[Join-cvs] join/src/main/org/figure8/join/businessobjects/resource/ejb GatewayBean.java,NONE,1.1
Brought to you by:
lbroudoux
|
From: <lbr...@us...> - 2003-07-28 09:36:41
|
Update of /cvsroot/join/join/src/main/org/figure8/join/businessobjects/resource/ejb
In directory sc8-pr-cvs1:/tmp/cvs-serv3801
Added Files:
GatewayBean.java
Log Message:
Initial checkin
--- NEW FILE: GatewayBean.java ---
/*
* GatewayBean.java
*
* Created on 26 august 2002, 16:22
*/
package org.figure8.join.businessobjects.resource.ejb;
import org.figure8.join.businessobjects.resource.interfaces.GatewayData;
import org.figure8.join.businessobjects.resource.interfaces.MachineLocal;
import java.util.Set;
/**
* This object is a representation of a logical Gateway (or portal).
* A gateway represents a unique access points to Information Systems available
* from software project to join. A gateway will be typically used for a portal
* type project. A gateway is hosted on a machine.
* @author <a href="mailto:lau...@fr...">Laurent Broudoux</a>
*
* @ejb.bean name="Gateway"
type="CMP" cmp-version="2.x" view-type="local"
jndi-name="${objects.res.gateway.jndi-name}"
local-jndi-name="${objects.res.gateway.jndi-name}Local"
primkey-field="id"
* @ejb.home local-class="org.figure8.join.businessobjects.resource.interfaces.GatewayLocalHome"
* @ejb.interface local-class="org.figure8.join.businessobjects.resource.interfaces.GatewayLocal"
* @ejb.data-object package="org.figure8.join.businessobjects.resource.interfaces"
*
* @ejb.finder signature="Collection findAll()"
unchecked="true" transaction-type="NotSupported"
query="SELECT DISTINCT OBJECT(g) FROM Gateway AS g"
*
* @ejb.pk class="java.lang.Integer" generate="false" unchecked="true"
* @ejb.persistence table-name="${objects.res.gateway.table-name}"
*
* @jboss.tuned-updates "true"
* @jboss.read-ahead strategy="on-find"
*
* @jboss.query signature="Collection findAll()"
query="SELECT DISTINCT OBJECT(g) FROM Gateway AS g ORDER BY g.label ASC"
*/
public abstract class GatewayBean implements javax.ejb.EntityBean{
// Public -------------------------------------------------------------------
/**
* Gateway id
* @ejb.pk-field
* @ejb.persistence column-name="n_id"
*/
public abstract Integer getId();
/** Gateway id */
public abstract void setId(Integer id);
/**
* Gateway label
* @ejb.interface-method
* @ejb.persistence column-name="s_label"
*/
public abstract String getLabel();
/**
* Gateway label
* @ejb.interface-method
*/
public abstract void setLabel(String label);
/**
* Gateway logs directory path
* @ejb.interface-method
* @ejb.persistence column-name="s_logdirpath"
*/
public abstract String getLogDirPath();
/**
* Gateway logs directory path
* @ejb.interface-method
*/
public abstract void setLogDirPath(String logPath);
/**
* Gateway current log file path
* @ejb.interface-method
* @ejb.persistence column-name="s_logfilepath"
*/
public abstract String getLogFilePath();
/**
* Gateway current log file path
* @ejb.interface-method
*/
public abstract void setLogFilePath(String logPath);
/**
* Machine of this Gateway
* @ejb.interface-method view-type="local"
* @ejb.relation name="Machine-OneToMany-Gateways-Bi"
* role-name="Gateway-belongsto-Machine"
* cascade-delete="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_machine_fk"
*/
public abstract MachineLocal getMachine();
/**
* Machine of this Gateway
* @ejb.interface-method view-type="local"
*/
public abstract void setMachine(MachineLocal machine);
/**
* Gateway bound Information Systems
* @ejb.interface-method view-type="local"
* @ejb.relation name="Gateway-OneToMany-BoundISs-Bi"
* role-name="Gateway-has-BoundResources"
* @return Set of <code>org.figure8.join.businessobjects.resource.interfaces.BoundISLocal</code>
*/
public abstract Set getBoundISs();
/**
* Gateway bound Information Systems
* @ejb.interface-method view-type="local"
*/
public abstract void setBoundISs(Set boundISs);
/**
* Generated bulk accessor
* @ejb.interface-method
*/
public abstract GatewayData getData();
/** Generated bulk accessor */
public abstract void setData(GatewayData data);
// Implementation of EntityBean ---------------------------------------------
/**
* Create a new Gateway
* @ejb.create-method
*/
public Integer ejbCreate(GatewayData data, MachineLocal machine) throws javax.ejb.CreateException{
if (data.getId() != null){
setId(data.getId());
setData(data);
}
else throw new javax.ejb.CreateException("Identifier (id) for Gateway must be non null.");
return null;
}
/** Create a new Gateway */
public void ejbPostCreate(GatewayData data, MachineLocal machine) throws javax.ejb.CreateException{
setMachine(machine);
}
/**
* Remove this Gateway
* @ejb.transaction type="Mandatory"
*/
public void ejbRemove() throws javax.ejb.RemoveException, javax.ejb.EJBException {}
}
|