@Nullable private static Class<?> fallbackIdTypeLookup(IdentifiableType<?> type) { IdClass annotation = AnnotationUtils.findAnnotation(type.getJavaType(), IdClass.class); return annotation == null ? null : annotation.value(); }
Class<?> superType = type.getJavaType().getSuperclass();
private List<Map<String, ?>> recordsInfo() { List<Map<String, ?>> records = U.list(); for (EntityType<?> type : JPA.getEntityTypes()) { Class<?> javaType = type.getJavaType(); long count = JPA.count(javaType); String idType = type.getIdType() != null ? type.getIdType().getJavaType().getSimpleName() : ""; Object superType = type.getSupertype() != null ? type.getSupertype().getJavaType().getSimpleName() : ""; records.add(U.map("type", type.getName(), "extends", superType, "ID Type", idType, "count", count)); } return records; }
@Nullable private static Class<?> fallbackIdTypeLookup(IdentifiableType<?> type) { IdClass annotation = AnnotationUtils.findAnnotation(type.getJavaType(), IdClass.class); return annotation == null ? null : annotation.value(); }
private static Class<?> fallbackIdTypeLookup(IdentifiableType<?> type) { IdClass annotation = AnnotationUtils.findAnnotation(type.getJavaType(), IdClass.class); return annotation == null ? null : annotation.value(); }
Class<?> superType = type.getJavaType().getSuperclass();
CtClass boxedType = autoBox(classPool, idType); String desc = "(" + Descriptor.of(type.getJavaType().getName()) + ")" + Descriptor.of(boxedType);
private List<Map<String, ?>> recordsInfo() { List<Map<String, ?>> records = U.list(); for (EntityType<?> type : JPA.getEntityTypes()) { Class<?> javaType = type.getJavaType(); long count = JPA.count(javaType); String idType = type.getIdType() != null ? type.getIdType().getJavaType().getSimpleName() : ""; Object superType = type.getSupertype() != null ? type.getSupertype().getJavaType().getSimpleName() : ""; records.add(U.map("type", type.getName(), "extends", superType, "ID Type", idType, "count", count)); } return records; }
private EntityMetamodel getDeclarerEntityMetamodel(IdentifiableType<?> ownerType) { final Type.PersistenceType persistenceType = ownerType.getPersistenceType(); if ( persistenceType == Type.PersistenceType.ENTITY) { return context.getSessionFactory() .getEntityPersister( ownerType.getJavaType().getName() ) .getEntityMetamodel(); } else if ( persistenceType == Type.PersistenceType.MAPPED_SUPERCLASS) { PersistentClass persistentClass = context.getPersistentClassHostingProperties( (MappedSuperclassTypeImpl<?>) ownerType ); return context.getSessionFactory() .getEntityPersister( persistentClass.getClassName() ) .getEntityMetamodel(); } else { throw new AssertionFailure( "Cannot get the metamodel for PersistenceType: " + persistenceType ); } }