// Path: acmeair-common/src/main/java/com/acmeair/entities/Flight.java
// public interface Flight{
// 
// 	
// 	String getFlightId();
// 	
// 	void setFlightId(String id);
// 	
// 	String getFlightSegmentId();
// 	
// 	FlightSegment getFlightSegment();
// 
// 	void setFlightSegment(FlightSegment flightSegment);
// 		
// 	Date getScheduledDepartureTime();
// 
// 	Date getScheduledArrivalTime();
// 
// 	BigDecimal getFirstClassBaseCost();
// 
// 
// 	BigDecimal getEconomyClassBaseCost();
// 
// 
// 	int getNumFirstClassSeats();
// 
// 
// 	int getNumEconomyClassSeats();
// 
// 
// 	String getAirplaneTypeId();
// 
// }
// 
// Path: acmeair-common/src/main/java/com/acmeair/entities/FlightSegment.java
// public interface FlightSegment {
// 	
// 	String getFlightName();
// 
// 	String getOriginPort();
// 
// 	String getDestPort();
// 
// 	int getMiles();
// 		
// }


import com.acmeair.entities.Flight;
import com.acmeair.entities.FlightSegment;
import org.springframework.data.mongodb.core.mapping.Document;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/*******************************************************************************
* Copyright (c) 2013-2015 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.acmeair.morphia.entities;



@Document(collection = "flight")
@Entity(name = "flight")
public class FlightImpl implements Flight, Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "id")
	private String _id;

	private String flightSegmentId;
		
	private Date scheduledDepartureTime;
	private Date scheduledArrivalTime;
	private BigDecimal firstClassBaseCost;
	private BigDecimal economyClassBaseCost;
	private int numFirstClassSeats;
	private int numEconomyClassSeats;
	private String airplaneTypeId;

	@ManyToOne(targetEntity = FlightSegmentImpl.class, cascade = CascadeType.ALL)
	@JoinColumn(name = "fk_flight_segment_id")
// Path: acmeair-common/src/main/java/com/acmeair/entities/Flight.java
// public interface Flight{
// 
// 	
// 	String getFlightId();
// 	
// 	void setFlightId(String id);
// 	
// 	String getFlightSegmentId();
// 	
// 	FlightSegment getFlightSegment();
// 
// 	void setFlightSegment(FlightSegment flightSegment);
// 		
// 	Date getScheduledDepartureTime();
// 
// 	Date getScheduledArrivalTime();
// 
// 	BigDecimal getFirstClassBaseCost();
// 
// 
// 	BigDecimal getEconomyClassBaseCost();
// 
// 
// 	int getNumFirstClassSeats();
// 
// 
// 	int getNumEconomyClassSeats();
// 
// 
// 	String getAirplaneTypeId();
// 
// }
// 
// Path: acmeair-common/src/main/java/com/acmeair/entities/FlightSegment.java
// public interface FlightSegment {
// 	
// 	String getFlightName();
// 
// 	String getOriginPort();
// 
// 	String getDestPort();
// 
// 	int getMiles();
// 		
// }


// Path: acmeair-services-morphia/src/main/java/com/acmeair/morphia/entities/FlightImpl.java
import com.acmeair.entities.Flight;
import com.acmeair.entities.FlightSegment;
import org.springframework.data.mongodb.core.mapping.Document;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/*******************************************************************************
* Copyright (c) 2013-2015 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.acmeair.morphia.entities;



@Document(collection = "flight")
@Entity(name = "flight")
public class FlightImpl implements Flight, Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "id")
	private String _id;

	private String flightSegmentId;
		
	private Date scheduledDepartureTime;
	private Date scheduledArrivalTime;
	private BigDecimal firstClassBaseCost;
	private BigDecimal economyClassBaseCost;
	private int numFirstClassSeats;
	private int numEconomyClassSeats;
	private String airplaneTypeId;

	@ManyToOne(targetEntity = FlightSegmentImpl.class, cascade = CascadeType.ALL)
	@JoinColumn(name = "fk_flight_segment_id")
	private FlightSegment flightSegment;