|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.acegisecurity.domain.service.ImmutableManagerImpl<E>
public class ImmutableManagerImpl<E extends PersistableEntity>
Base ImmutableManager implementation.
| Field Summary | |
|---|---|
protected Dao<E> |
dao
|
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
ImmutableManagerImpl()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected void |
doInitManager()
Provides hook for custom subclasses to provide initialization behaviour |
List<E> |
findAll()
Return all persistent instances, including subclasses. |
List<E> |
findId(Collection<Serializable> ids)
Find a List of PersistableEntitys, searched by
their identifiers. |
Dao<E> |
getDao()
|
protected String |
getDefaultSortOrder()
|
Class |
getSupportsClass()
|
E |
readId(Serializable id)
Load a persistent instance by its identifier, although some properties may be lazy loaded depending on the underlying DAO implementation and/or persistence engine mapping document. |
E |
readPopulatedId(Serializable id)
Loads a persistent instance by its identifier, along with any lazy loaded properties associated with that instance. |
PaginatedList<E> |
scroll(E value,
int firstElement,
int maxElements)
Find persistent instances with properties matching those of the passed PersistableEntity. |
PaginatedList<E> |
scrollPopulated(E value,
int firstElement,
int maxElements)
Find persistent instances with properties matching those of the passed PersistableEntity, with a guarantee the returned results
will have each of the value class' immediate properties
initialized. |
PaginatedList<E> |
scrollPopulatedWithSubclasses(E value,
int firstElement,
int maxElements)
Find persistent instances with properties matching those of the passed PersistableEntity, ignoring the class of the passed
PersistableEntity (useful if you pass a superclass, as you
want to find all subclass instances which match). |
PaginatedList<E> |
scrollWithSubclasses(E value,
int firstElement,
int maxElements)
Find persistent instances with properties matching those of the passed PersistableEntity, ignoring the class of the passed
PersistableEntity (useful if you pass a superclass, as you
want to find all subclass instances which match). |
void |
setBeanName(String beanName)
|
void |
setDao(Dao<E> dao)
|
void |
setSupportsClass(Class supportClass)
|
boolean |
supports(Class clazz)
Indicates whether the DAO instance provides persistence services for the specified class. |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Dao<E extends PersistableEntity> dao
| Constructor Detail |
|---|
public ImmutableManagerImpl()
| Method Detail |
|---|
public void setSupportsClass(Class supportClass)
public Class getSupportsClass()
public Dao<E> getDao()
public void setDao(Dao<E> dao)
protected String getDefaultSortOrder()
protected void doInitManager()
throws Exception
Exception
public final void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic List<E> findAll()
ImmutableManager
findAll in interface ImmutableManager<E extends PersistableEntity>List will be
returned if no matches are found)public List<E> findId(Collection<Serializable> ids)
ImmutableManagerList of PersistableEntitys, searched by
their identifiers.
findId in interface ImmutableManager<E extends PersistableEntity>ids - collection of identifiers to locate
List
will be returned if no matches are found)public E readId(Serializable id)
ImmutableManager
readId in interface ImmutableManager<E extends PersistableEntity>id - the identifier of the persistent instance desired to be
retrieved
null if not foundpublic E readPopulatedId(Serializable id)
ImmutableManager
readPopulatedId in interface ImmutableManager<E extends PersistableEntity>id - the identifier of the persistent instance desired to be
retrieved
null if not found
public PaginatedList<E> scroll(E value,
int firstElement,
int maxElements)
ImmutableManagerPersistableEntity.
Persistent instances are matched on the basis of query by example.
Properties whose value is null, empty
Strings, and any Collections are ignored in
the query by example evaluation.
scroll in interface ImmutableManager<E extends PersistableEntity>value - parameters to filter on (the class of this object will
be added to the filter)firstElement - the first result (start at zero to obtain all
results)maxElements - the maximum number of results desired for this page
of the result set
PaginatedList is returned if no results match)
public PaginatedList<E> scrollPopulated(E value,
int firstElement,
int maxElements)
ImmutableManagerPersistableEntity, with a guarantee the returned results
will have each of the value class' immediate properties
initialized.
Persistent instances are matched on the basis of query by example.
Properties whose value is null, empty
Strings, and any Collections are ignored in
the query by example evaluation.
scrollPopulated in interface ImmutableManager<E extends PersistableEntity>value - parameters to filter on (the class of this object will
be added to the filter)firstElement - the first result (start at zero to obtain all
results)maxElements - the maximum number of results desired for this page
of the result set
PaginatedList is returned if no results match)
public PaginatedList<E> scrollWithSubclasses(E value,
int firstElement,
int maxElements)
ImmutableManagerPersistableEntity, ignoring the class of the passed
PersistableEntity (useful if you pass a superclass, as you
want to find all subclass instances which match).
scrollWithSubclasses in interface ImmutableManager<E extends PersistableEntity>value - parameters to filter on (the class of this object will
NOT be added to the filter)firstElement - the first result (start at zero to obtain all
results)maxElements - the maximum number of results desired for this page
of the result set
PaginatedList is returned if no results match)
public PaginatedList<E> scrollPopulatedWithSubclasses(E value,
int firstElement,
int maxElements)
ImmutableManagerPersistableEntity, ignoring the class of the passed
PersistableEntity (useful if you pass a superclass, as you
want to find all subclass instances which match). Guarantees the returned
results will have each of the DAO's supports class' immediate
properties initialized.
scrollPopulatedWithSubclasses in interface ImmutableManager<E extends PersistableEntity>value - parameters to filter on (the class of this object will
NOT be added to the filter)firstElement - the first result (start at zero to obtain all
results)maxElements - the maximum number of results desired for this page
of the result set
PaginatedList is returned if no results match)public boolean supports(Class clazz)
ImmutableManager
supports in interface ImmutableManager<E extends PersistableEntity>clazz - to test, which should be an implementation of
PersistableEntity
true or false, indicating whether or
not the passed class is supported by this DAO instancepublic void setBeanName(String beanName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||