public interface AmberConnection
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Starts a transaction.
|
void |
close()
Closes the connection.
|
void |
commit()
Commits a transaction.
|
boolean |
contains(java.lang.Object entity)
Returns true if the entitiy is managed.
|
void |
create(java.lang.Object obj)
Creates a new entity given the values in the object.
|
void |
delete(java.lang.Object obj)
Deletes the specified entry.
|
java.util.List |
find(java.lang.String query)
Queries the database, returning a result set
|
void |
flush()
Flushes data from the connection.
|
java.lang.Object |
load(java.lang.Class cl,
long key)
Loads the entity specified by its class and primary key.
|
java.lang.Object |
load(java.lang.Class cl,
java.lang.Object key)
Loads the entity specified by its class and primary key.
|
java.lang.Object |
makePersistent(java.lang.Object entity)
Loads the entity, returning the active entity
|
AmberQuery |
prepareQuery(java.lang.String queryString)
Creates a query object from a query string.
|
java.sql.ResultSet |
query(java.lang.String query)
Queries the database, returning a result set
|
void |
rollback()
Rolls a transaction back.
|
int |
update(java.lang.String query)
Queries the database, returning a result set
|
java.lang.Object load(java.lang.Class cl,
java.lang.Object key)
throws AmberException
AmberExceptionjava.lang.Object load(java.lang.Class cl,
long key)
throws AmberException
AmberExceptionjava.lang.Object makePersistent(java.lang.Object entity)
throws java.sql.SQLException
java.sql.SQLExceptionvoid create(java.lang.Object obj)
throws java.sql.SQLException
java.sql.SQLExceptionboolean contains(java.lang.Object entity)
void delete(java.lang.Object obj)
throws java.sql.SQLException
java.sql.SQLExceptionjava.sql.ResultSet query(java.lang.String query)
throws java.sql.SQLException
query - the queryjava.sql.SQLExceptionint update(java.lang.String query)
throws java.sql.SQLException
query - the queryjava.sql.SQLExceptionAmberQuery prepareQuery(java.lang.String queryString) throws AmberException
queryString - a queryAmberExceptionvoid beginTransaction()
throws java.sql.SQLException
java.sql.SQLExceptionvoid commit()
throws java.sql.SQLException
java.sql.SQLExceptionvoid rollback()
throws java.sql.SQLException
java.sql.SQLExceptionvoid flush()
throws java.sql.SQLException
java.sql.SQLExceptionvoid close()
java.util.List find(java.lang.String query)
throws java.sql.SQLException
query - the queryjava.sql.SQLException