01: //$Id: PostInsertIdentityPersister.java 9681 2006-03-24 18:10:04Z steve.ebersole@jboss.com $
02: package org.hibernate.id;
03:
04: import org.hibernate.persister.entity.EntityPersister;
05:
06: /**
07: * A persister that may have an identity assigned by execution of
08: * a SQL <tt>INSERT</tt>.
09: *
10: * @author Gavin King
11: */
12: public interface PostInsertIdentityPersister extends EntityPersister {
13: /**
14: * Get a SQL select string that performs a select based on a unique
15: * key determined by the given property name).
16: *
17: * @param propertyName The name of the property which maps to the
18: * column(s) to use in the select statement restriction.
19: * @return The SQL select string
20: */
21: public String getSelectByUniqueKeyString(String propertyName);
22:
23: /**
24: * Get the database-specific SQL command to retrieve the last
25: * generated IDENTITY value.
26: *
27: * @return The SQL command string
28: */
29: public String getIdentitySelectString();
30:
31: /**
32: * The names of the primary key columns in the root table.
33: *
34: * @return The primary key column names.
35: */
36: public String[] getRootTableKeyColumnNames();
37: }
|