Package org.hibernate.engine.spi

Examples of org.hibernate.engine.spi.FilterDefinition


        }
      }
      if ( condition == null ) {
        condition = filterDefinition.getCondition();
      }
      metadata.addFilterDefinition( new FilterDefinition( name, condition, parameters ) );
    }
  }
View Full Code Here


  private static void bindFilterDef(FilterDef defAnn, Mappings mappings) {
    Map<String, org.hibernate.type.Type> params = new HashMap<String, org.hibernate.type.Type>();
    for ( ParamDef param : defAnn.parameters() ) {
      params.put( param.name(), mappings.getTypeResolver().heuristicType( param.type() ) );
    }
    FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params );
    LOG.debugf( "Binding filter definition: %s", def.getFilterName() );
    mappings.addFilterDefinition( def );
  }
View Full Code Here

      final Type heuristicType = mappings.getTypeResolver().heuristicType( paramType );
      LOG.debugf( "Parameter heuristic type : %s", heuristicType );
      paramMappings.put( paramName, heuristicType );
    }
    LOG.debugf( "Parsed filter-def [%s]", name );
    FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
    mappings.addFilterDefinition( def );
  }
View Full Code Here

  public StatisticsImplementor getStatisticsImplementor() {
    return serviceRegistry.getService( StatisticsImplementor.class );
  }

  public FilterDefinition getFilterDefinition(String filterName) throws HibernateException {
    FilterDefinition def = filters.get( filterName );
    if ( def == null ) {
      throw new HibernateException( "No such filter configured [" + filterName + "]" );
    }
    return def;
  }
View Full Code Here

    for ( Filter filter : filters ) {
      String filterName = filter.name();
      String cond = filter.condition();
      if ( BinderHelper.isEmptyAnnotationValue( cond ) ) {
        FilterDefinition definition = mappings.getFilterDefinition( filterName );
        cond = definition == null ? null : definition.getDefaultFilterCondition();
        if ( StringHelper.isEmpty( cond ) ) {
          throw new AnnotationException(
              "no filter condition found for filter " + filterName + " in " + this.name
          );
        }
View Full Code Here

          JandexHelper.getValue( prm, "name", String.class ),
          metadata.getTypeResolver().heuristicType( JandexHelper.getValue( prm, "type", String.class ) )
      );
    }
    metadata.addFilterDefinition(
        new FilterDefinition(
            name,
            JandexHelper.getValue( filterDef, "defaultCondition", String.class ),
            prms
        )
    );
View Full Code Here

  private static void bindFilterDef(FilterDef defAnn, Mappings mappings) {
    Map<String, org.hibernate.type.Type> params = new HashMap<String, org.hibernate.type.Type>();
    for ( ParamDef param : defAnn.parameters() ) {
      params.put( param.name(), mappings.getTypeResolver().heuristicType( param.type() ) );
    }
    FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params );
    LOG.debugf( "Binding filter definition: %s", def.getFilterName() );
    mappings.addFilterDefinition( def );
  }
View Full Code Here

        }
      }
      if ( condition == null ) {
        condition = filterDefinition.getCondition();
      }
      metadata.addFilterDefinition( new FilterDefinition( name, condition, parameters ) );
    }
  }
View Full Code Here

      final Type heuristicType = mappings.getTypeResolver().heuristicType( paramType );
      LOG.debugf( "Parameter heuristic type : %s", heuristicType );
      paramMappings.put( paramName, heuristicType );
    }
    LOG.debugf( "Parsed filter-def [%s]", name );
    FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
    mappings.addFilterDefinition( def );
  }
View Full Code Here

  public StatisticsImplementor getStatisticsImplementor() {
    return serviceRegistry.getService( StatisticsImplementor.class );
  }

  public FilterDefinition getFilterDefinition(String filterName) throws HibernateException {
    FilterDefinition def = filters.get( filterName );
    if ( def == null ) {
      throw new HibernateException( "No such filter configured [" + filterName + "]" );
    }
    return def;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.engine.spi.FilterDefinition

Copyright © 2018 www.massapicom. 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.