Package realcix20.cixfiles

Examples of realcix20.cixfiles.ExampleFileFilter


            Vector rowDatas = new Vector();
       
            Iterator cellIter = row.getNewCells().iterator();
            while (cellIter.hasNext()) {
               
                Cell cell = (Cell)cellIter.next();
                rowDatas.add(cell.getColumnValue());
               
            }
           
            addRow(rowDatas);
       
View Full Code Here


       
            boolean flag = true;                   
           
            Iterator cellIter = row.getNewCells().iterator();
            while (cellIter.hasNext()) {
                Cell cell = (Cell)cellIter.next();
                Column column = findColumn(object, cell.getTableName(), cell.getColumnName());
                if (column != null) {
                    if ( (column.isPrimaryKey()) && (column.isItemField()) ) {
                        if ( (cell.getColumnValue() == null) ) {
                            flag = false;
                            break;
                        }
                    }
                }
View Full Code Here

                String rdate = getTime(now);
                String created = TimeManager.getTime(now.getTime());       
                String createdby = UserClass.getCurrentRUser();
                String lastchanged = created;
                String lastchangedby = createdby;
                Cell txt256Cell = ObjectUtil.findNewCell(mainRow, "T", "TXT256");
                String txt256 = (String)txt256Cell.getColumnValue();
               
                DAO dao = DAO.getInstance();
                dao.update(Resources.INSERT_R_SQL);
                dao.setObject(1, r);
                dao.setObject(2, at);
                dao.setObject(3, rdate);
                dao.setObject(4, created);
                dao.setObject(5, createdby);
                dao.setObject(6, lastchanged);
                dao.setObject(7, lastchangedby);
                dao.setObject(8, txt256);
                dao.executeUpdate();
               
                int currentRi = 0;
                double amt = 0.0;
                Iterator rowsIter = mainRow.getRowSet().getRows().iterator();
                while (rowsIter.hasNext()) {
                    Row childRow = (Row)rowsIter.next();
                    if ( (childRow != null) && (childRow != mainRow) ) {                      
                        currentRi++;
                        txt256Cell = ObjectUtil.findNewCell(childRow, "TI", "TXT256");
                        txt256 = (String)txt256Cell.getColumnValue();
                       
                        Cell tcCell = ObjectUtil.findNewCell(childRow, "TI", "TC");
                        String tc = (String)tcCell.getColumnValue();
                        Cell tamtCell = ObjectUtil.findNewCell(childRow, "TI", "TAMT");
                        double tamt = 0.0;
                        if (tamtCell.getColumnValue() != null) {
                            tamt = ((Number)tamtCell.getColumnValue()).doubleValue();
                        }
                        String lc = FamilyClass.getLocalCurrency();
                        double xr = XRClass.getExchangeRate(lc, tc, rdate);
                        double lamt = tamt * xr;
                        amt+= lamt;
                        Cell nsCell = ObjectUtil.findNewCell(mainRow, "T", "NS");
                        String ns = (String)nsCell.getColumnValue();
                        Cell pCell = ObjectUtil.findNewCell(mainRow, "T", "P");
                        String p = (String)pCell.getColumnValue();
                        Cell paCell = ObjectUtil.findNewCell(mainRow, "T", "PA");
                        String pa = (String)paCell.getColumnValue();
                        Cell mCell = ObjectUtil.findNewCell(childRow, "TI", "M");
                        String m = (String)mCell.getColumnValue();
                        Cell muomCell = ObjectUtil.findNewCell(childRow, "TI", "MUOM");
                        String muom = (String)muomCell.getColumnValue();
                        Cell mquanCell = ObjectUtil.findNewCell(childRow, "TI", "MQUAN");
                        double mquan = 0.0;
                        if (mquanCell.getColumnValue() != null) {
                            mquan = ((Number)mquanCell.getColumnValue()).doubleValue();
                        }
                        Cell mpriceCell = ObjectUtil.findNewCell(childRow, "TI", "MPRICE");
                        double mprice = 0.0;
                        if (mpriceCell.getColumnValue() != null) {
                            mprice = ((Number)mpriceCell.getColumnValue()).doubleValue();
                        }
                        Cell imCell = ObjectUtil.findNewCell(childRow, "TI", "IM");
                        String im = (String)imCell.getColumnValue();
                        Cell ipCell = ObjectUtil.findNewCell(childRow, "TI", "IP");
                        String ip = (String)ipCell.getColumnValue();
                        Cell ipuomCell = ObjectUtil.findNewCell(childRow, "TI", "IPUOM");
                        String ipuom = (String)ipuomCell.getColumnValue();
                        Cell ipquanCell = ObjectUtil.findNewCell(childRow, "TI", "IPQUAN");
                        double ipquan = 0.0;
                        if (ipquanCell.getColumnValue() != null) {
                            ipquan = ((Number)ipquanCell.getColumnValue()).doubleValue();
                        }
                        Cell ippriceCell = ObjectUtil.findNewCell(childRow, "TI", "IPPRICE");
                        double ipprice = 0.0;
                        if (ippriceCell.getColumnValue() != null) {
                            ipprice = ((Number)ippriceCell.getColumnValue()).doubleValue();
                        }
                       
                        dao.update(Resources.INSERT_RI_SQL);
                        dao.setObject(1, r);
                        dao.setObject(2, currentRi);
                        dao.setObject(3, txt256);
                        dao.setObject(4, ld);
                        dao.setObject(5, tc);
                        dao.setObject(6, -tamt);
                        dao.setObject(7, lc);
                        dao.setObject(8, xr);
                        dao.setObject(9, -lamt);
                        dao.setObject(10, ns);
                        dao.setObject(11, p);
                        dao.setObject(12, pa);
                        dao.setObject(13, m);
                        dao.setObject(14, muom);
                        dao.setObject(15, mquan);
                        dao.setObject(16, mprice);
                        dao.setObject(17, null);
                        dao.setObject(18, im);
                        dao.setObject(19, ip);
                        dao.setObject(20, ipuom);
                        dao.setObject(21, ipquan);
                        dao.setObject(22, ipprice);
                        dao.executeUpdate();
                       
                    }
                }
               
                //At this point, setld zhanghu to add ouy.
                txt256Cell = ObjectUtil.findNewCell(mainRow, "TI", "TXT256");
                txt256 = (String)txt256Cell.getColumnValue();

                Cell tcCell = ObjectUtil.findNewCell(mainRow, "TI", "TC");
                String tc = (String)tcCell.getColumnValue();
                Cell tamtCell = ObjectUtil.findNewCell(mainRow, "TI", "TAMT");
                double tamt = 0.0;
                if (tamtCell.getColumnValue() != null) {
                    tamt = amt;
                }
                String lc = FamilyClass.getLocalCurrency();
                double xr = XRClass.getExchangeRate(lc, tc, rdate);
                double lamt = tamt * xr;
                amt+= lamt;
                Cell nsCell = ObjectUtil.findNewCell(mainRow, "T", "NS");
                String ns = (String)nsCell.getColumnValue();
                Cell pCell = ObjectUtil.findNewCell(mainRow, "T", "P");
                String p = (String)pCell.getColumnValue();
                Cell paCell = ObjectUtil.findNewCell(mainRow, "T", "PA");
                String pa = (String)paCell.getColumnValue();
                Cell mCell = ObjectUtil.findNewCell(mainRow, "TI", "M");
                String m = (String)mCell.getColumnValue();
                Cell muomCell = ObjectUtil.findNewCell(mainRow, "TI", "MUOM");
                String muom = (String)muomCell.getColumnValue();
                Cell mquanCell = ObjectUtil.findNewCell(mainRow, "TI", "MQUAN");
                double mquan = 0.0;
                if (mquanCell.getColumnValue() != null) {
                    mquan = ((Number)mquanCell.getColumnValue()).doubleValue();
                }
                Cell mpriceCell = ObjectUtil.findNewCell(mainRow, "TI", "MPRICE");
                double mprice = 0.0;
                if (mpriceCell.getColumnValue() != null) {
                    mprice = ((Number)mpriceCell.getColumnValue()).doubleValue();
                }
                Cell imCell = ObjectUtil.findNewCell(mainRow, "TI", "IM");
                String im = (String)imCell.getColumnValue();
                Cell ipCell = ObjectUtil.findNewCell(mainRow, "TI", "IP");
                String ip = (String)ipCell.getColumnValue();
                Cell ipuomCell = ObjectUtil.findNewCell(mainRow, "TI", "IPUOM");
                String ipuom = (String)ipuomCell.getColumnValue();
                Cell ipquanCell = ObjectUtil.findNewCell(mainRow, "TI", "IPQUAN");
                double ipquan = 0.0;
                if (ipquanCell.getColumnValue() != null) {
                    ipquan = ((Number)ipquanCell.getColumnValue()).doubleValue();
                }
                Cell ippriceCell = ObjectUtil.findNewCell(mainRow, "TI", "IPPRICE");
                double ipprice = 0.0;
                if (ippriceCell.getColumnValue() != null) {
                    ipprice = ((Number)ippriceCell.getColumnValue()).doubleValue();
                }
                currentRi++;
                dao.update(Resources.INSERT_RI_SQL);
                dao.setObject(1, r);
                dao.setObject(2, currentRi);
View Full Code Here

                Vector rowDatas = new Vector();
                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) {
                            rowDatas.add("*****");
                        }
                        else if (column.isI18N()) {
                            String i18nString = null;
                            if (newCell.getColumnValue() != null)
                                i18nString = I18NManager.getI18NString(column.getI18nPrefix(), newCell.getColumnValue());
                            if (i18nString != null) {
                                if (GlobalValueManager.getValue("APPLICATION.ZIC").equals("1")) {
                                    rowDatas.add(i18nString);
                                } else if (GlobalValueManager.getValue("APPLICATION.ZIC").equals("2")) {
                                    rowDatas.add(newCell.getColumnValue());
                                } else if (GlobalValueManager.getValue("APPLICATION.ZIC").equals("3")) {
                                   rowDatas.add(newCell.getColumnValue() + " - " + i18nString);
                                }
                            }
                            else {
                                if (newCell.getColumnValue() instanceof Double) {
                                    rowDatas.add(CurrencyPlugin.getFormatedDouble((Double)newCell.getColumnValue()));
                                } else
                                    rowDatas.add(newCell.getColumnValue());
                            }
                        } else {
                            if (newCell.getColumnValue() instanceof Double) {
                                rowDatas.add(CurrencyPlugin.getFormatedDouble((Double)newCell.getColumnValue()));
                            } else
                                rowDatas.add(newCell.getColumnValue());
                        }                       
                    }
                }                                                      
                rowDatas.add(row);               
                dataValues.add(rowDatas);
