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

📄 blockvo.java.svn-base

📁 this is example use EJB with jboss.
💻 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 : BlockVO <BR>
 * 
 * Package	  : jp.co.ntt.awgview.server.vo <BR>
 * 
 * Description: Store information about function block of a node<BR>
 * 
 * @author : AI&T
 * @version : 1.0
 */
public class BlockVO implements Serializable {

	private static final long serialVersionUID = 7526471155622776147L;

	/** Define fields of database table */
	public static final String BLOCK_TBL = "block_tbl";
	public static final String BLOCK_ID = "block_id";
	public static final String BLOCK_NAME = "block_name";
	public static final String BLOCK_IP = "block_ip";
	public static final String BLOCK_TYPE = "block_type";
	//public static final String BLOCK_ALARM = "block_alarm";
	public static final String BLOCK_POS_X = "block_pos_x";
	public static final String BLOCK_POS_Y = "block_pos_y";
	public static final String BLOCK_POS_W = "block_pos_w";
	public static final String BLOCK_POS_H = "block_pos_h";

	/*ID of Block contained in database*/
	private long blockID = -1;
	/*Name of function block*/
	private String blockName = "";
	/*IP address of function block*/
	private String blockIP = "";
	/*Type of function block*/
	private int blockType = -1;
	/*Alarm value of Block*/
	private int blockAlarm = 0;
	/** Block position X*/
	private int blockPosX  = 0;
	/** Block position Y*/
	private int blockPosY  = 0;
	/** Block position width*/
	private int blockWidth = 0;
	/** Block position heigh*/
	private int blockHeigh = 0;
	/** Node id*/
	private long nodeID = -1;
	/** PackageVO list*/
	private Vector<PackageVO> listPackageVO = null;
	/** Node parent*/
	private NodeVO parentObject = null;

	/**
	 * Empty constructor
	 */
	public BlockVO() {
		listPackageVO = new Vector<PackageVO>();
	}
	
	/**
	 * Returns the PackageVO List
	 * @return Vector<PackageVO> object
	 */
	public Vector<PackageVO> getListPackageVO() {
		return listPackageVO;
	}
	
	/**
	 * Return the PackageVO with a specified condition
	 * 
	 * @param i
	 * 				object at index i in list
	 * @return PackageVO object
	 */
	public PackageVO getPackageVO(int i) {
		if ((listPackageVO != null) && (!listPackageVO.isEmpty())) {
			return listPackageVO.get(i);
		}
		return null;
	}
	
	/**
	 * Returns the Parent Object
	 * @return NodeVO object
	 */
	public NodeVO getParentObject() {

		return parentObject;
	}
	
	/**
	 * Sets the Parent Object with a specified condition
	 * @param obj
	 * 			NodeVO object
	 */
	public void setParentObject(NodeVO obj) {
		parentObject = obj;

	}
	
	/**
	 * Return Parent ID
	 * @return Parent ID
	 */
	public long getParentID() {

		return nodeID;
	}
	
	/**
	 * Sets the Parent ID
	 * @param parentID
	 * 			Parent ID of block
	 */
	public void setParentID(long parentID) {
		nodeID = parentID;

	}
	
	/**
	 * Sets the Block ID
	 * @param intBlockID
	 * 				ID of block
	 */
	public void setID(long intBlockID) {
		this.blockID = intBlockID;

	}
	
	/**
	 * Return Block ID
	 * @return  Block ID
	 */
	public long getID() {
		return this.blockID;
	}
	
	/**
	 * Sets the Block IP Address
	 * @param strBlockIPAddress
	 * 					IP address of block
	 */
	public void setIP(String strBlockIPAddress) {
		this.blockIP = strBlockIPAddress;
	}
	
	/**
	 * Return the block IP Address
	 * @return  block IP
	 */
	public String getIP() {
		return this.blockIP;
	}
	
	/**
	 * Sets the block name
	 * @param strBlockName
	 * 			Name of block
	 */
	public void setName(String strBlockName) {
		this.blockName = strBlockName;
	}
	
	/***
	 * Returns the Block name
	 * @return Block name
	 */
	public String getName() {
		return this.blockName;
	}
	
	/**
	 * Set the Block type
	 * @param blockType
	 * 				Type of block
	 */
	public void setType(int blockType) {
		this.blockType = blockType;
	}
	
	/**
	 * Returns the Block type
	 * @return Type of block
	 * 				
	 */
	public int getType() {
		return this.blockType;
	}
	
	/**
	 * Sets the Block Alarm
	 * @param blockAlarm
	 * 				 alarm value of block
	 */
	public void setAlarm(int blockAlarm) {
		this.blockAlarm = blockAlarm;
	}
	
	/**
	 * Returns the Block Alarm
	 * @return blockAlarm
	 * 				c
	 */
	public int getAlarm() {
		return this.blockAlarm;
	}
	
	/**
	 * Sets the position x of Block
	 * @param intPositionX
	 * 				 position x of Block
	 */
	public void setPosX(int intPositionX) {
		this.blockPosX = intPositionX;
	}
	
	/**
	 * Returns the Position x of Block
	 * @return Position x of Block
	 */
	public int getPosX() {
		return this.blockPosX;
	}
	
	/**
	 * Sets the position y of Block
	 * @param intPositionY
	 * 				position y of Block
	 */
	public void setPosY(int intPositionY) {
		this.blockPosY = intPositionY;
	}
	
	/**
	 * Returns the Position Y of Block
	 * @return Position Y of Block
	 */
	public int getPosY() {
		return this.blockPosY;
	}
	
	/**
	 * Sets the width of Block
	 * @param intWidth
	 * 			width of block
	 */
	public void setWidth(int intWidth) {
		this.blockWidth = intWidth;
	}
	
	/**
	 * Returns the Block width
	 * @return Block width
	 */
	public int getWidth() {
		return this.blockWidth;
	}
	
	/**
	 * Sets the Block height
	 * @param intHeigh
	 * 				height of block
	 */
	public void setHeigh(int intHeigh) {
		this.blockHeigh = intHeigh;
	}
	
	/**
	 * Returns the Block height
	 * @return Block height
	 */
	public int getHeigh() {
		return this.blockHeigh;
	}
	
	/**
	 * Return info of BlockVO
	 * @return a String object contains info of BlockVO 
	 */
	public String toString() {
		StringBuffer buff = new StringBuffer();
		buff.append(" Block <");
		buff.append("name: " + getName() + ", ");
		buff.append("Type: " + getType() + ", ");
		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 + -