|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.domain.hibernate.IntrospectionManagerHibernate
public class IntrospectionManagerHibernate
IntrospectionManager that uses Hibernate metadata to locate
children.
Add children objects are added to the List of children objects
to validate, irrespective of whether a save/update/delete operation will
cascade to them. This is not a perfect solution, but addresses most
real-world validation requirements (you can always implement your own
IntrospectionManager if you prefer).
This implementation only adds properties of a parent object that have a
Hibernate net.sf.hibernate.type.Type that indicates it is an object
type (ie net.sf.hibernate.type.Type#isObjectType()).
| Constructor Summary | |
|---|---|
IntrospectionManagerHibernate()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
org.hibernate.SessionFactory[] |
getSessionFactories()
|
ValidationRegistryManager |
getValidationRegistryManager()
|
void |
obtainImmediateChildren(Object parentObject,
List<Object> allObjects)
Locates any direct children of a domain object. |
void |
setSessionFactories(org.hibernate.SessionFactory[] sessionFactorys)
|
void |
setValidationRegistryManager(ValidationRegistryManager validationRegistryManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntrospectionManagerHibernate()
| Method Detail |
|---|
public void setSessionFactories(org.hibernate.SessionFactory[] sessionFactorys)
public org.hibernate.SessionFactory[] getSessionFactories()
public void setValidationRegistryManager(ValidationRegistryManager validationRegistryManager)
public ValidationRegistryManager getValidationRegistryManager()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public void obtainImmediateChildren(Object parentObject,
List<Object> allObjects)
IntrospectionManager
Typically used with a ValidationManager to validate each of the
located children.
Implementations should only add the immediate layer of children. Grandchildren, great-grandchildren etc should not be added.
obtainImmediateChildren in interface IntrospectionManagerparentObject - the immediate parent which all children should share
(guaranteed to never be null)allObjects - the list to which this method should append each
immediate child (guaranteed to never be null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||