private void validateTypeMapping(Set<Class<? extends AttributedType>> supportedTypes) { for (Class<? extends AttributedType> supportedType : supportedTypes) { // we only validate user-defined types if (Relationship.class.equals(supportedType) || Partition.class.equals(supportedType) || IdentityType.class.equals(supportedType) || Account.class.equals(supportedType)) { continue; } checkIfAnnotationIsDefined(supportedType, Identifier.class); if (Partition.class.isAssignableFrom(supportedType)) { checkIfAnnotationIsDefined(supportedType, PartitionClass.class); } if (IdentityType.class.isAssignableFrom(supportedType)) { checkIfAnnotationIsDefined(supportedType, IdentityClass.class); if (getConfig().supportsPartition()) { checkIfAnnotationIsDefined(supportedType, OwnerReference.class); } } if (Relationship.class.isAssignableFrom(supportedType)) { checkIfAnnotationIsDefined(supportedType, RelationshipClass.class); checkIfAnnotationIsDefined(supportedType, RelationshipDescriptor.class); checkIfAnnotationIsDefined(supportedType, RelationshipMember.class); checkIfAnnotationIsDefined(supportedType, OwnerReference.class); } } }
private void validateTypeMapping(Set<Class<? extends AttributedType>> supportedTypes) { for (Class<? extends AttributedType> supportedType : supportedTypes) { // we only validate user-defined types if (Relationship.class.equals(supportedType) || Partition.class.equals(supportedType) || IdentityType.class.equals(supportedType) || Account.class.equals(supportedType)) { continue; } checkIfAnnotationIsDefined(supportedType, Identifier.class); if (Partition.class.isAssignableFrom(supportedType)) { checkIfAnnotationIsDefined(supportedType, PartitionClass.class); } if (IdentityType.class.isAssignableFrom(supportedType)) { checkIfAnnotationIsDefined(supportedType, IdentityClass.class); if (getConfig().supportsPartition()) { checkIfAnnotationIsDefined(supportedType, OwnerReference.class); } } if (Relationship.class.isAssignableFrom(supportedType)) { checkIfAnnotationIsDefined(supportedType, RelationshipClass.class); checkIfAnnotationIsDefined(supportedType, RelationshipDescriptor.class); checkIfAnnotationIsDefined(supportedType, RelationshipMember.class); checkIfAnnotationIsDefined(supportedType, OwnerReference.class); } } }