1 package org.hibernate; 3 4 import java.io.Serializable ; 5 import java.sql.Connection ; 6 import java.util.Map ; 7 8 import javax.naming.Referenceable ; 9 10 import org.hibernate.metadata.ClassMetadata; 11 import org.hibernate.metadata.CollectionMetadata; 12 import org.hibernate.stat.Statistics; 13 14 31 public interface SessionFactory extends Referenceable , Serializable { 32 33 44 public org.hibernate.classic.Session openSession(Connection connection); 45 46 54 public org.hibernate.classic.Session openSession(Interceptor interceptor) throws HibernateException; 55 56 68 public org.hibernate.classic.Session openSession(Connection connection, Interceptor interceptor); 69 70 76 public org.hibernate.classic.Session openSession() throws HibernateException; 77 78 103 public org.hibernate.classic.Session getCurrentSession() throws HibernateException; 104 105 110 public ClassMetadata getClassMetadata(Class persistentClass) throws HibernateException; 111 112 118 public ClassMetadata getClassMetadata(String entityName) throws HibernateException; 119 120 125 public CollectionMetadata getCollectionMetadata(String roleName) throws HibernateException; 126 127 128 136 public Map getAllClassMetadata() throws HibernateException; 137 138 145 public Map getAllCollectionMetadata() throws HibernateException; 146 147 150 public Statistics getStatistics(); 151 152 158 public void close() throws HibernateException; 159 160 163 public boolean isClosed(); 164 165 170 public void evict(Class persistentClass) throws HibernateException; 171 176 public void evict(Class persistentClass, Serializable id) throws HibernateException; 177 182 public void evictEntity(String entityName) throws HibernateException; 183 188 public void evictEntity(String entityName, Serializable id) throws HibernateException; 189 194 public void evictCollection(String roleName) throws HibernateException; 195 200 public void evictCollection(String roleName, Serializable id) throws HibernateException; 201 202 205 public void evictQueries() throws HibernateException; 206 209 public void evictQueries(String cacheRegion) throws HibernateException; 210 213 public StatelessSession openStatelessSession(); 214 217 public StatelessSession openStatelessSession(Connection connection); 218 } 219 220 221 222 223 224 225 226 | Popular Tags |