Examples of Neo4jPersistentEntity


Examples of org.springframework.data.neo4j.mapping.Neo4jPersistentEntity

     */
    @Override
    public Result<T> findAllBySchemaPropertyValue(String property, Object value) {
        final String SCHEMA_PROP_MATCH_CLAUSE = "MATCH (entity:`%s`) where entity.`%s` = {propValue} return entity";

        Neo4jPersistentEntity persistentEntity = template.getEntityType(clazz).getEntity();
        Neo4jPersistentProperty persistentProperty = (Neo4jPersistentProperty)persistentEntity.getPersistentProperty(property);
        if (persistentProperty.getIndexInfo() == null || !persistentProperty.getIndexInfo().isLabelBased() ) {
            throw new IllegalArgumentException(format("property %s.%s is not schema indexed",persistentEntity.getName(),property));
        }

        Map<String,Object> params = new HashMap<String,Object>();
        params.put("propValue", value);
        String cypherQuery = format(SCHEMA_PROP_MATCH_CLAUSE,
View Full Code Here

Examples of org.springframework.data.neo4j.mapping.Neo4jPersistentEntity

    }

    @SuppressWarnings("unchecked")
    public EntityState<Relationship> getEntityState(final Object entity, boolean detachable, Neo4jTemplate template) {
        final Class<?> entityType = entity.getClass();
        final Neo4jPersistentEntity persistentEntity = (Neo4jPersistentEntity) mappingContext.getPersistentEntity(entityType);
        final DelegatingFieldAccessorFactory fieldAccessorFactory = relationshipDelegatingFieldAccessorFactory.provideFactoryFor(template);
        final RelationshipEntityState relationshipEntityState = new RelationshipEntityState(null, entity, entityType, template, fieldAccessorFactory, persistentEntity);
        if (!detachable) {
            return relationshipEntityState;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.