@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); if (cid.getAnnotation(RooJavaType.ROO_DTO) != null) { return true; } return false; }
@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); return cid.getAnnotation(RooJavaType.ROO_JPA_ENTITY) != null; }
@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); if (cid.getAnnotation(RooJavaType.ROO_THYMELEAF) != null) { return true; } return false; }
@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); if (cid.getAnnotation(RooJavaType.ROO_REPOSITORY_JPA) != null) { return true; } return false; }
/** * Informs if this component can generate service class for required entity * * @param domainType * @return */ public boolean canGenerateService(JavaType domainType) { return canGenerateService(typeLocationService.getTypeDetails(domainType)); }
@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); if (cid.getAnnotation(RooJavaType.ROO_JPA_ENTITY) != null) { return true; } return false; }
private ClassOrInterfaceTypeDetails getDetailsFor(JavaType type, Map<JavaType, ClassOrInterfaceTypeDetails> detailsCache) { if (detailsCache.containsKey(type)) { return detailsCache.get(type); } ClassOrInterfaceTypeDetails details = getTypeLocationService().getTypeDetails(type); detailsCache.put(type, details); return details; }
private MemberDetails getMemberDetails(final JavaType type) { final ClassOrInterfaceTypeDetails typeDetails = typeLocationService.getTypeDetails(type); if (typeDetails == null) { return null; } return memberDetailsScanner.getMemberDetails(getClass().getName(), typeDetails); }
@Override public String getPlural(JavaType type, Locale locale) { Validate.notNull(type, "ERROR: You must provide a valid JavaType"); Validate.notNull(locale, "ERROR: You must provide a valid Locale"); // Getting ClassOrInterfaceTypeDetails ClassOrInterfaceTypeDetails cid = getTypeLocationService().getTypeDetails(type); Validate.notNull(cid, "ERROR: You must provide an existing JavaType"); return getPlural(cid, locale); }
private boolean isExceptionAnnotatedWithResponseStatus(JavaType exception) { ClassOrInterfaceTypeDetails exceptionCid = typeLocationService.getTypeDetails(exception); Validate.notNull(exceptionCid, String.format("Can't found class: %s", exception.getFullyQualifiedTypeName())); AnnotationMetadata annotation = exceptionCid.getAnnotation(SpringJavaType.RESPONSE_STATUS); if (annotation == null) { return false; } return true; }
@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); if (cid.getAnnotation(RooJavaType.ROO_JPA_ENTITY) != null || cid.getAnnotation(JpaJavaType.ENTITY) != null) { return true; } return false; }
@Override public boolean shouldGenerateRepository(JavaType domainType) { ClassOrInterfaceTypeDetails entityDetails = getTypeLocationService().getTypeDetails(domainType); return shouldGenerateRepository(entityDetails); }
@Override public EntityProjectionMetadata getEntityProjectionMetadata(final JavaType entityProjection) { ClassOrInterfaceTypeDetails projectionDetails = typeLocationService.getTypeDetails(entityProjection); if (projectionDetails == null) { return null; } return metadataService.get(EntityProjectionMetadata.createIdentifier(projectionDetails)); }
@Override public boolean isValid(JavaType javaType) { ClassOrInterfaceTypeDetails cid = typeLocationService.getTypeDetails(javaType); MemberDetails details = memberDetailsScanner.getMemberDetails(this.getClass().getName(), cid); if (cid.getAnnotation(JpaJavaType.EMBEDDABLE) != null || details.getAnnotation(JpaJavaType.EMBEDDABLE) != null) { return true; } return false; }
@Override public List<Pair<FieldMetadata, RelationInfo>> getFieldChildPartOfRelation(JavaType entity) { ClassOrInterfaceTypeDetails entityDetails = getTypeLocationService().getTypeDetails(entity); return getFieldChildPartOfRelation(entityDetails); }
/** * Gets JpaEntityMetadata by a javaType * @param domainType * @return */ private JpaEntityMetadata getJpaEntityMetadata(JavaType domainType) { ClassOrInterfaceTypeDetails entityDetails = getTypeLocationService().getTypeDetails(domainType); return getJpaEntityMetadata(entityDetails); }
@Override public JpaEntityFactoryMetadata getJpaEntityFactoryMetadata(JavaType entityFactory) { ClassOrInterfaceTypeDetails factoryDetails = typeLocationService.getTypeDetails(entityFactory); if (factoryDetails == null) { return null; } return metadataService.get(JpaEntityFactoryMetadata.createIdentifier(factoryDetails)); }
@Override public String getBaseUrlForController(JavaType controller) { ClassOrInterfaceTypeDetails cid = getTypeLocationService().getTypeDetails(controller); Validate.notNull(cid, "%s not found", controller.getFullyQualifiedTypeName()); return getBaseUrlForController(cid); }
@Override public String getBaseUrlControllerForFinder(JavaType controller, String finder) { ClassOrInterfaceTypeDetails cid = getTypeLocationService().getTypeDetails(controller); Validate.notNull(cid, "%s not found", controller.getFullyQualifiedTypeName()); return getBaseUrlControllerForFinder(cid, finder); }
/** * Gets {@link JpaEntityMetadata} from a entity * * @param entity * @return */ private JpaEntityMetadata getEntityMetadata(JavaType entity) { ClassOrInterfaceTypeDetails entityDetails = getTypeLocationService().getTypeDetails(entity); return getMetadataService().get(JpaEntityMetadata.createIdentifier(entityDetails)); }