Examples of OCommandRequest


Examples of com.orientechnologies.orient.core.command.OCommandRequest

    // database.command(cmd).execute();
    return this;
  }

  public Collection<OIdentifiable> get(final Object iKey) {
    final OCommandRequest cmd = formatCommand(QUERY_GET, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(iKey);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

    final OCommandRequest cmd = formatCommand(QUERY_GET, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(iKey);
  }

  public Collection<OIdentifiable> getValuesBetween(final Object iRangeFrom, final Object iRangeTo) {
    final OCommandRequest cmd = formatCommand(QUERY_GET_VALUE_RANGE, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(iRangeFrom, iRangeTo);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

    final OCommandRequest cmd = formatCommand(QUERY_GET_VALUE_RANGE, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(iRangeFrom, iRangeTo);
  }

  public Collection<ODocument> getEntriesBetween(final Object iRangeFrom, final Object iRangeTo) {
    final OCommandRequest cmd = formatCommand(QUERY_GET_RANGE, name);
    return (Collection<ODocument>) getDatabase().command(cmd).execute(iRangeFrom, iRangeTo);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

    final OCommandRequest cmd = formatCommand(QUERY_GET_RANGE, name);
    return (Collection<ODocument>) getDatabase().command(cmd).execute(iRangeFrom, iRangeTo);
  }

  public Collection<OIdentifiable> getValuesMajor(Object fromKey, boolean isInclusive) {
    final OCommandRequest cmd;
    if (isInclusive)
      cmd = formatCommand(QUERY_GET_VALUE_MAJOR_EQUALS, name);
    else
      cmd = formatCommand(QUERY_GET_VALUE_MAJOR, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(fromKey);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

      cmd = formatCommand(QUERY_GET_VALUE_MAJOR, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(fromKey);
  }

  public Collection<ODocument> getEntriesMajor(Object fromKey, boolean isInclusive) {
    final OCommandRequest cmd;
    if (isInclusive)
      cmd = formatCommand(QUERY_GET_MAJOR_EQUALS, name);
    else
      cmd = formatCommand(QUERY_GET_MAJOR, name);
    return (Collection<ODocument>) getDatabase().command(cmd).execute(fromKey);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

      cmd = formatCommand(QUERY_GET_MAJOR, name);
    return (Collection<ODocument>) getDatabase().command(cmd).execute(fromKey);
  }

  public Collection<OIdentifiable> getValuesMinor(Object toKey, boolean isInclusive) {
    final OCommandRequest cmd;
    if (isInclusive)
      cmd = formatCommand(QUERY_GET_VALUE_MINOR_EQUALS, name);
    else
      cmd = formatCommand(QUERY_GET_VALUE_MINOR, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(toKey);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

      cmd = formatCommand(QUERY_GET_VALUE_MINOR, name);
    return (Collection<OIdentifiable>) getDatabase().command(cmd).execute(toKey);
  }

  public Collection<ODocument> getEntriesMinor(Object toKey, boolean isInclusive) {
    final OCommandRequest cmd;
    if (isInclusive)
      cmd = formatCommand(QUERY_GET_MINOR_EQUALS, name);
    else
      cmd = formatCommand(QUERY_GET_MINOR, name);
    return (Collection<ODocument>) getDatabase().command(cmd).execute(toKey);
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

      cmd = formatCommand(QUERY_GET_MINOR, name);
    return (Collection<ODocument>) getDatabase().command(cmd).execute(toKey);
  }

  public boolean contains(final Object iKey) {
    final OCommandRequest cmd = formatCommand(QUERY_CONTAINS, name);
    final List<ODocument> result = getDatabase().command(cmd).execute();
    return (Long) result.get(0).field("size") > 0;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

    if (iValue instanceof ORecord<?> && !iValue.getIdentity().isValid())
      // SAVE IT BEFORE TO PUT
      ((ORecord<?>) iValue).save();

    final OCommandRequest cmd = formatCommand(QUERY_PUT, name, iKey, iValue.getIdentity());
    getDatabase().command(cmd).execute();
    return this;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandRequest

  public boolean remove(Object iKey) {
    if (iKey instanceof String)
      iKey = "'" + iKey + "'";

    final OCommandRequest cmd = formatCommand(QUERY_REMOVE, name, iKey);
    return Boolean.parseBoolean((String) getDatabase().command(cmd).execute(iKey));
  }
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.