Tabnine Logo
org.hibernate.impl
Code IndexAdd Tabnine to your IDE (free)

How to use org.hibernate.impl

Best Java code snippets using org.hibernate.impl (Showing top 20 results out of 315)

origin: stackoverflow.com

 private void closeSessionFactory(SessionFactory factory) { 
  if(factory instanceof SessionFactoryImpl) {
   SessionFactoryImpl sf = (SessionFactoryImpl)factory;
   ConnectionProvider conn = sf.getConnectionProvider();
   if(conn instanceof C3P0ConnectionProvider) { 
    ((C3P0ConnectionProvider)conn).close(); 
   }
  }
  factory.close();
}
origin: net.sf.ehcache/ehcache

private SessionFactory locateSessionFactory() {
  String jndiName = properties.getProperty(Environment.SESSION_FACTORY_NAME);
  if (jndiName != null) {
    return (SessionFactory)SessionFactoryObjectFactory.getNamedInstance(jndiName);
origin: hibernate/hibernate

public List list() throws HibernateException {
  before();
  try {
    return session.list(this);
  }
  finally {
    after();
  }
}

origin: hibernate/hibernate

protected void before() {
  if ( flushMode!=null ) {
    sessionFlushMode = getSession().getFlushMode();
    getSession().setFlushMode(flushMode);
  }
  if ( cacheMode!=null ) {
    sessionCacheMode = getSession().getCacheMode();
    getSession().setCacheMode(cacheMode);
  }
}

origin: hibernate/hibernate

public ScrollableResults scroll(ScrollMode scrollMode) {
  before();
  try {
    return session.scroll(this, scrollMode);
  }
  finally {
    after();
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Criteria createCriteria(String entityName, String alias) {
  errorIfClosed();
  checkTransactionSynchStatus();
  return new CriteriaImpl(entityName, alias, this);
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Filter enableFilter(String filterName) {
  errorIfClosed();
  checkTransactionSynchStatus();
  FilterImpl filter = new FilterImpl( factory.getFilterDefinition(filterName) );
  enabledFilters.put(filterName, filter);
  return filter;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Criteria createCriteria(String entityName) {
  errorIfClosed();
  return new CriteriaImpl(entityName, this);
}
origin: hibernate/hibernate

protected void after() {
  if (sessionFlushMode!=null) {
    getSession().setFlushMode(sessionFlushMode);
    sessionFlushMode = null;
  }
  if (sessionCacheMode!=null) {
    getSession().setCacheMode(sessionCacheMode);
    sessionCacheMode = null;
  }
}

origin: hibernate/hibernate

private QueryTranslator[] getQueries(String query, boolean scalar) throws HibernateException {
  // take the union of the query spaces (ie. the queried tables)
  QueryTranslator[] q = factory.getQuery( query, scalar, getEnabledFilters() );
  return prepareQueries(q);
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public SQLQuery createSQLQuery(String sql) {
  errorIfClosed();
  checkTransactionSynchStatus();
  return super.createSQLQuery(sql);
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Query getNamedQuery(String queryName) throws MappingException {
  errorIfClosed();
  checkTransactionSynchStatus();
  return super.getNamedQuery(queryName);
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public Query createQuery(String queryString) {
  errorIfClosed();
  checkTransactionSynchStatus();
  return super.createQuery(queryString);
}
 
origin: hibernate/hibernate

public Criteria createAlias(String associationPath, String alias)
  throws HibernateException {
  new Subcriteria(this, associationPath, alias);
  return this;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public PersistenceContext getPersistenceContext() {
  errorIfClosed();
  checkTransactionSynchStatus();
  return persistenceContext;
}
 
origin: hibernate/hibernate

/**
 * @see org.hibernate.ScrollableResults#getBinary(int)
 */
public byte[] getBinary(int col) throws HibernateException {
  return (byte[]) getFinal(col, Hibernate.BINARY);
}
origin: hibernate/hibernate

/**
 * @see org.hibernate.ScrollableResults#getDate(int)
 */
public Date getDate(int col) throws HibernateException {
  return (Date) getNonFinal(col, Hibernate.TIMESTAMP);
}
origin: hibernate/hibernate

public ScrollableResults scroll() {
  before();
  try {
    return session.scroll(this, ScrollMode.SCROLL_INSENSITIVE);
  }
  finally {
    after();
  }
}
origin: hibernate/hibernate

public Criteria createAlias(String associationPath, String alias) 
throws HibernateException {
  new Subcriteria(this, associationPath, alias);
  return this;
}
origin: hibernate/hibernate

/**
 * @see org.hibernate.ScrollableResults#getLocale(int)
 */
public Locale getLocale(int col) throws HibernateException {
  return (Locale) getFinal(col, Hibernate.LOCALE);
}
org.hibernate.impl

Most used classes

  • SessionFactoryImpl
    Concrete implementation of the SessionFactory interface. Has the following responsibilites * caches
  • CriteriaImpl
    Implementation of the Criteria interface
  • SessionFactoryObjectFactory
    Resolves SessionFactory JNDI lookups and deserialization
  • CriteriaImpl$Subcriteria
  • SessionImpl
    Concrete implementation of a Session, and also the central, organizing component of Hibernate's inte
  • CriteriaImpl$CriterionEntry,
  • CriteriaImpl$OrderEntry,
  • QueryImpl,
  • CollectionFilterImpl,
  • FilterImpl,
  • IteratorImpl,
  • SQLQueryImpl,
  • ScrollableResultsImpl,
  • AbstractScrollableResults,
  • AbstractSessionImpl,
  • FetchingScrollableResultsImpl,
  • SessionFactoryImpl$CurrentSessionCleanupSynch,
  • SessionFactoryImpl$FilterCacheKeyFactory,
  • SessionFactoryImpl$QueryCacheKeyFactory
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now