Package org.springframework.data.neo4j.fieldaccess

Examples of org.springframework.data.neo4j.fieldaccess.DelegatingFieldAccessorFactory


    @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;
        }
        return new DetachedEntityState<Relationship>(relationshipEntityState, template);
View Full Code Here


    public EntityState<Node> getEntityState(final Object entity, boolean detachable, Neo4jTemplate template) {
        final Class<?> entityType = entity.getClass();
        if (isPartial(entityType)) {
            Neo4jPersistentEntity<Object> persistentEntity = getPersistentEntity(entityType);
            if (persistentEntity==null) return null;
            final DelegatingFieldAccessorFactory fieldAccessorFactory = crossStoreFactory.provideFactoryFor(template);
            @SuppressWarnings("unchecked") final CrossStoreNodeEntityState<NodeBacked> partialNodeEntityState =
                    new CrossStoreNodeEntityState<NodeBacked>(null, (NodeBacked)entity, (Class<? extends NodeBacked>) entityType,
                            template, getPersistenceUnitUtils(), fieldAccessorFactory,
                            persistentEntity);
            if (!detachable) return partialNodeEntityState;
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.fieldaccess.DelegatingFieldAccessorFactory

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.