Package javax.persistence

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


  public int compareTo(IManagedType managedType) {
    return getType().getName().compareTo(managedType.getType().getName());
  }

  protected AccessType getAccessType() {
    Access accessType = type.getType().getAnnotation(Access.class);
    if (accessType == null) {
      return AccessType.FIELD;
    }
    return accessType.value();
  }
View Full Code Here

     * Explicit access type specification does not affect the access type of
     * other entity classes or mapped super classes in the entity hierarchy.
     */
    private int getAccessCode(Class<?> cls) {
        int accessCode = AccessCode.UNKNOWN;
        Access access = AccessController.doPrivileged(
            J2DoPrivHelper.getAnnotationAction(cls, Access.class));
        if (access != null) {
            accessCode |=  AccessCode.EXPLICIT |
                (access.value() == AccessType.FIELD ?
                AccessCode.FIELD : AccessCode.PROPERTY);
        }
        return accessCode;
    }
View Full Code Here

TOP

Related Classes of javax.persistence.Access

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.