|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDataAccessor
A data accessor is the central "entry point" for accessing data from data
sources. Each data accessor instance provides caching of data which has been
retrieved by one of the searches methods provided by IDataTable or
IDataBrowser.
| Method Summary | |
|---|---|
void |
clear()
Performs a complete reset of this data accessor including all underlying IDataTable and IDataBrowser instances. |
IDataTableRecord |
cloneRecord(IDataTransaction trans,
IDataTableRecord recordToClone)
Same behaviour than cloneRecord(IDataTransaction, IDataTableRecord, ITableAlias)
except that the alias to clone the record for equals to the related alias of recordToClone. |
IDataTableRecord |
cloneRecord(IDataTransaction trans,
IDataTableRecord recordToClone,
ITableAlias alias)
Clones the given table record, i.e. create a new table record for the specified table alias and copies the field values from the record to clone to the new record. |
IDataTableRecord |
cloneRecord(IDataTransaction trans,
IDataTableRecord recordToClone,
java.lang.String aliasName)
Same behaviour than cloneRecord(IDataTransaction, IDataTableRecord, ITableAlias)
except that the alias to clone the record for is specified by name. |
IDataBrowser |
createBrowser(IAdhocBrowserDefinition adhocBrowserDefinition)
Creates a new data browser for the given adhoc browser definition. |
IApplicationDefinition |
getApplication()
Returns the application definition used for this accessor. |
IDataBrowser |
getBrowser(IBrowserDefinition browserDefinition)
Gets the data browser of the given browser definition. |
IDataBrowser |
getBrowser(java.lang.String name)
Gets the data browser specified by name. |
IDataTable |
getTable(ITableAlias alias)
Gets the data table of the given table alias. |
IDataTable |
getTable(java.lang.String name)
Gets the data table specified by name. |
IDataAccessor |
newAccessor()
Creates a new data accessor instance. |
IDataTransaction |
newTransaction()
Creates a new data transaction. |
boolean |
propagateRecord(IDataRecord record,
Filldirection filldirection)
Propagates the given record, i.e. |
boolean |
propagateRecord(IDataRecord record,
IRelationSet relationSet,
Filldirection filldirection)
Propagates the given record, i.e. |
boolean |
propagateRecord(IDataRecord record,
java.lang.String relationSetName,
Filldirection filldirection)
Propagates the given record, i.e. |
void |
qbeClearAll()
Performs a complete reset of all QBE constraints of any underlying IDataTableinstance. |
boolean |
qbeHasConstraint(ITableAlias alias,
IRelationSet relationSet)
Checks whether any constraint exists for the given table alias and all related table aliases specified by the given relation set. |
boolean |
qbeHasConstraint(java.lang.String aliasName,
java.lang.String relationSetName)
Checks whether any constraint exists for the given table alias and all related table aliases specified by the given relation set. |
| Method Detail |
|---|
void clear()
IDataTable and IDataBrowser instances. This includes
clearing all QBE constraints, all cached records and any record selections.
IDataTable.qbeClear(),
IDataRecordSet.clear()void qbeClearAll()
IDataTableinstance.
IDataTable.qbeClear()
boolean qbeHasConstraint(ITableAlias alias,
IRelationSet relationSet)
alias - the table alias to check for constraints and used as starting
point for related table aliases.relationSet - the relation set to check for constraints.
true if at least one constraint exists, otherwise
false.
boolean qbeHasConstraint(java.lang.String aliasName,
java.lang.String relationSetName)
This method is equivalent to
qbeHasConstraint(ITableAlias, IRelationSet) except that table
alias and relation set are specified by name.
aliasName - the name of the table alias to check for constraints and used as
starting point for related table aliases.relationSetName - the name of the relation set to check for constraints.
true if at least one constraint exists, otherwise
false.IDataBrowser createBrowser(IAdhocBrowserDefinition adhocBrowserDefinition)
Note: The returned data browser is not cleared when clear() is
performed.
adhocBrowserDefinition - the adhoc browser definition
IApplicationDefinition.createAdhocBrowserDefinition(IBrowserDefinition),
IApplicationDefinition.createAdhocBrowserDefinition(ITableAlias)
IDataBrowser getBrowser(IBrowserDefinition browserDefinition)
throws java.lang.RuntimeException
browserDefinition - the browser definition
java.lang.RuntimeException - if the given browser definition is a IAdhocBrowserDefinition
IDataBrowser getBrowser(java.lang.String name)
throws java.lang.RuntimeException
The name of the data browser is equivalent to the name of the underlying
IBrowserDefinition.
name - the name of data browser
java.lang.RuntimeException - if no data browser with the given name exists
IDataTable getTable(java.lang.String name)
throws java.lang.RuntimeException
The name of the data table is equivalent to the name of the underlying
ITableAlias.
name - the name of the data table.
java.lang.RuntimeException - if no data table with the given name existsIDataTable getTable(ITableAlias alias)
alias - the table alias
IDataAccessor newAccessor()
IDataTransaction newTransaction()
IApplicationDefinition getApplication()
boolean propagateRecord(IDataRecord record,
Filldirection filldirection)
throws RecordNotFoundException
Note: This method has identical behaviour than calling
propagateRecord(IDataRecord, IRelationSet, Filldirection) in case
the relation set is the default relation set.
record - the record to propagatefilldirection - the fill direction to propagate
true if the propagation had been successful, false
if the given record could not be propagate, because a primary key
is missing
RecordNotFoundException - If the given record could not be reloaded from the database.
boolean propagateRecord(IDataRecord record,
IRelationSet relationSet,
Filldirection filldirection)
throws RecordNotFoundException
record - the record to propagaterelationSet - the relation set to propagatefilldirection - the fill direction to propagate
true if the propagation had been successful, false
if the given record could not be propagate, because a primary key
is missing
RecordNotFoundException - If the given record could not be reloaded from the database.
boolean propagateRecord(IDataRecord record,
java.lang.String relationSetName,
Filldirection filldirection)
throws RecordNotFoundException
record - the record to propagaterelationSetName - the name of the relation set to propagatefilldirection - the fill direction to propagate
true if the propagation had been successful, false
if the given record could not be propagate, because a primary key
is missing
RecordNotFoundException - If the given record could not be reloaded from the database.
IDataTableRecord cloneRecord(IDataTransaction trans,
IDataTableRecord recordToClone)
cloneRecord(IDataTransaction, IDataTableRecord, ITableAlias)
except that the alias to clone the record for equals to the related alias of recordToClone.
trans - the transaction in which context this operation should be executedrecordToClone - the record to clone
IDataTableRecord cloneRecord(IDataTransaction trans,
IDataTableRecord recordToClone,
java.lang.String aliasName)
cloneRecord(IDataTransaction, IDataTableRecord, ITableAlias)
except that the alias to clone the record for is specified by name.
trans - the transaction in which context this operation should be executedrecordToClone - the record to clonealiasName - the name of the table alias to clone the record for, which must
point to the same physical table than the related alias of recordToClone!
IDataTableRecord cloneRecord(IDataTransaction trans,
IDataTableRecord recordToClone,
ITableAlias alias)
After this method has been called the returned record becomes the selected
record of the data table referenced by alias of this
accessor. Hence, previously populated records of that data table will be
cleared!
Call IDataTransaction.commit() to save this record to the data
source.
Note: The values of the primary key and the history field (see
ITableDefinition.getHistoryField(), if existing, are not copied!
trans - the transaction in which context this operation should be executedrecordToClone - the record to clonealias - the table alias to clone the record for, which must point to the
same physical table than the related alias of
recordToClone!
IDataTable.getSelectedRecord()
|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||