1 package org.hibernate.id; 3 4 import java.io.Serializable ; 5 import java.sql.ResultSet ; 6 import java.sql.SQLException ; 7 8 import org.hibernate.engine.SessionImplementor; 9 10 11 19 public class IdentityGenerator extends AbstractPostInsertGenerator { 20 21 protected String getSQL(PostInsertIdentityPersister persister) { 22 return persister.getIdentitySelectString(); 23 } 24 25 protected Serializable getResult(SessionImplementor session, ResultSet rs, Object object, PostInsertIdentityPersister persister) 26 throws SQLException { 27 return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); 28 } 29 } 30 31 32 33 34 35 36 | Popular Tags |