super.verify();
doWithProperties(new PropertyHandler<Neo4jPersistentProperty>() {
Neo4jPersistentProperty unique = null;
public void doWithPersistentProperty(Neo4jPersistentProperty property) {
if (property.isUnique()) {
if (unique!=null) throw new MappingException("Duplicate unique property " + qualifiedPropertyName(property)+ ", " + qualifiedPropertyName(uniqueProperty) + " has already been defined. Only one unique property is allowed per type");
unique = property;
}
}
});
if (isManaged() || getType().isInterface()) {
return;
}
final Neo4jPersistentProperty idProperty = getIdProperty();
if (idProperty == null) throw new MappingException("No id property in " + this);
if (idProperty.getType().isPrimitive()) throw new MappingException("The type of the id-property in " + qualifiedPropertyName(idProperty)+" must not be a primitive type but an object type like java.lang.Long");
}