Examples of DBColumn


Examples of org.apache.empire.db.DBColumn

        DBDatabase db = t.getDatabase();
        createComment(db, "TABLE", t, t.getComment(), script);
        Iterator<DBColumn> columns = t.getColumns().iterator();
        while (columns.hasNext())
        {
            DBColumn c = columns.next();
            String com = c.getComment();
            if (com != null)
                createComment(db, "COLUMN", c, com, script);
        }
    }
View Full Code Here

Examples of org.apache.empire.db.DBColumn

    }
    // Foreign Key
    Map<DBColumn, DBColumn> referencesMap = t.getColumnReferences();
    if (referencesMap != null)
    {
      DBColumn source = null,target = null;
      for (Entry<DBColumn, DBColumn> entry : referencesMap.entrySet())
      {
        source = entry.getKey();
        target = entry.getValue();
        sql.append((addSeparator) ? ",\r\n   " : "\r\n   ");
        sql.append("FOREIGN KEY (");
        source.addSQL(sql, DBExpr.CTX_NAME);
        sql.append(") REFERENCES ");
        sql.append(target.getRowSet().getName());
        sql.append(" (");
        target.addSQL(sql, DBExpr.CTX_NAME);
        sql.append(")");
View Full Code Here

Examples of org.apache.empire.db.DBColumn

    public EmployeeListPage()
    {
        EmployeeListPage.log.trace("EmployeeListPage created");
        TEmployees EMP = getDatabase().T_EMPLOYEES;
       
        DBColumn defSortColumn = EMP.EMPLOYEE_ID;
        employees = new BeanListPageElement<EmployeeListEntry>(this, EmployeeListEntry.class, defSortColumn, EmployeeListPage.EMPLOYEES_PROPERTY);
    }
View Full Code Here

Examples of org.apache.empire.db.DBColumn

  private void gatherRelations(DBDatabase db, DatabaseMetaData dbMeta, ArrayList<String> tables) throws SQLException{
    ResultSet relations = null;
    String fkTableName, pkTableName, fkColName, pkColName, relName;
    DBTableColumn fkCol, pkCol;
    DBTable fkTable, pkTable;
    DBColumn col;
   
    // Add all Relations
    for (String tableName :tables) {
     
      // check for foreign-keys
View Full Code Here

Examples of org.apache.empire.db.DBColumn

        // add Comments
        createComment(db, "TABLE", t, t.getComment(), script);
        columns = t.getColumns().iterator();
        while (columns.hasNext())
        {
            DBColumn c = columns.next();
            String com = c.getComment();
            if (com != null)
                createComment(db, "COLUMN", c, com, script);
        }
        // done
        return success();
View Full Code Here

Examples of org.apache.empire.db.DBColumn

        sql.append("COMMENT ON ");
        sql.append(type);
        sql.append(" ");
        if (expr instanceof DBColumn)
        {
            DBColumn c = (DBColumn)expr;
            c.getRowSet().addSQL(sql, DBExpr.CTX_NAME);
            sql.append(".");
        }
        expr.addSQL(sql, DBExpr.CTX_NAME);
        sql.append(" IS '");
        sql.append(comment);
View Full Code Here

Examples of org.apache.empire.db.DBColumn

                   
                    if (dbTable != null)
                    {
                       
                        // check if the found column exists in the found DBTable
                        DBColumn col = dbTable.getColumn(columnName);
                        if (col == null)
                        {
                            log.warn("COLUMN NOT FOUND IN " + db.getClass().getName() + "\t: [" + tableName + "]["
                                           + columnName + "][" + dataType + "][" + dataLength + "]");
                            continue;
View Full Code Here

Examples of org.apache.empire.db.DBColumn

     */
    public boolean isJoinOn(DBRowSet rowset)
    {
        if (rowset==null)
            return false;
        DBColumn l = (left !=null ? left .getUpdateColumn() : null);
        DBColumn r = (right!=null ? right.getUpdateColumn() : null);
        DBRowSet rsl = (l!=null ? l.getRowSet() : null);
        DBRowSet rsr = (r!=null ? r.getRowSet() : null);
        return rowset.equals(rsl) || rowset.equals(rsr);
    }
View Full Code Here

Examples of org.apache.empire.db.DBColumn

      {
        DBCompareColExpr o = (DBCompareColExpr)other;
        DBColumnExpr oexpr = o.getColumnExpr();
        if (expr.equals(oexpr))
          return true;
        DBColumn col  = expr.getUpdateColumn();
        DBColumn ocol = oexpr.getUpdateColumn();
        return (col!=null) ? (col.equals(ocol)) : false;
      }
      return false;
    }
View Full Code Here

Examples of org.apache.empire.db.DBColumn

   
    public boolean isJoinOn(DBRowSet rowset)
    {
        if (rowset==null)
            return false;
        DBColumn l = (left !=null ? left .getUpdateColumn() : null);
        DBColumn r = (right!=null ? right.getUpdateColumn() : null);
        DBRowSet rsl = (l!=null ? l.getRowSet() : null);
        DBRowSet rsr = (r!=null ? r.getRowSet() : null);
        return rowset.equals(rsl) || rowset.equals(rsr);
    }
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.