ariba.ui.meta.jpa
Class JPAContext

java.lang.Object
  extended by ariba.ui.meta.persistence.ObjectContext
      extended by ariba.ui.meta.jpa.JPAContext
Direct Known Subclasses:
HibernateContext

public abstract class JPAContext
extends ObjectContext


Nested Class Summary
 
Nested classes/interfaces inherited from class ariba.ui.meta.persistence.ObjectContext
ObjectContext.ChangeWatch, ObjectContext.EntityQueryFilterProvider, ObjectContext.Provider
 
Method Summary
 boolean contains(java.lang.Object o)
           
 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).
 java.util.List executeNamedQuery(java.lang.String s, java.util.Map<java.lang.String,java.lang.Object> params)
           
<T> T
find(java.lang.Class<T> tClass, java.lang.Object primaryKey)
           
static EntityManagerFactory getDefaultFactory()
           
 java.lang.Object getDelegate()
           
 EntityManager getJPAEntityManager()
           
static void initialize()
           
 java.lang.Boolean isTransient(java.lang.Object o)
           
 void lock(java.lang.Object o)
           
<T> T
merge(T t)
           
 QueryProcessor processorForQuery(QuerySpecification spec)
           
 void recordForInsert(java.lang.Object o)
          Records object for insert on next save().
static void registerQueryProcessor(QueryProcessor processor)
           
 void remove(java.lang.Object o)
           
 void save()
           
static void setDefaultFactory(EntityManagerFactory defaultFactory)
           
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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(java.lang.Object o)
Specified by:
remove in class ObjectContext

find

public <T> T find(java.lang.Class<T> tClass,
                  java.lang.Object primaryKey)
Specified by:
find in class ObjectContext

recordForInsert

public void recordForInsert(java.lang.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 java.lang.Boolean isTransient(java.lang.Object o)

lock

public void lock(java.lang.Object o)
Specified by:
lock in class ObjectContext

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in class ObjectContext

executeNamedQuery

public java.util.List executeNamedQuery(java.lang.String s,
                                        java.util.Map<java.lang.String,java.lang.Object> params)
Specified by:
executeNamedQuery in class ObjectContext

getDelegate

public java.lang.Object getDelegate()
Specified by:
getDelegate in class ObjectContext

getJPAEntityManager

public EntityManager getJPAEntityManager()


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.