[Join-cvs] join/src/main/org/figure8/join/businessobjects/resource/ejb BoundGatewayBean.java,NONE,1.
Brought to you by:
lbroudoux
Update of /cvsroot/join/join/src/main/org/figure8/join/businessobjects/resource/ejb
In directory sc8-pr-cvs1:/tmp/cvs-serv3839
Added Files:
BoundGatewayBean.java BoundISBean.java BoundResourceBean.java
BoundServiceBean.java
Log Message:
Initial checkin
--- NEW FILE: BoundGatewayBean.java ---
/*
* BoundGatewayBean.java
*
* Created on 3 september 2002, 18:52
*/
package org.figure8.join.businessobjects.resource.ejb;
import org.figure8.join.businessobjects.resource.util.BoundGatewayUtil;
import org.figure8.join.businessobjects.resource.interfaces.GatewayLocal;
import org.figure8.join.businessobjects.resource.interfaces.BoundGatewayData;
import org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal;
import java.sql.Date;
/**
* This object is a representation of a gateway bound to an environment.
* It is indeed the link between a physical environment and a specific gateway.
* This link can be active (<b>enddate</b> == null) or broken (<b>enddate</b> != null)
* in order to keep history.
* @author <a href="mailto:lau...@fr...">Laurent Broudoux</a>
*
* @ejb.bean name="BoundGateway"
type="CMP" cmp-version="2.x" view-type="local"
jndi-name="${objects.res.boundGateway.jndi-name}"
local-jndi-name="${objects.res.boundGateway.jndi-name}Local"
primkey-field="id"
* @ejb.home local-class="org.figure8.join.businessobjects.resource.interfaces.BoundGatewayLocalHome"
* @ejb.interface local-class="org.figure8.join.businessobjects.resource.interfaces.BoundGatewayLocal"
* @ejb.data-object package="org.figure8.join.businessobjects.resource.interfaces"
*
* @ejb.finder signature="Collection findActivesForPhysical(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bg) FROM BoundGateway AS bg WHERE bg.physicalEnv=?1 AND bg.endDate IS NULL"
*
* @ejb.pk class="java.lang.String" generate="false" unchecked="true"
* @ejb.persistence table-name="${objects.res.boundGateway.table-name}"
*
* @jboss.tuned-updates "true"
* @jboss.read-ahead strategy="on-find"
*/
public abstract class BoundGatewayBean implements javax.ejb.EntityBean{
// Public -------------------------------------------------------------------
/**
* Bound Gateway id
* @ejb.pk-field
* @ejb.persistence column-name="s_id"
*/
public abstract String getId();
/** Bound Gateway id */
public abstract void setId(String id);
/**
* Bound Gateway creation date
* @ejb.interface-method
* @ejb.persistence column-name="d_creation"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getCreationDate();
/**
* Bound Gateway creation date
* @ejb.interface-method
*/
public abstract void setCreationDate(java.sql.Date creationDate);
/**
* Bound Gateway end date
* @ejb.interface-method
* @ejb.persistence column-name="d_end"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getEndDate();
/**
* Bound Gateway end date
* @ejb.interface-method
*/
public abstract void setEndDate(java.sql.Date endDate);
/**
* Gateway to which this object links
* @ejb.interface-method view-type="local"
* @ejb.relation name="Gateway-OneToMany-BoundGateways-Uni"
* role-name="BoundGateway-belongsto-Gateway"
* target-role-name="Gateway-has-BoundGateways"
* target-ejb="Gateway"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="n_gateway_fk"
*/
public abstract GatewayLocal getGateway();
/**
* Gateway to which this object links
* @ejb.interface-method view-type="local"
*/
public abstract void setGateway(GatewayLocal gateway);
/**
* Physical environment to which the gateway is bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="PhysicalEnv-OneToMany-BoundGateways-Bi"
* role-name="BoundGateway-has-PhysicalEnv"
* cascade-delete="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="n_physicalenv_fk"
*/
public abstract PhysicalEnvLocal getPhysicalEnv();
/**
* Physical environment to which the gateway is bound
* @ejb.interface-method view-type="local"
*/
public abstract void setPhysicalEnv(PhysicalEnvLocal environment);
/**
* Generated bulk accessor
* @ejb.interface-method
*/
public abstract BoundGatewayData getData();
/** Generated bulk accessor */
public abstract void setData(BoundGatewayData data);
/**
* Make this binding between physical environment and gateway end.
* @ejb.interface-method
*/
public void close(){
setEndDate(new java.sql.Date(System.currentTimeMillis()));
}
// Implementation of EntityBean ---------------------------------------------
/**
* Create a new Bound Gateway
* @ejb.create-method
*/
public String ejbCreate(BoundGatewayData data, GatewayLocal gateway, PhysicalEnvLocal env) throws javax.ejb.CreateException{
if (data != null){
setId(BoundGatewayUtil.generateGUID(this));
setData(data);
}
else throw new javax.ejb.CreateException("Data object for BoundGateway must be non null.");
return null;
}
/** Create a new Bound Gateway */
public void ejbPostCreate(BoundGatewayData data, GatewayLocal gateway, PhysicalEnvLocal env) throws javax.ejb.CreateException{
setGateway(gateway);
setPhysicalEnv(env);
}
/**
* Remove this Bound Resource
* @ejb.transaction type="Mandatory"
*/
public void ejbRemove() throws javax.ejb.RemoveException, javax.ejb.EJBException {}
}
--- NEW FILE: BoundISBean.java ---
/*
* BoundISBean.java
*
* Created on 9 october 2003, 18:55
*/
package org.figure8.join.businessobjects.resource.ejb;
import org.figure8.join.businessobjects.resource.util.BoundISUtil;
import org.figure8.join.businessobjects.resource.interfaces.ISTypeLocal;
import org.figure8.join.businessobjects.resource.interfaces.ISystemLocal;
import org.figure8.join.businessobjects.resource.interfaces.GatewayLocal;
import org.figure8.join.businessobjects.resource.interfaces.BoundISData;
import java.sql.Date;
/**
* This object is a representation of an Information SYstem bound to a gateway.
* It is indeed the link between a gateway and a specific Information System. This
* link can be active (<b>enddate</b> == null) or broken (<b>enddate</b> != null)
* in order to keep history.
* @author <a href="mailto:lau...@fr...">Laurent Broudoux</a>
*
* @ejb.bean name="BoundIS"
type="CMP" cmp-version="2.x" view-type="local"
jndi-name="${objects.res.boundIS.jndi-name}"
local-jndi-name="${objects.res.boundIS.jndi-name}Local"
primkey-field="id"
* @ejb.home local-class="org.figure8.join.businessobjects.resource.interfaces.BoundISLocalHome"
* @ejb.interface local-class="org.figure8.join.businessobjects.resource.interfaces.BoundISLocal"
* @ejb.data-object package="org.figure8.join.businessobjects.resource.interfaces"
*
* @ejb.finder signature="Collection findActivesForGateway(org.figure8.join.businessobjects.resource.interfaces.GatewayLocal gat)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bi) FROM BoundIS AS bi WHERE bi.gateway=?1 AND bi.endDate IS NULL"
* @ejb.finder signature="Collection findActivesForGatewayAndDate(org.figure8.join.businessobjects.resource.interfaces.GatewayLocal gat,
java.util.Date date)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bi) FROM BoundIS AS bi WHERE bi.gateway=?1 AND (bi.creationDate<?2 OR bi.creationDate=?2) AND (bi.endDate>?2 OR bi.endDate=?2)"
* @ejb.finder signature="Collection findActivesForGatewayAndType(org.figure8.join.businessobjects.resource.interfaces.GatewayLocal gat,
org.figure8.join.businessobjects.resource.interfaces.ISTypeLocal type)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bi) FROM BoundIS AS bi WHERE bi.gateway=?1 AND bi.iSType=?2 AND bi.endDate IS NULL"
*
* @ejb.pk class="java.lang.String" generate="false" unchecked="true"
* @ejb.persistence table-name="${objects.res.boundIS.table-name}"
*
* @jboss.tuned-updates "true"
* @jboss.read-ahead strategy="on-find"
*/
public abstract class BoundISBean implements javax.ejb.EntityBean{
// Public -------------------------------------------------------------------
/**
* Bound Information System id
* @ejb.pk-field
* @ejb.persistence column-name="s_id"
*/
public abstract String getId();
/** Bound Information System id */
public abstract void setId(String id);
/**
* Bound Information System creation date
* @ejb.interface-method
* @ejb.persistence column-name="d_creation"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getCreationDate();
/**
* Bound Information System creation date
* @ejb.interface-method
*/
public abstract void setCreationDate(java.sql.Date creationDate);
/**
* Bound Information System end date
* @ejb.interface-method
* @ejb.persistence column-name="d_end"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getEndDate();
/**
* Bound Information System end date
* @ejb.interface-method
*/
public abstract void setEndDate(java.sql.Date endDate);
/**
* Information System bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="IS-OneToMany-BoundISs-Uni"
* role-name="BoundIS-belongsto-IS"
* target-role-name="IS-has-BoundISs"
* target-ejb="ISystem"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_is_fk"
*/
public abstract ISystemLocal getIS();
/**
* Information System bound
* @ejb.interface-method view-type="local"
*/
public abstract void setIS(ISystemLocal is);
/**
* Type of this Bound Information System
* @ejb.interface-method view-type="local"
* @ejb.relation name="ISType-OneToMany-BoundISs-Uni"
* role-name="BoundIS-belongsto-ISType"
* target-role-name="ISType-has-BoundISs"
* target-ejb="ISType"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_istype_fk"
*/
public abstract ISTypeLocal getISType();
/**
* Type of this Bound Information System
* @ejb.interface-method view-type="local"
*/
public abstract void setISType(ISTypeLocal type);
/**
* Gateway to which the Information System is bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="Gateway-OneToMany-BoundISs-Bi"
* role-name="BoundIS-belongsto-Gateway"
* target-multiple="yes"
* cascade-delete="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="n_gateway_fk"
*/
public abstract GatewayLocal getGateway();
/**
* Gateway to which the Information System is bound
* @ejb.interface-method view-type="local"
*/
public abstract void setGateway(GatewayLocal gateway);
/**
* Generated bulk accessor
* @ejb.interface-method
*/
public abstract BoundISData getData();
/** Generated bulk accessor */
public abstract void setData(BoundISData data);
/**
* Make this binding between gateway and IS end.
* @ejb.interface-method
*/
public void close(){
setEndDate(new java.sql.Date(System.currentTimeMillis()));
}
// Implementation of EntityBean ---------------------------------------------
/**
* Create a new Bound Information System
* @ejb.create-method
*/
public String ejbCreate(BoundISData data, ISystemLocal is, ISTypeLocal type, GatewayLocal gateway) throws javax.ejb.CreateException{
if (data != null){
setId(BoundISUtil.generateGUID(this));
setData(data);
}
else throw new javax.ejb.CreateException("Data object for BoundIS must be non null.");
return null;
}
/** Create a new Bound Information System */
public void ejbPostCreate(BoundISData data, ISystemLocal is, ISTypeLocal type, GatewayLocal gateway) throws javax.ejb.CreateException{
setIS(is);
setISType(type);
setGateway(gateway);
}
/**
* Remove this Bound Information System
* @ejb.transaction type="Mandatory"
*/
public void ejbRemove() throws javax.ejb.RemoveException, javax.ejb.EJBException {}
}
--- NEW FILE: BoundResourceBean.java ---
/*
* BoundResourceBean.java
*
* Created on 28 august 2002, 14:14
*/
package org.figure8.join.businessobjects.resource.ejb;
import org.figure8.join.businessobjects.resource.util.BoundResourceUtil;
import org.figure8.join.businessobjects.resource.interfaces.ResourceLocal;
import org.figure8.join.businessobjects.resource.interfaces.ResourceTypeLocal;
import org.figure8.join.businessobjects.resource.interfaces.BoundResourceData;
import org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal;
import java.sql.Date;
/**
* This object is a representation of a resource bound to an environment.
* It is indeed the link between a physical environment and a specific resource.
* This link can be active (<b>enddate</b> == null) or broken
* (<b>enddate</b> != null) in order to keep history.
* @author <a href="mailto:lau...@fr...">Laurent Broudoux</a>
*
* @ejb.bean name="BoundResource"
type="CMP" cmp-version="2.x" view-type="local"
jndi-name="${objects.res.boundResource.jndi-name}"
local-jndi-name="${objects.res.boundResource.jndi-name}Local"
primkey-field="id"
* @ejb.home local-class="org.figure8.join.businessobjects.resource.interfaces.BoundResourceLocalHome"
* @ejb.interface local-class="org.figure8.join.businessobjects.resource.interfaces.BoundResourceLocal"
* @ejb.data-object package="org.figure8.join.businessobjects.resource.interfaces"
*
* @ejb.finder signature="Collection findActivesForPhysical(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(br) FROM BoundResource AS br WHERE br.physicalEnv=?1 AND br.endDate IS NULL"
* @ejb.finder signature="Collection findActivesForPhysicalAndDate(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env,
java.util.Date date)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(br) FROM BoundResource AS br WHERE br.physicalEnv=?1 AND (br.creationDate<?2 OR br.creationDate=?2) AND (br.endDate>?2 OR br.endDate=?2)"
* @ejb.finder signature="Collection findActivesForPhysicalAndType(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env,
org.figure8.join.businessobjects.resource.interfaces.ResourceTypeLocal type)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(br) FROM BoundResource AS br WHERE br.physicalEnv=?1 AND br.resourceType=?2 AND br.endDate IS NULL"
*
* @ejb.pk class="java.lang.String" generate="false" unchecked="true"
* @ejb.persistence table-name="${objects.res.boundResource.table-name}"
*
* @jboss.tuned-updates "true"
* @jboss.read-ahead strategy="on-find"
*/
public abstract class BoundResourceBean implements javax.ejb.EntityBean{
// Public -------------------------------------------------------------------
/**
* Bound Resource id
* @ejb.pk-field
* @ejb.persistence column-name="s_id"
*/
public abstract String getId();
/** Bound Resource id */
public abstract void setId(String id);
/**
* Bound Resource creation date
* @ejb.interface-method
* @ejb.persistence column-name="d_creation"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getCreationDate();
/**
* Bound Resource date
* @ejb.interface-method
*/
public abstract void setCreationDate(java.sql.Date creationDate);
/**
* Bound Resource end date
* @ejb.interface-method
* @ejb.persistence column-name="d_end"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getEndDate();
/**
* Bound Resource end date
* @ejb.interface-method
*/
public abstract void setEndDate(java.sql.Date endDate);
/**
* Resource bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="Resource-OneToMany-BoundResources-Uni"
* role-name="BoundResource-belongsto-Resource"
* target-role-name="Resource-has-BoundResources"
* target-ejb="Resource"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_resource_fk"
*/
public abstract ResourceLocal getResource();
/**
* Resource bound
* @ejb.interface-method view-type="local"
*/
public abstract void setResource(ResourceLocal resource);
/**
* Type of this Bound Resource
* @ejb.interface-method view-type="local"
* @ejb.relation name="ResourceType-OneToMany-BoundResources-Uni"
* role-name="BoundResource-belongsto-ResourceType"
* target-role-name="ResourceType-has-BoundResources"
* target-ejb="ResourceType"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_resourcetype_fk"
* @jboss.relation-read-ahead strategy="on-find"
* page-size="4
*/
public abstract ResourceTypeLocal getResourceType();
/**
* Type of this Bound Resource
* @ejb.interface-method view-type="local"
*/
public abstract void setResourceType(ResourceTypeLocal type);
/**
* Physical environment to which the resource is bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="PhysicalEnv-OneToMany-BoundResources-Bi"
* role-name="BoundResource-belongsto-PhysicalEnv"
* target-multiple="yes"
* cascade-delete="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="n_physicalenv_fk"
*/
public abstract PhysicalEnvLocal getPhysicalEnv();
/**
* Physical environment to which the resource is bound
* @ejb.interface-method view-type="local"
*/
public abstract void setPhysicalEnv(PhysicalEnvLocal environment);
/**
* Generated bulk accessor
* @ejb.interface-method
*/
public abstract BoundResourceData getData();
/** Generated bulk accessor */
public abstract void setData(BoundResourceData data);
/**
* Make this binding between physical environment and resource end.
* @ejb.interface-method
*/
public void close(){
setEndDate(new java.sql.Date(System.currentTimeMillis()));
}
// Implementation of EntityBean ---------------------------------------------
/**
* Create a new Bound Resource
* @ejb.create-method
*/
public String ejbCreate(BoundResourceData data, ResourceLocal resource, ResourceTypeLocal type, PhysicalEnvLocal env) throws javax.ejb.CreateException{
if (data != null){
setId(BoundResourceUtil.generateGUID(this));
setData(data);
}
else throw new javax.ejb.CreateException("Data object for BoundResource must be non null.");
return null;
}
/** Create a new Bound Resource */
public void ejbPostCreate(BoundResourceData data, ResourceLocal resource, ResourceTypeLocal type, PhysicalEnvLocal env) throws javax.ejb.CreateException{
setPhysicalEnv(env);
setResource(resource);
setResourceType(type);
}
/**
* Remove this Bound Resource
* @ejb.transaction type="Mandatory"
*/
public void ejbRemove() throws javax.ejb.RemoveException, javax.ejb.EJBException {}
}
--- NEW FILE: BoundServiceBean.java ---
/*
* BoundServiceBean.java
*
* Created on 21 december 2002, 09:44
*/
package org.figure8.join.businessobjects.resource.ejb;
import org.figure8.join.businessobjects.resource.util.BoundServiceUtil;
import org.figure8.join.businessobjects.resource.interfaces.ServiceLocal;
import org.figure8.join.businessobjects.resource.interfaces.ServiceTypeLocal;
import org.figure8.join.businessobjects.resource.interfaces.BoundServiceData;
import org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal;
import java.sql.Date;
/**
* This object is a representation of a service bound to an environment.
* It is indeed the link between a physical environment and a specific service.
* This link can be active (<b>enddate</b> == null) or broken
* (<b>enddate</b> != null) in order to keep history.
* @author <a href="mailto:lau...@fr...">Laurent Broudoux</a>
*
* @ejb.bean name="BoundService"
type="CMP" cmp-version="2.x" view-type="local"
jndi-name="${objects.res.boundService.jndi-name}"
local-jndi-name="${objects.res.boundService.jndi-name}Local"
primkey-field="id"
* @ejb.home local-class="org.figure8.join.businessobjects.resource.interfaces.BoundServiceLocalHome"
* @ejb.interface local-class="org.figure8.join.businessobjects.resource.interfaces.BoundServiceLocal"
* @ejb.data-object package="org.figure8.join.businessobjects.resource.interfaces"
*
* @ejb.finder signature="Collection findActivesForPhysical(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bs) FROM BoundService AS bs WHERE bs.physicalEnv=?1 AND bs.endDate IS NULL"
* @ejb.finder signature="Collection findActivesForPhysicalAndDate(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env,
java.util.Date date)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bs) FROM BoundService AS bs WHERE bs.physicalEnv=?1 AND (bs.creationDate<?2 OR bs.creationDate=?2) AND (bs.endDate>?2 OR bs.endDate=?2)"
* @ejb.finder signature="Collection findActivesForPhysicalAndType(org.figure8.join.businessobjects.environment.interfaces.PhysicalEnvLocal env,
org.figure8.join.businessobjects.resource.interfaces.ServiceTypeLocal type)"
unchecked="true" transaction-type="Supports"
query="SELECT DISTINCT OBJECT(bs) FROM BoundService AS bs WHERE bs.physicalEnv=?1 AND bs.serviceType=?2 AND bs.endDate IS NULL"
*
* @ejb.pk class="java.lang.String" generate="false" unchecked="true"
* @ejb.persistence table-name="${objects.res.boundService.table-name}"
*
* @jboss.tuned-updates "true"
* @jboss.read-ahead strategy="on-find"
*/
public abstract class BoundServiceBean implements javax.ejb.EntityBean{
// Public -------------------------------------------------------------------
/**
* Bound Resource id
* @ejb.pk-field
* @ejb.persistence column-name="s_id"
*/
public abstract String getId();
/** Bound Resource id */
public abstract void setId(String id);
/**
* Bound Resource creation date
* @ejb.interface-method
* @ejb.persistence column-name="d_creation"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getCreationDate();
/**
* Bound Resource date
* @ejb.interface-method
*/
public abstract void setCreationDate(java.sql.Date creationDate);
/**
* Bound Resource end date
* @ejb.interface-method
* @ejb.persistence column-name="d_end"
* sql-type="TIMESTAMP"
*/
public abstract java.sql.Date getEndDate();
/**
* Bound Resource end date
* @ejb.interface-method
*/
public abstract void setEndDate(java.sql.Date endDate);
/**
* Service bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="Service-OneToMany-BoundServices-Uni"
* role-name="BoundService-belongsto-Service"
* target-role-name="Service-has-BoundServices"
* target-ejb="Service"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_service_fk"
*/
public abstract ServiceLocal getService();
/**
* Service bound
* @ejb.interface-method view-type="local"
*/
public abstract void setService(ServiceLocal service);
/**
* Type of this Bound Service
* @ejb.interface-method view-type="local"
* @ejb.relation name="ServiceType-OneToMany-BoundServices-Uni"
* role-name="BoundService-belongsto-ServiceType"
* target-role-name="ServiceType-has-BoundServices"
* target-ejb="ServiceType"
* target-multiple="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="s_servicetype_fk"
* @jboss.relation-read-ahead strategy="on-find"
* page-size="4"
*/
public abstract ServiceTypeLocal getServiceType();
/**
* Type of this Bound Service
* @ejb.interface-method view-type="local"
*/
public abstract void setServiceType(ServiceTypeLocal type);
/**
* Physical environment to which the service is bound
* @ejb.interface-method view-type="local"
* @ejb.relation name="PhysicalEnv-OneToMany-BoundServices-Bi"
* role-name="BoundService-belongsto-PhysicalEnv"
* target-multiple="yes"
* cascade-delete="yes"
* @jboss.relation fk-constraint="true"
* related-pk-field="id"
* fk-column="n_physicalenv_fk"
*/
public abstract PhysicalEnvLocal getPhysicalEnv();
/**
* Physical environment to which the service is bound
* @ejb.interface-method view-type="local"
*/
public abstract void setPhysicalEnv(PhysicalEnvLocal environment);
/**
* Generated bulk accessor
* @ejb.interface-method
*/
public abstract BoundServiceData getData();
/** Generated bulk accessor */
public abstract void setData(BoundServiceData data);
/**
* Make this binding between physical environment and service end.
* @ejb.interface-method
*/
public void close(){
setEndDate(new java.sql.Date(System.currentTimeMillis()));
}
// Implementation of EntityBean ---------------------------------------------
/**
* Create a new Bound Service
* @ejb.create-method
*/
public String ejbCreate(BoundServiceData data, ServiceLocal service, ServiceTypeLocal type, PhysicalEnvLocal env) throws javax.ejb.CreateException{
if (data != null){
setId(BoundServiceUtil.generateGUID(this));
setData(data);
}
else throw new javax.ejb.CreateException("Data object for BoundService must be non null.");
return null;
}
/** Create a new Bound Service */
public void ejbPostCreate(BoundServiceData data, ServiceLocal service, ServiceTypeLocal type, PhysicalEnvLocal env) throws javax.ejb.CreateException{
setPhysicalEnv(env);
setService(service);
setServiceType(type);
}
/**
* Remove this Bound Service
* @ejb.transaction type="Mandatory"
*/
public void ejbRemove() throws javax.ejb.RemoveException, javax.ejb.EJBException {}
}
|