Package realcix20.classes.basic

Examples of realcix20.classes.basic.BaseClass


            }
           
        }
        sb.replace(sb.length() - 1, sb.length(), " ");
       
        BaseClass object = container.getObject();
        String basicSQL = object.getBasicSQL();       
        if (basicSQL.indexOf("WHERE") == -1)
            basicSQL = basicSQL.substring(basicSQL.indexOf("FROM"));
        else {
            basicSQL = basicSQL.substring(basicSQL.indexOf("FROM"), basicSQL.indexOf("WHERE"));
        }
        sb.append(basicSQL + " ");
       
        boolean hasWhere = false;
        basicSQL = object.getBasicSQL();
        if (basicSQL.indexOf("WHERE") == -1)
            sb.append("WHERE ");
        else {
            hasWhere = true;
            basicSQL = basicSQL.substring(basicSQL.indexOf("WHERE"));
View Full Code Here


                Vector pubKeys = (Vector)data.get(1);
                Cell urnsCell = ObjectUtil.findNewCell(partnerRow, "P", "URNS");
                Cell urpCell = ObjectUtil.findNewCell(partnerRow, "P", "URP");
                String urns = (String)urnsCell.getColumnValue();
                String urp = (String)urpCell.getColumnValue();
                BaseClass object = ClassManager.createClass(250);
                Iterator rowsIter = object.getRows().iterator();
                while (rowsIter.hasNext()) {
                    Row row = (Row)rowsIter.next();
                    Cell nsCell = ObjectUtil.findNewCell(row, "P", "NS");
                    Cell pCell = ObjectUtil.findNewCell(row, "P", "P");
                    String ns = (String)nsCell.getColumnValue();
View Full Code Here

    }
   
    class ClearRegsManagerTableModel extends DefaultTableModel {
       
    public ClearRegsManagerTableModel() {
            BaseClass object = ClassManager.createClass(510);
            Vector names = new Vector();
            Vector dataValues = new Vector();
            closeValues=new Vector();
            openValues=new Vector();
            Iterator columnIter = object.getColumns().iterator();
            names.add("");
            while (columnIter.hasNext()) {
                Column column = (Column)columnIter.next();
                if (column.isIndexField())
                    names.add(column);
                  //add combox
                  searchField.addItem(new Item(column.getColumnName(),column.toString()));
            }
            names.add("row");
            Iterator rowIter = object.getRows().iterator();
            while (rowIter.hasNext()) {
                Row row = (Row)rowIter.next();               
                String ld = (String)ObjectUtil.findNewCell(row, "RI", "LD").getColumnValue();
                String lt = "";
                if (ld != null)
                    lt = LedgerClass.getLTByLD(ld);
                if ( (ld !=null) && ( (lt.equals("AP")) || (lt.equals("AR")) ) ) {                   
                    Vector rowDatas = new Vector();
                    if (isRegCleared(row)) {                       
                        Item item2 = new Item("Close", TxtManager.getTxt("VIEW.CLEARREGMANAGER.TABLE.COLUMN1VALUE2"));
                        rowDatas.add(item2);
                    } else {
                        Item item1 = new Item("Open", TxtManager.getTxt("VIEW.CLEARREGMANAGER.TABLE.COLUMN1VALUE1"));
                        rowDatas.add(item1);
                    }
                    columnIter = object.getColumns().iterator();               
                    while (columnIter.hasNext()) {
                        Column column = (Column)columnIter.next();
                        if (column.isIndexField()) {                       
                            Cell newCell = ObjectUtil.findNewCell(row, column.getTableName(), column.getColumnName());
                            if (column.getInputType() == 4) {
View Full Code Here

                Vector names = new Vector();
                names.add(TxtManager.getTxt("VIEW.I18NMAINTAINDIALOG.TABLE.I18NID"));
                names.add(TxtManager.getTxt("VIEW.I18NMAINTAINDIALOG.TABLE.REFLANGTXT"));
                names.add(TxtManager.getTxt("VIEW.I18NMAINTAINDIALOG.TABLE.WORKLANGTXT"));
                Vector dataValues = new Vector();
                BaseClass object = container.getCurrentObject();
                Column pkColumn = (Column)object.getPkColumns().get(0);
                Iterator rowsIter = object.getRows().iterator();
                while (rowsIter.hasNext()) {
                    Vector rowDatas = new Vector();
                    Row row = (Row)rowsIter.next();
                    String i18nID = ObjectUtil.findNewCell(row, pkColumn.getTableName(), pkColumn.getColumnName()).getColumnValue().toString();
                    if (!isI18NIDAdded(i18nID, dataValues)) {
View Full Code Here

    }
   
    private void saveObjectToDB() {
       
            Row mainRow = container.getCurrentRow();
            BaseClass object = container.getObject();
            String action = container.getAction();
           
            //make childRow primaryKey equals to mainRow primaryKey
            Iterator childRowIter = mainRow.getRowSet().getRows().iterator();
            while (childRowIter.hasNext()) {
                Row childRow = (Row)childRowIter.next();
                if (childRow != mainRow) {
                    Iterator childRowCellIter = childRow.getNewCells().iterator();                   
                    while (childRowCellIter.hasNext()) {
                        Cell childRowCell = (Cell)childRowCellIter.next();                     
                        Column tColumn = ObjectUtil.findColumn(container.getObject(), childRowCell.getTableName(), childRowCell.getColumnName());
                        if ( (tColumn.isPrimaryKey()) && (tColumn.getTableName().equals(container.getObject().getChildTableName())) ) {
                            Cell mainRowCell = ObjectUtil.findNewCell(mainRow, container.getObject().getMainTableName(), childRowCell.getColumnName());
                            if (mainRowCell != null)
                                childRowCell.setColumnValue(mainRowCell.getColumnValue());
                        }
                        /*if ( (tColumn.getTableName().equals("PA")) && (tColumn.getColumnName().equals("PUBKEY")) )
                            childRowCell.setColumnValue(null);
                        if ( (tColumn.getTableName().equals("PA")) && (tColumn.getColumnName().equals("PRIKEY")) )
                            childRowCell.setColumnValue(null);*/
                    }
                }
            }
           
            if (action.equals("Add"))
                object.classInsert_WholeObject(mainRow, false);
            else if (action.equals("Edit"))
                object.classUpdate_WholeObject(mainRow, false);
       
    }
View Full Code Here

   
    public void showHelpFrame() {
       
            if (GlobalValueManager.getValue("APPLICATION.HELPSHOWING").equals("FALSE")) {
                GlobalValueManager.setValue("APPLICATION.HELPSHOWING", "TRUE");
                BaseClass object = container.getObject();
                if (container.getContainer().getListener().getHelpFrame() != null) {
                    container.getContainer().getListener().getHelpFrame().dispose();
                    container.getContainer().getListener().setHelpFrame(null);
                }
                container.getContainer().getListener().setHelpFrame(new HelpView(object.getClsId()));
            } else {
                if (container.getContainer().getListener().getHelpFrame() != null) {
                    container.getContainer().getListener().getHelpFrame().dispose();
                    container.getContainer().getListener().setHelpFrame(null);
                }
                BaseClass object = container.getObject();
                container.getContainer().getListener().setHelpFrame(new HelpView(object.getClsId()));
            }
       
    }
View Full Code Here

        public void setCurrentUser(Row currentUser) {
           
                //will be modified
                DAO dao = DAO.getInstance();
                dao.update(Resources.UPDATE_GLOBALVAR_TABLE_SQL);
                Cell userCell = ObjectUtil.findNewCell(currentUser, "LOGINENTRY", "RUSER");               
                dao.setObject(1, userCell.getColumnValue());
                dao.setObject(2, "loginuser");
                dao.executeUpdate();

                this.currentUser = currentUser;
        }
View Full Code Here

        String mainTableName = object.getMainTableName();
        String childTableName = object.getChildTableName();
        Iterator newCellIter = newRow.getNewCells().iterator();
        Iterator oldCellIter = newRow.getOldCells().iterator();
        try {
            Cell newCell = (Cell)newCellIter.next();
            Cell oldCell = (Cell)oldCellIter.next();
            if (newCell.getTableName().equals(childTableName)) {
                newCell.setColumnValue(null);
                oldCell.setColumnValue(null);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        Iterator pkColumnIter = object.getPkColumns().iterator();
        while (pkColumnIter.hasNext()) {
            Column pkColumn = (Column)pkColumnIter.next();
            if (pkColumn.getTableName().equals(mainTableName)) {
                Cell childPkOldCell = ObjectUtil.findOldCell(newRow, childTableName, pkColumn.getColumnName());

                //found
                if (childPkOldCell != null) {
                    Cell childPkNewCell = ObjectUtil.findNewCell(newRow, childTableName, pkColumn.getColumnName());
                    Cell mainPkNewCell = ObjectUtil.findNewCell(newRow, mainTableName, pkColumn.getColumnName());
                    childPkOldCell.setColumnValue(mainPkNewCell.getColumnValue());
                    childPkNewCell.setColumnValue(mainPkNewCell.getColumnValue());
                }
            }
        }
        return newRow;
    }
View Full Code Here

        return txt;
    }
   
    //���ָ��tableName,columnName��ָ��row�в���newCell��
    public static Cell findNewCell(Row row, String tableName, String columnName) {
        Cell newCell = null;               
        Iterator cellIter = row.getNewCells().iterator();
        while (cellIter.hasNext()) {
            Cell cell = (Cell)cellIter.next();
            if ( (cell.getColumnName().equals(columnName)) && (cell.getTableName().equals(tableName)) ) {
                newCell = cell;
                break;
            }
        }
        return newCell;
View Full Code Here

        return newCell;
    }
   
    //���ָ��tableName,columnName��ָ��row�в���oldCell��
    public static Cell findOldCell(Row row, String tableName, String columnName) {
        Cell oldCell = null;
        Iterator cellIter = row.getOldCells().iterator();
        while (cellIter.hasNext()) {
            Cell cell = (Cell)cellIter.next();
            if ( (cell.getColumnName().equals(columnName)) && (cell.getTableName().equals(tableName)) ) {
                oldCell = cell;
                break;
            }
        }
        return oldCell;
View Full Code Here

TOP

Related Classes of realcix20.classes.basic.BaseClass

Copyright © 2018 www.massapicom. 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.