|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bill.util.persist.EntityData | +--bill.util.persist.EntityDataRDBMS
This class is used to define an entity and to manipulate the entity in the persistent store. This class works with a RDBMS, in which case an entity represents a row in a table.
Fields inherited from class bill.util.persist.EntityData |
_collectionInfo, _collections, _elements, _entityName, _keys, _state, ET_BOOLEAN, ET_DOUBLE, ET_INTEGER, ET_LONG, ET_OID, ET_REAL, ET_STRING |
Constructor Summary | |
EntityDataRDBMS()
Creator based on the name of the entity. |
|
EntityDataRDBMS(String entityName)
Creator based on the name of the entity. |
|
EntityDataRDBMS(String entityName,
Hashtable keyValues)
Creator based on the name of the entity and the key elements' values. |
Method Summary | |
protected String |
createDeleteSQL()
Creates the SQL needed to delete an existing entity from the persistent data store. |
protected String |
createInsertSQL()
Creates the SQL needed to add a new entity to the persistent data store. |
protected String |
createSelectSQL()
Creates the SQL needed to select some existing entities in the persistent data store. |
protected String |
createSelectSQL(Hashtable keyValues)
Creates the SQL needed to select an existing entity (or entities) in the persistent data store. |
protected String |
createUpdateSQL()
Creates the SQL needed to update an existing entity in the persistent data store. |
String |
getCollectionClassName()
Returns the class name of the EntityCollection class associated with this class. |
void |
retrieve(Hashtable keyValues)
Retrieves an entity from the database that is keyed by the given key values. |
int |
save()
Controls the updating of the persistent store with the entity's information. |
Methods inherited from class bill.util.persist.EntityData |
addElement, containsElement, getCollection, getElement, getElements, getElementValue, getEntityName, getKey, identifyElements, identifyKeyElement, identifyRequiredElement, instantiateCollection, isDeleted, isModified, isNew, registerOneToManyCollection, setClean, setDeleted, setElementValue, setElementValues, setEntityName, setModified, setNew, toString, userValidate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EntityDataRDBMS()
public EntityDataRDBMS(String entityName)
entityName
- The name of the entity.public EntityDataRDBMS(String entityName, Hashtable keyValues) throws PersistException
entityName
- The name of the entity.keyValues
- The key element's values. Keyed by the element's logical
name, result is the element's value.PersistException
- If a fatal error occurs that causes us to not
be able to perform the retrieval. In our case this would be a SQLException
of some sort.Method Detail |
public String getCollectionClassName()
getCollectionClassName
in class EntityData
protected String createInsertSQL()
protected String createUpdateSQL() throws PersistException
protected String createDeleteSQL() throws PersistException
protected String createSelectSQL() throws PersistException
protected String createSelectSQL(Hashtable keyValues) throws PersistException
keyValues
- The key element's values. Keyed by the element's logical
name, result is the element's value.public int save() throws PersistException
save
in class EntityData
PersistException
- If a fatal error occurs that causes us to not
be able to perform the action. In our case this would be a SQLException
of some sort or a validation error.public void retrieve(Hashtable keyValues) throws PersistException
retrieve
in class EntityData
keyValues
- The key element's values. Keyed by the element's logical
name, result is the element's value.PersistException
- If a fatal error occurs that causes us to not
be able to perform the retrieval. In our case this would be a SQLException
of some sort.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |