Codota Logo
HibernateTemplate.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.springframework.orm.hibernate5.HibernateTemplate
constructor

Best Java code snippets using org.springframework.orm.hibernate5.HibernateTemplate.<init> (Showing top 6 results out of 315)

  • Common ways to obtain HibernateTemplate
private void myMethod () {
HibernateTemplate h =
  • Codota IconSessionFactory sessionFactory;new HibernateTemplate(sessionFactory)
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-framework

/**
 * Create a HibernateTemplate for the given SessionFactory.
 * Only invoked if populating the DAO with a SessionFactory reference!
 * <p>Can be overridden in subclasses to provide a HibernateTemplate instance
 * with different configuration, or a custom HibernateTemplate subclass.
 * @param sessionFactory the Hibernate SessionFactory to create a HibernateTemplate for
 * @return the new HibernateTemplate instance
 * @see #setSessionFactory
 */
protected HibernateTemplate createHibernateTemplate(SessionFactory sessionFactory) {
  return new HibernateTemplate(sessionFactory);
}
origin: org.springframework/spring-orm

/**
 * Create a HibernateTemplate for the given SessionFactory.
 * Only invoked if populating the DAO with a SessionFactory reference!
 * <p>Can be overridden in subclasses to provide a HibernateTemplate instance
 * with different configuration, or a custom HibernateTemplate subclass.
 * @param sessionFactory the Hibernate SessionFactory to create a HibernateTemplate for
 * @return the new HibernateTemplate instance
 * @see #setSessionFactory
 */
protected HibernateTemplate createHibernateTemplate(SessionFactory sessionFactory) {
  return new HibernateTemplate(sessionFactory);
}
origin: apache/servicemix-bundles

/**
 * Create a HibernateTemplate for the given SessionFactory.
 * Only invoked if populating the DAO with a SessionFactory reference!
 * <p>Can be overridden in subclasses to provide a HibernateTemplate instance
 * with different configuration, or a custom HibernateTemplate subclass.
 * @param sessionFactory the Hibernate SessionFactory to create a HibernateTemplate for
 * @return the new HibernateTemplate instance
 * @see #setSessionFactory
 */
protected HibernateTemplate createHibernateTemplate(SessionFactory sessionFactory) {
  return new HibernateTemplate(sessionFactory);
}
origin: micromata/projectforge

@Bean
public HibernateTemplate hibernateTemplate() throws Exception
{
 HibernateTemplate ht = new HibernateTemplate(sessionFactory());
 if (DatabaseSupport.getInstance() == null) {
  DatabaseSupport.setInstance(new DatabaseSupport(HibernateUtils.getDialect()));
 }
 return ht;
}
origin: spring-projects/spring-webflow

private Hibernate5Handler(DataSource dataSource) throws Exception {
  sessionFactory = getSessionFactory(dataSource);
  template = new org.springframework.orm.hibernate5.HibernateTemplate(sessionFactory);
  template.setCheckWriteOperations(false);
  tranasactionManager = new org.springframework.orm.hibernate5.HibernateTransactionManager(sessionFactory);
}
origin: micromata/projectforge

@Bean
public HibernateTemplate hibernateTemplate() throws Exception
{
 HibernateTemplate ht = new HibernateTemplate(sessionFactory());
 if (DatabaseSupport.getInstance() == null) {
  DatabaseSupport.setInstance(new DatabaseSupport(HibernateUtils.getDialect()));
 }
 return ht;
}
org.springframework.orm.hibernate5HibernateTemplate<init>

Javadoc

Create a new HibernateTemplate instance.

Popular methods of HibernateTemplate

  • delete
  • save
  • find
  • get
  • load
  • update
  • getSessionFactory
    Return the Hibernate SessionFactory that should be used to create Hibernate Sessions.
  • executeWithNativeSession
    Execute the action specified by the given action object within a native Session. This execute varian
  • findByNamedParam
  • merge
  • afterPropertiesSet
  • createSessionProxy
    Create a close-suppressing proxy for the given Hibernate Session. The proxy also prepares returned Q
  • afterPropertiesSet,
  • createSessionProxy,
  • disableFilters,
  • doExecute,
  • enableFilters,
  • findByCriteria,
  • findByNamedQueryAndNamedParam,
  • getFilterNames,
  • isCheckWriteOperations

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • String (java.lang)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now