|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.beanlib.hibernate.HibernatePropertyFilter
public class HibernatePropertyFilter
A default implementation used to determine if a Hibernate property that follows the JavaBean getter/setter convention should be propagated. Each propagation decision can be controlled by specifying
vetoer used to veto the propagation of a property
| Field Summary | |
|---|---|
private String |
applicationPackagePrefix
An entity bean under a package with a name that matches this prefix will be included for replication, eagerly fetched if necessary. |
private Set<? extends CollectionPropertyName<?>> |
collectionPropertyNameSet
The set of collection and map properties that will be replicated, eagerly fetching if necessary. |
private Set<Class<?>> |
entityBeanClassSet
The set of entity bean classes for matching properties that will be replicated, eagerly fetching if necessary. |
private PropertyFilter |
vetoer
Used to veto the propagation of a property. |
| Constructor Summary | |
|---|---|
HibernatePropertyFilter()
Constructs with the default behavior of replicating all properties recursively. |
|
HibernatePropertyFilter(Set<Class<?>> entityBeanClassSet,
Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet,
PropertyFilter vetoer)
Constructs with the specified options of controlling what to be replicated and what not. |
|
HibernatePropertyFilter(String applicationPackagePrefix)
Constructs with an application package prefix. |
|
HibernatePropertyFilter(String applicationPackagePrefix,
Set<Class<?>> entityBeanClassSet,
Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet,
PropertyFilter vetoer)
Constructs with the specified options of controlling what to be replicated and what not. |
|
| Method Summary | |
|---|---|
private boolean |
checkCollectionProperty(String propertyName,
Method readerMethod)
|
Set<CollectionPropertyName<?>> |
getCollectionPropertyNameSet()
Returns the configured set of collection and map properties that are to be replicated, eagerly fetching if necessary; null if all collection and map properties are to be replicated; or empty if no collection nor map properties are to be replicated. |
Set<Class<?>> |
getEntityBeanClassSet()
Returns the configured set of entity bean classes for matching properties that will be replicated, eagerly fetching if necessary; null if all entity bean classes are to be replicated; or empty if no entity bean class is to be replicated. |
PropertyFilter |
getVetoer()
Returns the vetoer configured for vetoing the propagation of a property. |
boolean |
isApplicationClass(Class<?> c)
Returns true iff c is an application class. |
boolean |
propagate(String propertyName,
Method readerMethod)
Returns true if the given JavaBean property should be propagated; false otherwise. |
boolean |
propagateImpl(String propertyName,
Method readerMethod)
|
HibernatePropertyFilter |
withCollectionPropertyNameSet(Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet)
Used to configure the set of collection and map properties that will be replicated, eagerly fetching if necessary. |
HibernatePropertyFilter |
withEntityBeanClassSet(Set<Class<?>> entityBeanClassSet)
Used to configure the set of entity bean classes for matching properties that will be replicated, eagerly fetching if necessary. |
HibernatePropertyFilter |
withVetoer(PropertyFilter vetoer)
Used to configure a vetoer for vetoing the propagation of a property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Set<Class<?>> entityBeanClassSet
private Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet
private PropertyFilter vetoer
private final String applicationPackagePrefix
entityBeanClassSet applies.
| Constructor Detail |
|---|
public HibernatePropertyFilter(Set<Class<?>> entityBeanClassSet,
Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet,
PropertyFilter vetoer)
entityBeanClassSet - The set of entity bean classes for matching properties that will be replicated,
eagerly fetching if necessary.
Null means all whereas empty means none.collectionPropertyNameSet - The set of collection and map properties that will be replicated,
eagerly fetching if necessary.
Null means all whereas empty means none.vetoer - used to veto the propagation of a JavaBean property.
public HibernatePropertyFilter(String applicationPackagePrefix,
Set<Class<?>> entityBeanClassSet,
Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet,
PropertyFilter vetoer)
applicationPackagePrefix - An entity bean under a package with a name
that matches this prefix will be included for replication,
eagerly fetched if necessary.
Otherwise, the semantics of entityBeanClassSet applies.entityBeanClassSet - The set of entity bean classes for matching properties that will be replicated,
eagerly fetching if necessary.
Null means all whereas empty means none.collectionPropertyNameSet - The set of collection and map properties that will be replicated,
eagerly fetching if necessary.
Null means all whereas empty means none.vetoer - used to veto the propagation of a JavaBean property.public HibernatePropertyFilter()
public HibernatePropertyFilter(String applicationPackagePrefix)
applicationPackagePrefix - An entity bean under a package with a name
that matches this prefix will be included for replication,
eagerly fetched if necessary.
Otherwise, the semantics of entityBeanClassSet applies.| Method Detail |
|---|
public Set<Class<?>> getEntityBeanClassSet()
public HibernatePropertyFilter withEntityBeanClassSet(Set<Class<?>> entityBeanClassSet)
entityBeanClassSet - the set of entity bean classes for matching properties that will be replicated,
eagerly fetching if necessary.
null if all entity bean classes are to be replicated;
or empty if no entity bean class is to be replicated.
public Set<CollectionPropertyName<?>> getCollectionPropertyNameSet()
public HibernatePropertyFilter withCollectionPropertyNameSet(Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet)
collectionPropertyNameSet - set of collection and map properties that will be replicated,
eagerly fetching if necessary;
null if all collection and map properties are to be replicated;
or empty if no collection nor map properties are to be replicated.
public PropertyFilter getVetoer()
public HibernatePropertyFilter withVetoer(PropertyFilter vetoer)
public boolean propagate(String propertyName,
Method readerMethod)
PropertyFilter
propagate in interface PropertyFilterpropertyName - JavaBean property name.readerMethod - reader method of the JavaBean property name.
public boolean propagateImpl(String propertyName,
Method readerMethod)
private boolean checkCollectionProperty(String propertyName,
Method readerMethod)
public boolean isApplicationClass(Class<?> c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||