|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AmberConnection
Main user interface to Amber.
Method Summary | |
---|---|
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 |
Method Detail |
---|
java.lang.Object load(java.lang.Class cl, java.lang.Object key) throws AmberException
AmberException
java.lang.Object load(java.lang.Class cl, long key) throws AmberException
AmberException
java.lang.Object makePersistent(java.lang.Object entity) throws java.sql.SQLException
java.sql.SQLException
void create(java.lang.Object obj) throws java.sql.SQLException
java.sql.SQLException
boolean contains(java.lang.Object entity)
void delete(java.lang.Object obj) throws java.sql.SQLException
java.sql.SQLException
java.sql.ResultSet query(java.lang.String query) throws java.sql.SQLException
query
- the query
java.sql.SQLException
int update(java.lang.String query) throws java.sql.SQLException
query
- the query
java.sql.SQLException
AmberQuery prepareQuery(java.lang.String queryString) throws AmberException
queryString
- a query
AmberException
void beginTransaction() throws java.sql.SQLException
java.sql.SQLException
void commit() throws java.sql.SQLException
java.sql.SQLException
void rollback() throws java.sql.SQLException
java.sql.SQLException
void flush() throws java.sql.SQLException
java.sql.SQLException
void close()
java.util.List find(java.lang.String query) throws java.sql.SQLException
query
- the query
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |