Examples of RowInfo


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

       
        return updateCount;
    }
   
    public static int deleteRecord(Map<String, Object> inputs, String connName, String table, String restfulId) {
        RowInfo ri = getRowInfo(connName, table);
       
        StringBuilder deleteSQL = new StringBuilder();
        deleteSQL.append("DELETE FROM ").append(SqlExpressUtil.getExpandedTableName(connName, table));
       
        String condition = prepareDynamicWhereClauseForRestfulId(inputs, ri, restfulId);
View Full Code Here

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

       
        return deleteCount;
    }
   
    public static RowInfo getRowInfo(String connName, String table) {
        RowInfo ri = null;
        TableInfo ti = SqlExpressUtil.lookupTableInfo(connName, table);
        if (ti != null) {
            ri = ti.getHeader();
        }
       
View Full Code Here

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

      super(connName, Record.getFinderSql(connName, tableName));
      this.tableName = tableName;
    }
   
    protected List<RowData> retrieveList() {
      RowInfo ri = Record.getRowInfo(connName, tableName);
     
      Map<String, Object> inputs = new HashMap<String, Object>();
      inputs.putAll(inputOptions);
      inputs.put(DataProcessor.input_key_database_connection_name, connName);
     
View Full Code Here

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

            stmt = conn.createStatement();

            // Query the table
            rs = stmt.executeQuery(sqlString);
           
            RowInfo header = new RowInfo(table, rs.getMetaData());
            header.setCatalog(catalog);
            header.setSchema(schema);
            header.setTable(table);
           
            ti.setHeader(header);
            DAOUtil.closeResultSet(rs);

            //set more properties
            DatabaseMetaData dbmd = conn.getMetaData();
            rs2 = dbmd.getColumns(toUpperCaseIfAllowed(dba, catalog),
                toUpperCaseIfAllowed(dba, schema),
                toUpperCaseIfAllowed(dba, table), (String)null);
            header.setResultSetMetaDataForTable(rs2);
           
            // set some table properties
            //ti.setSchema(ti.getHeader().getColumnInfo(0).getSchemaName());
            //ti.setCatalog(ti.getHeader().getColumnInfo(0).getCatalogName());
           
            // get primary keys
            if (!header.hasPrimaryKey()) {
                PrimaryKey pk = lookupPrimaryKey(dba, conn, catalog, schema, table);
                if (pk != null) header.setPrimaryKeyColumns(pk.getColumns());
            }
        }
        finally {
            DAOUtil.closeResultSet(rs);
            DAOUtil.closeResultSet(rs2);
View Full Code Here

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

            DatabaseMetaData dbmd = conn.getMetaData();
            rs = dbmd.getColumns(toUpperCaseIfAllowed(dba, catalog),
                toUpperCaseIfAllowed(dba, schema),
                toUpperCaseIfAllowed(dba, viewName), (String)null);
           
            RowInfo header = ti.getHeader();
            header.setResultSetMetaDataForView(rs);
            header.setCatalog(catalog);
            header.setSchema(schema);
            header.setTable(viewName);
           
            // set some table properties
            ti.setSchema(ti.getHeader().getColumnInfo(0).getSchemaName());
            ti.setCatalog(ti.getHeader().getColumnInfo(0).getCatalogName());
            ti.setType(TableInfo.TYPE_VIEW);
           
            header.setCatalog(ti.getCatalog());
            header.setSchema(ti.getSchema());
            header.setTable(ti.getName());
        }
        finally {
            DAOUtil.closeResultSet(rs);
        }
       
View Full Code Here

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

     *
     * @param model model name
     * @return RowInfo for the model
     */
    public static RowInfo getRowInfo(String model) {
        RowInfo ri = homeInstance(model).getRowInfo();
        return (ri != null)?ri:(new RowInfo());
    }
View Full Code Here

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

     *
     * @param record a record object
     * @return RowInfo attribute of the record.
     */
    public static RowInfo rowInfoOf(ActiveRecord record) {
        return (record != null)?record.getRowInfo():(new RowInfo());
    }
View Full Code Here

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

     *
     * @param record a record object
     * @return RowInfo attribute of the record.
     */
    public static RowInfo rowInfoOf(RowData record) {
        return (record != null)?record.getRowInfo():(new RowInfo());
    }
View Full Code Here

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

     *
     * @param tableData a TableData object
     * @return RowInfo attribute of the record.
     */
    public static RowInfo rowInfoOf(TableData tableData) {
        return (tableData != null)?tableData.getHeader():(new RowInfo());
    }
View Full Code Here

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

     *
     * @param tableInfo a TableInfo object
     * @return RowInfo attribute of the record.
     */
    public static RowInfo rowInfoOf(TableInfo tableInfo) {
        return (tableInfo != null)?tableInfo.getHeader():(new RowInfo());
    }
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.