Examples of SQLFunctionRegistry


Examples of org.hibernate.dialect.function.SQLFunctionRegistry

    this.properties = new Properties();
    this.properties.putAll( cfg.getProperties() );
    this.interceptor = cfg.getInterceptor();
    this.settings = settings;
    this.sqlFunctionRegistry = new SQLFunctionRegistry(settings.getDialect(), cfg.getSqlFunctions());
        this.eventListeners = listeners;
    this.observer = observer != null ? observer : new SessionFactoryObserver() {
      public void sessionFactoryCreated(SessionFactory factory) {
      }
      public void sessionFactoryClosed(SessionFactory factory) {
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

   * many-to-many/map-key-from-target-table feature is pulled into core.
   *
   * @deprecated Only intended for annotations usage; use {@link #renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)} instead
   */
  public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) {
    return renderWhereStringTemplate( sqlWhereString, placeholder, dialect, new SQLFunctionRegistry( dialect, java.util.Collections.EMPTY_MAP ) );
  }
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

    this.properties = new Properties();
    this.properties.putAll( cfg.getProperties() );
    this.interceptor = cfg.getInterceptor();
    this.settings = settings;
    this.sqlFunctionRegistry = new SQLFunctionRegistry(settings.getDialect(), cfg.getSqlFunctions());
        this.eventListeners = listeners;
    this.observer = observer != null ? observer : new SessionFactoryObserver() {
      public void sessionFactoryCreated(SessionFactory factory) {
      }
      public void sessionFactoryClosed(SessionFactory factory) {
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

  public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) {
    return renderWhereStringTemplate(
        sqlWhereString,
        placeholder,
        dialect,
        new SQLFunctionRegistry( dialect, java.util.Collections.<String, SQLFunction>emptyMap() )
    );
  }
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

  public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery) throws HibernateException {
    return getFunction( criteriaQuery ).render( null, ARGS, criteriaQuery.getFactory() ) + " as y" + position + '_';
  }

  protected SQLFunction getFunction(CriteriaQuery criteriaQuery) {
    final SQLFunctionRegistry sqlFunctionRegistry = criteriaQuery.getFactory().getSqlFunctionRegistry();
    final SQLFunction function = sqlFunctionRegistry.findSQLFunction( "count" );
    if ( function == null ) {
      throw new HibernateException( "Unable to locate count function mapping" );
    }
    return function;
  }
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

        cfg
    );
        this.jdbcServices = this.serviceRegistry.getService( JdbcServices.class );
        this.dialect = this.jdbcServices.getDialect();
    this.cacheAccess = this.serviceRegistry.getService( CacheImplementor.class );
    this.sqlFunctionRegistry = new SQLFunctionRegistry( getDialect(), cfg.getSqlFunctions() );
    if ( observer != null ) {
      this.observer.addObserver( observer );
    }

    this.typeResolver = cfg.getTypeResolver().scope( this );
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

    this.dialect = this.jdbcServices.getDialect();
    this.cacheAccess = this.serviceRegistry.getService( CacheImplementor.class );

    // TODO: get SQL functions from JdbcServices (HHH-6559)
    //this.sqlFunctionRegistry = new SQLFunctionRegistry( this.jdbcServices.getSqlFunctions() );
    this.sqlFunctionRegistry = new SQLFunctionRegistry( this.dialect, new HashMap<String, SQLFunction>() );

    // TODO: get SQL functions from a new service
    // this.sqlFunctionRegistry = new SQLFunctionRegistry( getDialect(), cfg.getSqlFunctions() );

    if ( observer != null ) {
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

    this.properties = new Properties();
    this.properties.putAll( cfg.getProperties() );
    this.interceptor = cfg.getInterceptor();
    this.settings = settings;
    this.sqlFunctionRegistry = new SQLFunctionRegistry(settings.getDialect(), cfg.getSqlFunctions());
        this.eventListeners = listeners;
    this.observer = observer != null ? observer : new SessionFactoryObserver() {
      public void sessionFactoryCreated(SessionFactory factory) {
      }
      public void sessionFactoryClosed(SessionFactory factory) {
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

   * many-to-many/map-key-from-target-table feature is pulled into core.
   *
   * @deprecated Only intended for annotations usage; use {@link #renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)} instead
   */
  public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) {
    return renderWhereStringTemplate( sqlWhereString, placeholder, dialect, new SQLFunctionRegistry( dialect, java.util.Collections.EMPTY_MAP ) );
  }
View Full Code Here

Examples of org.hibernate.dialect.function.SQLFunctionRegistry

   * many-to-many/map-key-from-target-table feature is pulled into core.
   *
   * @deprecated Only intended for annotations usage; use {@link #renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)} instead
   */
  public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) {
    return renderWhereStringTemplate( sqlWhereString, placeholder, dialect, new SQLFunctionRegistry( dialect, java.util.Collections.EMPTY_MAP ) );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.