public class TopiaFilter extends Object implements EntityFilter
Modifier and Type | Field and Description |
---|---|
protected Integer |
endIndex |
protected String |
orderBy |
protected String |
referenceId |
protected String |
referenceProperty |
protected Integer |
startIndex |
PROPERTY_END_INDEX, PROPERTY_ORDER_BY, PROPERTY_REFERENCE_ID, PROPERTY_REFERENCE_PROPERTY, PROPERTY_START_INDEX
Constructor and Description |
---|
TopiaFilter() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add PropertyChangeListener.
|
void |
checkReference(Class<?> reference,
boolean mandatory)
Use to check if
reference class is supported by the current
filter reference. |
Integer |
getEndIndex()
Get the value of endIndex
|
String |
getOrderBy()
Get the value of orderBy
|
String |
getReferenceId()
Get the value of referenceId
|
String |
getReferenceProperty()
Get the value of referenceProperty
|
Integer |
getStartIndex()
Get the value of startIndex
|
boolean |
hasReference()
Used to check if the filter contains a reference.
|
boolean |
isClassReference(Class<?> entityClass)
Test if the
entityClass is corresponding to the current reference
in the filter. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove PropertyChangeListener.
|
void |
setEndIndex(Integer endIndex)
Set the value of endIndex
|
void |
setOrderBy(String orderBy)
Set the value of orderBy
|
void |
setReference(Object entity)
Set the value of referenceId from
entity |
void |
setReferenceId(String referenceId)
Set the value of referenceId
|
void |
setReferenceProperty(String referenceProperty)
Set the value of referenceProperty
|
void |
setStartIndex(Integer startIndex)
Set the value of startIndex
|
String |
toString() |
protected Integer startIndex
protected Integer endIndex
protected String orderBy
protected String referenceId
protected String referenceProperty
public Integer getStartIndex()
EntityFilter
getStartIndex
in interface EntityFilter
public void setStartIndex(Integer startIndex)
EntityFilter
setStartIndex
in interface EntityFilter
startIndex
- new value of startIndexpublic String getOrderBy()
EntityFilter
getOrderBy
in interface EntityFilter
public void setOrderBy(String orderBy)
EntityFilter
setOrderBy
in interface EntityFilter
orderBy
- new value of orderBypublic Integer getEndIndex()
EntityFilter
getEndIndex
in interface EntityFilter
public void setEndIndex(Integer endIndex)
EntityFilter
setEndIndex
in interface EntityFilter
endIndex
- new value of endIndexpublic String getReferenceId()
EntityFilter
getReferenceId
in interface EntityFilter
public void setReferenceId(String referenceId)
EntityFilter
setReferenceId
in interface EntityFilter
public void setReference(Object entity) throws IllegalArgumentException
EntityFilter
entity
setReference
in interface EntityFilter
IllegalArgumentException
public boolean hasReference()
EntityFilter
hasReference
in interface EntityFilter
public String getReferenceProperty()
EntityFilter
getReferenceProperty
in interface EntityFilter
public void setReferenceProperty(String referenceProperty)
EntityFilter
setReferenceProperty
in interface EntityFilter
public void addPropertyChangeListener(PropertyChangeListener listener)
EntityFilter
addPropertyChangeListener
in interface EntityFilter
public void removePropertyChangeListener(PropertyChangeListener listener)
EntityFilter
removePropertyChangeListener
in interface EntityFilter
public boolean isClassReference(Class<?> entityClass)
entityClass
is corresponding to the current reference
in the filter. Will return false if no reference is set in the filter.isClassReference
in interface EntityFilter
entityClass
- Class reference to testcheckReference(Class, boolean)
public void checkReference(Class<?> reference, boolean mandatory) throws IllegalArgumentException
reference
class is supported by the current
filter reference. The reference can be not mandatory
. Exceptions
are thrown if the check failed. If you prefer to have a boolean instead
of exceptions, you can use isClassReference(Class)
.checkReference
in interface EntityFilter
reference
- Class reference to checkmandatory
- If the existence of the reference is mandatoryIllegalArgumentException
- for errors on checkhasReference()
,
isClassReference(Class)
Copyright © 2004–2022 Code Lutin. All rights reserved.