Package org.springframework.data.neo4j.mapping

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


      return property.isRelationship() && property.getRelationshipInfo().targetsNodes() && !property.getRelationshipInfo().isMultiple();
  }

  @Override
  public FieldAccessor<T> forField(final Neo4JPersistentProperty property) {
        final RelationshipInfo relationshipInfo = property.getRelationshipInfo();
        return new SingleRelationshipFieldAccessor<T, TARGET>(relationshipInfo.getRelationshipType(), relationshipInfo.getDirection(), (Class<TARGET>) relationshipInfo.getTargetType().getType(), graphDatabaseContext,property);
  }
View Full Code Here


  }

    @Override
    public boolean accept(final Neo4JPersistentProperty property) {
        if (!property.isRelationship()) return false;
        final RelationshipInfo info = property.getRelationshipInfo();
        return info.isMultiple() && info.targetsNodes() && !info.isReadonly();
    }
View Full Code Here

        return info.isMultiple() && info.targetsNodes() && !info.isReadonly();
    }

    @Override
  public FieldAccessor<T> forField(final Neo4JPersistentProperty property) {
        final RelationshipInfo relationshipInfo = property.getRelationshipInfo();
        final Class<TARGET> targetType = (Class<TARGET>) relationshipInfo.getTargetType().getType();
        return new OneToNRelationshipFieldAccessor<T, TARGET>(relationshipInfo.getRelationshipType(), relationshipInfo.getDirection(), targetType, graphDatabaseContext,property);
  }
View Full Code Here

    return property.isRelationship() && !property.getRelationshipInfo().targetsNodes() && property.getRelationshipInfo().isMultiple();
  }

  @Override
  public FieldAccessor<NodeBacked> forField(final Neo4JPersistentProperty property) {
        final RelationshipInfo relationshipInfo = property.getRelationshipInfo();
    return new OneToNRelationshipEntityFieldAccessor(relationshipInfo.getRelationshipType(), relationshipInfo.getDirection(), (Class<? extends RelationshipBacked>) relationshipInfo.getTargetType().getType(), graphDatabaseContext,property);
  }
View Full Code Here

  }

  @Override
  public boolean accept(final Neo4JPersistentProperty f) {
      if (!f.isRelationship()) return false;
        final RelationshipInfo info = f.getRelationshipInfo();
        return  info.isMultiple() && info.targetsNodes() && info.isReadonly();
  }
View Full Code Here

        return  info.isMultiple() && info.targetsNodes() && info.isReadonly();
  }

  @Override
  public FieldAccessor<T> forField(final Neo4JPersistentProperty property) {
        final RelationshipInfo relationshipInfo = property.getRelationshipInfo();
        return new ReadOnlyOneToNRelationshipFieldAccessor<T, TARGET>(relationshipInfo.getRelationshipType(), relationshipInfo.getDirection(), (Class<TARGET>) property.getRelationshipInfo().getTargetType().getType(), graphDatabaseContext,property);
  }
View Full Code Here

            if (!property.isRelationship()) {
                return intermediate;
            }

            RelationshipInfo info = property.getRelationshipInfo();
            Class<?> ownerType = property.getOwner().getType();

            intermediate = intermediate == null ? asVariableReference(StringUtils.uncapitalize(ownerType.getSimpleName()))
                    : intermediate;
            intermediate = String.format(getPattern(info), intermediate, info.getType(), asVariableReference(property.getName()));
        }

        return intermediate.toString();
    }
View Full Code Here

        return property.getRelationshipInfo().isRelatedToVia() && property.getRelationshipInfo().isSingle();
    }

  @Override
  public FieldAccessor forField(final Neo4jPersistentProperty property) {
        final RelationshipInfo relationshipInfo = property.getRelationshipInfo();
    return new RelatedToViaSingleFieldAccessor(relationshipInfo.getRelationshipType(), relationshipInfo.getDirection(), (Class<?>) relationshipInfo.getTargetType().getType(), template,property);
  }
View Full Code Here

        return property.getRelationshipInfo().isRelatedToVia() && property.getRelationshipInfo().isCollection();
    }

  @Override
  public FieldAccessor forField(final Neo4jPersistentProperty property) {
        final RelationshipInfo relationshipInfo = property.getRelationshipInfo();
    return new RelatedToViaCollectionFieldAccessor(relationshipInfo.getRelationshipType(), relationshipInfo.getDirection(), (Class<?>) relationshipInfo.getTargetType().getType(), template,property);
  }
View Full Code Here

            final Neo4jPersistentProperty property = relPath.getBaseProperty();
            return formatMatch(variableContext.getVariableFor(property.getOwner()),
                    QueryTemplates.getArrow(property.getRelationshipInfo()),
                    variableContext.getVariableFor(relPath));
        }
        final RelationshipInfo info = relPath.getLeafProperty().getRelationshipInfo();
        return formatMatch2(matchPattern(variableContext, relPath.getParentPath()),
                QueryTemplates.getArrow(info),
                variableContext.getVariableFor(relPath));
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.mapping.RelationshipInfo

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.