Package realcix20.classes.basic

Examples of realcix20.classes.basic.Column


        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

        } 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());
                }
            }
        }
View Full Code Here

        return oldCell;
    }
       
    //���object,tableName,columnName����column��
    public static Column findColumn(BaseClass object, String tableName, String columnName) {
        Column rColumn = null;
        Iterator columnIter = object.getColumns().iterator();
        while (columnIter.hasNext()) {
            Column column = (Column)columnIter.next();
            if ( (column.getTableName().equals(tableName)) && (column.getColumnName().equals(columnName)) ) {
                rColumn = column;
                break;
            }
        }
        return rColumn;
View Full Code Here

       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
           
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
            JComponent component = componentExt.getComponent();
           
            switch (column.getInputType()) {
               
                case 1:
                case 2:
                   
                    if ( (column.getPControls() == null) || (column.getPControls().equals("")) ) {
                       
                        DAO dao = DAO.getInstance();
                        dao.query(column.getInputPar());
                        ResultSet rs = dao.executeQuery();
                        try {

                            ResultSetMetaData rsmd = rs.getMetaData();
                            if (rsmd.getColumnCount() == 1) {
View Full Code Here

       
    }
   
    protected Column findColumn(String tableName, String columnName, Vector componentExts) {
       
        Column column = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column tempColumn = componentExt.getColumn();
            if ( (tempColumn.getTableName().equals(tableName)) && (tempColumn.getColumnName().equals(columnName)) ) {
                column = tempColumn;
                break;
            }
        }
       
View Full Code Here

        Row row = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
            if ( (column.getTableName().equals(tableName)) && (column.getColumnName().equals(columnName)) ) {
                row = componentExt.getRow();
                break;
            }
        }
       
View Full Code Here

        JComponent component = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
            if ( (column.getTableName().equals(tableName)) && (column.getColumnName().equals(columnName)) ) {
                component = componentExt.getComponent();
                break;
            }
        }
       
View Full Code Here

TOP

Related Classes of realcix20.classes.basic.Column

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.