KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > param > VersionTypeSeedParameterSpecification


1 // $Id: VersionTypeSeedParameterSpecification.java,v 1.1 2005/07/12 19:56:56 steveebersole Exp $
2
package org.hibernate.param;
3
4 import org.hibernate.engine.QueryParameters;
5 import org.hibernate.engine.SessionImplementor;
6 import org.hibernate.type.VersionType;
7 import org.hibernate.param.ParameterSpecification;
8
9 import java.sql.PreparedStatement JavaDoc;
10 import java.sql.SQLException JavaDoc;
11
12 /**
13  * Implementation of VersionTypeSeedParameterSpecification.
14  *
15  * @author Steve Ebersole
16  */

17 public class VersionTypeSeedParameterSpecification implements ParameterSpecification {
18
19     private VersionType type;
20
21     public VersionTypeSeedParameterSpecification(VersionType type) {
22         this.type = type;
23     }
24
25     /**
26      * @see org.hibernate.param.ParameterSpecification#bind
27      */

28     public int bind(PreparedStatement JavaDoc statement, QueryParameters qp, SessionImplementor session, int position)
29             throws SQLException JavaDoc {
30         type.nullSafeSet( statement, type.seed(), position, session );
31         return 1;
32     }
33 }
34
Popular Tags