Package com.scooterframework.orm.sqldataexpress.object

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


        try {
          conn = getConnection(connName);
            DatabaseMetaData dbmd = conn.getMetaData();
            rs = dbmd.getTables(catalog, schema, tableName, types);
            while (rs.next()) {
                TableInfo ti = new TableInfo();
                ti.setCatalog(rs.getString("TABLE_CAT"));
                ti.setName(rs.getString("TABLE_NAME"));
                ti.setRemarks(rs.getString("REMARKS"));
                ti.setSchema(rs.getString("TABLE_SCHEM"));
                ti.setType(rs.getString("TABLE_TYPE"));
                list.add(ti);
            }
            rs.close();
        }
        catch(SQLException ex) {
View Full Code Here


     
        if (tableName == null) return null;
       
        String fullTableName = getFullTableName(connName, catalog, schema, tableName);
        String tableKey = getTableKey(connName, fullTableName);
        TableInfo ti = null;
        if (DatabaseConfig.getInstance().isInDevelopmentEnvironment()) {
          ti = (TableInfo)CurrentThreadCache.get(tableKey);
            return ti;
        }
       
View Full Code Here

      }
     
        if (tableName == null) return null;
       
        String tableKey = getTableKey(connName, tableName);
        TableInfo ti = null;
        if (DatabaseConfig.getInstance().isInDevelopmentEnvironment()) {
          ti = (TableInfo)CurrentThreadCache.get(tableKey);
            return ti;
        }
       
View Full Code Here

  static String getOrderByClauseFromTableMetaInfo(Map<String, Object> inputs) {
    String connName = getConnectionName(inputs);
    String table = getTableOrViewName(inputs);
    if (table == null) return null;
   
    TableInfo ti = SqlExpressUtil.lookupTableInfo(connName, table);
    if (ti == null) return null;
    String[] columns = ti.getHeader().getColumnNames();
    return (columns != null && columns.length > 0)?columns[0]:null;
  }
View Full Code Here

            conn = SqlExpressUtil.getReadonlyConnection(connName);
            List<TableInfo> tmp = SqlExpressUtil.getDatabaseTables(connName, catalog, schema, null, types);
            if (tmp != null) {
              Iterator<TableInfo> it = tmp.iterator();
              while(it.hasNext()) {
                TableInfo ti = (TableInfo)it.next();
                if (!SqlExpressUtil.isNiceDBString(ti.getName())) continue;
                tableInfos.add(ti);
              }
            }
        }
        catch(Exception ex) {
View Full Code Here

        Object result = SqlExpressUtil.countTotalRecords(connName, table);
        return (result != null)?result.toString():"0";
    }
   
    public static RowInfo getTableHeaderInfo(String connName, String table) {
      TableInfo ti = SqlExpressUtil.lookupTableInfo(connName, table);
      return (ti != null)?ti.getHeader():null;
    }
View Full Code Here

TOP

Related Classes of com.scooterframework.orm.sqldataexpress.object.TableInfo

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.