Package org.hibernate.engine

Examples of org.hibernate.engine.FilterDefinition


      }
    }
  }

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


      final Type heuristicType = TypeFactory.heuristicType( paramType );
      log.debug( "parameter heuristic type : " + heuristicType );
      paramMappings.put( paramName, heuristicType );
    }
    log.debug( "Parsed filter-def [" + name + "]" );
    FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
    mappings.addFilterDefinition( def );
  }
View Full Code Here

      while ( iter.hasNext() ) {
        Map.Entry<String, String> filter = iter.next();
        String filterName = filter.getKey();
        String cond = filter.getValue();
        if ( BinderHelper.isDefault( 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

      final Type heuristicType = TypeFactory.heuristicType( paramType );
      log.debug( "parameter heuristic type : " + heuristicType );
      paramMappings.put( paramName, heuristicType );
    }
    log.debug( "Parsed filter-def [" + name + "]" );
    FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
    mappings.addFilterDefinition( def );
  }
View Full Code Here

    if ( !inheritanceState.hasParents() ) {
      for ( Map.Entry<String, String> filter : filters.entrySet() ) {
        String filterName = filter.getKey();
        String cond = filter.getValue();
        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

  public StatisticsImplementor getStatisticsImplementor() {
    return statistics;
  }

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

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

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

      while ( iter.hasNext() ) {
        Map.Entry<String, String> filter = iter.next();
        String filterName = filter.getKey();
        String cond = filter.getValue();
        if ( BinderHelper.isDefault( 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

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

TOP

Related Classes of org.hibernate.engine.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.