public class SQLObjectAccess extends Object implements ClassAccessIF
Modifier and Type | Field and Description |
---|---|
protected RDBMSAccess |
access |
static int |
batchSize |
protected ClassInfoIF |
cinfo |
protected boolean |
debug |
protected FieldAccessIF[] |
faccesses |
protected FieldInfoIF |
identity_field |
protected FieldInfoIF[] |
m2m_fields |
protected FieldInfoIF[] |
o2a_fields |
protected FieldInfoIF[] |
o2o_fields |
protected String |
sql_create |
protected String |
sql_delete |
protected String |
sql_load |
protected FieldInfoIF[] |
value_fields |
Constructor and Description |
---|
SQLObjectAccess(RDBMSAccess access,
ClassInfoIF cinfo) |
Modifier and Type | Method and Description |
---|---|
protected void |
bindParametersCreate(PreparedStatement stm,
ObjectAccessIF oaccess,
Object object) |
protected void |
bindParametersDelete(PreparedStatement stm,
IdentityIF identity) |
protected void |
clearFields(IdentityIF identity) |
void |
create(ObjectAccessIF oaccess,
Object object)
INTERNAL: Creates the new object in the database.
|
void |
delete(ObjectAccessIF oaccess,
Object object)
INTERNAL: Deletes the object identity from the database.
|
protected FieldAccessIF |
getFieldAccess(int field) |
boolean |
load(AccessRegistrarIF registrar,
IdentityIF identity)
INTERNAL: Loads the object identity from the database.
|
Object |
loadField(AccessRegistrarIF registrar,
IdentityIF identity,
int field)
INTERNAL: Loads the specified object field for the given identity
from the database.
|
Object |
loadFieldMultiple(AccessRegistrarIF registrar,
Collection<IdentityIF> identities,
IdentityIF current,
int field)
INTERNAL: Loads the specified object field for the given
identitys from the database.
|
void |
storeDirty(ObjectAccessIF oaccess,
Object object)
INTERNAL: Stores object fields that are dirty in the
database.
|
public static int batchSize
protected boolean debug
protected RDBMSAccess access
protected ClassInfoIF cinfo
protected String sql_load
protected String sql_create
protected String sql_delete
protected FieldInfoIF identity_field
protected FieldInfoIF[] value_fields
protected FieldInfoIF[] o2o_fields
protected FieldInfoIF[] o2a_fields
protected FieldInfoIF[] m2m_fields
protected FieldAccessIF[] faccesses
public SQLObjectAccess(RDBMSAccess access, ClassInfoIF cinfo)
protected FieldAccessIF getFieldAccess(int field)
public boolean load(AccessRegistrarIF registrar, IdentityIF identity) throws Exception
ClassAccessIF
load
in interface ClassAccessIF
Exception
public Object loadField(AccessRegistrarIF registrar, IdentityIF identity, int field)
ClassAccessIF
loadField
in interface ClassAccessIF
public Object loadFieldMultiple(AccessRegistrarIF registrar, Collection<IdentityIF> identities, IdentityIF current, int field)
ClassAccessIF
loadFieldMultiple
in interface ClassAccessIF
public void create(ObjectAccessIF oaccess, Object object) throws Exception
ClassAccessIF
create
in interface ClassAccessIF
Exception
protected void bindParametersCreate(PreparedStatement stm, ObjectAccessIF oaccess, Object object) throws Exception
Exception
public void delete(ObjectAccessIF oaccess, Object object) throws Exception
ClassAccessIF
delete
in interface ClassAccessIF
Exception
protected void bindParametersDelete(PreparedStatement stm, IdentityIF identity) throws Exception
Exception
protected void clearFields(IdentityIF identity) throws Exception
Exception
public void storeDirty(ObjectAccessIF oaccess, Object object) throws Exception
ClassAccessIF
storeDirty
in interface ClassAccessIF
Exception