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
ClassAccessIFload in interface ClassAccessIFExceptionpublic Object loadField(AccessRegistrarIF registrar, IdentityIF identity, int field)
ClassAccessIFloadField in interface ClassAccessIFpublic Object loadFieldMultiple(AccessRegistrarIF registrar, Collection<IdentityIF> identities, IdentityIF current, int field)
ClassAccessIFloadFieldMultiple in interface ClassAccessIFpublic void create(ObjectAccessIF oaccess, Object object) throws Exception
ClassAccessIFcreate in interface ClassAccessIFExceptionprotected void bindParametersCreate(PreparedStatement stm, ObjectAccessIF oaccess, Object object) throws Exception
Exceptionpublic void delete(ObjectAccessIF oaccess, Object object) throws Exception
ClassAccessIFdelete in interface ClassAccessIFExceptionprotected void bindParametersDelete(PreparedStatement stm, IdentityIF identity) throws Exception
Exceptionprotected void clearFields(IdentityIF identity) throws Exception
Exceptionpublic void storeDirty(ObjectAccessIF oaccess, Object object) throws Exception
ClassAccessIFstoreDirty in interface ClassAccessIFException