1 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 ; 10 import java.sql.SQLException ; 11 12 17 public class VersionTypeSeedParameterSpecification implements ParameterSpecification { 18 19 private VersionType type; 20 21 public VersionTypeSeedParameterSpecification(VersionType type) { 22 this.type = type; 23 } 24 25 28 public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) 29 throws SQLException { 30 type.nullSafeSet( statement, type.seed(), position, session ); 31 return 1; 32 } 33 } 34 | Popular Tags |