Examples of FetchProfile


Examples of org.hibernate.mapping.FetchProfile

    filterable.addFilter( name, condition );
  }

  private static void parseFetchProfile(Element element, Mappings mappings, String containingEntityName) {
    String profileName = element.attributeValue( "name" );
    FetchProfile profile = mappings.findOrCreateFetchProfile( profileName, MetadataSource.HBM );
    Iterator itr = element.elementIterator( "fetch" );
    while ( itr.hasNext() ) {
      final Element fetchElement = ( Element ) itr.next();
      final String association = fetchElement.attributeValue( "association" );
      final String style = fetchElement.attributeValue( "style" );
      String entityName = fetchElement.attributeValue( "entity" );
      if ( entityName == null ) {
        entityName = containingEntityName;
      }
      if ( entityName == null ) {
        throw new MappingException( "could not determine entity for fetch-profile fetch [" + profileName + "]:[" + association + "]" );
      }
      profile.addFetch( entityName, association, style );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.FetchProfile

    public void addFilterDefinition(FilterDefinition definition) {
      filterDefinitions.put( definition.getFilterName(), definition );
    }

    public FetchProfile findOrCreateFetchProfile(String name, MetadataSource source) {
      FetchProfile profile = fetchProfiles.get( name );
      if ( profile == null ) {
        profile = new FetchProfile( name, source );
        fetchProfiles.put( name, profile );
      }
      return profile;
    }
View Full Code Here

Examples of org.hibernate.mapping.FetchProfile

    filterable.addFilter(name, condition, autoAliasInjection, aliasTables, null);
  }

  private static void parseFetchProfile(Element element, Mappings mappings, String containingEntityName) {
    String profileName = element.attributeValue( "name" );
    FetchProfile profile = mappings.findOrCreateFetchProfile( profileName, MetadataSource.HBM );
    Iterator itr = element.elementIterator( "fetch" );
    while ( itr.hasNext() ) {
      final Element fetchElement = ( Element ) itr.next();
      final String association = fetchElement.attributeValue( "association" );
      final String style = fetchElement.attributeValue( "style" );
      String entityName = fetchElement.attributeValue( "entity" );
      if ( entityName == null ) {
        entityName = containingEntityName;
      }
      if ( entityName == null ) {
        throw new MappingException( "could not determine entity for fetch-profile fetch [" + profileName + "]:[" + association + "]" );
      }
      profile.addFetch( entityName, association, style );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.FetchProfile

    filterable.addFilter( name, condition );
  }

  private static void parseFetchProfile(Element element, Mappings mappings, String containingEntityName) {
    String profileName = element.attributeValue( "name" );
    FetchProfile profile = mappings.findOrCreateFetchProfile( profileName );
    Iterator itr = element.elementIterator( "fetch" );
    while ( itr.hasNext() ) {
      final Element fetchElement = ( Element ) itr.next();
      final String association = fetchElement.attributeValue( "association" );
      final String style = fetchElement.attributeValue( "style" );
      String entityName = fetchElement.attributeValue( "entity" );
      if ( entityName == null ) {
        entityName = containingEntityName;
      }
      if ( entityName == null ) {
        throw new MappingException( "could not determine entity for fetch-profile fetch [" + profileName + "]:[" + association + "]" );
      }
      profile.addFetch( entityName, association, style );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.FetchProfile

    public void addFilterDefinition(FilterDefinition definition) {
      filterDefinitions.put( definition.getFilterName(), definition );
    }

    public FetchProfile findOrCreateFetchProfile(String name, MetadataSource source) {
      FetchProfile profile = fetchProfiles.get( name );
      if ( profile == null ) {
        profile = new FetchProfile( name, source );
        fetchProfiles.put( name, profile );
      }
      return profile;
    }
View Full Code Here

Examples of org.hibernate.mapping.FetchProfile

    public void addFilterDefinition(FilterDefinition definition) {
      filterDefinitions.put( definition.getFilterName(), definition );
    }

    public FetchProfile findOrCreateFetchProfile(String name) {
      FetchProfile profile = ( FetchProfile ) fetchProfiles.get( name );
      if ( profile == null ) {
        profile = new FetchProfile( name );
        fetchProfiles.put( name, profile );
      }
      return profile;
    }
View Full Code Here

Examples of org.hibernate.mapping.FetchProfile

    filterable.addFilter( name, condition );
  }

  private static void parseFetchProfile(Element element, Mappings mappings, String containingEntityName) {
    String profileName = element.attributeValue( "name" );
    FetchProfile profile = mappings.findOrCreateFetchProfile( profileName, MetadataSource.HBM );
    Iterator itr = element.elementIterator( "fetch" );
    while ( itr.hasNext() ) {
      final Element fetchElement = ( Element ) itr.next();
      final String association = fetchElement.attributeValue( "association" );
      final String style = fetchElement.attributeValue( "style" );
      String entityName = fetchElement.attributeValue( "entity" );
      if ( entityName == null ) {
        entityName = containingEntityName;
      }
      if ( entityName == null ) {
        throw new MappingException( "could not determine entity for fetch-profile fetch [" + profileName + "]:[" + association + "]" );
      }
      profile.addFetch( entityName, association, style );
    }
  }
View Full Code Here

Examples of org.hibernate.metamodel.binding.FetchProfile

              origin()
          );
        }
        fetches.add( new FetchProfile.Fetch( entityName, fetch.getAssociation(), fetch.getStyle() ) );
      }
      metadata.addFetchProfile( new FetchProfile( profileName, fetches ) );
    }
  }
View Full Code Here

Examples of org.hibernate.metamodel.binding.FetchProfile

      }
      final String entityName = JandexHelper.getValue( override, "entity", String.class );
      final String associationName = JandexHelper.getValue( override, "association", String.class );
      fetches.add( new Fetch( entityName, associationName, fetchMode.toString().toLowerCase() ) );
    }
    metadata.addFetchProfile( new FetchProfile( name, fetches ) );
  }
View Full Code Here

Examples of org.hibernate.metamodel.binding.FetchProfile

              origin()
          );
        }
        fetches.add( new FetchProfile.Fetch( entityName, fetch.getAssociation(), fetch.getStyle() ) );
      }
      metadata.addFetchProfile( new FetchProfile( profileName, fetches ) );
    }
  }
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.