|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RemoteEntityConnection
An interface specifying a remote EntityConnection implementation.
Method Summary | |
---|---|
void |
beginTransaction()
Begins a transaction on this connection |
void |
commitTransaction()
Performs a commit and ends the current transaction |
void |
delete(EntityCriteria criteria)
Deletes the entities specified by the given criteria Performs a commit unless a transaction is open. |
void |
delete(List<Entity.Key> entityKeys)
Deletes the entities according to the given primary keys. |
void |
disconnect()
Disconnects this connection |
List<?> |
executeFunction(String functionID,
Object... arguments)
Executes the function with the given id |
void |
executeProcedure(String procedureID,
Object... arguments)
Executes the procedure with the given id |
ReportResult |
fillReport(ReportWrapper reportWrapper)
Takes a ReportWrapper object using a JDBC datasource and returns an initialized ReportResult object |
PoolableConnection |
getPoolableConnection()
|
User |
getUser()
|
List<Entity.Key> |
insert(List<Entity> entities)
Inserts the given entities, returning a list containing the primary keys of the inserted entities in the same order as they were received. |
boolean |
isConnected()
|
boolean |
isTransactionOpen()
|
boolean |
isValid()
|
byte[] |
readBlob(Entity.Key primaryKey,
String blobPropertyID)
Reads the blob specified by the property identified by propertyID from the given entity |
void |
rollbackTransaction()
Performs a rollback and ends the current transaction |
List<Entity> |
selectAll(String entityID)
Selects all the entities of the given type |
Map<String,Collection<Entity>> |
selectDependentEntities(Collection<Entity> entities)
Returns the entities that depend on the given entities via foreign keys, mapped to corresponding entityIDs |
List<Entity> |
selectMany(EntitySelectCriteria criteria)
Selects entities according to the specified criteria |
List<Entity> |
selectMany(List<Entity.Key> keys)
Returns entities according to keys |
List<Entity> |
selectMany(String entityID,
String propertyID,
Object... values)
Selects entities according to one property ( propertyID ), using values as a condition |
List<Object> |
selectPropertyValues(String entityID,
String propertyID,
boolean order)
Selects distinct non-null values of the given property of the given entity |
int |
selectRowCount(EntityCriteria criteria)
Selects the number of rows returned according to the given criteria |
Entity |
selectSingle(Entity.Key key)
Selects a single entity by key |
Entity |
selectSingle(EntitySelectCriteria criteria)
Selects a single entity according to the specified criteria, throws a DatabaseException if the criteria results in more than one entity |
Entity |
selectSingle(String entityID,
String propertyID,
Object value)
Selects a single entity |
List<Entity> |
update(List<Entity> entities)
Updates the given entities according to their properties. |
void |
writeBlob(Entity.Key primaryKey,
String blobPropertyID,
String dataDescription,
byte[] blobData)
Writes blobData in the blob field specified by the property identified by propertyID
for the given entity |
Method Detail |
---|
User getUser() throws RemoteException
RemoteException
- in case of an exceptionboolean isConnected() throws RemoteException
RemoteException
- in case of an exceptionvoid disconnect() throws RemoteException
RemoteException
- in case of an exceptionboolean isValid() throws RemoteException
RemoteException
- in case of exceptionboolean isTransactionOpen() throws RemoteException
RemoteException
- in case of exceptionvoid beginTransaction() throws RemoteException
IllegalStateException
- if a transaction is already open
RemoteException
- in case of a remote exceptionvoid rollbackTransaction() throws RemoteException
IllegalStateException
- in case a transaction is not open
RemoteException
- in case of a remote exceptionvoid commitTransaction() throws RemoteException
IllegalStateException
- in case a transaction is not open
RemoteException
- in case of a remote exceptionList<?> executeFunction(String functionID, Object... arguments) throws RemoteException, DatabaseException
functionID
- the function IDarguments
- the arguments, if any
DatabaseException
- in case anyhing goes wrong during the execution
RemoteException
- in case of a remote exceptionvoid executeProcedure(String procedureID, Object... arguments) throws RemoteException, DatabaseException
procedureID
- the procedure IDarguments
- the arguments, if any
DatabaseException
- in case anyhing goes wrong during the execution
RemoteException
- in case of a remote exceptionList<Entity.Key> insert(List<Entity> entities) throws RemoteException, DatabaseException
entities
- the entities to insert
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionList<Entity> update(List<Entity> entities) throws RemoteException, DatabaseException
entities
- the entities to update
DatabaseException
- in case of a db exception
RecordModifiedException
- in case an entity has been modified by another user
RemoteException
- in case of a remote exceptionvoid delete(List<Entity.Key> entityKeys) throws RemoteException, DatabaseException
entityKeys
- the primary keys of the entities to delete
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionvoid delete(EntityCriteria criteria) throws RemoteException, DatabaseException
criteria
- the criteria specifying the entities to delete
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionList<Object> selectPropertyValues(String entityID, String propertyID, boolean order) throws RemoteException, DatabaseException
entityID
- the class of the EntitypropertyID
- the ID of the propertyorder
- if true then the result is ordered
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionEntity selectSingle(String entityID, String propertyID, Object value) throws RemoteException, DatabaseException
entityID
- the Class of the entity to selectpropertyID
- the ID of the property to use as a conditionvalue
- the value to use in the condition
entityID
, having the
value of propertyID
as value
RecordNotFoundException
- in case the entity was not found
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionEntity selectSingle(Entity.Key key) throws RemoteException, DatabaseException
key
- the key of the entity to select
entityID
, having the key key
RecordNotFoundException
- in case the entity was not found
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionEntity selectSingle(EntitySelectCriteria criteria) throws RemoteException, DatabaseException
criteria
- the criteria specifying the entity to select
RecordNotFoundException
- in case the entity was not found
DatabaseException
- if an exception occurs
RemoteException
- in case of a remote exceptionList<Entity> selectMany(List<Entity.Key> keys) throws RemoteException, DatabaseException
keys
keys
- the keys used in the condition
keys
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionList<Entity> selectMany(EntitySelectCriteria criteria) throws RemoteException, DatabaseException
criteria
- the criteria specifying which entities to select
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionList<Entity> selectMany(String entityID, String propertyID, Object... values) throws RemoteException, DatabaseException
propertyID
), using values
as a condition
entityID
- the Class of the entities to selectpropertyID
- the ID of the condition propertyvalues
- the property values to use as condition
entityID
according to propertyID
and values
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionList<Entity> selectAll(String entityID) throws RemoteException, DatabaseException
entityID
- the Class of the entities to select
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionMap<String,Collection<Entity>> selectDependentEntities(Collection<Entity> entities) throws RemoteException, DatabaseException
entities
- the entities for which to retrieve dependencies
entities
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionint selectRowCount(EntityCriteria criteria) throws RemoteException, DatabaseException
criteria
- the search criteria
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionReportResult fillReport(ReportWrapper reportWrapper) throws RemoteException, DatabaseException, ReportException
reportWrapper
- the wrapper containing the report to fill
ReportException
- in case of a report exception
RemoteException
- in case of a remote exception
DatabaseException
- in case of a db exceptionReportWrapper.fillReport(java.sql.Connection)
void writeBlob(Entity.Key primaryKey, String blobPropertyID, String dataDescription, byte[] blobData) throws RemoteException, DatabaseException
blobData
in the blob field specified by the property identified by propertyID
for the given entity
primaryKey
- the primary key of the entity for which to write the blob fieldblobPropertyID
- the ID of the blob propertydataDescription
- the value to insert into the blob description columnblobData
- the blob data
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionbyte[] readBlob(Entity.Key primaryKey, String blobPropertyID) throws RemoteException, DatabaseException
propertyID
from the given entity
primaryKey
- the primary key of the entityblobPropertyID
- the ID of the blob property
DatabaseException
- in case of a db exception
RemoteException
- in case of a remote exceptionPoolableConnection getPoolableConnection() throws RemoteException
UnsupportedOperationException
- always
RemoteException
- in case of a remote exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |