it.amattioli.dominate.hibernate
Class AbstractHibernateFilter

Show UML class diagram
java.lang.Object
  extended by it.amattioli.dominate.hibernate.AbstractHibernateFilter
All Implemented Interfaces:
Filter, HibernateFilter, PropertyChangeEmitter

public abstract class AbstractHibernateFilter
extends Object
implements HibernateFilter


Constructor Summary
AbstractHibernateFilter()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void customize(org.hibernate.Criteria crit)
          Allow to customize a criteria query.
 void doFilter()
           
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
           
 org.apache.commons.collections.Predicate getCollectionPredicate()
           
 int getFirst()
          Retrieves the index of the first object that will be retrieved when using this filter.
 String getHqlFilter()
          Retrieves a Hql query string that can be used to filter a collection repository
 String getHqlQuery()
          Retrieves a Hql query string that can be used to filter a class repository
 int getLast()
          Retrieves the index of the last object that will be retrieved when using this filter.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setFirst(int first)
          Set the index of the first object that will be retrieved when using this filter.
 void setHqlParameters(org.hibernate.Query query)
          Set parameters on a Hql query
 void setLast(int last)
          Set the index of the last object that will be retrieved when using this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHibernateFilter

public AbstractHibernateFilter()
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface PropertyChangeEmitter

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface PropertyChangeEmitter

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)

getFirst

public int getFirst()
Description copied from interface: Filter
Retrieves the index of the first object that will be retrieved when using this filter.

Specified by:
getFirst in interface Filter
Returns:
the index of the first object that will be retrieved when using this filter

setFirst

public void setFirst(int first)
Description copied from interface: Filter
Set the index of the first object that will be retrieved when using this filter.

Specified by:
setFirst in interface Filter
Parameters:
first - the index of the first object that will be retrieved when using this filter

getLast

public int getLast()
Description copied from interface: Filter
Retrieves the index of the last object that will be retrieved when using this filter. This method will retrieve the same number that has been set using Filter.setLast(int).

Specified by:
getLast in interface Filter
Returns:
the index of the last object that will be retrieved when using this filter

setLast

public void setLast(int last)
Description copied from interface: Filter
Set the index of the last object that will be retrieved when using this filter. If the repository contains less objects than the indicated index, all the objects will be retrieved.

Specified by:
setLast in interface Filter
Parameters:
last - the index of the last object that will be retrieved when using this filter

getHqlQuery

public String getHqlQuery()
Description copied from interface: HibernateFilter
Retrieves a Hql query string that can be used to filter a class repository

Specified by:
getHqlQuery in interface HibernateFilter
Returns:

getHqlFilter

public String getHqlFilter()
Description copied from interface: HibernateFilter
Retrieves a Hql query string that can be used to filter a collection repository

Specified by:
getHqlFilter in interface HibernateFilter
Returns:

setHqlParameters

public void setHqlParameters(org.hibernate.Query query)
Description copied from interface: HibernateFilter
Set parameters on a Hql query

Specified by:
setHqlParameters in interface HibernateFilter

customize

public void customize(org.hibernate.Criteria crit)
Description copied from interface: HibernateFilter
Allow to customize a criteria query.

Specified by:
customize in interface HibernateFilter

getCollectionPredicate

public org.apache.commons.collections.Predicate getCollectionPredicate()
Specified by:
getCollectionPredicate in interface HibernateFilter

doFilter

public void doFilter()
Specified by:
doFilter in interface Filter


Copyright © 2011. All Rights Reserved.