Package org.nuiton.topia.framework
Class TopiaFilter
java.lang.Object
org.nuiton.topia.framework.TopiaFilter
- All Implemented Interfaces:
EntityFilter
Filter
Created: 23 avr. 2010
- Since:
- 2.0
- Author:
- fdesbois
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Integerprotected Stringprotected Stringprotected Stringprotected IntegerFields inherited from interface org.nuiton.topia.framework.EntityFilter
PROPERTY_END_INDEX, PROPERTY_ORDER_BY, PROPERTY_REFERENCE_ID, PROPERTY_REFERENCE_PROPERTY, PROPERTY_START_INDEX -
Constructor Summary
Constructors -
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 startIndextoString()
-
Field Details
-
startIndex
-
endIndex
-
orderBy
-
referenceId
-
referenceProperty
-
-
Constructor Details
-
TopiaFilter
public TopiaFilter()
-
-
Method Details
-
getStartIndex
Description copied from interface:EntityFilterGet the value of startIndex- Specified by:
getStartIndexin interfaceEntityFilter- Returns:
- the value of startIndex
-
setStartIndex
Description copied from interface:EntityFilterSet the value of startIndex- Specified by:
setStartIndexin interfaceEntityFilter- Parameters:
startIndex- new value of startIndex
-
getOrderBy
Description copied from interface:EntityFilterGet the value of orderBy- Specified by:
getOrderByin interfaceEntityFilter- Returns:
- the value of orderBy
-
setOrderBy
Description copied from interface:EntityFilterSet the value of orderBy- Specified by:
setOrderByin interfaceEntityFilter- Parameters:
orderBy- new value of orderBy
-
getEndIndex
Description copied from interface:EntityFilterGet the value of endIndex- Specified by:
getEndIndexin interfaceEntityFilter- Returns:
- the value of endIndex
-
setEndIndex
Description copied from interface:EntityFilterSet the value of endIndex- Specified by:
setEndIndexin interfaceEntityFilter- Parameters:
endIndex- new value of endIndex
-
getReferenceId
Description copied from interface:EntityFilterGet the value of referenceId- Specified by:
getReferenceIdin interfaceEntityFilter- Returns:
- the value of referenceId
-
setReferenceId
Description copied from interface:EntityFilterSet the value of referenceId- Specified by:
setReferenceIdin interfaceEntityFilter
-
setReference
Description copied from interface:EntityFilterSet the value of referenceId fromentity- Specified by:
setReferencein interfaceEntityFilter- Throws:
IllegalArgumentException
-
hasReference
public boolean hasReference()Description copied from interface:EntityFilterUsed to check if the filter contains a reference.- Specified by:
hasReferencein interfaceEntityFilter- Returns:
- true if the filter contains a reference
-
getReferenceProperty
Description copied from interface:EntityFilterGet the value of referenceProperty- Specified by:
getReferencePropertyin interfaceEntityFilter- Returns:
- the value of referenceProperty
-
setReferenceProperty
Description copied from interface:EntityFilterSet the value of referenceProperty- Specified by:
setReferencePropertyin interfaceEntityFilter
-
addPropertyChangeListener
Description copied from interface:EntityFilterAdd PropertyChangeListener.- Specified by:
addPropertyChangeListenerin interfaceEntityFilter
-
removePropertyChangeListener
Description copied from interface:EntityFilterRemove PropertyChangeListener.- Specified by:
removePropertyChangeListenerin interfaceEntityFilter
-
isClassReference
Test if theentityClassis corresponding to the current reference in the filter. Will return false if no reference is set in the filter.- Specified by:
isClassReferencein interfaceEntityFilter- Parameters:
entityClass- Class reference to test- Returns:
- true if the classReference is corresponding, false otherwise
- See Also:
-
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).- Specified by:
checkReferencein interfaceEntityFilter- Parameters:
reference- Class reference to checkmandatory- If the existence of the reference is mandatory- Throws:
IllegalArgumentException- for errors on check- See Also:
-
toString
-