Examples of createCommand()


Examples of edu.isi.karma.controller.command.worksheet.AddValuesCommandFactory.createCommand()

        obj3.put("type", "other");
        input.put(obj3);
        try {
          OntologyManager ontMgr = workspace.getOntologyManager();
          Label label = ontMgr.getUriLabel(incoming ? otherClass : predicate);
          AddValuesCommand command = (AddValuesCommand) addFactory.createCommand(input, workspace, hNodeId, worksheetId, hnode.getHTableId(), label.getDisplayName(), HNodeType.AugmentData, selection.getName());
          command.doIt(workspace);
          outputColumns.addAll(command.getOutputColumns());
          isNewNode |= command.isNewNode();
          if (command.isNewNode())
            appliedCommands.push(command);
View Full Code Here

Examples of edu.isi.karma.controller.command.worksheet.MultipleValueEditColumnCommandFactory.createCommand()

      // Invoke the MultipleValueEditColumnCommand
      JSONArray multiCellEditInput = getMultiCellValueEditInputJSON(transformedRows, newHNodeId);
      MultipleValueEditColumnCommandFactory mfc = (MultipleValueEditColumnCommandFactory)
          ctrl.getCommandFactoryMap().get(MultipleValueEditColumnCommand.class.getSimpleName());
      MultipleValueEditColumnCommand mvecc = (MultipleValueEditColumnCommand) mfc.createCommand(multiCellEditInput, workspace);
      mvecc.doIt(workspace);
     
    } catch (Exception e) {
      logger.error("Error occured during python transformation.",e);
      return new UpdateContainer(new ErrorUpdate("Error occured while applying Python transformation to the column."));
View Full Code Here

Examples of org.apache.empire.db.CompanyDB.createCommand()

        emp.create(db.DATA);
        emp.setValue(db.DATA.DATA, new byte[]{1,2,3});
        emp.update(conn);
   
    // read a value
    DBCommand cmd = db.createCommand();
    cmd.select(db.DATA.DATA);
    DBReader reader = new DBReader();
    reader.open(cmd, conn);
    while(reader.moveNext()){
      byte[] value = (byte[]) reader.getValue(db.DATA.DATA);
View Full Code Here

Examples of org.apache.empire.db.DBDatabase.createCommand()

        try {
            DBDatabase db = getDatabase();
            if (db.getTables() == null || db.getTables().isEmpty()) {
                throw new AssertionError("There are no tables in this database!");
            }
            DBCommand cmd = db.createCommand();
            if (cmd == null) {
                throw new AssertionError("The DBCommand object is null.");
            }
            DBTable t = db.getTables().get(0);
            cmd.select(t.count());
View Full Code Here

Examples of org.apache.empire.db.DBDatabase.createCommand()

    public BeanResult(Class<T> clazz, DBRowSet rowset)
    {
        this.clazz = clazz;
        // Create the command
        DBDatabase db = rowset.getDatabase();
        cmd = db.createCommand();
        // Select all accessible columns
        int count = 0;
        Method[] methods = clazz.getMethods();
        for (DBColumn col : rowset.getColumns())
        {   // obtain the bean property Name
View Full Code Here

Examples of org.apache.empire.db.example.MyDB.createCommand()

    MyDB db = MyDB.get();
    Employees EMP = db.EMPLOYEES;

    DBDatabaseDriver driver = new DBDatabaseDriverHSql();
    db.open(driver, conn);
    DBCommand cmd = db.createCommand();
    cmd.select(EMP.EMPLOYEE_ID, EMP.FIRSTNAME);

    int rowCount = 0;
    DBReader reader = new DBReader();
    try {
View Full Code Here

Examples of org.apache.empire.jsf2.websample.db.SampleDB.createCommand()

    public Options getFieldOptions(DBColumn column)
    {
        if (column.equals(T.DEPARTMENT_ID))
        {
            SampleDB db = (SampleDB) getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.NAME);
            cmd.orderBy(db.T_DEPARTMENTS.NAME);
            return db.queryOptionList(cmd, SampleUtils.getConnection());
        }
View Full Code Here

Examples of org.apache.empire.samples.spring.db.SampleDB.createCommand()

    @Transactional
    public void clearDatabase() {
        SampleDB db = getDB();
        Connection conn = getConnection();

        DBCommand cmd = db.createCommand();
        // Delete all Employees (no constraints)
        db.executeSQL(cmd.getDelete(db.EMPLOYEES), conn);
        // Delete all Departments (no constraints)
        db.executeSQL(cmd.getDelete(db.DEPARTMENTS), conn);
    }
View Full Code Here

Examples of org.apache.empire.struts2.websample.db.SampleDB.createCommand()

    public Options getDepartments()
    {
        if (departments==null)
        {
            SampleDB db = getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.C_NAME);
            cmd.orderBy(db.T_DEPARTMENTS.C_NAME.asc());
            departments = db.queryOptionList(cmd, getConnection());
        }
View Full Code Here

Examples of org.apache.empire.struts2.websample.db.SampleDB.createCommand()

    {
        SampleDB db = getDatabase();
        SampleDB.Employees EMP = db.T_EMPLOYEES;
        SampleDB.Departments DEP = db.T_DEPARTMENTS;
       
        DBCommand cmd = db.createCommand();
        cmd.select(EMP.C_EMPLOYEE_ID);
        cmd.select(C_FULL_NAME, EMP.C_GENDER, EMP.C_DATE_OF_BIRTH);
        cmd.select(C_DEPARTMENT);
        cmd.join  (DEP.C_DEPARTMENT_ID, EMP.C_DEPARTMENT_ID);
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.