org.openfaces.component.filter
Class HibernateCriterionBuilder

java.lang.Object
  extended by org.openfaces.component.filter.FilterCriterionProcessor
      extended by org.openfaces.component.filter.HibernateCriterionBuilder

public class HibernateCriterionBuilder
extends FilterCriterionProcessor


Constructor Summary
HibernateCriterionBuilder()
           
 
Method Summary
static Criterion build(FilterCriterion filterCriterion)
          Returns hibernate Criterion instance that corresponds to the passed FilterCriterion instance.
static Criteria buildCriteria(Session session, java.lang.Class persistentClass)
          You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.
static Criteria buildCriteria(Session session, java.lang.Class persistentClass, java.lang.String alias)
          You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.
static Criteria buildCriteria(Session session, java.lang.String entityName)
          You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.
static Criteria buildCriteria(Session session, java.lang.String entityName, java.lang.String alias)
          You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.
static void fillCriteria(Criteria criteria)
          You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.
static HibernateCriterionBuilder getInstance()
           
static int getRowCount(Criteria criteria)
          This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.
static int getRowCount(Session session, java.lang.Class persistentClass)
          This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.
static int getRowCount(Session session, java.lang.Class persistentClass, java.lang.String alias)
          This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.
static int getRowCount(Session session, java.lang.String entityName)
          This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.
static int getRowCount(Session session, java.lang.String entityName, java.lang.String alias)
          This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.
 java.lang.Object process(AndFilterCriterion criterion)
           
 java.lang.Object process(ExpressionFilterCriterion criterion)
           
 java.lang.Object process(OrFilterCriterion criterion)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateCriterionBuilder

public HibernateCriterionBuilder()
Method Detail

getInstance

public static HibernateCriterionBuilder getInstance()

build

public static Criterion build(FilterCriterion filterCriterion)
Returns hibernate Criterion instance that corresponds to the passed FilterCriterion instance.


buildCriteria

public static Criteria buildCriteria(Session session,
                                     java.lang.Class persistentClass)
You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.

This method creates the hibernate Criteria object with the current DataTable custom data providing parameters that are automatically retrieved from the request scope by this method. That is the returned Criteria will contain the current table's filtering, sorting and pagination parameters.

NOTE: the table should have the "id" attribute specified for all sortable columns. The id value should correspond to the appropriate property name by which sorting should be performed, or more formally, the value of the "id" attribute will be passed to the Order.asc(String propertyName) and Order.desc(String propertyName) methods when populating the Criteria object.

You can use any of the buidCriteria() methods or the fillCriteria() method depending on the needs of your application.

See Also:
@fillCriteria

buildCriteria

public static Criteria buildCriteria(Session session,
                                     java.lang.String entityName)
You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.

This method creates the hibernate Criteria object with the current DataTable custom data providing parameters that are automatically retrieved from the request scope by this method. That is the returned Criteria will contain the current table's filtering, sorting and pagination parameters.

NOTE: the table should have the "id" attribute specified for all sortable columns. The id value should correspond to the appropriate property name by which sorting should be performed, or more formally, the value of the "id" attribute will be passed to the Order.asc(String propertyName) and Order.desc(String propertyName) methods when populating the Criteria object.

You can use any of the buidCriteria() methods or the fillCriteria() method depending on the needs of your application.

See Also:
@fillCriteria

buildCriteria

public static Criteria buildCriteria(Session session,
                                     java.lang.Class persistentClass,
                                     java.lang.String alias)
You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.

This method creates the hibernate Criteria object with the current DataTable custom data providing parameters that are automatically retrieved from the request scope by this method. That is the returned Criteria will contain the current table's filtering, sorting and pagination parameters.

NOTE: the table should have the "id" attribute specified for all sortable columns. The id value should correspond to the appropriate property name by which sorting should be performed, or more formally, the value of the "id" attribute will be passed to the Order.asc(String propertyName) and Order.desc(String propertyName) methods when populating the Criteria object.

You can use any of the buidCriteria() methods or the fillCriteria() method depending on the needs of your application.

See Also:
@fillCriteria

buildCriteria

public static Criteria buildCriteria(Session session,
                                     java.lang.String entityName,
                                     java.lang.String alias)
You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.

This method creates the hibernate Criteria object with the current DataTable custom data providing parameters that are automatically retrieved from the request scope by this method. That is the returned Criteria will contain the current table's filtering, sorting and pagination parameters.

NOTE: the table should have the "id" attribute specified for all sortable columns. The id value should correspond to the appropriate property name by which sorting should be performed, or more formally, the value of the "id" attribute will be passed to the Order.asc(String propertyName) and Order.desc(String propertyName) methods when populating the Criteria object.

You can use any of the buidCriteria() methods or the fillCriteria() method depending on the needs of your application.

See Also:
@fillCriteria

fillCriteria

public static void fillCriteria(Criteria criteria)
You can invoke this function from the DataTable's data providing method (a method that is bound to the DataTable's "value" attribute) to implement the hibernate-based custom data providing mode.

This method fills the passed hibernate Criteria object with the current DataTable custom data providing parameters that are automatically retrieved from the request scope by this method. That is the Criteria object will be configured with the current table's filtering, sorting and pagination parameters.

NOTE: the table should have the "id" attribute specified for all sortable columns. The id value should correspond to the appropriate property name by which sorting should be performed, or more formally, the value of the "id" attribute will be passed to the Order.asc(String propertyName) and Order.desc(String propertyName) methods when populating the Criteria object.

You can use any of the buidCriteria() methods or the fillCriteria() method depending on the needs of your application.

See Also:
@buildCriteria

getRowCount

public static int getRowCount(Session session,
                              java.lang.String entityName)
This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.

Returns:
the total number of rows without the pagination parameters (which is required by DataTable to properly calculate the number of pages).

getRowCount

public static int getRowCount(Session session,
                              java.lang.Class persistentClass)
This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.

Returns:
the total number of rows without the pagination parameters (which is required by DataTable to properly calculate the number of pages).

getRowCount

public static int getRowCount(Session session,
                              java.lang.String entityName,
                              java.lang.String alias)
This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.

Returns:
the total number of rows without the pagination parameters (which is required by DataTable to properly calculate the number of pages).

getRowCount

public static int getRowCount(Session session,
                              java.lang.Class persistentClass,
                              java.lang.String alias)
This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.

Returns:
the total number of rows without the pagination parameters (which is required by DataTable to properly calculate the number of pages).

getRowCount

public static int getRowCount(Criteria criteria)
This method should be invoked from a method bound to the DataTable's "totalRowCount" attribute to implement the hibernate-based custom data providing mode.

Returns:
the total number of rows without the pagination parameters (which is required by DataTable to properly calculate the number of pages).

process

public java.lang.Object process(ExpressionFilterCriterion criterion)
Specified by:
process in class FilterCriterionProcessor

process

public java.lang.Object process(AndFilterCriterion criterion)
Specified by:
process in class FilterCriterionProcessor

process

public java.lang.Object process(OrFilterCriterion criterion)
Specified by:
process in class FilterCriterionProcessor


Copyright © 1998-2009 TeamDev Ltd. All Rights Reserved.