org.hdpagination.dataaccess.support
Interface NamedParamRestriction

All Superinterfaces:
java.io.Serializable

public interface NamedParamRestriction
extends java.io.Serializable

This interface represents a restriction applied to the query SELECT statement to filter the search result. Named parameter is used to bind the query.

Since:
1.3.1
Author:
Liangfeng Ren

Method Summary
 java.lang.String getClause()
          Generate the WHERE clause fragment (after prefixing "WHERE" or "AND" keywords) that will be appended to the SELECT statement.
 NamedParams getParameters()
          Return an instance of NamedParams that defines the mapping of named query parameters (key:parameter name, value:parameter value).
 

Method Detail

getClause

java.lang.String getClause()
Generate the WHERE clause fragment (after prefixing "WHERE" or "AND" keywords) that will be appended to the SELECT statement. The key words "WHERE" and "AND" is excluded from this clause fragment. The clause fragment can contain multiple named query parameters of the form :name. For example, a valid clause can be "p.price BETWEEN :priceFrom and :priceTo"".

Returns:

getParameters

NamedParams getParameters()
Return an instance of NamedParams that defines the mapping of named query parameters (key:parameter name, value:parameter value).

Returns:


Copyright © 2008 HDPagination All Rights Reserved.