Interface EntityFilter

All Known Implementing Classes:
TopiaFilter

public interface EntityFilter
Created: 3 juin 2010
Version:
$Id$
Author:
fdesbois <fdesbois@codelutin.com>
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String PROPERTY_END_INDEX  
    static java.lang.String PROPERTY_ORDER_BY  
    static java.lang.String PROPERTY_REFERENCE_ID  
    static java.lang.String PROPERTY_REFERENCE_PROPERTY  
    static java.lang.String PROPERTY_START_INDEX  
  • Method Summary

    Modifier and Type Method Description
    void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
    Add PropertyChangeListener.
    void checkReference​(java.lang.Class<?> reference, boolean mandatory)
    Use to check if reference class is supported by the current filter reference.
    java.lang.Integer getEndIndex()
    Get the value of endIndex
    java.lang.String getOrderBy()
    Get the value of orderBy
    java.lang.String getReferenceId()
    Get the value of referenceId
    java.lang.String getReferenceProperty()
    Get the value of referenceProperty
    java.lang.Integer getStartIndex()
    Get the value of startIndex
    boolean hasReference()
    Used to check if the filter contains a reference.
    boolean isClassReference​(java.lang.Class<?> entityClass)
    Test if the entityClass is corresponding to the current reference in the filter.
    void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
    Remove PropertyChangeListener.
    void setEndIndex​(java.lang.Integer endIndex)
    Set the value of endIndex
    void setOrderBy​(java.lang.String orderBy)
    Set the value of orderBy
    void setReference​(java.lang.Object entity)
    Set the value of referenceId from entity
    void setReferenceId​(java.lang.String referenceId)
    Set the value of referenceId
    void setReferenceProperty​(java.lang.String referenceProperty)
    Set the value of referenceProperty
    void setStartIndex​(java.lang.Integer startIndex)
    Set the value of startIndex
  • Field Details

  • Method Details

    • getStartIndex

      java.lang.Integer getStartIndex()
      Get the value of startIndex
      Returns:
      the value of startIndex
    • setStartIndex

      void setStartIndex​(java.lang.Integer startIndex)
      Set the value of startIndex
      Parameters:
      startIndex - new value of startIndex
    • getOrderBy

      java.lang.String getOrderBy()
      Get the value of orderBy
      Returns:
      the value of orderBy
    • setOrderBy

      void setOrderBy​(java.lang.String orderBy)
      Set the value of orderBy
      Parameters:
      orderBy - new value of orderBy
    • getEndIndex

      java.lang.Integer getEndIndex()
      Get the value of endIndex
      Returns:
      the value of endIndex
    • setEndIndex

      void setEndIndex​(java.lang.Integer endIndex)
      Set the value of endIndex
      Parameters:
      endIndex - new value of endIndex
    • getReferenceId

      java.lang.String getReferenceId()
      Get the value of referenceId
      Returns:
      the value of referenceId
    • setReferenceId

      void setReferenceId​(java.lang.String referenceId)
      Set the value of referenceId
      Parameters:
      referenceId -
    • setReference

      void setReference​(java.lang.Object entity) throws java.lang.IllegalArgumentException
      Set the value of referenceId from entity
      Parameters:
      entity -
      Throws:
      java.lang.IllegalArgumentException
    • hasReference

      boolean hasReference()
      Used to check if the filter contains a reference.
      Returns:
      true if the filter contains a reference
    • checkReference

      void checkReference​(java.lang.Class<?> reference, boolean mandatory) throws java.lang.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:
      java.lang.IllegalArgumentException - for errors on check
      See Also:
      hasReference(), isClassReference(Class)
    • isClassReference

      boolean isClassReference​(java.lang.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

      java.lang.String getReferenceProperty()
      Get the value of referenceProperty
      Returns:
      the value of referenceProperty
    • setReferenceProperty

      void setReferenceProperty​(java.lang.String referenceProperty)
      Set the value of referenceProperty
      Parameters:
      referenceProperty -
    • addPropertyChangeListener

      void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Add PropertyChangeListener.
      Parameters:
      listener -
    • removePropertyChangeListener

      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Remove PropertyChangeListener.
      Parameters:
      listener -