final List<? extends FieldMetadata> declaredFields = governorTypeDetails.getDeclaredFields();
pathResolver.getFocusedPath(Path.SRC_MAIN_JAVA)); final List<FieldMetadata> constructorFields = new ArrayList<FieldMetadata>(); final List<? extends FieldMetadata> declaredFields = javaTypeDetails.getDeclaredFields(); if (fields != null) { for (final String field : fields) {
Map<String, FieldMetadata> relationsAsChild = new HashMap<String, FieldMetadata>(); for (FieldMetadata field : entityDetails.getDeclaredFields()) { if (field.getAnnotation(RooJavaType.ROO_JPA_RELATION) != null) { fieldsParent.add(field);
List<MethodMetadata> oneToManyGetters = new ArrayList<MethodMetadata>(); List<MethodMetadata> manyToOneGetters = new ArrayList<MethodMetadata>(); for (FieldMetadata field : entityDetails.getDeclaredFields()) {
new LinkedHashMap<FieldMetadata, JavaSymbolName>(); final List<FieldMetadata> declaredFieldsList = new ArrayList<FieldMetadata>(); for (final FieldMetadata field : currentClassDetails.getDeclaredFields()) { declaredFields.put(field, getIdentifierAccessorMethodName(field, metadataIdentificationString));
for (final FieldMetadata candidate : cid.getDeclaredFields()) { JavaParserFieldMetadataBuilder.addField(compilationUnitServices, typeDeclaration.getMembers(), candidate);
for (FieldMetadata field : entityDetails.getDeclaredFields()) { if (field.getAnnotation(JpaJavaType.ID) != null) { idType = field.getFieldType();
private void writeInnerTypeFields(final ClassOrInterfaceTypeDetails innerType) { for (final FieldMetadata field : innerType.getDeclaredFields()) { indent(); this.newLine(false); // Append annotations for (final AnnotationMetadata annotation : field.getAnnotations()) { appendIndent(); outputAnnotation(annotation); this.newLine(false); } appendIndent(); if (field.getModifier() != 0) { append(Modifier.toString(field.getModifier())); append(" "); } append(field.getFieldType().getNameIncludingTypeParameters(false, resolver)); append(" "); append(field.getFieldName().getSymbolName()); // Append initializer, if present if (field.getFieldInitializer() != null) { append(" = "); append(field.getFieldInitializer()); } // Complete the field declaration append(";"); this.newLine(false); indentRemove(); } }
private boolean isIdentifierDeletable(final JavaType identifierType) { final PhysicalTypeMetadata governorPhysicalTypeMetadata = getPhysicalTypeMetadata(identifierType); if (governorPhysicalTypeMetadata == null) { return false; } // Check for added constructors, fields and methods final ClassOrInterfaceTypeDetails managedIdentifier = governorPhysicalTypeMetadata .getMemberHoldingTypeDetails(); return managedIdentifier.getDeclaredConstructors().isEmpty() && managedIdentifier.getDeclaredFields().isEmpty() && managedIdentifier.getDeclaredMethods().isEmpty(); }
private boolean isEntityDeletable( final ClassOrInterfaceTypeDetails managedEntity) { final String declaredByMetadataId = DbreMetadata.createIdentifier( managedEntity.getName(), PhysicalTypeIdentifier .getPath(managedEntity.getDeclaredByMetadataId())); final DbreMetadata dbreMetadata = (DbreMetadata) getMetadataService() .get(declaredByMetadataId); if (dbreMetadata == null || !dbreMetadata.isAutomaticallyDelete()) { return false; } // Check whether the type's annotations have been customised if (!hasStandardEntityAnnotations(managedEntity)) { return false; } // Finally, check for added constructors, fields and methods return managedEntity.getDeclaredConstructors().isEmpty() && managedEntity.getDeclaredFields().isEmpty() && managedEntity.getDeclaredMethods().isEmpty(); }
final List<? extends FieldMetadata> declaredFields = governorTypeDetails.getDeclaredFields();
pathResolver.getFocusedPath(Path.SRC_MAIN_JAVA)); final List<FieldMetadata> constructorFields = new ArrayList<FieldMetadata>(); final List<? extends FieldMetadata> declaredFields = javaTypeDetails.getDeclaredFields(); if (fields != null) { for (final String field : fields) {
fieldMetadataList.addAll(mutableTypeDetails.getDeclaredFields());
Map<String, FieldMetadata> relationsAsChild = new HashMap<String, FieldMetadata>(); for (FieldMetadata field : entityDetails.getDeclaredFields()) { if (field.getAnnotation(RooJavaType.ROO_JPA_RELATION) != null) { fieldsParent.add(field);
for (FieldMetadata field : governorTypeDetails.getDeclaredFields()) { annotation = field.getAnnotation(GVNIX_JPA_QUERY); if (annotation != null) {
new LinkedHashMap<FieldMetadata, JavaSymbolName>(); final List<FieldMetadata> declaredFieldsList = new ArrayList<FieldMetadata>(); for (final FieldMetadata field : currentClassDetails.getDeclaredFields()) { declaredFields.put(field, getIdentifierAccessorMethodName(field, metadataIdentificationString));
.getDeclaredFields(); for (FieldMetadata field : fields) {
private void writeInnerTypeFields(final ClassOrInterfaceTypeDetails innerType) { for (final FieldMetadata field : innerType.getDeclaredFields()) { indent(); this.newLine(false); // Append annotations for (final AnnotationMetadata annotation : field.getAnnotations()) { appendIndent(); outputAnnotation(annotation); this.newLine(false); } appendIndent(); if (field.getModifier() != 0) { append(Modifier.toString(field.getModifier())); append(" "); } append(field.getFieldType().getNameIncludingTypeParameters(false, resolver)); append(" "); append(field.getFieldName().getSymbolName()); // Append initializer, if present if (field.getFieldInitializer() != null) { append(" = "); append(field.getFieldInitializer()); } // Complete the field declaration append(";"); this.newLine(false); indentRemove(); } }