Examples of OmniDTO


Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

            createSQL += " " + strBuffer.toString();
            log.debug("create sql = " + createSQL);
           
            inputs = addMoreProperties(inputs, null);

            OmniDTO returnTO =
                getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, createSQL);

            int count = returnTO.getUpdatedRowCount();

            if (count != 1) {
                log.error("Only one record should be created, but " + count +
                          " objects were created instead.");
            }

            //populate auto-generated primary keys
            if (autoPopulatePrimaryKey) {
                long gpk = returnTO.getGeneratedKey();
                if (gpk != -1) {
                    Map<String, Object> pkMap = getPrimaryKeyDataMap();
                    Iterator<String> it = pkMap.keySet().iterator();
                    if(it.hasNext()) { //only one column is allowed to be auto-generated primary key
                        setData((String)it.next(), Long.valueOf(gpk));
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

            log.debug("update sql = " + updateSQL);
           
            inputs = addMoreProperties(inputs, null);

            OmniDTO returnTO =
                getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, updateSQL);

            count = returnTO.getUpdatedRowCount();

            after_internal_update();
        }
        catch (Exception ex) {
            throw new BaseSQLException(ex);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

    public OmniDTO execute(UserDatabaseConnection udc, Map<String, Object> inputs, Map<String, String> outputFilters)
    throws BaseSQLException {
      Connection connection = udc.getConnection();
      DBAdapter dba = DBAdapterFactory.getInstance().getAdapter(udc.getConnectionName());
     
        OmniDTO returnTO = new OmniDTO();
        CallableStatement cstmt = null;
       
        try {
            cstmt = connection.prepareCall(sp.getJavaAPIString());
           
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

       
        log.debug("insert sql = " + insertSQL);
        log.debug("insert inputs = " + inputs);
       
        inputs.put(DataProcessor.input_key_database_connection_name, connName);
        OmniDTO returnTO =
            SqlServiceConfig.getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, insertSQL.toString());
        int insertCount = returnTO.getUpdatedRowCount();
       
        RowData record = null;
        if (insertCount == 1) {
            record = new RowData(ri, null);
            record.setData(inputs);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

       
        log.debug("updates sql = " + updateSQL);
        log.debug("updates inputs = " + inputs);
       
        inputs.put(DataProcessor.input_key_database_connection_name, connName);
        OmniDTO returnTO =
            SqlServiceConfig.getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, updateSQL.toString());
        int updateCount = returnTO.getUpdatedRowCount();
       
        return updateCount;
    }
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

       
        log.debug("delete sql = " + deleteSQL);
        log.debug("delete inputs = " + inputs);
       
        inputs.put(DataProcessor.input_key_database_connection_name, connName);
        OmniDTO returnTO =
            SqlServiceConfig.getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, deleteSQL.toString());
        int deleteCount = returnTO.getUpdatedRowCount();
       
        return deleteCount;
    }
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

     */
    public static TableData retrieveTableDataBySQL(String sql, Map<String, Object> inputs) {
        TableData td = null;
       
        try {
            OmniDTO returnTO =
                getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, sql);
           
            if ( returnTO != null ) {
                td = returnTO.getTableData(sql);
            }
        }
        catch (Exception ex) {
            throw new BaseSQLException(ex);
        }
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

     */
    public static TableData retrieveTableDataBySQLKey(String sqlKey, Map<String, Object> inputs) {
        TableData td = null;
       
        try {
            OmniDTO returnTO =
                getSqlService().execute(inputs, DataProcessorTypes.NAMED_SQL_STATEMENT_PROCESSOR, sqlKey);
           
            if ( returnTO != null ) {
                td = returnTO.getTableData(sqlKey);
            }
        }
        catch (Exception ex) {
            throw new BaseSQLException(ex);
        }
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

     */
    public static Object retrieveObjectBySQL(String sql, Map<String, Object> inputs) {
        Object returnObj = null;
       
        try {
            OmniDTO returnTO =
                getSqlService().execute(inputs, DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, sql);
           
            returnObj = processResult(returnTO, sql);
        }
        catch (Exception ex) {
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.OmniDTO

     */
    public static Object retrieveObjectBySQLKey(String sqlKey, Map<String, Object> inputs) {
        Object returnObj = null;
       
        try {
            OmniDTO returnTO =
                getSqlService().execute(inputs, DataProcessorTypes.NAMED_SQL_STATEMENT_PROCESSOR, sqlKey);
           
            returnObj = processResult(returnTO, sqlKey);
        }
        catch (Exception ex) {
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.