⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plan.java

📁 有关webserive的interface的讲述 我觉得面向对象编程最重要的优势就是 在于接口和多态
💻 JAVA
字号:
package net.seproject.ws.travel;

import net.seproject.ws.flight.Flight;
import net.seproject.ws.hotel.HotelRoom;
import net.seproject.ws.restaurant.RestaTable;

/**
 * 出行方案
 * 
 * @author shufang
 *
 */
public class Plan {

	/**
	 * 方案号
	 * 
	 * <br/><br/>
	 * 唯一标识某个方案
	 */
	private String id;

	/**
	 * 本方案采用的航班、机票信息
	 */
	private Flight theFlight;

	/**
	 * 本方案采用的酒店、客房信息
	 */
	private HotelRoom theHotelRoom;

	/**
	 * 本方案采用的餐厅、餐位信息
	 */
	private RestaTable theRestaTable;

	/**
	 * 本方案采用的机票预订服务URL
	 */
	private String flightServiceUrl;

	/**
	 * 本方案采用的酒店预订服务URL
	 */
	private String hotelServiceUrl;

	/**
	 * 本方案采用的餐厅预订服务URL
	 */
	private String restaurantServiceUrl;

	//
	// 以下是自动生成的get/set方法对。。。
	//

	public Plan() {
		super();
	}

	public Plan(String id, Flight theFlight, HotelRoom theHotelRoom,
			RestaTable theRestaTable, String flightServiceUrl,
			String hotelServiceUrl, String restaurantServiceUrl) {
		super();
		this.id = id;
		this.theFlight = theFlight;
		this.theHotelRoom = theHotelRoom;
		this.theRestaTable = theRestaTable;
		this.flightServiceUrl = flightServiceUrl;
		this.hotelServiceUrl = hotelServiceUrl;
		this.restaurantServiceUrl = restaurantServiceUrl;
	}

	@Override
	public String toString() {
		return String.format(
				"[planId= %s]\n" +
				"[flightServiceUrl= %s]\n %s\n" +
				"[hotelServiceUrl = %s]\n %s\n" +
				"[restauServiceUrl= %s]\n %s\n",
				id,
				flightServiceUrl, theFlight.toString(),
				hotelServiceUrl, theHotelRoom.toString(),
				restaurantServiceUrl, theRestaTable.toString() );
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Flight getTheFlight() {
		return theFlight;
	}

	public void setTheFlight(Flight theFlight) {
		this.theFlight = theFlight;
	}

	public HotelRoom getTheHotelRoom() {
		return theHotelRoom;
	}

	public void setTheHotelRoom(HotelRoom theHotelRoom) {
		this.theHotelRoom = theHotelRoom;
	}

	public RestaTable getTheRestaTable() {
		return theRestaTable;
	}

	public void setTheRestaTable(RestaTable theRestaTable) {
		this.theRestaTable = theRestaTable;
	}

	public String getFlightServiceUrl() {
		return flightServiceUrl;
	}

	public void setFlightServiceUrl(String flightServiceUrl) {
		this.flightServiceUrl = flightServiceUrl;
	}

	public String getHotelServiceUrl() {
		return hotelServiceUrl;
	}

	public void setHotelServiceUrl(String hotelServiceUrl) {
		this.hotelServiceUrl = hotelServiceUrl;
	}

	public String getRestaurantServiceUrl() {
		return restaurantServiceUrl;
	}

	public void setRestaurantServiceUrl(String restaurantServiceUrl) {
		this.restaurantServiceUrl = restaurantServiceUrl;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -