*/
public class Neo4jMetadataFactory implements DatastoreMetadataFactory<NodeMetadata, org.neo4j.graphdb.Label, RelationshipMetadata, Neo4jRelationshipType> {
@Override
public NodeMetadata createEntityMetadata(AnnotatedType annotatedType, Map<Class<?>, TypeMetadata> metadataByType) {
Label labelAnnotation = annotatedType.getAnnotation(Label.class);
org.neo4j.graphdb.Label label = null;
IndexedPropertyMethodMetadata<?> indexedProperty = null;
if (labelAnnotation != null) {
String value = labelAnnotation.value();
if (Label.DEFAULT_VALUE.equals(value)) {
value = annotatedType.getName();
}
label = DynamicLabel.label(value);
Class<?> usingIndexOf = labelAnnotation.usingIndexedPropertyOf();
if (!Object.class.equals(usingIndexOf)) {
TypeMetadata typeMetadata = metadataByType.get(usingIndexOf);
indexedProperty = typeMetadata.getIndexedProperty();
}
}