Package javax.persistence.metamodel

Examples of javax.persistence.metamodel.IdentifiableType


  public boolean appliesTo(EntityType<? super T> entityType) {
    if ( this.entityType.equals( entityType ) ) {
      return true;
    }

    IdentifiableType superType = entityType.getSupertype();
    while ( superType != null ) {
      if ( superType.equals( entityType ) ) {
        return true;
      }
      superType = superType.getSupertype();
    }

    return false;
  }
View Full Code Here


  public boolean appliesTo(EntityType<? super T> entityType) {
    if ( this.entityType.equals( entityType ) ) {
      return true;
    }

    IdentifiableType superType = entityType.getSupertype();
    while ( superType != null ) {
      if ( superType.equals( entityType ) ) {
        return true;
      }
      superType = superType.getSupertype();
    }

    return false;
  }
View Full Code Here

  public boolean appliesTo(EntityType<? super T> entityType) {
    if ( this.entityType.equals( entityType ) ) {
      return true;
    }

    IdentifiableType superType = entityType.getSupertype();
    while ( superType != null ) {
      if ( superType.equals( entityType ) ) {
        return true;
      }
      superType = superType.getSupertype();
    }

    return false;
  }
View Full Code Here

    };
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private <T> SingularAttribute<?, ?> getIdProperty(final Class type) {
    IdentifiableType entity = em.getMetamodel().entity(type);

    Type<?> idType = entity.getIdType();
    checkArgument(idType != null, "Entity %s must have an id property for @Load.", type.getSimpleName());

    if (hasSupertype(entity)) {
      entity = entity.getSupertype();
    }

    return entity.getDeclaredId(idType.getJavaType());
  }
View Full Code Here

    return em.find(type, id);
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private <T> SingularAttribute<?, ?> getIdProperty(final Class type) {
    IdentifiableType entity = em.getMetamodel().entity(type);

    Type<?> idType = entity.getIdType();
    checkArgument(idType != null, "Entity %s must have an id property for @Load.", type.getSimpleName());

    if (hasSupertype(entity)) {
      entity = entity.getSupertype();
    }

    return entity.getDeclaredId(idType.getJavaType());
  }
View Full Code Here

    };
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private <T> SingularAttribute<?, ?> getIdProperty(final Class type) {
    IdentifiableType entity = em.getMetamodel().entity(type);

    Type<?> idType = entity.getIdType();
    checkArgument(idType != null, "Entity %s must have an id property for @Load.", type.getSimpleName());

    if (hasSupertype(entity)) {
      entity = entity.getSupertype();
    }

    return entity.getDeclaredId(idType.getJavaType());
  }
View Full Code Here

  public boolean appliesTo(EntityType<? super T> entityType) {
    if ( this.entityType.equals( entityType ) ) {
      return true;
    }

    IdentifiableType superType = entityType.getSupertype();
    while ( superType != null ) {
      if ( superType.equals( entityType ) ) {
        return true;
      }
      superType = superType.getSupertype();
    }

    return false;
  }
View Full Code Here

  public boolean appliesTo(EntityType<? super T> entityType) {
    if ( this.entityType.equals( entityType ) ) {
      return true;
    }

    IdentifiableType superType = entityType.getSupertype();
    while ( superType != null ) {
      if ( superType.equals( entityType ) ) {
        return true;
      }
      superType = superType.getSupertype();
    }

    return false;
  }
View Full Code Here

TOP

Related Classes of javax.persistence.metamodel.IdentifiableType

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.