Method Summary |
|
public void | addCompletion(AmberCompletion completion) |
public void | addEntity(Entity entity) |
public Entity | addNewEntity(Class cl, Object key) Adds a new entity for the given class name and key.
The new entity object is supposed to be used as a
copy from cache. |
public void | afterCommit(boolean isCommit) Commits a transaction. |
public void | afterCompletion(int status) Callback after a utrans commit. |
public void | beforeCommit() |
public void | beforeCompletion() Callback before a utrans commit. |
public void | begin(Transaction xa) |
public void | beginTransaction() Starts a transaction. |
public void | cleanup() Cleans up the connection. |
public void | clear() |
public void | close() Closes the context. |
public static void | close(ResultSet rs) |
public void | closeStatement(String sql) Closes a statement. |
public void | commit() Commits a transaction. |
public boolean | contains(Object obj) Loads the object based on itself. |
public void | create(Object obj) Saves the object. |
public void | create(String homeName, Object obj) Saves the object. |
public void | create(AmberEntityHome home, Object obj) Saves the object. |
public Query | createNamedQuery(String name) |
public Query | createNativeQuery(String sql) |
public Query | createNativeQuery(String sql, String map) |
public Query | createNativeQuery(String sql, Class type) |
public Query | createQuery(String sql) Creates a query. |
public void | delete(Entity entity) Deletes the object. |
public void | detach() Detach after non-xa. |
public void | expire() |
public void | finalize() Finalizer. |
public T | find(Class<T> entityClass, Object primaryKey) Find by the primary key. |
public List | find(String hsql) Select a list of objects with a Hibernate query. |
public EntityItem | findEntityItem(String name, Object key) Loads the object with the given class. |
public void | flush() Flushes managed entities. |
public void | flushNoChecks() Flushes managed entities. |
public void | freeConnection() Frees the connection. |
public AmberPersistenceUnit | getAmberManager() Returns the amber manager. |
public int | getCacheChunkSize() Returns the cache chunk size. |
public Entity | getCacheEntity(Entity entity) |
public Entity | getCacheEntity(Entity entity, boolean isDebug) |
public Entity | getCacheEntity(Class cl, Object pk) |
public Entity | getCacheEntity(Class cl, Object pk, boolean isDebug) |
public Connection | getConnection() Returns the connection. |
public Object | getDelegate() Gets the delegate. |
public Entity | getEntity(EntityItem item) Returns the entity for the connection. |
public Entity | getEntity(String className, Object key) Matches the entity. |
public Entity | getEntity(int index) |
public Entity | getEntity(Class cl, Object key) |
public Entity | getEntity(Entity entity) Returns the context entity that corresponds to the
entity passed in. |
public Entity | getEntityLazy(EntityItem item) Returns the entity for the connection. |
public FlushModeType | getFlushMode() Returns the flush mode. |
public AmberPersistenceUnit | getPersistenceUnit() Returns the persistence unit. |
public ResultSetCacheChunk | getQueryCacheChunk(String sql, Object[] args, int startRow) Returns the cache chunk. |
public ResultSetMetaData | getQueryMetaData() Returns the result set meta data from cache. |
public T | getReference(Class<T> entityClass, Object primaryKey) Find by the primary key. |
public Entity | getSubEntity(Class cl, Object key) |
public EntityItem | getSubEntityCacheItem(Class cl, Object key) Gets the cache item referenced by __caucho_item
from an entity of class/subclass cl. |
public EntityTransaction | getTransaction() Returns the transaction. |
public Entity | getTransactionEntity(String className, Object key) |
public Entity | getTransactionEntity(int index) |
public void | initJta() |
public void | initThreadConnection() Set true for a threaded connection. |
public boolean | isActiveTransaction() Returns true if a transaction is active or
this persistence context is extended. |
public boolean | isCacheEntity(Entity entity) |
public boolean | isInTransaction() Returns true if a transaction is active. |
public boolean | isJPA() Returns true for JPA. |
public boolean | isOpen() Returns true if open. |
public void | joinTransaction() Joins the transaction. |
public Object | load(Class cl, Object key, boolean isEager) |
public Object | load(String entityName, Object key) Loads the object based on the class and primary key. |
public Object | load(Class cl, long intKey) Loads the object based on the class and primary key. |
public EntityItem | loadCacheItem(Class cl, Object key, AmberEntityHome entityHome) |
public Entity | loadEntity(Class cl, Object key, boolean isEager) Adds a new entity for the given class name and key. |
public Entity | loadFromHome(String name, Object key) Loads the object with the given class. |
public Entity | loadLazy(Class cl, String name, Object key) Loads the object with the given class. |
public Entity | loadLazy(String className, String name, Object key) Loads the object with the given class. |
public Object | loadLazy(Class cl, long intKey) Loads the object based on the class and primary key. |
public Object | loadProxy(String name, Object key) Loads the object with the given class. |
public Object | loadProxy(EntityType type, Object key) Loads the object with the given class. |
public Object | loadProxy(EntityItem entityItem) |
public void | lock(Object entity, LockModeType lockMode) Locks the object. |
public Object | makePersistent(Object obj) Loads the object based on itself. |
public void | makeTransactional(Entity entity) Makes the object transactional. |
public T | merge(T entityT) Merges the state of the entity into the current context. |
public Entity | mergeDetachedEntity(Entity entity, boolean isFullMerge) |
public AbstractQuery | parseQuery(String sql, boolean isLazy) Creates a query object from a query string. |
public void | persist(Object entityObject) Makes the instance managed. |
public void | persistFromCascade(Object o) Makes the instance managed called
from cascading operations. |
public void | popDepth() Pops the depth. |
public PreparedStatement | prepareInsertStatement(String sql) Prepares an insert statement. |
public AmberQuery | prepareLazyQuery(String queryString) Creates a query object from a query string. |
public AmberQuery | prepareQuery(String queryString) Creates a query object from a query string. |
public PreparedStatement | prepareStatement(String sql) Prepares a statement. |
public AmberQuery | prepareUpdate(String queryString) Creates a query object from a query string. |
public void | pushDepth() Pushes the depth. |
public void | putQueryCacheChunk(String sql, Object[] args, int startRow, ResultSetCacheChunk cacheChunk, ResultSetMetaData cacheMetaData) Sets the cache chunk. |
public ResultSet | query(String hsql) Select a list of objects with a Hibernate query. |
public T | recursiveMerge(T entityT) Recursively merges the state of the entity into the current context. |
public void | refresh(Object entity) Refresh the state of the instance from the database. |
void | register() Registers with the local transaction. |
public void | register(AmberCollection query) Registers a collection. |
public void | remove(Object entity) Remove the instance. |
public boolean | removeEntity(Entity entity) Removes an entity. |
public void | rollback() Rollbacks a transaction. |
public EntityItem | setEntityItem(String name, Object key, EntityItem item) Loads the object with the given class. |
public void | setExtended(boolean isExtended) Sets the extended type. |
public void | setFlushMode(FlushModeType mode) Returns the flush mode. |
public void | setTransactionalState(Entity entity) |
public void | setXA(boolean isXA) Sets XA. |
public boolean | shouldRetrieveFromCache() Returns true when cache items can be used. |
public String | toString() |
public void | update(Object obj) Updates the database with the values in object. |
public void | update(Entity entity) Updates the object. |
public int | update(String hsql) |