public interface Database
Modifier and Type | Method and Description |
---|---|
void |
dbDelete(DBRecord... records)
Performs a database request that to delete the given record(s) from the database.
|
DBRecord |
dbInsert(DBRecord record)
Inserts the record into the database.
|
DBRecord[] |
dbInsertRecords(DBRecord... records)
Performs a database request to insert the given records into the database.
|
void |
dbLoadRecords(DBRecord master,
DBLoadMonitor monitor,
SqlCondition condition)
|
void |
dbLoadRecords(DBRecord master,
DBLoadMonitor monitor,
SqlCondition condition,
SqlOrder order)
Performs a database request to load records of the given type with the given condition and
order.
|
DBRecord |
dbRehash(DBRecord record)
Performs a database request to rehash the given record.
|
DBRecord[] |
dbRehashRecords(DBRecord... record)
Performs a database request that tries to rehash the given records.
|
DBRecord[] |
dbSearchRecords(DBRecord master,
SqlCondition condition,
SqlOrder order)
Performs a database request to select
ComposedRecord instances by a
SqlCondition that may contain fields of different record parts (the composing
DBObjects). |
DBRecord |
dbSelect(DBRecord master,
java.lang.String... primaryKey)
Performs a database request to fetch a single record by primary key.
|
DBRecord[] |
dbSelectRecords(DBRecord master,
SqlCondition condition)
|
DBRecord[] |
dbSelectRecords(DBRecord master,
SqlCondition condition,
SqlOrder order)
Performs a database request to read records of the given type with the given condition and
order.
|
DBObject |
dbStore(DBObject dbo)
Performs a database request to store the given DBobject with its
DBObject.forceUpdate() method. |
DBObject[] |
dbStoreRecords(DBObject... dbos)
Performs a database request to store the given records with their
DBObject.forceUpdate() method. |
void |
dbUpdate(DBRecord... records)
Performs a database request to update the given record(s) in the database.
|
DBRecord dbInsert(DBRecord record) throws java.lang.Exception
java.lang.Exception
dbInsertRecords(DBRecord[])
DBRecord[] dbInsertRecords(DBRecord... records) throws java.lang.Exception
java.lang.Exception
void dbUpdate(DBRecord... records) throws java.lang.Exception
java.lang.Exception
void dbDelete(DBRecord... records) throws java.lang.Exception
java.lang.Exception
DBRecord dbRehash(DBRecord record) throws java.lang.Exception
java.lang.Exception
dbRehashRecords(DBRecord[])
DBRecord[] dbRehashRecords(DBRecord... record) throws java.lang.Exception
java.lang.Exception
void dbLoadRecords(DBRecord master, DBLoadMonitor monitor, SqlCondition condition, SqlOrder order) throws java.lang.Exception
DBLoadMonitor
is responsible for collecting or processing the records.java.lang.Exception
void dbLoadRecords(DBRecord master, DBLoadMonitor monitor, SqlCondition condition) throws java.lang.Exception
dbLoadRecords(DBRecord, DBLoadMonitor, SqlCondition)
. The default order is by
primary key.java.lang.Exception
DBRecord[] dbSelectRecords(DBRecord master, SqlCondition condition, SqlOrder order) throws java.lang.Exception
java.lang.Exception
DBRecord[] dbSelectRecords(DBRecord master, SqlCondition condition) throws java.lang.Exception
dbSelectRecords(DBRecord, SqlCondition, SqlOrder)
. The default order is by
primary key.java.lang.Exception
DBRecord dbSelect(DBRecord master, java.lang.String... primaryKey) throws java.lang.Exception
java.lang.Exception
DBRecord[] dbSearchRecords(DBRecord master, SqlCondition condition, SqlOrder order) throws java.lang.Exception
ComposedRecord
instances by a
SqlCondition
that may contain fields of different record parts (the composing
DBObjects). The statement typically performs a join on several tables.
Note that classes with composed primary keys are not supported yet.java.lang.Exception
DBObject dbStore(DBObject dbo) throws java.lang.Exception
DBObject.forceUpdate()
method.
If the record exists already it will be updated, otherwise it will be inserted.java.lang.Exception
dbStoreRecords(DBObject[])
DBObject[] dbStoreRecords(DBObject... dbos) throws java.lang.Exception
DBObject.forceUpdate()
method.
If the records exist already they will be updated, otherwise they will be inserted.
Note that this only works on DBObjects and not on composed records.java.lang.Exception
Copyright © 2014 EsprIT-Systems. All Rights Reserved.