bill.util.persist
Class EntityCollectionRDBMS
java.lang.Object
|
+--bill.util.persist.EntityCollection
|
+--bill.util.persist.EntityCollectionRDBMS
- public class EntityCollectionRDBMS
- extends EntityCollection
Holds a collection of related entities. This implementation is specific to
entities retrieved using JDBC, typically from a relational database.
Constructor Summary |
EntityCollectionRDBMS()
Default creator, normally only used when creating an object via
introspection. |
EntityCollectionRDBMS(String entityName,
Hashtable criteria)
Main creator, takes the selection criteria for populating the entity
collection as input. |
EntityCollectionRDBMS(String entityName,
String where)
Alternate creator, takes the where clause to use as the selection
criteria for populating the entity collection as input. |
Method Summary |
void |
populateCollection()
Performs the actual data retrieval and populates the contents of
the collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityCollectionRDBMS
public EntityCollectionRDBMS()
- Default creator, normally only used when creating an object via
introspection. When an object is created using this creator, the
setEntityName and setCriteria must be called as well to complete
the setting of the data required by this class. Then populateCollection
must be called to actually populate the collection.
EntityCollectionRDBMS
public EntityCollectionRDBMS(String entityName,
Hashtable criteria)
throws PersistException
- Main creator, takes the selection criteria for populating the entity
collection as input.
- Parameters:
entityName
- Name of the entity that is contained in this
collection. Must match the entitiy's Java class name as we will use
introspection to create one. Use the full package name if neccessary,
such as com.mycompany.UserData.criteria
- The criteria to use to populate the entity collection.
Keyed by the element name, the result is the element value.
EntityCollectionRDBMS
public EntityCollectionRDBMS(String entityName,
String where)
throws PersistException
- Alternate creator, takes the where clause to use as the selection
criteria for populating the entity collection as input.
- Parameters:
entityName
- Name of the entity that is contained in this
collection. Must match the entitiy's Java class name as we will use
introspection to create one. Use the full package name if neccessary,
such as com.mycompany.UserData.where
- The where clause to use as the selection criteria to
populate the entity collection.
populateCollection
public void populateCollection()
throws PersistException
- Performs the actual data retrieval and populates the contents of
the collection.
- Overrides:
populateCollection
in class EntityCollection
- Throws:
PersistException
- Typically thrown when a SQL exception occurs
that prevents us from populating the collection.