Examples of JaxbAccessType


Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

  }

  static JaxbAccessType getAccessFromIdPosition(DotName className, IndexBuilder indexBuilder) {
    Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
    Map<DotName, List<AnnotationInstance>> ormAnnotations = indexBuilder.getClassInfoAnnotationsMap( className );
    JaxbAccessType accessType = getAccessFromIdPosition( ormAnnotations );
    if ( accessType == null ) {
      accessType = getAccessFromIdPosition( indexedAnnotations );
    }
    if ( accessType == null ) {
      ClassInfo parent = indexBuilder.getClassInfo( className );
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

    }
    return null;
  }

  private static JaxbAccessType processIdAnnotations(List<AnnotationInstance> idAnnotations) {
    JaxbAccessType accessType = null;
    for ( AnnotationInstance annotation : idAnnotations ) {
      AnnotationTarget tmpTarget = annotation.target();
      if ( tmpTarget == null ) {
        throw new AssertionFailure( "@Id has no AnnotationTarget, this is mostly a internal error." );
      }
      if ( accessType == null ) {
        accessType = annotationTargetToAccessType( tmpTarget );
      }
      else {
        if ( !accessType.equals( annotationTargetToAccessType( tmpTarget ) ) ) {
          throw new MappingException( "Inconsistent placement of @Id annotation within hierarchy " );
        }
      }
    }
    return accessType;
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

  }

  static JaxbAccessType getEntityAccess(DotName className, IndexBuilder indexBuilder) {
    Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
    Map<DotName, List<AnnotationInstance>> ormAnnotations = indexBuilder.getClassInfoAnnotationsMap( className );
    JaxbAccessType accessType = getAccess( ormAnnotations );
    if ( accessType == null ) {
      accessType = getAccess( indexedAnnotations );
    }
    if ( accessType == null ) {
      ClassInfo parent = indexBuilder.getClassInfo( className );
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

          AnnotationTarget indexedPropertyTarget = annotationInstance.target();
          if ( indexedPropertyTarget == null ) {
            continue;
          }
          if ( JandexHelper.getPropertyName( indexedPropertyTarget ).equals( attributeName ) ) {
            JaxbAccessType accessType = JandexHelper.getEnumValue(
                annotationInstance,
                "value",
                JaxbAccessType.class
            );
            /**
             * here we ignore @Access(FIELD) on property (getter) and @Access(PROPERTY) on field
             */
            JaxbAccessType targetAccessType = annotationTargetToAccessType( indexedPropertyTarget );
            if ( accessType.equals( targetAccessType ) ) {
              return targetAccessType;
            }
            else {
              LOG.warn(
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

    return classInfo.name();
  }

  protected void resolveTarget() {
    //attribute in orm.xml has access sub-element
    JaxbAccessType accessType = getAccessType();
    if ( accessType == null ) {
      //attribute in the entity class has @Access
      accessType = AccessHelper.getAccessFromAttributeAnnotation( getTargetName(), getFieldName(), indexBuilder );
      if ( accessType == null ) {
        accessType = AccessHelper.getEntityAccess( getTargetName(), indexBuilder );
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

  final void process() {
    if ( !isPreProcessCalled ) {
      throw new AssertionFailure( "preProcess should be called before process" );
    }
    if ( getAccessType() == null ) {
      JaxbAccessType accessType = AccessHelper.getEntityAccess( getTargetName(), indexBuilder );
      if ( accessType == null ) {
        accessType = getDefaults().getAccess();
      }
      parserAccessType( accessType, getTarget() );
    }
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

  final void process() {
    if ( !isPreProcessCalled ) {
      throw new AssertionFailure( "preProcess should be called before process" );
    }
    if ( getAccessType() == null ) {
      JaxbAccessType accessType = AccessHelper.getEntityAccess( getTargetName(), indexBuilder );
      if ( accessType == null ) {
        accessType = getDefaults().getAccess();
      }
      parserAccessType( accessType, getTarget() );
    }
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

    return classInfo.name();
  }

  protected void resolveTarget() {
    //attribute in orm.xml has access sub-element
    JaxbAccessType accessType = getAccessType();
    if ( accessType == null ) {
      //attribute in the entity class has @Access
      accessType = AccessHelper.getAccessFromAttributeAnnotation( getTargetName(), getFieldName(), indexBuilder );
      if ( accessType == null ) {
        accessType = AccessHelper.getEntityAccess( getTargetName(), indexBuilder );
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

  }

  static JaxbAccessType getAccessFromIdPosition(DotName className, IndexBuilder indexBuilder) {
    Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
    Map<DotName, List<AnnotationInstance>> ormAnnotations = indexBuilder.getClassInfoAnnotationsMap( className );
    JaxbAccessType accessType = getAccessFromIdPosition( ormAnnotations );
    if ( accessType == null ) {
      accessType = getAccessFromIdPosition( indexedAnnotations );
    }
    if ( accessType == null ) {
      ClassInfo parent = indexBuilder.getClassInfo( className );
View Full Code Here

Examples of org.hibernate.internal.jaxb.mapping.orm.JaxbAccessType

    }
    return null;
  }

  private static JaxbAccessType processIdAnnotations(List<AnnotationInstance> idAnnotations) {
    JaxbAccessType accessType = null;
    for ( AnnotationInstance annotation : idAnnotations ) {
      AnnotationTarget tmpTarget = annotation.target();
      if ( tmpTarget == null ) {
        throw new AssertionFailure( "@Id has no AnnotationTarget, this is mostly a internal error." );
      }
      if ( accessType == null ) {
        accessType = annotationTargetToAccessType( tmpTarget );
      }
      else {
        if ( !accessType.equals( annotationTargetToAccessType( tmpTarget ) ) ) {
          throw new MappingException( "Inconsistent placement of @Id annotation within hierarchy " );
        }
      }
    }
    return accessType;
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.