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

📄 nodevo.java

📁 this is example use EJB with jboss.
💻 JAVA
字号:
/*
 * 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 : NodeVO <BR>
 * 
 * Package : jp.co.nttat.awgstar.server.vo <BR>
 *  
 * Description: Store information about node <BR>
 * 
 * @author : AI&T
 * @version : 1.0
 */
public class NodeVO implements Serializable {

	private static final long serialVersionUID = -1252668654054827733L;

	/** Define fields of database table */
	public static final String NODE_TBL   = "node_tbl";
	public static final String NODE_ID    = "node_id";
	public static final String NODE_NAME  = "node_name";
	public static final String NODE_ADDR  = "node_address";
	public static final String NODE_POS_X = "node_pos_x";
	public static final String NODE_POS_Y = "node_pos_y";
	public static final String NODE_POS_W = "node_pos_w";
	public static final String NODE_POS_H = "node_pos_h";

	/*ID of node contained in database*/
	private long nodeID    = -1;    
	/*Name of node*/
	private String nodeName    = ""; 
	/*Address of Node*/
	private String nodeAddress = ""; 
	/*Position according to X direction of node*/
	private int nodePosX  = 0;
	/*Position according to Y direction of node*/
	private int nodePosY  = 0;
	/*Width of node*/
	private int nodeWidth = 0;
	/*Height of node*/
	private int nodeHeigh = 0;
	/*List contains block object*/
	private Vector<BlockVO> listBlockVO = null;
	/*Parent of object*/
	NodeHelper parentObject = null;

	/**
	 * Construct default
	 */
	public NodeVO() {
		listBlockVO = new Vector<BlockVO>();
	}
	/**
	 * Get list block object contained in Vector object
	 * @return list block object
	 */
	public Vector<BlockVO> getListBlockVO() {
		return listBlockVO;
	}
	/**
	 * Get block object in list
	 * @param i
	 * 			block at index i in list
	 * @return   block object
	 */
	public BlockVO getBlockVO(int i) {

		if ((listBlockVO != null) && (!listBlockVO.isEmpty())) {
			return listBlockVO.get(i);
		}

		return null;
	}
	/**
	 * Get parent object of node
	 * @return NodeHelper object
	 */
	public NodeHelper getParentObject() {

		return parentObject;
	}
	/**
	 * Set parent object
	 * @param obj
	 * 			NodeHelper object
	 */
	public void setParentObject(NodeHelper obj) {
		parentObject = obj;

	}
	/**
	 * Set ID of node
	 * @param nodeID
	 * 				node's ID
	 */
	public void setID(long nodeID) {
		this.nodeID = nodeID;
	}
	/**
	 * Get ID of node
	 * @return parent ID
	 */
	public long getID() {
		return this.nodeID;
	}

	/**
	 * Set node name
	 * @param nodeName
	 *  			name of node
	 */
	public void setName(String nodeName) {
		this.nodeName = nodeName;
	}
	/**
	 * Get name of node
	 * @return String
	 */
	public String getName() {
		return this.nodeName;
	}
	/**
	 * Set address of node
	 * @param nodeAddress
	 * 				Node's address
	 */
	public void setAddress(String nodeAddress) {
		this.nodeAddress = nodeAddress;
	}
	/**
	 * Get node address
	 * @return node address
	 */
	public String getAddress() {
		return this.nodeAddress;
	}
	
	/**
	 * Set X position of node
	 * @param nodePosX
	 * 			position according to y direction
	 */
	public void setPosX(int nodePosX) {
		this.nodePosX = nodePosX;
	}

	/**
	 * Get position of package with X direction
	 * @return x position of package 
	 */
	public int getPosX() {
		return this.nodePosX;
	}

	/**
	 * Set Y position of node
	 * @param nodePosY
	 * 			position according to y direction
	 */
	public void setPosY(int nodePosY) {
		this.nodePosY = nodePosY;
	}

	/**
	 * Get position of package with Y direction
	 * @return y position of package 
	 */
	public int getPosY() {
		return this.nodePosY;
	}
	/**
	 * Set width for node
	 * @param nodeWidth
	 * 			width of node 
	 */
	public void setWidth(int nodeWidth) {
		this.nodeWidth = nodeWidth;
	}

	/**
	 * Get width of node
	 * @return width of node
	 */
	public int getWidth() {
		return this.nodeWidth;
	}

	/**
	 * Set height for node
	 * @param nodeHeigh
	 * 				height of node
	 */
	public void setHeigh(int nodeHeigh) {
		this.nodeHeigh = nodeHeigh;
	}
	
	/**
	 * Get height of node which drew on window screen
	 * @return int
	 */
	public int getHeigh() {
		return this.nodeHeigh;
	}
	
	/**
	 * Return info of NodeVO
	 * @return a String object contains info of NodeVO 
	 */
	public String toString() {
		StringBuffer buff = new StringBuffer();
		buff.append(" Node <");
		buff.append("name: " + getName() + ", ");
		buff.append("IP: " + getAddress() + ", " );
		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 + -