Examples of Access


Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessTypeAnnotation = property.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessTypeAnnotation != null ) {
      hibernateAccessType = AccessType.getAccessStrategy( accessTypeAnnotation.value() );
    }

    Access access = property.getAnnotation( Access.class );
    if ( access != null ) {
      jpaAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateAccessType != AccessType.DEFAULT
        && jpaAccessType != AccessType.DEFAULT
        && hibernateAccessType != jpaAccessType ) {
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessTypeAnnotation = element.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessTypeAnnotation != null ) {
      hibernateAccessType = AccessType.getAccessStrategy( accessTypeAnnotation.value() );
    }

    Access access = element.getAnnotation( Access.class );
    if ( access != null ) {
      jpaAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateAccessType != null && jpaAccessType != null && hibernateAccessType != jpaAccessType ) {
      throw new MappingException(
          "Found @Access and @AccessType with conflicting values on a property in class " + annotatedClass.toString()
View Full Code Here

Examples of javax.persistence.Access

    }
  }

  private void considerExplicitFieldAndPropertyAccess() {
    for ( XProperty property : fieldAccessMap.values() ) {
      Access access = property.getAnnotation( Access.class );
      if ( access == null ) {
        continue;
      }

      // see "2.3.2 Explicit Access Type" of JPA 2 spec
      // the access type for this property is explicitly set to AccessType.FIELD, hence we have to
      // use field access for this property even if the default access type for the class is AccessType.PROPERTY
      AccessType accessType = AccessType.getAccessStrategy( access.value() );
      if ( accessType == AccessType.FIELD ) {
        propertyAccessMap.put( property.getName(), property );
      }
      else {   // AccessType.PROPERTY
        log.warn( "Placing @Access(AccessType.PROPERTY) on a field does not have any effect." );
      }
    }

    for ( XProperty property : propertyAccessMap.values() ) {
      Access access = property.getAnnotation( Access.class );
      if ( access == null ) {
        continue;
      }

      AccessType accessType = AccessType.getAccessStrategy( access.value() );

      // see "2.3.2 Explicit Access Type" of JPA 2 spec
      // the access type for this property is explicitly set to AccessType.PROPERTY, hence we have to
      // return use method access even if the default class access type is AccessType.FIELD
      if ( accessType == AccessType.PROPERTY ) {
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessType = xClass.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessType != null ) {
      hibernateDefinedAccessType = AccessType.getAccessStrategy( accessType.value() );
    }

    Access access = xClass.getAnnotation( Access.class );
    if ( access != null ) {
      jpaDefinedAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateDefinedAccessType != AccessType.DEFAULT
        && jpaDefinedAccessType != AccessType.DEFAULT
        && hibernateDefinedAccessType != jpaDefinedAccessType ) {
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessTypeAnnotation = element.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessTypeAnnotation != null ) {
      hibernateAccessType = AccessType.getAccessStrategy( accessTypeAnnotation.value() );
    }

    Access access = element.getAnnotation( Access.class );
    if ( access != null ) {
      jpaAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateAccessType != null && jpaAccessType != null && hibernateAccessType != jpaAccessType ) {
      throw new MappingException(
          "Found @Access and @AccessType with conflicting values on a property in class " + annotatedClass.toString()
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessTypeAnnotation = property.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessTypeAnnotation != null ) {
      hibernateAccessType = AccessType.getAccessStrategy( accessTypeAnnotation.value() );
    }

    Access access = property.getAnnotation( Access.class );
    if ( access != null ) {
      jpaAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateAccessType != AccessType.DEFAULT
        && jpaAccessType != AccessType.DEFAULT
        && hibernateAccessType != jpaAccessType ) {
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessTypeAnnotation = element.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessTypeAnnotation != null ) {
      hibernateAccessType = AccessType.getAccessStrategy( accessTypeAnnotation.value() );
    }

    Access access = element.getAnnotation( Access.class );
    if ( access != null ) {
      jpaAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateAccessType != null && jpaAccessType != null && hibernateAccessType != jpaAccessType ) {
      throw new MappingException(
          "Found @Access and @AccessType with conflicting values on a property in class " + annotatedClass.toString()
View Full Code Here

Examples of javax.persistence.Access

    }
  }

  private void considerExplicitFieldAndPropertyAccess() {
    for ( XProperty property : fieldAccessMap.values() ) {
      Access access = property.getAnnotation( Access.class );
      if ( access == null ) {
        continue;
      }

      // see "2.3.2 Explicit Access Type" of JPA 2 spec
      // the access type for this property is explicitly set to AccessType.FIELD, hence we have to
      // use field access for this property even if the default access type for the class is AccessType.PROPERTY
      AccessType accessType = AccessType.getAccessStrategy( access.value() );
            if (accessType == AccessType.FIELD) {
        propertyAccessMap.put(property.getName(), property);
      }
            else {
        LOG.debug( "Placing @Access(AccessType.FIELD) on a field does not have any effect." );
      }
    }

    for ( XProperty property : propertyAccessMap.values() ) {
      Access access = property.getAnnotation( Access.class );
      if ( access == null ) {
        continue;
      }

      AccessType accessType = AccessType.getAccessStrategy( access.value() );

      // see "2.3.2 Explicit Access Type" of JPA 2 spec
      // the access type for this property is explicitly set to AccessType.PROPERTY, hence we have to
      // return use method access even if the default class access type is AccessType.FIELD
            if (accessType == AccessType.PROPERTY) {
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessType = xClass.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessType != null ) {
      hibernateDefinedAccessType = AccessType.getAccessStrategy( accessType.value() );
    }

    Access access = xClass.getAnnotation( Access.class );
    if ( access != null ) {
      jpaDefinedAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateDefinedAccessType != AccessType.DEFAULT
        && jpaDefinedAccessType != AccessType.DEFAULT
        && hibernateDefinedAccessType != jpaDefinedAccessType ) {
View Full Code Here

Examples of javax.persistence.Access

    org.hibernate.annotations.AccessType accessTypeAnnotation = property.getAnnotation( org.hibernate.annotations.AccessType.class );
    if ( accessTypeAnnotation != null ) {
      hibernateAccessType = AccessType.getAccessStrategy( accessTypeAnnotation.value() );
    }

    Access access = property.getAnnotation( Access.class );
    if ( access != null ) {
      jpaAccessType = AccessType.getAccessStrategy( access.value() );
    }

    if ( hibernateAccessType != AccessType.DEFAULT
        && jpaAccessType != AccessType.DEFAULT
        && hibernateAccessType != jpaAccessType ) {
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.