Examples of DynaBean


Examples of org.apache.commons.beanutils.DynaBean

                "nestedBean",
                new NestedTestBean("newName"));
            return true;
        }
        else if (name.equals("beans")) {
            DynaBean bean = (DynaBean) parent;
            Object beans[] = (Object[]) bean.get("beans");
            if (beans == null || index >= beans.length) {
                beans = new NestedTestBean[index + 1];
                bean.set("beans", beans);
            }
            beans[index] = new NestedTestBean("newName");
            return true;
        }
        else if (name.equals("integers")) {
            DynaBean bean = (DynaBean) parent;
            bean.set("integers", index, new Integer(0));
            return true;
        }
        return false;
    }
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

        sforceMapping.put("Description", "the description");
        // Account number is set for easier test data cleanup
        sforceMapping.put("AccountNumber", ACCOUNT_NUMBER_PREFIX + System.currentTimeMillis());

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

        sforceMapping.put("Description", "the new description");
        // Account number is set for easier test data cleanup
        sforceMapping.put("AccountNumber", ACCOUNT_NUMBER_PREFIX + System.currentTimeMillis());

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

        sforceMapping.put("Description", "the new description");
        // Account number is set for easier test data cleanup
        sforceMapping.put("AccountNumber", ACCOUNT_NUMBER_PREFIX + System.currentTimeMillis());

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();
        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
        beanList.add(sforceObj);
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

    private void doUpsert(String entity, Map<String, Object> sforceMapping) throws Exception {
        // now convert to a dynabean array for the client
        // setup our dynabeans
        BasicDynaClass dynaClass = setupDynaClass(entity);

        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

            // forget to set the foreign key external id value
            sforceMapping.put(ObjectField.formatAsString("Parent", extIdField), "bogus");
        }

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

        sforceMapping.put("Description", "the description");
        // Account number is set for easier test data cleanup
        sforceMapping.put("AccountNumber", ACCOUNT_NUMBER_PREFIX + System.currentTimeMillis());

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

        sforceMapping.put("description", "the description");
        // Account number is set for easier test data cleanup
        sforceMapping.put("AccountNumber", ACCOUNT_NUMBER_PREFIX + System.currentTimeMillis());

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

     * @throws ConnectionException
     */
    public DeleteResult[] loadDeletes(List<DynaBean> dynaBeans) throws ConnectionException {


        DynaBean dynaBean;
        String[] dels = new String[dynaBeans.size()];
        for (int i = 0; i < dynaBeans.size(); i++) {
            dynaBean = dynaBeans.get(i);
            String id = (String)dynaBean.get("Id"); //$NON-NLS-1$
            if (id == null) {
                id = "";
            }
            dels[i] = id;
        }
View Full Code Here

Examples of org.apache.commons.beanutils.DynaBean

            AsyncApiException {
        int recordsInBatch = 0;
        final List<String> userColumns = getController().getDao().getColumnNames();
        List<String> headerColumns = null;
        for (int i = 0; i < rows.size(); i++) {
            final DynaBean row = rows.get(i);

            if (recordsInBatch == 0) {
                headerColumns = addHeader(out, os, row, userColumns);
            }
            writeRow(row, out, os, recordsInBatch, headerColumns);
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.