org.springframework.orm.hibernate5.HibernateTemplate Java Examples

The following examples show how to use org.springframework.orm.hibernate5.HibernateTemplate. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdminUserDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public AdminUserDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #2
Source File: HiberConfig.java    From Spring-5.0-Cookbook with MIT License 4 votes vote down vote up
@Bean
public HibernateTemplate hibernateTemplate(SessionFactory sessionFactory) {
        return new HibernateTemplate(sessionFactory);
}
 
Example #3
Source File: UserDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public UserDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #4
Source File: GoodsCommentDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public GoodsCommentDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #5
Source File: AddressDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public AddressDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #6
Source File: ShoppingCartDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public ShoppingCartDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #7
Source File: OrderDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public OrderDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #8
Source File: AdminGroupDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public AdminGroupDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #9
Source File: GoodsCatDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public GoodsCatDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #10
Source File: GoodsDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public GoodsDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #11
Source File: MerchantDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public MerchantDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #12
Source File: HomeExtendDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public HomeExtendDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #13
Source File: SecondKillDaoImpl.java    From Mall-Server with MIT License 4 votes vote down vote up
@Autowired
public SecondKillDaoImpl(SessionFactory sessionFactory) {
    template = new HibernateTemplate(sessionFactory);
}
 
Example #14
Source File: DrugsDAOImpl.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
private HibernateTemplate getHibernateTemplate() {
    return new HibernateTemplate(getSessionFactory());
}
 
Example #15
Source File: HibernateDaoSupport.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Return the HibernateTemplate for this DAO,
 * pre-initialized with the SessionFactory or set explicitly.
 * <p><b>Note: The returned HibernateTemplate is a shared instance.</b>
 * You may introspect its configuration, but not modify the configuration
 * (other than from within an {@link #initDao} implementation).
 * Consider creating a custom HibernateTemplate instance via
 * {@code new HibernateTemplate(getSessionFactory())}, in which case
 * you're allowed to customize the settings on the resulting instance.
 */
public final HibernateTemplate getHibernateTemplate() {
  return this.hibernateTemplate;
}
 
Example #16
Source File: HibernateDaoSupport.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Set the HibernateTemplate for this DAO explicitly,
 * as an alternative to specifying a SessionFactory.
 * @see #setSessionFactory
 */
public final void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
	this.hibernateTemplate = hibernateTemplate;
}
 
Example #17
Source File: HibernateDaoSupport.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Return the HibernateTemplate for this DAO,
 * pre-initialized with the SessionFactory or set explicitly.
 * <p><b>Note: The returned HibernateTemplate is a shared instance.</b>
 * You may introspect its configuration, but not modify the configuration
 * (other than from within an {@link #initDao} implementation).
 * Consider creating a custom HibernateTemplate instance via
 * {@code new HibernateTemplate(getSessionFactory())}, in which case
 * you're allowed to customize the settings on the resulting instance.
 */
public final HibernateTemplate getHibernateTemplate() {
  return this.hibernateTemplate;
}
 
Example #18
Source File: HibernateDaoSupport.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
}
 
Example #19
Source File: HibernateDaoSupport.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Set the HibernateTemplate for this DAO explicitly,
 * as an alternative to specifying a SessionFactory.
 * @see #setSessionFactory
 */
public final void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
	this.hibernateTemplate = hibernateTemplate;
}
 
Example #20
Source File: HibernateDaoSupport.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example #21
Source File: HibernateDaoSupport.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
}
 
Example #22
Source File: HibernateDaoSupport.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Return the HibernateTemplate for this DAO,
 * pre-initialized with the SessionFactory or set explicitly.
 * <p><b>Note: The returned HibernateTemplate is a shared instance.</b>
 * You may introspect its configuration, but not modify the configuration
 * (other than from within an {@link #initDao} implementation).
 * Consider creating a custom HibernateTemplate instance via
 * {@code new HibernateTemplate(getSessionFactory())}, in which case
 * you're allowed to customize the settings on the resulting instance.
 */
@Nullable
public final HibernateTemplate getHibernateTemplate() {
	return this.hibernateTemplate;
}
 
Example #23
Source File: HibernateDaoSupport.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Set the HibernateTemplate for this DAO explicitly,
 * as an alternative to specifying a SessionFactory.
 * @see #setSessionFactory
 */
public final void setHibernateTemplate(@Nullable HibernateTemplate hibernateTemplate) {
	this.hibernateTemplate = hibernateTemplate;
}
 
Example #24
Source File: HibernateDaoSupport.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * 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);
}
 
Example #25
Source File: HibernateDaoSupport.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Return the HibernateTemplate for this DAO,
 * pre-initialized with the SessionFactory or set explicitly.
 * <p><b>Note: The returned HibernateTemplate is a shared instance.</b>
 * You may introspect its configuration, but not modify the configuration
 * (other than from within an {@link #initDao} implementation).
 * Consider creating a custom HibernateTemplate instance via
 * {@code new HibernateTemplate(getSessionFactory())}, in which case
 * you're allowed to customize the settings on the resulting instance.
 */
@Nullable
public final HibernateTemplate getHibernateTemplate() {
	return this.hibernateTemplate;
}
 
Example #26
Source File: HibernateDaoSupport.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Set the HibernateTemplate for this DAO explicitly,
 * as an alternative to specifying a SessionFactory.
 * @see #setSessionFactory
 */
public final void setHibernateTemplate(@Nullable HibernateTemplate hibernateTemplate) {
	this.hibernateTemplate = hibernateTemplate;
}