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 -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd PropertyChangeListener.voidcheckReference(Class<?> reference, boolean mandatory) Use to check ifreferenceclass is supported by the current filter reference.Get the value of endIndexGet the value of orderByGet the value of referenceIdGet the value of referencePropertyGet the value of startIndexbooleanUsed to check if the filter contains a reference.booleanisClassReference(Class<?> entityClass) Test if theentityClassis corresponding to the current reference in the filter.voidRemove PropertyChangeListener.voidsetEndIndex(Integer endIndex) Set the value of endIndexvoidsetOrderBy(String orderBy) Set the value of orderByvoidsetReference(Object entity) Set the value of referenceId fromentityvoidsetReferenceId(String referenceId) Set the value of referenceIdvoidsetReferenceProperty(String referenceProperty) Set the value of referencePropertyvoidsetStartIndex(Integer startIndex) Set the value of startIndex
-
Field Details
-
PROPERTY_START_INDEX
- See Also:
-
PROPERTY_END_INDEX
- See Also:
-
PROPERTY_ORDER_BY
- See Also:
-
PROPERTY_REFERENCE_ID
- See Also:
-
PROPERTY_REFERENCE_PROPERTY
- See Also:
-
-
Method Details
-
getStartIndex
Integer getStartIndex()Get the value of startIndex- Returns:
- the value of startIndex
-
setStartIndex
Set the value of startIndex- Parameters:
startIndex- new value of startIndex
-
getOrderBy
String getOrderBy()Get the value of orderBy- Returns:
- the value of orderBy
-
setOrderBy
Set the value of orderBy- Parameters:
orderBy- new value of orderBy
-
getEndIndex
Integer getEndIndex()Get the value of endIndex- Returns:
- the value of endIndex
-
setEndIndex
Set the value of endIndex- Parameters:
endIndex- new value of endIndex
-
getReferenceId
String getReferenceId()Get the value of referenceId- Returns:
- the value of referenceId
-
setReferenceId
Set the value of referenceId- Parameters:
referenceId-
-
setReference
Set the value of referenceId fromentity- Parameters:
entity-- Throws:
IllegalArgumentException
-
hasReference
boolean hasReference()Used to check if the filter contains a reference.- Returns:
- true if the filter contains a reference
-
checkReference
Use 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:
IllegalArgumentException- for errors on check- See Also:
-
isClassReference
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:
-
getReferenceProperty
String getReferenceProperty()Get the value of referenceProperty- Returns:
- the value of referenceProperty
-
setReferenceProperty
Set the value of referenceProperty- Parameters:
referenceProperty-
-
addPropertyChangeListener
Add PropertyChangeListener.- Parameters:
listener-
-
removePropertyChangeListener
Remove PropertyChangeListener.- Parameters:
listener-
-