Package net.ontopia.persistence.proxy
Class SQLOneToManyAggregate
java.lang.Object
net.ontopia.persistence.proxy.SQLOneToManyAggregate
- All Implemented Interfaces:
FieldAccessIF
- Direct Known Subclasses:
SQLBatchOneToManyAggregate
INTERNAL: Class that performs the task of accessing and
manipulating 1:M aggregate fields in the database.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RDBMSAccessprotected intprotected ClassInfoIFprotected booleanprotected booleanprotected FieldInfoIFprotected FieldInfoIFprotected FieldInfoIF[]protected Stringprotected Stringprotected Stringprotected Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(IdentityIF identity, Collection<?> values) protected voidadd_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) protected PreparedStatementvoidclear(IdentityIF identity) INTERNAL: Clears the field value for the given object identity.protected voidclear_bindParameters(PreparedStatement stm, IdentityIF identity) protected PreparedStatementprotected voidexecuteUpdate(PreparedStatement stm, String sql) load(AccessRegistrarIF registrar, IdentityIF identity) INTERNAL: Loads the field value for the given object identity.loadMultiple(AccessRegistrarIF registrar, Collection<IdentityIF> identities, IdentityIF current) INTERNAL: Loads the field value for all the given object identities.protected voidremove(IdentityIF identity, Collection<?> values) protected voidremove_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) protected PreparedStatementvoidstoreDirty(ObjectAccessIF oaccess, Object object) INTERNAL: The object field is dirty and a call to this method should cause the field value to be updated.
-
Field Details
-
debug
protected boolean debug -
access
-
cinfo
-
field
-
sql_load
-
sql_load_multiple
-
sql_add
-
sql_remove
-
sql_clear
-
identity_field
-
select_fields
-
close_stm
protected boolean close_stm -
batchSize
protected int batchSize
-
-
Constructor Details
-
SQLOneToManyAggregate
-
-
Method Details
-
load
Description copied from interface:FieldAccessIFINTERNAL: Loads the field value for the given object identity. The specified access registrar will be notified about the value(s) read from the database.- Specified by:
loadin interfaceFieldAccessIF- Returns:
- The value loaded for the specific field. Note that if the field is a reference field the identity will be returned, not the actual object. This is because the storage system does not deal with persistent object instances directly.
- Throws:
IdentityNotFoundException- if the identity was not found.Exception
-
loadMultiple
public Object loadMultiple(AccessRegistrarIF registrar, Collection<IdentityIF> identities, IdentityIF current) throws Exception Description copied from interface:FieldAccessIFINTERNAL: Loads the field value for all the given object identities. The specified access registrar will be notified about the value(s) read from the database.- Specified by:
loadMultiplein interfaceFieldAccessIF- Returns:
- The value loaded for the specific field for the current identity. Note that if the field is a reference field the identity will be returned, not the actual object. This is because the storage system does not deal with persistent object instances directly.
- Throws:
IdentityNotFoundException- if the identity was not found.Exception
-
add
- Throws:
Exception
-
add_getStatement
- Throws:
SQLException
-
add_bindParameters
protected void add_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) throws Exception - Throws:
Exception
-
remove
- Throws:
Exception
-
remove_getStatement
- Throws:
SQLException
-
remove_bindParameters
protected void remove_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) throws Exception - Throws:
Exception
-
clear
Description copied from interface:FieldAccessIFINTERNAL: Clears the field value for the given object identity. This method is only applicable for 1:M and M:M fields.- Specified by:
clearin interfaceFieldAccessIF- Throws:
Exception
-
clear_getStatement
- Throws:
SQLException
-
clear_bindParameters
- Throws:
Exception
-
storeDirty
Description copied from interface:FieldAccessIFINTERNAL: The object field is dirty and a call to this method should cause the field value to be updated. Note that the field access may also store other field values if it decides to do so. After the field value(s) has been updated the dirty flag(s) should be set to false.- Specified by:
storeDirtyin interfaceFieldAccessIF- Throws:
Exception
-
executeUpdate
- Throws:
Exception
-