Package org.hibernate.metamodel.source

Examples of org.hibernate.metamodel.source.MetaAttributeContext


  public static MetaAttributeContext extractMetaAttributeContext(
      List<JaxbMetaElement> metaElementList,
      boolean onlyInheritable,
      MetaAttributeContext parentContext) {
    final MetaAttributeContext subContext = new MetaAttributeContext( parentContext );

    for ( JaxbMetaElement metaElement : metaElementList ) {
      if ( onlyInheritable & !metaElement.isInherit() ) {
        continue;
      }

      final String name = metaElement.getAttribute();
      final MetaAttribute inheritedMetaAttribute = parentContext.getMetaAttribute( name );
      MetaAttribute metaAttribute = subContext.getLocalMetaAttribute( name );
      if ( metaAttribute == null || metaAttribute == inheritedMetaAttribute ) {
        metaAttribute = new MetaAttribute( name );
        subContext.add( metaAttribute );
      }
      metaAttribute.addValue( metaElement.getValue() );
    }

    return subContext;
View Full Code Here


  private static MetaAttributeContext buildMetaAttributeContext(
      Iterable<MetaAttributeSource> metaAttributeSources,
      boolean onlyInheritable,
      MetaAttributeContext parentContext) {
    final MetaAttributeContext subContext = new MetaAttributeContext( parentContext );

    for ( MetaAttributeSource metaAttributeSource : metaAttributeSources ) {
      if ( onlyInheritable & !metaAttributeSource.isInheritable() ) {
        continue;
      }

      final String name = metaAttributeSource.getName();
      final MetaAttribute inheritedMetaAttribute = parentContext.getMetaAttribute( name );
      MetaAttribute metaAttribute = subContext.getLocalMetaAttribute( name );
      if ( metaAttribute == null || metaAttribute == inheritedMetaAttribute ) {
        metaAttribute = new MetaAttribute( name );
        subContext.add( metaAttribute );
      }
      metaAttribute.addValue( metaAttributeSource.getValue() );
    }

    return subContext;
View Full Code Here

          hbmJaxbRoot.getRoot().getDefaultCascade(),
          hbmJaxbRoot.getRoot().getDefaultAccess(),
          hbmJaxbRoot.getRoot().isDefaultLazy()
      );
      if ( hbmJaxbRoot.getRoot().getMeta() == null || hbmJaxbRoot.getRoot().getMeta().isEmpty() ) {
        this.metaAttributeContext = new MetaAttributeContext( metadata.getGlobalMetaAttributeContext() );
      }
      else {
        this.metaAttributeContext = Helper.extractMetaAttributeContext(
            hbmJaxbRoot.getRoot().getMeta(),
            true,
View Full Code Here

          hbmJaxbRoot.getRoot().getDefaultCascade(),
          hbmJaxbRoot.getRoot().getDefaultAccess(),
          hbmJaxbRoot.getRoot().isDefaultLazy()
      );
      if ( hbmJaxbRoot.getRoot().getMeta() == null || hbmJaxbRoot.getRoot().getMeta().isEmpty() ) {
        this.metaAttributeContext = new MetaAttributeContext( metadata.getGlobalMetaAttributeContext() );
      }
      else {
        this.metaAttributeContext = Helper.extractMetaAttributeContext(
            hbmJaxbRoot.getRoot().getMeta(),
            true,
View Full Code Here

  public static MetaAttributeContext extractMetaAttributeContext(
      List<JaxbMetaElement> metaElementList,
      boolean onlyInheritable,
      MetaAttributeContext parentContext) {
    final MetaAttributeContext subContext = new MetaAttributeContext( parentContext );

    for ( JaxbMetaElement metaElement : metaElementList ) {
      if ( onlyInheritable & !metaElement.isInherit() ) {
        continue;
      }

      final String name = metaElement.getAttribute();
      final MetaAttribute inheritedMetaAttribute = parentContext.getMetaAttribute( name );
      MetaAttribute metaAttribute = subContext.getLocalMetaAttribute( name );
      if ( metaAttribute == null || metaAttribute == inheritedMetaAttribute ) {
        metaAttribute = new MetaAttribute( name );
        subContext.add( metaAttribute );
      }
      metaAttribute.addValue( metaElement.getValue() );
    }

    return subContext;
View Full Code Here

          hbmJaxbRoot.getRoot().getDefaultCascade(),
          hbmJaxbRoot.getRoot().getDefaultAccess(),
          hbmJaxbRoot.getRoot().isDefaultLazy()
      );
      if ( hbmJaxbRoot.getRoot().getMeta() == null || hbmJaxbRoot.getRoot().getMeta().isEmpty() ) {
        this.metaAttributeContext = new MetaAttributeContext( metadata.getGlobalMetaAttributeContext() );
      }
      else {
        this.metaAttributeContext = Helper.extractMetaAttributeContext(
            hbmJaxbRoot.getRoot().getMeta(),
            true,
View Full Code Here

  private static MetaAttributeContext buildMetaAttributeContext(
      Iterable<MetaAttributeSource> metaAttributeSources,
      boolean onlyInheritable,
      MetaAttributeContext parentContext) {
    final MetaAttributeContext subContext = new MetaAttributeContext( parentContext );

    for ( MetaAttributeSource metaAttributeSource : metaAttributeSources ) {
      if ( onlyInheritable & !metaAttributeSource.isInheritable() ) {
        continue;
      }

      final String name = metaAttributeSource.getName();
      final MetaAttribute inheritedMetaAttribute = parentContext.getMetaAttribute( name );
      MetaAttribute metaAttribute = subContext.getLocalMetaAttribute( name );
      if ( metaAttribute == null || metaAttribute == inheritedMetaAttribute ) {
        metaAttribute = new MetaAttribute( name );
        subContext.add( metaAttribute );
      }
      metaAttribute.addValue( metaAttributeSource.getValue() );
    }

    return subContext;
View Full Code Here

  public static MetaAttributeContext extractMetaAttributeContext(
      List<XMLMetaElement> metaElementList,
      boolean onlyInheritable,
      MetaAttributeContext parentContext) {
    final MetaAttributeContext subContext = new MetaAttributeContext( parentContext );

    for ( XMLMetaElement metaElement : metaElementList ) {
      if ( onlyInheritable & !metaElement.isInherit() ) {
        continue;
      }

      final String name = metaElement.getAttribute();
      final MetaAttribute inheritedMetaAttribute = parentContext.getMetaAttribute( name );
      MetaAttribute metaAttribute = subContext.getLocalMetaAttribute( name );
      if ( metaAttribute == null || metaAttribute == inheritedMetaAttribute ) {
        metaAttribute = new MetaAttribute( name );
        subContext.add( metaAttribute );
      }
      metaAttribute.addValue( metaElement.getValue() );
    }

    return subContext;
View Full Code Here

  public static MetaAttributeContext extractMetaAttributeContext(
      List<JaxbMetaElement> metaElementList,
      boolean onlyInheritable,
      MetaAttributeContext parentContext) {
    final MetaAttributeContext subContext = new MetaAttributeContext( parentContext );

    for ( JaxbMetaElement metaElement : metaElementList ) {
      if ( onlyInheritable & !metaElement.isInherit() ) {
        continue;
      }

      final String name = metaElement.getAttribute();
      final MetaAttribute inheritedMetaAttribute = parentContext.getMetaAttribute( name );
      MetaAttribute metaAttribute = subContext.getLocalMetaAttribute( name );
      if ( metaAttribute == null || metaAttribute == inheritedMetaAttribute ) {
        metaAttribute = new MetaAttribute( name );
        subContext.add( metaAttribute );
      }
      metaAttribute.addValue( metaElement.getValue() );
    }

    return subContext;
View Full Code Here

          hbmJaxbRoot.getRoot().getDefaultCascade(),
          hbmJaxbRoot.getRoot().getDefaultAccess(),
          hbmJaxbRoot.getRoot().isDefaultLazy()
      );
      if ( hbmJaxbRoot.getRoot().getMeta() == null || hbmJaxbRoot.getRoot().getMeta().isEmpty() ) {
        this.metaAttributeContext = new MetaAttributeContext( metadata.getGlobalMetaAttributeContext() );
      }
      else {
        this.metaAttributeContext = Helper.extractMetaAttributeContext(
            hbmJaxbRoot.getRoot().getMeta(),
            true,
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.source.MetaAttributeContext

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.