Package org.hibernate.mapping

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


    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

    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

    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

    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

    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

    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

    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

    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

    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

TOP

Related Classes of org.hibernate.mapping.FetchProfile

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.