org.nuiton.topia.framework
Interface EntityFilter

All Known Implementing Classes:
TopiaFilter

public interface EntityFilter

Created: 3 juin 2010

Version:
$Id: EntityFilter.java 2011 2010-06-14 09:13:07Z tchemit $
Author:
fdesbois

Field Summary
static String PROPERTY_END_INDEX
           
static String PROPERTY_ORDER_BY
           
static String PROPERTY_REFERENCE_ID
           
static String PROPERTY_REFERENCE_PROPERTY
           
static String PROPERTY_START_INDEX
           
 
Method Summary
 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
 

Field Detail

PROPERTY_START_INDEX

static final String PROPERTY_START_INDEX
See Also:
Constant Field Values

PROPERTY_END_INDEX

static final String PROPERTY_END_INDEX
See Also:
Constant Field Values

PROPERTY_ORDER_BY

static final String PROPERTY_ORDER_BY
See Also:
Constant Field Values

PROPERTY_REFERENCE_ID

static final String PROPERTY_REFERENCE_ID
See Also:
Constant Field Values

PROPERTY_REFERENCE_PROPERTY

static final String PROPERTY_REFERENCE_PROPERTY
See Also:
Constant Field Values
Method Detail

getStartIndex

Integer getStartIndex()
Get the value of startIndex

Returns:
the value of startIndex

setStartIndex

void setStartIndex(Integer startIndex)
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

void setOrderBy(String orderBy)
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

void setEndIndex(Integer endIndex)
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

void setReferenceId(String referenceId)
Set the value of referenceId

Parameters:
referenceId -

setReference

void setReference(Object entity)
                  throws IllegalArgumentException
Set the value of referenceId from entity

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

void checkReference(Class<?> reference,
                    boolean mandatory)
                    throws IllegalArgumentException
Use to check if 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).

Parameters:
reference - Class reference to check
mandatory - If the existence of the reference is mandatory
Throws:
IllegalArgumentException - for errors on check
See Also:
hasReference(), isClassReference(Class)

isClassReference

boolean isClassReference(Class<?> entityClass)
Test if the entityClass is 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

String getReferenceProperty()
Get the value of referenceProperty

Returns:
the value of referenceProperty

setReferenceProperty

void setReferenceProperty(String referenceProperty)
Set the value of referenceProperty

Parameters:
referenceProperty -

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Add PropertyChangeListener.

Parameters:
listener -

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Remove PropertyChangeListener.

Parameters:
listener -


Copyright © 2004-2011 CodeLutin. All Rights Reserved.