|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mathema.pride.DatabaseAdapter
de.mathema.pride.DatabaseRecord
public abstract class DatabaseRecord
Convenience baseclass, providing a set of simple methods for interaction between the database and data entity objects. This is a derivation from DatabaseAdapter assuming that the entity to pass is the object itself.
| Field Summary | |
|---|---|
static java.lang.String |
REVISION_ID
|
| Constructor Summary | |
|---|---|
DatabaseRecord()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
constraint(java.lang.String[] dbfields,
boolean byLike,
RecordDescriptor red)
|
protected void |
create(ExtensionDescriptor xd)
|
protected int |
create(RecordDescriptor dbd)
Create a record from this entity |
protected int |
create(java.lang.String[] autoFields,
RecordDescriptor dbd)
Create a record from this entity |
protected int |
delete(RecordDescriptor dbd)
Delete the record matching this entitie's primary key |
protected int |
delete(java.lang.String[] dbkeyfields,
RecordDescriptor dbd)
Delete all records matching the fields refered to by dbkeyfields |
protected void |
fetch(ExtensionDescriptor xd)
|
protected void |
fetch(ExtensionDescriptor xd,
java.lang.String attrName)
|
protected void |
fetch(ExtensionDescriptor xd,
java.lang.String[] attrNames)
|
protected void |
fetch(java.lang.Object key,
RecordDescriptor dbd)
Fetch an object by key. |
protected void |
find(RecordDescriptor dbd)
Same like find() above but takes the first attribute as key |
protected void |
find(java.lang.String[] dbfields,
RecordDescriptor dbd)
Same like query() but takes the first record only |
protected void |
find(java.lang.String where,
RecordDescriptor dbd)
Same like query() but takes the first record only |
protected ResultIterator |
query(java.lang.String[] dbfields,
RecordDescriptor dbd)
Fetch an object by fields. |
protected ResultIterator |
query(java.lang.String where,
RecordDescriptor dbd)
Fetch an object by a self-made where clause |
protected ResultIterator |
queryAll(RecordDescriptor dbd)
Fetch all objects |
protected void |
update(ExtensionDescriptor xd)
|
protected void |
update(ExtensionDescriptor xd,
java.lang.String attrName)
|
protected void |
update(ExtensionDescriptor xd,
java.lang.String[] attrNames)
|
protected int |
update(RecordDescriptor dbd)
Update a record from this entitie's content |
protected int |
update(java.lang.String[] dbkeyfields,
RecordDescriptor dbd)
Same like above but updates all object's matching the fields refered to by dbkeyfields |
protected int |
update(java.lang.String where,
RecordDescriptor dbd)
|
protected ResultIterator |
wildcard(java.lang.String[] dbfields,
RecordDescriptor dbd)
Same like query() but performs a wildcard search |
| Methods inherited from class de.mathema.pride.DatabaseAdapter |
|---|
commit, constraint, create, create, create, delete, delete, fetch, fetch, fetch, fetch, find, find, find, getDatabase, getDatabase, process, query, query, queryAll, update, update, update, update, update, update, update, update, wildcard |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String REVISION_ID
| Constructor Detail |
|---|
public DatabaseRecord()
| Method Detail |
|---|
protected void fetch(java.lang.Object key,
RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected ResultIterator query(java.lang.String[] dbfields,
RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected ResultIterator wildcard(java.lang.String[] dbfields,
RecordDescriptor dbd)
throws java.sql.SQLException
query() but performs a wildcard search
java.sql.SQLException
protected void find(java.lang.String[] dbfields,
RecordDescriptor dbd)
throws java.sql.SQLException
query() but takes the first record only
java.sql.SQLException
protected void find(RecordDescriptor dbd)
throws java.sql.SQLException
find() above but takes the first attribute as key
java.sql.SQLException
protected ResultIterator queryAll(RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected ResultIterator query(java.lang.String where,
RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected void find(java.lang.String where,
RecordDescriptor dbd)
throws java.sql.SQLException
query() but takes the first record only
java.sql.SQLException
protected int update(RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected int update(java.lang.String[] dbkeyfields,
RecordDescriptor dbd)
throws java.sql.SQLException
dbkeyfields
java.sql.SQLException
protected int update(java.lang.String where,
RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected int create(RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected int create(java.lang.String[] autoFields,
RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected int delete(RecordDescriptor dbd)
throws java.sql.SQLException
java.sql.SQLException
protected int delete(java.lang.String[] dbkeyfields,
RecordDescriptor dbd)
throws java.sql.SQLException
dbkeyfields
java.sql.SQLException
protected java.lang.String constraint(java.lang.String[] dbfields,
boolean byLike,
RecordDescriptor red)
protected void update(ExtensionDescriptor xd)
throws java.sql.SQLException
java.sql.SQLException
protected void update(ExtensionDescriptor xd,
java.lang.String attrName)
throws java.sql.SQLException
java.sql.SQLException
protected void update(ExtensionDescriptor xd,
java.lang.String[] attrNames)
throws java.sql.SQLException
java.sql.SQLException
protected void fetch(ExtensionDescriptor xd)
throws java.sql.SQLException
java.sql.SQLException
protected void fetch(ExtensionDescriptor xd,
java.lang.String attrName)
throws java.sql.SQLException
java.sql.SQLException
protected void fetch(ExtensionDescriptor xd,
java.lang.String[] attrNames)
throws java.sql.SQLException
java.sql.SQLException
protected void create(ExtensionDescriptor xd)
throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||