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
FieldAccessIF
load
in interface FieldAccessIF
IdentityNotFoundException
- if the identity was not found.Exception
public Object loadMultiple(AccessRegistrarIF registrar, Collection<IdentityIF> identities, IdentityIF current) throws Exception
FieldAccessIF
loadMultiple
in interface FieldAccessIF
IdentityNotFoundException
- if the identity was not found.Exception
protected void add(IdentityIF identity, Collection<?> values) throws Exception
Exception
protected PreparedStatement add_getStatement() throws SQLException
SQLException
protected void add_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) throws Exception
Exception
protected void remove(IdentityIF identity, Collection<?> values) throws Exception
Exception
protected PreparedStatement remove_getStatement() throws SQLException
SQLException
protected void remove_bindParameters(PreparedStatement stm, IdentityIF identity, Object value) throws Exception
Exception
public void clear(IdentityIF identity) throws Exception
FieldAccessIF
clear
in interface FieldAccessIF
Exception
protected PreparedStatement clear_getStatement() throws SQLException
SQLException
protected void clear_bindParameters(PreparedStatement stm, IdentityIF identity) throws Exception
Exception
public void storeDirty(ObjectAccessIF oaccess, Object object) throws Exception
FieldAccessIF
storeDirty
in interface FieldAccessIF
Exception
protected void executeUpdate(PreparedStatement stm, String sql) throws Exception
Exception