|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.archiviststoolkit.mydomain.DomainAccessObjectImpl
public class DomainAccessObjectImpl
Default implementation of a DomainAccessObject specific to hibernate version 2.
| Constructor Summary | |
|---|---|
DomainAccessObjectImpl(java.lang.Class clazz)
Constructor which builds a DAO for this class. |
|
| Method Summary | |
|---|---|
void |
add(DomainObject domainObject)
Add an instance to this DAO. |
void |
addGroup(java.util.Collection collection,
java.awt.Component parent)
Add a group of instances. |
void |
addListener(DomainAccessListener listener)
Add a listener for this DAO. |
void |
closeLongSession()
|
void |
closeLongSessionRollback()
|
void |
delete(DomainObject domainObject)
Delete this object from the data store. |
void |
deleteById(java.lang.Long identifier)
Delete this object from the data store. |
void |
deleteGroup(java.util.Collection collection)
Delete these objects from the data store. |
void |
deleteLongSession(DomainObject domainObject)
|
void |
domainChanged(DomainAccessEvent event)
Called to notify the listener that an event has occurred. |
java.util.Collection |
findAll(org.hibernate.LockMode lockmode,
java.lang.String... sortFields)
Get a collection of all objects under the control of this domain access object. |
java.util.Collection |
findAll(java.lang.String... sortFields)
Return a collection with everything in this DAO. |
java.util.Collection |
findAllLongSession(java.lang.Boolean alwaysApplyFilters,
java.lang.String... sortFields)
|
java.util.Collection |
findAllLongSession(java.lang.String... sortFields)
Get a collection of all objects under the control of this domain access object. |
java.util.Collection |
findByExample(java.lang.Object instance)
Find a collection of domain objects by example. |
java.util.Collection |
findByNamedQuery(java.lang.String queryName)
Return a collection which conforms to the named query. |
java.util.Collection |
findByNamedQuery(java.lang.String queryName,
java.lang.Object propertyObject)
Return a collection which conforms to the named query. |
DomainObject |
findByPrimaryKey(java.lang.Long identifier)
Find an instance by its identifier. |
DomainObject |
findByPrimaryKeyLongSession(java.lang.Long identifier)
Find an instance by its identifier. |
DomainObject |
findByPrimaryKeyLongSessionForPrinting(java.lang.Long identifier)
Find an instance by its identifier. |
java.util.Collection |
findByPropertyValue(java.lang.String propertyName,
java.lang.Object value)
Find instances through a named query without parameters. |
java.util.Collection |
findByPropertyValues(java.lang.String propertyName,
java.lang.Object[] values)
Find instances through a named query without parameters. |
java.util.Collection |
findByPropertyValuesLongSession(java.lang.String propertyName,
java.lang.Object[] values)
Find instances through a named query without parameters. |
java.util.Collection |
findByQuery(java.lang.String queryString)
Find a collection of domain objects by direct hql query. |
java.util.Collection |
findByQueryEditor(QueryEditor editor,
InfiniteProgressPanel progressPanel)
Find a collection of domain objects by direct hql query. |
DomainObject |
findByUniquePropertyValue(java.lang.String propertyName,
java.lang.Object value)
Find instances through a named query without parameters. |
DomainObject |
findByUniquePropertyValueLongSession(java.lang.String propertyName,
java.lang.Object value)
Find instances through a named query without parameters. |
java.lang.Integer |
getCountBasedOnPropertyValue(java.lang.String propertyName,
java.lang.Object value)
|
org.hibernate.Session |
getLongSession()
|
protected java.lang.Class |
getPersistentClass()
|
int |
merge(java.util.Collection<DomainObject> mergeFrom,
DomainObject mergeTo,
InfiniteProgressPanel progressPanel)
|
void |
notifyListeners(DomainAccessEvent event)
Notify all the listeners of an event. |
void |
removeListener(DomainAccessListener listener)
Remove a listener from this DAO. |
void |
update(DomainObject domainObject)
Update the instance within this DAO. |
void |
updateLongSession(DomainObject domainObject)
Update the instance within this DAO. |
void |
updateLongSession(DomainObject domainObject,
boolean closeSession)
Update the instance within this DAO. |
int |
updateTextField(java.lang.String propertyName,
java.lang.String oldValue,
java.lang.String newValue,
InfiniteProgressPanel progressPanel)
Find instances through a named query without parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomainAccessObjectImpl(java.lang.Class clazz)
clazz - the class to build to| Method Detail |
|---|
public final void addListener(DomainAccessListener listener)
addListener in interface DomainAccessObjectlistener - the listener to addpublic final void removeListener(DomainAccessListener listener)
removeListener in interface DomainAccessObjectlistener - the listener to removepublic final void notifyListeners(DomainAccessEvent event)
event - the event which should be sent to all listeners
public final void add(DomainObject domainObject)
throws PersistenceException
add in interface DomainAccessObjectdomainObject - the object to add
PersistenceException - fails if we cannot persist the instance
public final void addGroup(java.util.Collection collection,
java.awt.Component parent)
throws PersistenceException
addGroup in interface DomainAccessObjectcollection - the objects to add
PersistenceException - fails if we cannot persist the instance
public final void update(DomainObject domainObject)
throws PersistenceException
update in interface DomainAccessObjectdomainObject - the instance to update
PersistenceException - fails if we cannot update the instance
public final void updateLongSession(DomainObject domainObject)
throws PersistenceException
updateLongSession in interface DomainAccessObjectdomainObject - the instance to update
PersistenceException - fails if we cannot update the instance
public final void updateLongSession(DomainObject domainObject,
boolean closeSession)
throws PersistenceException
updateLongSession in interface DomainAccessObjectdomainObject - the instance to update
PersistenceException - fails if we cannot update the instance
public void deleteGroup(java.util.Collection collection)
throws PersistenceException
deleteGroup in interface DomainAccessObjectcollection - the object to delete
PersistenceException - fails if we cannot delete the instance
public void delete(DomainObject domainObject)
throws DeleteException
delete in interface DomainAccessObjectdomainObject - the object to delete
DeleteException - fails if we cannot delete the instance
public final void deleteLongSession(DomainObject domainObject)
throws DeleteException
deleteLongSession in interface DomainAccessObjectDeleteException
public final void deleteById(java.lang.Long identifier)
throws DeleteException
identifier - the id of the object to delete
DeleteException - fails if we cannot delete the instance
public final DomainObject findByPrimaryKey(java.lang.Long identifier)
throws LookupException
findByPrimaryKey in interface DomainAccessObjectidentifier - the identifier we are looking for
LookupException - fails if we cannot execute the lookup
public final DomainObject findByPrimaryKeyLongSession(java.lang.Long identifier)
throws LookupException
findByPrimaryKeyLongSession in interface DomainAccessObjectidentifier - the identifier we are looking for
LookupException - fails if we cannot execute the lookup
public final DomainObject findByPrimaryKeyLongSessionForPrinting(java.lang.Long identifier)
throws LookupException
findByPrimaryKeyLongSessionForPrinting in interface DomainAccessObjectidentifier - the identifier we are looking for
LookupException - fails if we cannot execute the lookup
public void closeLongSession()
throws java.sql.SQLException
closeLongSession in interface DomainAccessObjectjava.sql.SQLException
public void closeLongSessionRollback()
throws java.sql.SQLException
closeLongSessionRollback in interface DomainAccessObjectjava.sql.SQLExceptionpublic org.hibernate.Session getLongSession()
getLongSession in interface DomainAccessObject
public java.util.Collection findAll(java.lang.String... sortFields)
throws LookupException
findAll in interface DomainAccessObjectLookupException - fails if we cannot execute the lookup
public java.util.Collection findAll(org.hibernate.LockMode lockmode,
java.lang.String... sortFields)
throws LookupException
DomainAccessObject
findAll in interface DomainAccessObjectLookupException - if we failed to execute the lookup
public java.util.Collection findAllLongSession(java.lang.String... sortFields)
throws LookupException
DomainAccessObject
findAllLongSession in interface DomainAccessObjectLookupException - if we failed to execute the lookup
public java.util.Collection findAllLongSession(java.lang.Boolean alwaysApplyFilters,
java.lang.String... sortFields)
throws LookupException
findAllLongSession in interface DomainAccessObjectLookupException
public final java.util.Collection findByQuery(java.lang.String queryString)
throws LookupException
findByQuery in interface DomainAccessObjectqueryString - the hql statement
LookupException - if we failed to find the objects.
public final java.util.Collection findByQueryEditor(QueryEditor editor,
InfiniteProgressPanel progressPanel)
findByQueryEditor in interface DomainAccessObjecteditor - an AT query editor
public final java.util.Collection findByExample(java.lang.Object instance)
throws LookupException
findByExample in interface DomainAccessObjectinstance - the example object
LookupException - if we failed to find the objects.
public java.util.Collection findByPropertyValue(java.lang.String propertyName,
java.lang.Object value)
throws LookupException
findByPropertyValue in interface DomainAccessObjectpropertyName - the name of the propertyvalue - the value of the property
LookupException - if we failed to execute the query
public java.util.Collection findByPropertyValues(java.lang.String propertyName,
java.lang.Object[] values)
throws LookupException
findByPropertyValues in interface DomainAccessObjectpropertyName - the name of the propertyvalues - the value of the property
LookupException - if we failed to execute the query
public java.util.Collection findByPropertyValuesLongSession(java.lang.String propertyName,
java.lang.Object[] values)
throws LookupException
findByPropertyValuesLongSession in interface DomainAccessObjectpropertyName - the name of the propertyvalues - the value of the property
LookupException - if we failed to execute the query
public DomainObject findByUniquePropertyValue(java.lang.String propertyName,
java.lang.Object value)
throws LookupException
findByUniquePropertyValue in interface DomainAccessObjectpropertyName - the name of the propertyvalue - the value of the property
LookupException - if we failed to execute the query
public DomainObject findByUniquePropertyValueLongSession(java.lang.String propertyName,
java.lang.Object value)
throws LookupException
findByUniquePropertyValueLongSession in interface DomainAccessObjectpropertyName - the name of the propertyvalue - the value of the property
LookupException - if we failed to execute the query
public int updateTextField(java.lang.String propertyName,
java.lang.String oldValue,
java.lang.String newValue,
InfiniteProgressPanel progressPanel)
throws LookupException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
ValidationException
updateTextField in interface DomainAccessObjectpropertyName - the name of the propertyoldValue - the old value of the propertynewValue - the new value of the property
LookupException - if we failed to execute the query
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
ValidationException
public java.lang.Integer getCountBasedOnPropertyValue(java.lang.String propertyName,
java.lang.Object value)
getCountBasedOnPropertyValue in interface DomainAccessObject
public int merge(java.util.Collection<DomainObject> mergeFrom,
DomainObject mergeTo,
InfiniteProgressPanel progressPanel)
throws MergeException
merge in interface DomainAccessObjectMergeException
public final java.util.Collection findByNamedQuery(java.lang.String queryName,
java.lang.Object propertyObject)
throws LookupException
findByNamedQuery in interface DomainAccessObjectqueryName - the name of the querypropertyObject - the bean which is used to pass properties to the query
LookupException - fails if we cannot execute the named query
public final java.util.Collection findByNamedQuery(java.lang.String queryName)
throws LookupException
findByNamedQuery in interface DomainAccessObjectqueryName - the name of the query
LookupException - fails if we cannot execute the querypublic final void domainChanged(DomainAccessEvent event)
domainChanged in interface DomainAccessListenerevent - denotes that a domainobject has changed.protected java.lang.Class getPersistentClass()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||