Пример #1
0
  /*
   * (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());
  }
Пример #2
0
 /**
  * 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());
 }