|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilterCriterionProvider
Generic Criterion
instance provider
contract used by the FilterCriterion
.
Implementations of this interface are responsible
for providing an appropriate Criterion
instance for the given property of the target
persistent entity.
FilterCriterion
Method Summary | |
---|---|
boolean |
enabled(java.lang.Object[] filterObjectValues,
java.lang.Object[] directValues)
Returns a flag indicating whether to use this provider during the FilterCriterion instance processing. |
org.hibernate.criterion.Criterion |
getCriterion(java.lang.String targetPropertyName,
java.lang.Object[] filterObjectValues,
java.lang.Object[] directValues)
Returns a Criterion instance corresponding
to the given property of the target persistent entity. |
Method Detail |
---|
org.hibernate.criterion.Criterion getCriterion(java.lang.String targetPropertyName, java.lang.Object[] filterObjectValues, java.lang.Object[] directValues)
Criterion
instance corresponding
to the given property of the target persistent entity.
Sample method implementations:
return Restrictions.isNotNull(targetPropertyName); return Restrictions.eq(targetPropertyName, filterObjectValues[0]); return Restrictions.between(targetPropertyName, directValues[0], directValues[1]);
targetPropertyName
- Name of the target property for
which to create the Criterion
instance (either a direct
or indirect association to the target persistent entity).filterObjectValues
- Values extracted from the filter
object.directValues
- Values provided directly by the user.
Criterion
instance for the given property.boolean enabled(java.lang.Object[] filterObjectValues, java.lang.Object[] directValues)
FilterCriterion
instance processing.
Use this method for disabling the Criterion
instance provider in certain situations, for example:
Criterion
instance due to missing or incorrect filter data)
getCriterion(String, Object[], Object[])
invocation
during the FilterCriterion
instance processing.
filterObjectValues
- Values extracted from the filter
object.directValues
- Values provided directly by the user.
FilterCriterion
instance processing,
false otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |