org.nakedobjects.plugins.hibernate.objectstore
Class HibernateObjectStore
java.lang.Object
org.nakedobjects.plugins.hibernate.objectstore.HibernateObjectStore
- All Implemented Interfaces:
- Component, NamedComponent, SessionScopedComponent, DebugInfo, ObjectStore, ObjectStorePersistence, ObjectStoreTransactionManagement, PersistenceSessionHydratorAware
- Direct Known Subclasses:
- HibernateObjectStoreImmediate
public class HibernateObjectStore
- extends java.lang.Object
- implements ObjectStore, PersistenceSessionHydratorAware
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateObjectStore
public HibernateObjectStore()
name
public java.lang.String name()
- Specified by:
name in interface NamedComponent
open
public void open()
- Specified by:
open in interface SessionScopedComponent
close
public void close()
- TODO: commit transaction (?) and close underlying Hibernate session.
- Specified by:
close in interface SessionScopedComponent
isFixturesInstalled
public boolean isFixturesInstalled()
- Specified by:
isFixturesInstalled in interface ObjectStorePersistence
reset
public void reset()
- Specified by:
reset in interface ObjectStorePersistence
startTransaction
public void startTransaction()
- Specified by:
startTransaction in interface ObjectStoreTransactionManagement
abortTransaction
public void abortTransaction()
- Specified by:
abortTransaction in interface ObjectStoreTransactionManagement
endTransaction
public void endTransaction()
- Specified by:
endTransaction in interface ObjectStoreTransactionManagement
startHibernateTransaction
protected boolean startHibernateTransaction()
- Is protected so can be overridden.
- Returns:
commitHibernateTransaction
protected void commitHibernateTransaction(boolean started)
createCreateObjectCommand
public CreateObjectCommand createCreateObjectCommand(NakedObject object)
- Specified by:
createCreateObjectCommand in interface ObjectStorePersistence
createDestroyObjectCommand
public DestroyObjectCommand createDestroyObjectCommand(NakedObject object)
- Specified by:
createDestroyObjectCommand in interface ObjectStorePersistence
createSaveObjectCommand
public SaveObjectCommand createSaveObjectCommand(NakedObject object)
- Specified by:
createSaveObjectCommand in interface ObjectStorePersistence
execute
public void execute(java.util.List<PersistenceCommand> commands)
- Specified by:
execute in interface ObjectStorePersistence- Specified by:
execute in interface ObjectStoreTransactionManagement
executeCommands
protected void executeCommands(java.util.List<PersistenceCommand> commands)
- Protected so can be overridden
getObject
public NakedObject getObject(Oid oid,
NakedObjectSpecification hint)
throws ObjectNotFoundException,
ObjectPersistenceException
- Specified by:
getObject in interface ObjectStorePersistence
- Throws:
ObjectNotFoundException
ObjectPersistenceException
resolveImmediately
public void resolveImmediately(NakedObject object)
- Specified by:
resolveImmediately in interface ObjectStorePersistence
resolveField
public void resolveField(NakedObject object,
NakedObjectAssociation field)
- Specified by:
resolveField in interface ObjectStorePersistence
getInstances
public NakedObject[] getInstances(PersistenceQuery persistenceQuery)
- Specified by:
getInstances in interface ObjectStorePersistence
hasInstances
public boolean hasInstances(NakedObjectSpecification specification)
- Specified by:
hasInstances in interface ObjectStorePersistence
getInstancesByTitleCriteria
public NakedObject[] getInstancesByTitleCriteria(PersistenceQueryFindByTitle criteria)
getInstances
public NakedObject[] getInstances(NakedObjectSpecification specification)
getInstancesByHibernateCriteria
public NakedObject[] getInstancesByHibernateCriteria(HibernateInstancesCriteria criteria)
getInstancesByPatternCriteria
public NakedObject[] getInstancesByPatternCriteria(PersistenceQueryFindByPattern criteria)
createQuery
protected org.hibernate.Query createQuery(java.lang.String select,
NakedObjectSpecification specification)
getOidForService
public Oid getOidForService(java.lang.String name)
- Specified by:
getOidForService in interface ObjectStorePersistence
registerService
public void registerService(java.lang.String service,
Oid oid)
- Specified by:
registerService in interface ObjectStorePersistence
debugData
public void debugData(DebugString debug)
- Specified by:
debugData in interface DebugInfo
debugTitle
public java.lang.String debugTitle()
- Specified by:
debugTitle in interface DebugInfo
setHydrator
public void setHydrator(PersistenceSessionHydrator hydrator)
- Specified by:
setHydrator in interface PersistenceSessionHydratorAware
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.