Package org.nuiton.topia.framework
Class TopiaFilter
java.lang.Object
org.nuiton.topia.framework.TopiaFilter
- All Implemented Interfaces:
EntityFilter
public class TopiaFilter extends java.lang.Object implements EntityFilter
Filter
Created: 23 avr. 2010
- Since:
- 2.0
- Author:
- fdesbois
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.IntegerendIndexprotected java.lang.StringorderByprotected java.lang.StringreferenceIdprotected java.lang.StringreferencePropertyprotected java.lang.IntegerstartIndexFields 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 Constructor Description TopiaFilter() -
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 startIndexjava.lang.StringtoString()
-
Field Details
-
startIndex
protected java.lang.Integer startIndex -
endIndex
protected java.lang.Integer endIndex -
orderBy
protected java.lang.String orderBy -
referenceId
protected java.lang.String referenceId -
referenceProperty
protected java.lang.String referenceProperty
-
-
Constructor Details
-
TopiaFilter
public TopiaFilter()
-
-
Method Details
-
getStartIndex
public java.lang.Integer getStartIndex()Description copied from interface:EntityFilterGet the value of startIndex- Specified by:
getStartIndexin interfaceEntityFilter- Returns:
- the value of startIndex
-
setStartIndex
public void setStartIndex(java.lang.Integer startIndex)Description copied from interface:EntityFilterSet the value of startIndex- Specified by:
setStartIndexin interfaceEntityFilter- Parameters:
startIndex- new value of startIndex
-
getOrderBy
public java.lang.String getOrderBy()Description copied from interface:EntityFilterGet the value of orderBy- Specified by:
getOrderByin interfaceEntityFilter- Returns:
- the value of orderBy
-
setOrderBy
public void setOrderBy(java.lang.String orderBy)Description copied from interface:EntityFilterSet the value of orderBy- Specified by:
setOrderByin interfaceEntityFilter- Parameters:
orderBy- new value of orderBy
-
getEndIndex
public java.lang.Integer getEndIndex()Description copied from interface:EntityFilterGet the value of endIndex- Specified by:
getEndIndexin interfaceEntityFilter- Returns:
- the value of endIndex
-
setEndIndex
public void setEndIndex(java.lang.Integer endIndex)Description copied from interface:EntityFilterSet the value of endIndex- Specified by:
setEndIndexin interfaceEntityFilter- Parameters:
endIndex- new value of endIndex
-
getReferenceId
public java.lang.String getReferenceId()Description copied from interface:EntityFilterGet the value of referenceId- Specified by:
getReferenceIdin interfaceEntityFilter- Returns:
- the value of referenceId
-
setReferenceId
public void setReferenceId(java.lang.String referenceId)Description copied from interface:EntityFilterSet the value of referenceId- Specified by:
setReferenceIdin interfaceEntityFilter
-
setReference
public void setReference(java.lang.Object entity) throws java.lang.IllegalArgumentExceptionDescription copied from interface:EntityFilterSet the value of referenceId fromentity- Specified by:
setReferencein interfaceEntityFilter- Throws:
java.lang.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
public java.lang.String getReferenceProperty()Description copied from interface:EntityFilterGet the value of referenceProperty- Specified by:
getReferencePropertyin interfaceEntityFilter- Returns:
- the value of referenceProperty
-
setReferenceProperty
public void setReferenceProperty(java.lang.String referenceProperty)Description copied from interface:EntityFilterSet the value of referenceProperty- Specified by:
setReferencePropertyin interfaceEntityFilter
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)Description copied from interface:EntityFilterAdd PropertyChangeListener.- Specified by:
addPropertyChangeListenerin interfaceEntityFilter
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)Description copied from interface:EntityFilterRemove PropertyChangeListener.- Specified by:
removePropertyChangeListenerin interfaceEntityFilter
-
isClassReference
public 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.- Specified by:
isClassReferencein interfaceEntityFilter- Parameters:
entityClass- Class reference to test- Returns:
- true if the classReference is corresponding, false otherwise
- See Also:
checkReference(Class, boolean)
-
checkReference
public 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).- Specified by:
checkReferencein interfaceEntityFilter- 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)
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-