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

CollectionFilterKeyParameterSpecification

public class CollectionFilterKeyParameterSpecification extends Object implements ParameterSpecification
A specialized ParameterSpecification impl for dealing with a collection-key as part of a collection filter compilation.
author
Steve Ebersole

Fields Summary
private final String
collectionRole
private final org.hibernate.type.Type
keyType
private final int
queryParameterPosition
Constructors Summary
public CollectionFilterKeyParameterSpecification(String collectionRole, org.hibernate.type.Type keyType, int queryParameterPosition)
Creates a specialized collection-filter collection-key parameter spec.

param
collectionRole The collection role being filtered.
param
keyType The mapped collection-key type.
param
queryParameterPosition The position within {@link org.hibernate.engine.QueryParameters} where we can find the appropriate param value to bind.

		this.collectionRole = collectionRole;
		this.keyType = keyType;
		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.getPositionalParameterValues()[queryParameterPosition];
		keyType.nullSafeSet( statement, value, position, session );
		return keyType.getColumnSpan( session.getFactory() );
	
public org.hibernate.type.TypegetExpectedType()

		return keyType;
	
public java.lang.StringrenderDisplayInfo()

		return "collection-filter-key=" + collectionRole;
	
public voidsetExpectedType(org.hibernate.type.Type expectedType)

		// todo : throw exception?