Java 类org.hibernate.dialect.function.ClassicAvgFunction 实例源码

项目:sakai    文件:AddableSessionFactoryBean.java   
/**
 * This method is called after the LocalSessionFactory is instantiated
 */
public void init() {
    // Provide backwards compatibility with Hibernate 3.1.x behavior for aggregate functions.
    Configuration config = getConfiguration();
    config.addSqlFunction("count", new ClassicCountFunction());
    config.addSqlFunction("avg", new ClassicAvgFunction());
    config.addSqlFunction("sum", new ClassicSumFunction());
}
项目:sakai    文件:AddableSessionFactoryBean.java   
/**
 * This method is called after the LocalSessionFactory is instantiated
 */
public void init() {
    // Provide backwards compatibility with Hibernate 3.1.x behavior for aggregate functions.
    Configuration config = getConfiguration();
    config.addSqlFunction("count", new ClassicCountFunction());
    config.addSqlFunction("avg", new ClassicAvgFunction());
    config.addSqlFunction("sum", new ClassicSumFunction());
}
项目:open-cyclos    文件:CustomSessionFactoryBean.java   
@Override
protected void postProcessConfiguration(final Configuration config) throws HibernateException {
    // Set classic functions to return, ie, Integer on count, not Long
    // New to Hibernate 3.2, and would affect a large number of classes
    config.addSqlFunction("count", new ClassicCountFunction());
    config.addSqlFunction("avg", new ClassicAvgFunction());
    config.addSqlFunction("sum", new ClassicSumFunction());
}
项目:cacheonix-core    文件:CriteriaClassicAggregationReturnTest.java   
public void configure(Configuration cfg) {
    super.configure( cfg );
    cfg.addSqlFunction( "count", new ClassicCountFunction() );
    cfg.addSqlFunction( "avg", new ClassicAvgFunction() );
    cfg.addSqlFunction( "sum", new ClassicSumFunction() );
}