Examples of OCommandResultListener


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

  protected List<ODocument> executeQuery(String sql, ODatabaseDocumentInternal db, Object... args) {
    final List<ODocument> synchResult = db.query(new OSQLSynchQuery<ODocument>(sql), args);
    final List<ODocument> asynchResult = new ArrayList<ODocument>();
    final AtomicBoolean endWasCalled = new AtomicBoolean();

    db.query(new OSQLAsynchQuery<ODocument>(sql, new OCommandResultListener() {
      @Override
      public boolean result(Object iRecord) {
        asynchResult.add((ODocument) iRecord);
        return true;
      }
View Full Code Here

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

    this.clusterSelection = clusterSelection;
  }

  public void fireDatabaseMigration(final ODatabaseRecord database, final String propertyName, final OType type) {
    database.query(new OSQLAsynchQuery<Object>("select from " + name + " where " + propertyName + ".type() <> \"" + type.name()
        + "\"", new OCommandResultListener() {

      @Override
      public boolean result(Object iRecord) {
        final ODocument record = ((OIdentifiable) iRecord).getRecord();
        record.setFieldType(propertyName, type);
View Full Code Here

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

  }

  public void firePropertyNameMigration(final ODatabaseRecord database, final String propertyName, final String newPropertyName,
      final OType type) {
    database.query(new OSQLAsynchQuery<Object>("select from " + name + " where " + propertyName + " is not null ",
        new OCommandResultListener() {

          @Override
          public boolean result(Object iRecord) {
            final ODocument record = ((OIdentifiable) iRecord).getRecord();
            record.setFieldType(propertyName, type);
View Full Code Here

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

  @SuppressWarnings("unchecked")
  public void cycle() throws UnsupportedEncodingException {
    System.out.println("1 -----------------------");
    OrientTest.printRecords((List<? extends ORecord>) database.command(
        new OSQLAsynchQuery<ODocument>("select * from animal where column(0) < 5 or column(0) >= 3 and column(5) < 7",
            new OCommandResultListener() {
              @Override
              public boolean result(Object iRecord) {
                OrientTest.printRecord(resultCount++, iRecord);
                return true;
              }
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.