ariba.ui.meta.jpa
Class JPAContext
java.lang.Object
ariba.ui.meta.persistence.ObjectContext
ariba.ui.meta.jpa.JPAContext
- Direct Known Subclasses:
- HibernateContext
public abstract class JPAContext
- extends ObjectContext
| Methods inherited from class ariba.ui.meta.persistence.ObjectContext |
bind, bindNestedContext, bindNewContext, bindNewContext, create, create, createChangeWatch, createContext, executeQuery, executeQuery, findOne, get, getParentContext, getPrimaryKey, getProvider, groupName_debug, peek, registerQueryFilterProviderForEntityClass, setProvider, typeProvider, unbind, unregisterQueryFilterProviderForEntityClass, userMap |
initialize
public static void initialize()
getDefaultFactory
public static EntityManagerFactory getDefaultFactory()
setDefaultFactory
public static void setDefaultFactory(EntityManagerFactory defaultFactory)
registerQueryProcessor
public static void registerQueryProcessor(QueryProcessor processor)
processorForQuery
public QueryProcessor processorForQuery(QuerySpecification spec)
- Specified by:
processorForQuery in class ObjectContext
merge
public <T> T merge(T t)
- Specified by:
merge in class ObjectContext
remove
public void remove(Object o)
- Specified by:
remove in class ObjectContext
find
public <T> T find(Class<T> tClass,
Object primaryKey)
- Specified by:
find in class ObjectContext
recordForInsert
public void recordForInsert(Object o)
- Description copied from class:
ObjectContext
- Records object for insert on next save(). Some contexts may persist here, others
may defer the persist until just pre-save, to give the newly created object a change
to be fully initialized prior to persist()
- Overrides:
recordForInsert in class ObjectContext
- Parameters:
o - object instance to be inserted
save
public void save()
- Specified by:
save in class ObjectContext
createNestedContext
public ObjectContext createNestedContext()
- NOTE: this implementation is currently BROKEN! The JPA EntityManager API does not include support
for nested EntityManagers, and this attempt to emulate from the outside (including using Hibernate
interceptor APIs) does not work completely (do to issues with applying merge() when saving back
unsaved objects from the child back to the parent).
- Overrides:
createNestedContext in class ObjectContext
- Returns:
- the new child context instance
isTransient
public Boolean isTransient(Object o)
lock
public void lock(Object o)
- Specified by:
lock in class ObjectContext
contains
public boolean contains(Object o)
- Specified by:
contains in class ObjectContext
executeNamedQuery
public List executeNamedQuery(String s,
Map<String,Object> params)
- Specified by:
executeNamedQuery in class ObjectContext
getDelegate
public Object getDelegate()
- Specified by:
getDelegate in class ObjectContext
getJPAEntityManager
public EntityManager getJPAEntityManager()
AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.