《精通SOA:基于服务总线的Struts+EJB+Web Service整合应用开发》原书的实例代码
源代码在线查看: sequencenumbean.java
package com.sample.cmp.sequencenum;
import javax.ejb.EntityBean;
/**
*
* You can insert your documentation for 'SequenceNumBean'. *
SequenceNum
SequenceNum
com.sample.cmp.sequencenum.SequenceNumBean
Container
java.lang.Integer
2.x
sequence_num
indexNum
indexNum
java.lang.Integer
index_num
VARCHAR
INTEGER
false
true
maxUserID
java.lang.Integer
max_userid
VARCHAR
INTEGER
false
false
maxAccountID
java.lang.Integer
max_accountid
VARCHAR
INTEGER
false
false
sequence_num
jdbc\bkstore
*
*
* @ejb.bean name="SequenceNum"
* jndi-name="SequenceNum"
* type="CMP"
* primkey-field="indexNum"
* schema="sequence_num"
* cmp-version="2.x"
* data-source-name="jdbc\bkstore"
*
* @ejb.persistence
* table-name="sequence_num"
*
* @ejb.finder
* query="SELECT OBJECT(a) FROM sequence_num as a"
* signature="java.util.Collection findAll()"
*
* @ejb.pk class="java.lang.Integer"
*
* @generated
**/
public abstract class SequenceNumBean implements javax.ejb.EntityBean {
/**
*
*
* The ejbCreate method.
*
*
*
* @ejb.create-method
*
* @generated
*/
public java.lang.Integer ejbCreate() throws javax.ejb.CreateException {
// EJB 2.0 spec says return null for CMP ejbCreate methods.
// TODO: YOU MUST INITIALIZE THE FIELDS FOR THE BEAN HERE.
// setMyField("Something");
// begin-user-code
return null;
// end-user-code
}
/**
*
* The container invokes this method immediately after it calls ejbCreate.
*
*
* @generated
*/
public void ejbPostCreate() throws javax.ejb.CreateException {
// begin-user-code
// end-user-code
}
/**
*
*
*
* CMP Field indexNum
*
* Returns the indexNum
* @return the indexNum
*
*
*
*
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="index_num"
* jdbc-type="VARCHAR"
* sql-type="INTEGER"
* read-only="false"
* @ejb.pk-field
*
* @ejb.interface-method
*
*
* @generated
*/
public abstract java.lang.Integer getIndexNum();
/**
*
* Sets the indexNum
*
* @param java.lang.Integer the new indexNum value
*
*
*
* @ejb.interface-method
*
* @generated
*/
public abstract void setIndexNum(java.lang.Integer indexNum);
/**
*
*
*
* CMP Field maxUserID
*
* Returns the maxUserID
* @return the maxUserID
*
*
*
*
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="max_userid"
* jdbc-type="VARCHAR"
* sql-type="INTEGER"
* read-only="false"
*
*
* @ejb.interface-method
*
*
* @generated
*/
public abstract java.lang.Integer getMaxUserID();
/**
*
* Sets the maxUserID
*
* @param java.lang.Integer the new maxUserID value
*
*
*
* @ejb.interface-method
*
* @generated
*/
public abstract void setMaxUserID(java.lang.Integer maxUserID);
/**
*
*
*
* CMP Field maxAccountID
*
* Returns the maxAccountID
* @return the maxAccountID
*
*
*
*
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="max_accountid"
* jdbc-type="VARCHAR"
* sql-type="INTEGER"
* read-only="false"
*
*
* @ejb.interface-method
*
*
* @generated
*/
public abstract java.lang.Integer getMaxAccountID();
/**
*
* Sets the maxAccountID
*
* @param java.lang.Integer the new maxAccountID value
*
*
*
* @ejb.interface-method
*
* @generated
*/
public abstract void setMaxAccountID(java.lang.Integer maxAccountID);
}