Package org.nuiton.topia.framework
Interface EntityFilter
- All Known Implementing Classes:
TopiaFilter
public interface EntityFilter
Created: 3 juin 2010
- Version:
- $Id$
- Author:
- fdesbois <fdesbois@codelutin.com>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_END_INDEXstatic java.lang.StringPROPERTY_ORDER_BYstatic java.lang.StringPROPERTY_REFERENCE_IDstatic java.lang.StringPROPERTY_REFERENCE_PROPERTYstatic java.lang.StringPROPERTY_START_INDEX -
Method Summary
Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)Add PropertyChangeListener.voidcheckReference(java.lang.Class<?> reference, boolean mandatory)Use to check ifreferenceclass is supported by the current filter reference.java.lang.IntegergetEndIndex()Get the value of endIndexjava.lang.StringgetOrderBy()Get the value of orderByjava.lang.StringgetReferenceId()Get the value of referenceIdjava.lang.StringgetReferenceProperty()Get the value of referencePropertyjava.lang.IntegergetStartIndex()Get the value of startIndexbooleanhasReference()Used to check if the filter contains a reference.booleanisClassReference(java.lang.Class<?> entityClass)Test if theentityClassis corresponding to the current reference in the filter.voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)Remove PropertyChangeListener.voidsetEndIndex(java.lang.Integer endIndex)Set the value of endIndexvoidsetOrderBy(java.lang.String orderBy)Set the value of orderByvoidsetReference(java.lang.Object entity)Set the value of referenceId fromentityvoidsetReferenceId(java.lang.String referenceId)Set the value of referenceIdvoidsetReferenceProperty(java.lang.String referenceProperty)Set the value of referencePropertyvoidsetStartIndex(java.lang.Integer startIndex)Set the value of startIndex
-
Field Details
-
PROPERTY_START_INDEX
static final java.lang.String PROPERTY_START_INDEX- See Also:
- Constant Field Values
-
PROPERTY_END_INDEX
static final java.lang.String PROPERTY_END_INDEX- See Also:
- Constant Field Values
-
PROPERTY_ORDER_BY
static final java.lang.String PROPERTY_ORDER_BY- See Also:
- Constant Field Values
-
PROPERTY_REFERENCE_ID
static final java.lang.String PROPERTY_REFERENCE_ID- See Also:
- Constant Field Values
-
PROPERTY_REFERENCE_PROPERTY
static final java.lang.String PROPERTY_REFERENCE_PROPERTY- See Also:
- Constant Field Values
-
-
Method Details
-
getStartIndex
java.lang.Integer getStartIndex()Get the value of startIndex- Returns:
- the value of startIndex
-
setStartIndex
void setStartIndex(java.lang.Integer startIndex)Set the value of startIndex- Parameters:
startIndex- new value of startIndex
-
getOrderBy
java.lang.String getOrderBy()Get the value of orderBy- Returns:
- the value of orderBy
-
setOrderBy
void setOrderBy(java.lang.String orderBy)Set the value of orderBy- Parameters:
orderBy- new value of orderBy
-
getEndIndex
java.lang.Integer getEndIndex()Get the value of endIndex- Returns:
- the value of endIndex
-
setEndIndex
void setEndIndex(java.lang.Integer endIndex)Set the value of endIndex- Parameters:
endIndex- new value of endIndex
-
getReferenceId
java.lang.String getReferenceId()Get the value of referenceId- Returns:
- the value of referenceId
-
setReferenceId
void setReferenceId(java.lang.String referenceId)Set the value of referenceId- Parameters:
referenceId-
-
setReference
void setReference(java.lang.Object entity) throws java.lang.IllegalArgumentExceptionSet the value of referenceId fromentity- Parameters:
entity-- Throws:
java.lang.IllegalArgumentException
-
hasReference
boolean hasReference()Used to check if the filter contains a reference.- Returns:
- true if the filter contains a reference
-
checkReference
void checkReference(java.lang.Class<?> reference, boolean mandatory) throws java.lang.IllegalArgumentExceptionUse to check ifreferenceclass is supported by the current filter reference. The reference can be notmandatory. Exceptions are thrown if the check failed. If you prefer to have a boolean instead of exceptions, you can useisClassReference(Class).- Parameters:
reference- Class reference to checkmandatory- If the existence of the reference is mandatory- Throws:
java.lang.IllegalArgumentException- for errors on check- See Also:
hasReference(),isClassReference(Class)
-
isClassReference
boolean isClassReference(java.lang.Class<?> entityClass)Test if theentityClassis corresponding to the current reference in the filter. Will return false if no reference is set in the filter.- Parameters:
entityClass- Class reference to test- Returns:
- true if the classReference is corresponding, false otherwise
- See Also:
checkReference(Class, boolean)
-
getReferenceProperty
java.lang.String getReferenceProperty()Get the value of referenceProperty- Returns:
- the value of referenceProperty
-
setReferenceProperty
void setReferenceProperty(java.lang.String referenceProperty)Set the value of referenceProperty- Parameters:
referenceProperty-
-
addPropertyChangeListener
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)Add PropertyChangeListener.- Parameters:
listener-
-
removePropertyChangeListener
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)Remove PropertyChangeListener.- Parameters:
listener-
-