Examples of command()


Examples of co.cask.tigon.internal.app.runtime.distributed.FlowTwillProgramController.command()

                                                                                   instanceUpdater);
        Map<String, String> instanceOptions = Maps.newHashMap();
        instanceOptions.put("flowlet", flowletName);
        instanceOptions.put("newInstances", String.valueOf(instanceCount));
        instanceOptions.put("oldInstances", String.valueOf(oldInstances));
        flowController.command(ProgramOptionConstants.FLOWLET_INSTANCES, instanceOptions).get();
      }
    } catch (Exception e) {
      LOG.warn(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of com.github.jknack.antlr4ide.generator.ToolOptions.command()

    options.setOutputDirectory(outputPath.toOSString());
    assertEquals(Lists
        .newArrayList("-o", projectPath.append(outputPath).append("org").append("package")
            .toOSString(), "-listener", "-no-visitor", "-encoding",
            "UTF-8"),
        options.command(file));

    verify(mocks);
  }
}
View Full Code Here

Examples of com.mongodb.DB.command()

            @Override
            public Object doRun() {
                Object res = null;
                try {
                    res = admin.command(cmd);
                } catch (MongoException.Network e) {
                    res = new BasicDBObject("msg", "Operation was likely successful, but connection was bounced");
                }
               
                try {
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocument.command()

  public void testIndexReturnOnlySpecifiedClass() throws Exception {
    List<ODocument> result;

    ODatabaseDocument db = database.getUnderlying();

    result = db.command(new OSQLSynchQuery("select * from ChildTestClass where testParentProperty = 10")).execute();
    Assert.assertNotNull(result);
    Assert.assertEquals(1, result.size());
    Assert.assertEquals(10L, result.get(0).field("testParentProperty"));

    result = db.command(new OCommandSQL("select * from AnotherChildTestClass where testParentProperty = 11")).execute();
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.command()

    final Long total = db.countClass("Profile");

    final List<ODocument> resultset = db.query(new OSQLSynchQuery<Object>(
        "select from Profile where sex = 'male' and salary > 120 and salary <= 133"));

    final Number records = (Number) db.command(
        new OCommandSQL("delete from Profile where sex = 'male' and salary > 120 and salary <= 133")).execute();

    Assert.assertEquals(records.intValue(), resultset.size());

    Assert.assertEquals(db.countClass("Profile"), total - records.intValue());
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.command()

    final List<ORecord<?>> response;

    try {
      db = getProfiledDatabaseInstance(iRequest);

      response = (List<ORecord<?>>) db.command(new OSQLSynchQuery<ORecordSchemaAware<?>>(text, limit).setFetchPlan(fetchPlan))
          .execute();

    } finally {
      if (db != null)
        OSharedDocumentDatabase.release(db);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.command()

    final Object response;

    try {
      db = getProfiledDatabaseInstance(iRequest);

      response = db.command(new OCommandSQL(text)).execute();

    } finally {
      if (db != null)
        OSharedDocumentDatabase.release(db);
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecord.command()

    final String additionalStatement = parserGetLastWord();

    if (subjectName.startsWith("(")) {
      subjectName = subjectName.trim();
      query = database.command(new OSQLAsynchQuery<ODocument>(subjectName.substring(1, subjectName.length() - 1), this)
          .setContext(context));

      if (additionalStatement.equals(OCommandExecutorSQLAbstract.KEYWORD_WHERE)
          || additionalStatement.equals(OCommandExecutorSQLAbstract.KEYWORD_LIMIT))
        compiledFilter = OSQLEngine.getInstance().parseCondition(parserText.substring(parserGetCurrentPosition()), getContext(),
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.command()

              if (((String) value).length() == 0)
                value = null;
              else
                value = "'" + value + "'";

            result = database.<OCommandRequest> command(new OSQLSynchQuery<ODocument>(cmd + value)).execute();

            if (result == null || result.size() == 0)
              value = null;
            else if (result.size() > 1)
              throw new OCommandExecutionException("Cannot create link because multiple records was found in class '"
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.command()

   * @return an OCommandRequest object ready to be passed to the {@link #selectCommandExecute(com.orientechnologies.orient.core.command.OCommandRequest, Object[])} (OCommandRequest, String[])} method
   * @throws SqlInjectionException If the query is not a select statement
   */
  public static OCommandRequest selectCommandBuilder(String from, boolean count, QueryParams criteria) throws SqlInjectionException{
    ODatabaseRecordTx db =  DbHelper.getConnection();
    OCommandRequest command = db.command(new OSQLSynchQuery<ODocument>(
        selectQueryBuilder(from, count, criteria)
        ));
    if (!command.isIdempotent()) throw new SqlInjectionException();
    if (Logger.isDebugEnabled()) Logger.debug("commandBuilder: ");
    if (Logger.isDebugEnabled()) Logger.debug("  " + criteria.toString());
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.