FileDocCategorySizeDatePackage
DynamicFilterParameterSpecification.javaAPI DocHibernate 3.2.52066Wed Oct 18 22:25:42 BST 2006org.hibernate.param

DynamicFilterParameterSpecification

public class DynamicFilterParameterSpecification extends Object implements ParameterSpecification
A specialized ParameterSpecification impl for dealing with a dynamic filter parameters.

Note: this class is currently not used. The ideal way to deal with dynamic filter parameters for HQL would be to track them just as we do with other parameters in the translator. However, the problem with that is that we currently do not know the filters which actually apply to the query; we know the active/enabled ones, but not the ones that actually "make it into" the resulting query.

author
Steve Ebersole

Fields Summary
private final String
filterName
private final String
parameterName
private final org.hibernate.type.Type
definedParameterType
private final int
queryParameterPosition
Constructors Summary
public DynamicFilterParameterSpecification(String filterName, String parameterName, org.hibernate.type.Type definedParameterType, int queryParameterPosition)

		this.filterName = filterName;
		this.parameterName = parameterName;
		this.definedParameterType = definedParameterType;
		this.queryParameterPosition = queryParameterPosition;
	
Methods Summary
public intbind(java.sql.PreparedStatement statement, org.hibernate.engine.QueryParameters qp, org.hibernate.engine.SessionImplementor session, int position)

		Object value = qp.getFilteredPositionalParameterValues()[queryParameterPosition];
		definedParameterType.nullSafeSet( statement, value, position, session );
		return definedParameterType.getColumnSpan( session.getFactory() );
	
public org.hibernate.type.TypegetExpectedType()

		return definedParameterType;
	
public java.lang.StringrenderDisplayInfo()

		return "dynamic-filter={filterName=" + filterName + ",paramName=" + parameterName + "}";
	
public voidsetExpectedType(org.hibernate.type.Type expectedType)

		// todo : throw exception?