Package net.ontopia.persistence.proxy
Class SQLCollectionAccess
java.lang.Object
net.ontopia.persistence.proxy.SQLCollectionAccess
- All Implemented Interfaces:
ClassAccessIF
INTERNAL: Class that performs the task of accessing and
manipulating "collection" type instances in the database.
NOTE: Collection type instances must have an identity field and exactly one value field.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RDBMSAccessprotected ClassInfoIFprotected booleanprotected FieldInfoIFprotected Stringprotected Stringprotected Stringprotected Stringprotected FieldInfoIF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbindParametersAddRemove(PreparedStatement stm, ObjectAccessIF oaccess, IdentityIF identity, Object element) protected voidbindParametersDelete(PreparedStatement stm, IdentityIF identity) voidcreate(ObjectAccessIF oaccess, Object object) INTERNAL: Creates the new object in the database.voiddelete(ObjectAccessIF oaccess, Object object) INTERNAL: Deletes the object identity from the database.booleanload(AccessRegistrarIF registrar, IdentityIF identity) INTERNAL: Loads the object identity from the database.loadField(AccessRegistrarIF registrar, IdentityIF identity, int field) INTERNAL: Loads the specified object field for the given identity from the database.loadFieldMultiple(AccessRegistrarIF registrar, Collection identities, IdentityIF current, int field) INTERNAL: Loads the specified object field for the given identitys from the database.protected voidstoreAdded(ObjectAccessIF oaccess, IdentityIF identity, Collection elements) voidstoreDirty(ObjectAccessIF oaccess, Object object) INTERNAL: Stores object fields that are dirty in the database.protected voidstoreRemoved(ObjectAccessIF oaccess, IdentityIF identity, Collection elements)
-
Field Details
-
debug
protected boolean debug -
access
-
cinfo
-
sql_load
-
sql_add
-
sql_remove
-
sql_delete
-
identity_field
-
value_field
-
-
Constructor Details
-
SQLCollectionAccess
-
-
Method Details
-
load
Description copied from interface:ClassAccessIFINTERNAL: Loads the object identity from the database.- Specified by:
loadin interfaceClassAccessIF- Returns:
- true if object was found in the data store, false otherwise.
- Throws:
Exception
-
loadField
Description copied from interface:ClassAccessIFINTERNAL: Loads the specified object field for the given identity from the database.- Specified by:
loadFieldin interfaceClassAccessIF
-
loadFieldMultiple
public Object loadFieldMultiple(AccessRegistrarIF registrar, Collection identities, IdentityIF current, int field) Description copied from interface:ClassAccessIFINTERNAL: Loads the specified object field for the given identitys from the database.- Specified by:
loadFieldMultiplein interfaceClassAccessIF
-
create
Description copied from interface:ClassAccessIFINTERNAL: Creates the new object in the database. Note that the object identity can be extracted from the object using the supplied object access instance.- Specified by:
createin interfaceClassAccessIF- Throws:
Exception
-
delete
Description copied from interface:ClassAccessIFINTERNAL: Deletes the object identity from the database.- Specified by:
deletein interfaceClassAccessIF- Throws:
Exception
-
bindParametersDelete
- Throws:
Exception
-
storeDirty
Description copied from interface:ClassAccessIFINTERNAL: Stores object fields that are dirty in the database. Note that the object identity can be extracted from the object using the supplied object access instance.- Specified by:
storeDirtyin interfaceClassAccessIF- Throws:
Exception
-
storeAdded
protected void storeAdded(ObjectAccessIF oaccess, IdentityIF identity, Collection elements) throws Exception - Throws:
Exception
-
bindParametersAddRemove
protected void bindParametersAddRemove(PreparedStatement stm, ObjectAccessIF oaccess, IdentityIF identity, Object element) throws Exception - Throws:
Exception
-
storeRemoved
protected void storeRemoved(ObjectAccessIF oaccess, IdentityIF identity, Collection elements) throws Exception - Throws:
Exception
-