/*
   * (non-Javadoc)
   * @see java.lang.Object#toString()
   */
  @Override
  public String toString() {
    final String propertyName = partInfo.getNeo4jPropertyName();
    final String operator = SYMBOLS.get(partInfo.getType());
    final String variable = partInfo.getVariable();

    if (partInfo.getType().getNumberOfArguments() == 0) {
      return String.format(WHERE_CLAUSE_0, variable, propertyName, operator);
    }
    return String.format(
        WHERE_CLAUSE_1, variable, propertyName, operator, partInfo.getParameterIndex());
  }
 /**
  * Creates a new {@link WhereClause} for the given {@link Neo4jPersistentProperty}, variable, type
  * and parameter index.
  *
  * @param partInfo
  */
 public WhereClause(
     PersistentPropertyPath<Neo4jPersistentProperty> path,
     String variable,
     Type type,
     int index,
     PartInfo partInfo) {
   Assert.notNull(partInfo.getType());
   this.partInfo = partInfo;
 }
示例#3
0
 boolean sameVariable(PartInfo startPartInfo) {
   return startPartInfo.getVariable().equals(getVariable());
 }
示例#4
0
 boolean sameIndex(PartInfo startPartInfo) {
   return startPartInfo.getIndexName().equals(getIndexName());
 }