Package com.buschmais.cdo.neo4j.api.annotation

Examples of com.buschmais.cdo.neo4j.api.annotation.Relation


        return new IndexedPropertyMetadata(indexed.create());
    }

    @Override
    public RelationshipMetadata createRelationMetadata(PropertyMethod propertyMethod) {
        Relation relation = propertyMethod.getAnnotationOfProperty(Relation.class);
        String name = relation != null ? relation.value() : StringUtils.capitalize(propertyMethod.getName());
        DynamicRelationshipType relationshipType = DynamicRelationshipType.withName(name);
        return new RelationshipMetadata(relationshipType);
    }
View Full Code Here


        return new IndexedPropertyMetadata(indexed.create(), indexed.unique());
    }

    @Override
    public RelationshipMetadata createRelationMetadata(AnnotatedElement<?> annotatedElement, Map<Class<?>, TypeMetadata> metadataByType) {
        Relation relationAnnotation;
        if (annotatedElement instanceof PropertyMethod) {
            relationAnnotation = ((PropertyMethod) annotatedElement).getAnnotationOfProperty(Relation.class);
        } else {
            relationAnnotation = annotatedElement.getAnnotation(Relation.class);
        }
        String name = null;
        if (relationAnnotation != null) {
            String value = relationAnnotation.value();
            if (!Relation.DEFAULT_VALUE.equals(value)) {
                name = value;
            }
        }
        if (name == null) {
View Full Code Here

TOP

Related Classes of com.buschmais.cdo.neo4j.api.annotation.Relation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.