View Full Code Here

       
        public Vector dealWithCorrespondence(Row mainRow) {
           
                Vector data = null;
               
                Cell nsCell = ObjectUtil.findNewCell(mainRow, "T", "NS");
                String ns = (String)nsCell.getColumnValue();
                Cell pCell = ObjectUtil.findNewCell(mainRow, "T", "P");
                String p = (String)pCell.getColumnValue();
                Cell paCell = ObjectUtil.findNewCell(mainRow, "T", "PA");
                String pa = (String)paCell.getColumnValue();
                if (isthisPartnerAccountCanTransfer(ns, p, pa)) {
                    data = generateCixFile(mainRow);                  
                } else {
                    data = null;
                }
View Full Code Here

       
        private Vector generateCixFile(Row mainRow) {
           
                Vector data = new Vector();
           
                Cell urtCell = ObjectUtil.findNewCell(mainRow, "T", "URT");
                String urt = (String)urtCell.getColumnValue();
                if ( (urt == null) || (urt.trim().equals("")) ) {                   
                    CixFile file = generateCixFile_Stat4(mainRow);
                    String fileName = generateCixFileName(mainRow, 4);
                    data.add(file);
                    data.add(fileName);
View Full Code Here

                Vector noEncryData = new Vector();
                byte[] wrappedKey = null;
                Vector encryData = new Vector();
                SealedObject sealedEncryData = null;
               
                Cell nsCell = ObjectUtil.findNewCell(mainRow, "T", "NS");
                String ns = (String)nsCell.getColumnValue();
                Cell pCell = ObjectUtil.findNewCell(mainRow, "T", "P");
                String p = (String)pCell.getColumnValue();
                Cell paCell = ObjectUtil.findNewCell(mainRow, "T", "PA");
                String pa = (String)paCell.getColumnValue();
               
                String urns = null;
                String urp = null;
                DAO dao = DAO.getInstance();
                dao.query(Resources.SELECT_URNS_URP_FORM_P_SQL);
View Full Code Here

        }
       
        private String generateCixFileName(Row mainRow, int stat) {
           
                StringBuffer sb = new StringBuffer("");
                Cell tCell = ObjectUtil.findNewCell(mainRow, "T", "T");
                java.sql.Date now = new java.sql.Date(System.currentTimeMillis());
                String time = now.toString();
                sb.append(tCell.getColumnValue() + "_");
                sb.append(stat + "_");
                sb.append(time);
               
                return sb.toString();
           
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

TOP

Related Classes of realcix20.cixfiles.ExampleFileFilter

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.