123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
//$Id: SessionFactoryImplementor.java,v 1.6 2002/12/28 02:25:49 oneovthafew Exp $ package cirrus.hibernate.engine; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Collection; import cirrus.hibernate.HibernateException; import cirrus.hibernate.MappingException; import cirrus.hibernate.impl.CollectionPersister; import cirrus.hibernate.persister.ClassPersister; import cirrus.hibernate.sql.Dialect; import cirrus.hibernate.type.Type; /** * Defines the internal contract between the <tt>SessionFactory</tt> and other parts of * Hibernate such as implementors of <tt>Type</tt>. * @see cirrus.hibernate.SessionFactory * @see cirrus.hibernate.impl.SessionFactoryImpl */ public interface SessionFactoryImplementor extends Mapping { /** * Get the persister for a class */ public ClassPersister getPersister(Class clazz) throws MappingException; /** * Get the persister for the named class */ public ClassPersister getPersister(String className) throws MappingException; /** * Get the persister object for a collection role */ public CollectionPersister getCollectionPersister(String role) throws MappingException; /** * Is outerjoin fetching enabled? */ public boolean enableJoinedFetch(); /** * Are scrollable <tt>ResultSet</tt>s supported? */ public boolean useScrollableResultSets(); /** * Get the database schema specified in <tt>hibernate.default_schema</tt> */ public String getDefaultSchema(); /** * Get the SQL <tt>Dialect</tt> */ public Dialect getDialect(); /** * Get the return types of a query */ public Type[] getReturnTypes(String queryString) throws HibernateException; /** * Get the named parameter names for a query * @return a collection of strings */ public Collection getNamedParameters(String queryString) throws HibernateException; /** * Obtain a JDBC connection */ public Connection openConnection() throws SQLException; /** * Release a JDBC connection */ public void closeConnection(Connection conn) throws SQLException; /** * Get the names of all persistent classes that implement/extend the given interface/class */ public String[] getImplementors(Class clazz); /** * Get the list of query imports */ public String[] getImports(); /** * Dispose of a prepared statement */ public void closePreparedStatement(PreparedStatement ps) throws SQLException; /** * Obtain a prepared statement */ public PreparedStatement getPreparedStatement(final Connection conn, final String sql, boolean scrollable) throws SQLException; /** * Get the JDBC batch size */ public int getJdbcBatchSize(); /** * Set the fetch size */ public void setFetchSize(PreparedStatement statement) throws SQLException; }