📄 packagevo.java.svn-base
字号:
/*
* Copyright(C) 2008, NTT AT Co., Ltd.
* Project: AWGStar
*
* Notes:
* N/A
*
* Record of change:
* Date Version Name Content
* 2008/12/15 1.0 TuanNA First create
*/
package jp.co.ntt.awgview.server.vo;
import java.io.Serializable;
import java.util.Vector;
/**
* Class name : PackageVO <BR>
*
* Package : jp.co.nttat.awgstar.server.vo <BR>
*
* Description: Store information about package of a function block <BR>
*
* @author : AI&T
* @version : 1.0
*/
public class PackageVO implements Serializable {
private static final long serialVersionUID = -2263111914692432842L;
/*
* Define fields of database table
*/
public static final String PACKAGE_TBL = "package_tbl";
public static final String PACKAGE_ID = "package_id";
public static final String PACKAGE_SLOT = "package_slot";
public static final String PACKAGE_POS_X = "package_pos_x";
public static final String PACKAGE_POS_Y = "package_pos_y";
public static final String PACKAGE_POS_W = "package_pos_w";
public static final String PACKAGE_POS_H = "package_pos_h";
//public static final String PACKAGE_ALARM_1 = "package_alarm1";
//public static final String PACKAGE_ALARM_2 = "package_alarm2";
/*ID of package contained in database*/
private long packageID = -1;
/*Slot appropriate for package*/
private int packageSlot = -1;
/*Name of package*/
private String packageName = "";
/*List Ports of package*/
private String portsOfPackage = "";
/*ID of package type*/
private long packageTypeID = -1;
/*Position according to X direction of package*/
private int positionX = 0;
/*Position according to Y direction of package*/
private int positionY = 0;
/*Width of package*/
private int width = 0;
/*Height of package*/
private int heigh = 0;
/*alarm value of package appropriate for diagram window view*/
private int packageAlarm1 = 0;
/*alarm value of package appropriate for package implement window view*/
private int packageAlarm2 = 0;
/*Block ID*/
private long blockID = -1;
/*List PortVO object*/
private Vector<PortVO> listPortVO = null;
/*Parent object of package*/
private BlockVO parentObject = null;
/**
* Empty constructor
*/
public PackageVO() {
listPortVO = new Vector<PortVO>();
}
/**
* Get list port object
* @return Vector<PortVO> object
*/
public Vector<PortVO> getListPortVO() {
if (listPortVO != null) {
return listPortVO;
}
return null;
}
/**
* Get one port object in list ports of package
* @param i
* Port at index i of list
* @return port object
*/
public PortVO getPortVO(int i) {
if ((listPortVO != null) && (!listPortVO.isEmpty())) {
return listPortVO.get(i);
}
return null;
}
/**
* Get parent object of package
* @return Block object
*/
public BlockVO getParentObject() {
return parentObject;
}
/**
* Set parent object of package
* @param obj
* Block object
*/
public void setParentObject(BlockVO obj) {
parentObject = obj;
}
/**
*Get parent ID
* @return parent ID of package
*/
public long getParentID() {
return blockID;
}
/**
* Set parent ID of package
* @param parentID
* parent ID
*/
public void setParentID(long parentID) {
blockID = parentID;
}
/**
* Set ID for package
* @param intPackageID
* ID of package
*/
public void setID(long intPackageID) {
this.packageID = intPackageID;
}
/**
* Get ID of package
* @return ID of package
*/
public long getID() {
return this.packageID;
}
/**
* Set package type ID
* @param intPackageType
* package type ID
*/
public void setPackageTypeID(long intPackageType) {
this.packageTypeID = intPackageType;
}
/**
* Get package type ID
* @return package type ID
*/
public long getPackageTypeID() {
return this.packageTypeID;
}
/**
* Set number slot of package
* @param intPackageSlot
* Slot number of package
*/
public void setPackageSlot(int intPackageSlot) {
this.packageSlot = intPackageSlot;
}
/**
* Get number of package slot
* @return number of package slot
*/
public int getPackageSlot() {
return this.packageSlot;
}
/**
* Set name of package
* @param strPackageName
* name of package
*/
public void setName(String strPackageName) {
this.packageName = strPackageName;
}
/**
* Get name of package
* @return name of package
*/
public String getName() {
return this.packageName;
}
/**
* Set list port name
* @param strListPorts
* String contains list port name
*/
public void setListPorts(String strListPorts) {
this.portsOfPackage = strListPorts;
}
/**
* Get list of port name
* @return list of port name
*/
public String getListPorts() {
return this.portsOfPackage;
}
/**
* Set X position of package
* @param positionX
* position according to x direction
*/
public void setPosX(int positionX) {
this.positionX = positionX;
}
/**
* Get position of package with X direction
* @return x position of package
*/
public int getPosX() {
return this.positionX;
}
/**
* Set Y position of package
* @param positionY
* position according to y direction
*/
public void setPosY(int positionY) {
this.positionY = positionY;
}
/**
* Get position of package with Y direction
* @return y position of package
*/
public int getPosY() {
return this.positionY;
}
/**
* Set width of package
* @param intWidth
* width of package
*/
public void setWidth(int intWidth) {
this.width = intWidth;
}
/**
* Get width of package
* @return width of package
*/
public int getWidth() {
return this.width;
}
/**
* Set height of package
* @param intHeigh
* height of package
*/
public void setHeigh(int intHeigh) {
this.heigh = intHeigh;
}
/**
* Get height of package
* @return height of package
*/
public int getHeigh() {
return this.heigh;
}
/**
* Set alarm value for diagram window view
* @param alarm
* alarm value
*/
public void setAlarm1(int alarm) {
this.packageAlarm1 = alarm;
}
/**
* Get alarm value corresponding to window view of diagram
* @return alarm value
*/
public int getAlarm1() {
return this.packageAlarm1;
}
/**
* Set alarm value for package implement window view
* @param alarm
* alarm value
*/
public void setAlarm2(int alarm) {
this.packageAlarm2 = alarm;
}
/**
* Get alarm value corresponding to window view of package implement
* @return alarm value
*/
public int getAlarm2() {
return this.packageAlarm2;
}
/**
* Return info of PackageVO
* @return a String object contains info of PackageVO
*/
public String toString() {
StringBuffer buff = new StringBuffer();
buff.append(" Package <");
buff.append( "name: " + getName() + ", " );
buff.append( "Slot: " + getPackageSlot() + ", " );
buff.append( "Alarm1: " + getAlarm1() + ", " );
buff.append( "Alarm2: " + getAlarm2() + ", " );
buff.append( "x: " + getPosX() + ", " );
buff.append( "y: " + getPosY() + ", " );
buff.append( "w: " + getWidth() + ", " );
buff.append( "h: " + getHeigh());
buff.append( ">");
return buff.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -