|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.gov.tas.dpiwe.mr.test.aggregation.MrSquareHome
public final class MrSquareHome
This is an implementation of the SquareHome interface which allows SquareObjects to be created and retrieved from persistent storage.
| Field Summary | |
|---|---|
protected Container |
container
The container to which this bean home interface belongs. |
protected static ConstrainedField[] |
defaultConstrainedFields
The starter culture for constrained fields. |
protected MetaData |
metadata
The metadata object describing the beans residing in this home. |
| Constructor Summary | |
|---|---|
MrSquareHome(Container container)
Construct a new home interface instance. |
|
| Method Summary | |
|---|---|
SquareObject |
create(SquareKey squareID)
Creates a new bean object instance. |
SquareObject |
findAllByPrimaryKey(SquareKey squareID)
Finds an existing bean object, and all its related objects. |
List |
findAllWhereFieldsEqual(String edition,
SquareKey squareID)
Selects many existing bean objects whose fields equal those specified, along with all of their related objects. |
SquareObject |
findByPrimaryKey(SquareKey squareID)
Finds an existing bean object. |
List |
findWhereFieldsEqual(String edition,
SquareKey squareID)
Selects many existing bean objects whose fields equal those specified. |
Collection |
getFieldNamesForLongestFindWhereFieldsEqual()
Internal method used by the container to discover the meaning of parameters to the longest findWhereFieldsEqual() method, which is the method used to look up beans with given a foreign key. |
Class[] |
getFieldTypesForLongestFindWhereFieldsEqual()
Internal method used by the container to discover the types of parameters for the longest findWhereFieldsEqual() method, which is the method used to look up beans with given a foreign key. |
MetaData |
getMetaData()
Gets the metadata object associated with beans from this home. |
Object |
invokeOnServer(Method method,
Object[] parameters)
Executes a method of this home interface on the server. |
boolean |
lock()
Locks this home interface on the server, preventing updates until the current transaction commits (or rolls back.) |
void |
remove(Object squareID)
Removes the bean object with the specified primary key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Container container
protected MetaData metadata
protected static final ConstrainedField[] defaultConstrainedFields
| Constructor Detail |
|---|
public MrSquareHome(Container container)
This is done by the container during the addType() method, so external clients should not call this constructor directly. If a client requires access to the home interface instance created by the container at start-up then it should use the getHomeForEntityBean() method.
container - the container to which the new home interface belongs.| Method Detail |
|---|
public MetaData getMetaData()
The metadata object provides access to field types and lengths, and other information about the classes supporting a bean type.
getMetaData in interface LocalHome
public SquareObject create(SquareKey squareID)
throws EJBException,
CreateException
If the home belongs to the client container, this method grabs a pooled business object corresponding to this home interface and uses it and the primary key as parameters to a create command. Even when the current thread is involved in a transaction, the effect is to POST the command immediately to the CommandServlet.
If the home belongs to the server container, the key given is checked to make sure it doesn't already exist in the database table corresponding to this home. The record is not created, but a pooled entity bean with the primary key set to the specified value is returned as a new non-pooled entity bean.
create in interface SquareHomesquareID - the primary key for the new object.
CreateException - if an object with the specified primary key already
exists.
EJBException - if the operation fails unexpectedly.
public SquareObject findByPrimaryKey(SquareKey squareID)
throws EJBException,
FinderException
If the home belongs to the client container, this method grabs a pooled business object corresponding to this home interface and uses (1) it and (2) the primary key as parameters to a find command. Even if the current thread is involved in a transaction, the effect is to POST the command immediately to the CommandServlet.
If the home belongs to the server container, a SQL SELECT query is formed to obtain the appropriate record from the database table corresponding to this home. A pooled entity bean is populated with the record data obtained and returned as a new persistent entity bean.
findByPrimaryKey in interface SquareHomesquareID - the primary key of the object to be found.
FinderException - if an object with the specified primary key
does not exist.
EJBException - if the operation fails unexpectedly.
public SquareObject findAllByPrimaryKey(SquareKey squareID)
throws EJBException,
FinderException
If the home belongs to the client container, this method grabs a pooled business object corresponding to this home interface and uses (1) it and (2) the primary key as parameters to a find command. Even if the current thread is involved in a transaction, the effect is to POST the command immediately to the CommandServlet.
If the home belongs to the server container, a SQL SELECT query is formed to obtain the appropriate record from the database table corresponding to this home. A pooled entity bean is populated with the record data obtained and returned as a new persistent entity bean.
findAllByPrimaryKey in interface SquareHomesquareID - the primary key of the object to be found.
FinderException - if an object with the specified primary key
does not exist.
EJBException - if the operation fails unexpectedly.public Collection getFieldNamesForLongestFindWhereFieldsEqual()
getFieldNamesForLongestFindWhereFieldsEqual in interface FieldEqualFinderpublic Class[] getFieldTypesForLongestFindWhereFieldsEqual()
getFieldTypesForLongestFindWhereFieldsEqual in interface FieldEqualFinder
public List findAllWhereFieldsEqual(String edition,
SquareKey squareID)
throws EJBException,
FinderException
If the home belongs to the client container, this method returns a collection of business objects corresponding to this home interface by using (1) a pooled business object from this home along with (2) the constraints on fields listed in the method signature as parameters to a select command. Even if the current thread is involved in a transaction, the effect is to POST the command immediately to the CommandServlet.
If the home belongs to the server container, a SQL SELECT query is formed to obtain a collection of records from the database table corresponding to this home which satisfies the constraints on fields listed in the method signature. Potentially many pooled entity beans are populated with the data obtained and returned as a collection of new persistent entity beans.
findAllWhereFieldsEqual in interface SquareHomeedition - edition property value to search on, or null if it is not relevant.squareID - squareID property value to search on, or null if it is not relevant.
FinderException - never.
EJBException - if the operation fails unexpectedly.
public List findWhereFieldsEqual(String edition,
SquareKey squareID)
throws EJBException,
FinderException
If the home belongs to the client container, this method returns a collection of business objects corresponding to this home interface by using (1) a pooled business object from this home along with (2) the constraints on fields listed in the method signature as parameters to a select command. Even if the current thread is involved in a transaction, the effect is to POST the command immediately to the CommandServlet.
If the home belongs to the server container, a SQL SELECT query is formed to obtain a collection of records from the database table corresponding to this home which satisfies the constraints on fields listed in the method signature. Potentially many pooled entity beans are populated with the data obtained and returned as a collection of new persistent entity beans.
findWhereFieldsEqual in interface SquareHomeotherField - otherField property value to search on, or null if it is
not relevant.edition - edition property value to search on, or null if it is not relevant.squareID - squareID property value to search on, or null if it is not relevant.
FinderException - never.
EJBException - if the operation fails unexpectedly.
public void remove(Object squareID)
throws EJBException,
RemoveException
If the specified bean belongs to the client container, this method takes the business object corresponding to the specified key and uses it as the parameter to a remove command. If the current thread is not involved in a transaction, the effect is to POST the command immediately to the CommandServlet. The returned version is returned to the pool and the previous version is discarded. If the current thread is involved in a transaction, these actions will only occur when the commit() method of the container is called.
If the specified bean belongs to the server container, a SQL DELETE query is formed to remove the database record corresponding to it. The entity bean is returned. If the current thread is involved in a transaction, the DELETE query will only be executed when the commit() method of the container is called.
remove in interface EJBLocalHomesquareID - the primary key of the object being removed.
RemoveException - if objects in this home cannot be removed.
EJBException - if the operation fails- perhaps the object specified
doesn't exist.
public Object invokeOnServer(Method method,
Object[] parameters)
throws EJBException
Executes a method of this home interface on the server.
invokeOnServer in interface LocalHomemethod - the method to call.parameters - the parameters to pass to the method.
EJBException - if something goes wrong.
public boolean lock()
throws EJBException
Locks this home interface on the server, preventing updates until the current transaction commits (or rolls back.)
lock in interface LocalHomeEJBException - if something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||