public class SQLOneToManyReference extends Object implements FieldAccessIF
| Modifier and Type | Field and Description |
|---|---|
protected RDBMSAccess |
access |
protected int |
batchSize |
protected boolean |
close_stm |
protected boolean |
debug |
protected FieldInfoIF |
field |
protected FieldInfoIF |
identity_field |
protected FieldInfoIF[] |
select_fields |
protected String |
sql_add |
protected String |
sql_clear |
protected String |
sql_load |
protected String |
sql_load_multiple |
protected String |
sql_remove |
protected FieldInfoIF |
value_field |
| Constructor and Description |
|---|
SQLOneToManyReference(RDBMSAccess access,
FieldInfoIF field) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add_bindParameters(PreparedStatement stm,
IdentityIF identity,
Object value) |
protected PreparedStatement |
add_getStatement() |
protected void |
add(IdentityIF identity,
Collection<?> values) |
protected void |
clear_bindParameters(PreparedStatement stm,
IdentityIF identity) |
protected PreparedStatement |
clear_getStatement() |
void |
clear(IdentityIF identity)
INTERNAL: Clears the field value for the given object
identity.
|
protected void |
executeUpdate(PreparedStatement stm,
String sql) |
Object |
load(AccessRegistrarIF registrar,
IdentityIF identity)
INTERNAL: Loads the field value for the given object
identity.
|
Object |
loadMultiple(AccessRegistrarIF registrar,
Collection<IdentityIF> identities,
IdentityIF current)
INTERNAL: Loads the field value for all the given object
identities.
|
protected void |
remove_bindParameters(PreparedStatement stm,
IdentityIF identity,
Object value) |
protected PreparedStatement |
remove_getStatement() |
protected void |
remove(IdentityIF identity,
Collection<?> values) |
void |
storeDirty(ObjectAccessIF oaccess,
Object object)
INTERNAL: The object field is dirty and a call to this method
should cause the field value to be updated.
|
protected boolean debug
protected RDBMSAccess access
protected FieldInfoIF field
protected String sql_load
protected String sql_load_multiple
protected String sql_add
protected String sql_remove
protected String sql_clear
protected FieldInfoIF[] select_fields
protected FieldInfoIF identity_field
protected FieldInfoIF value_field
protected boolean close_stm
protected int batchSize
public SQLOneToManyReference(RDBMSAccess access, FieldInfoIF field)
public Object load(AccessRegistrarIF registrar, IdentityIF identity) throws Exception
FieldAccessIFload in interface FieldAccessIFIdentityNotFoundException - if the identity was not found.Exceptionpublic Object loadMultiple(AccessRegistrarIF registrar, Collection<IdentityIF> identities, IdentityIF current) throws Exception
FieldAccessIFloadMultiple in interface FieldAccessIFIdentityNotFoundException - if the identity was not found.Exceptionprotected void add(IdentityIF identity, Collection<?> values) throws Exception
Exceptionprotected PreparedStatement add_getStatement() throws SQLException
SQLExceptionprotected void add_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) throws Exception
Exceptionprotected void remove(IdentityIF identity, Collection<?> values) throws Exception
Exceptionprotected PreparedStatement remove_getStatement() throws SQLException
SQLExceptionprotected void remove_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) throws Exception
Exceptionpublic void clear(IdentityIF identity) throws Exception
FieldAccessIFclear in interface FieldAccessIFExceptionprotected PreparedStatement clear_getStatement() throws SQLException
SQLExceptionprotected void clear_bindParameters(PreparedStatement stm, IdentityIF identity) throws Exception
Exceptionpublic void storeDirty(ObjectAccessIF oaccess, Object object) throws Exception
FieldAccessIFstoreDirty in interface FieldAccessIFExceptionprotected void executeUpdate(PreparedStatement stm, String sql) throws Exception
Exception