Examples of addColumnLink()


Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

        short seq = rs.getShort(9);
        if (seq == 1) {
          foreignKey = pTable.getTable().newForeignKey(referencedTable.getTable());
          result.add(foreignKey);
        }
        foreignKey.addColumnLink(localColumnName, referencedColumnName);
      }

      isRsClosed = true;
      rs.close();
    } finally {
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

     Column companyColumn = otherTable.newColumn("Company", Column.Type.VARCHAR);
     ((StringColumn) companyColumn).setLength(60);
     otherTable.newPrimaryKey().addColumn(otherIndex);

     ForeignKey reference = otherTable.newForeignKey(pTable);
     reference.addColumnLink(referenceColumn, pTable.getColumn("MyIndex"));
     return otherTable;
  }

  /** <p>Basic test for creating a <code>CREATE TABLE</code>
   * statement.</p>
 
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

    deleteStatement.setTable(table);
    List columns = new ArrayList();
    for (Iterator iter = table.getColumns();  iter.hasNext()) {
      Column column = (Column) iter.next();
      Column refColumn = otherTable.newColumn("Ref" + column.getName(), column.getType());
      foreignKey.addColumnLink(refColumn, column);
      if (column.isPrimaryKeyPart()) {
        selectStatement.addResultColumn(selectStatement.getTableReference().newColumnReference(refColumn));
        columns.add(deleteStatement.getTableReference().newColumnReference(column));
      }
    }
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

      Index primaryKey = st.newPrimaryKey();
      primaryKey.addColumn(stId);

      ForeignKey foreignKey = st.newForeignKey(getMainTable());
      foreignKey.addColumnLink(stMtId, getMainTable().getColumn("ID"));
      foreignKey.addColumnLink(stMtVer, getMainTable().getColumn("VER"));

      subTable = st;
    }
    return subTable;
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

      Index primaryKey = st.newPrimaryKey();
      primaryKey.addColumn(stId);

      ForeignKey foreignKey = st.newForeignKey(getMainTable());
      foreignKey.addColumnLink(stMtId, getMainTable().getColumn("ID"));
      foreignKey.addColumnLink(stMtVer, getMainTable().getColumn("VER"));

      subTable = st;
    }
    return subTable;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

        sstId.setLength(32);

        Column sstMtId = sst.newColumn("MTID", Column.Type.BIGINT);
        Column sstMtVer = sst.newColumn("MTVER", Column.Type.INTEGER);
        ForeignKey foreignKeySt = sst.newForeignKey(getMainTable());
        foreignKeySt.addColumnLink(sstMtId, getMainTable().getColumn("ID"));
        foreignKeySt.addColumnLink(sstMtVer, getMainTable().getColumn("VER"));

        StringColumn sstStId = (StringColumn) sst.newColumn("SSTID", Column.Type.VARCHAR);
        sstStId.setLength(32);
        ForeignKey foreignKeySst = sst.newForeignKey(getSubTable());
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

        Column sstMtId = sst.newColumn("MTID", Column.Type.BIGINT);
        Column sstMtVer = sst.newColumn("MTVER", Column.Type.INTEGER);
        ForeignKey foreignKeySt = sst.newForeignKey(getMainTable());
        foreignKeySt.addColumnLink(sstMtId, getMainTable().getColumn("ID"));
        foreignKeySt.addColumnLink(sstMtVer, getMainTable().getColumn("VER"));

        StringColumn sstStId = (StringColumn) sst.newColumn("SSTID", Column.Type.VARCHAR);
        sstStId.setLength(32);
        ForeignKey foreignKeySst = sst.newForeignKey(getSubTable());
        foreignKeySst.addColumnLink(sstStId, getSubTable().getColumn("ID"));
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

        foreignKeySt.addColumnLink(sstMtVer, getMainTable().getColumn("VER"));

        StringColumn sstStId = (StringColumn) sst.newColumn("SSTID", Column.Type.VARCHAR);
        sstStId.setLength(32);
        ForeignKey foreignKeySst = sst.newForeignKey(getSubTable());
        foreignKeySst.addColumnLink(sstStId, getSubTable().getColumn("ID"));

        sst.newColumn("MTTS", Column.Type.TIMESTAMP);
     }
     return subsubTable;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

     
      Index primaryKey = st.newPrimaryKey();
      primaryKey.addColumn(stId);
     
      ForeignKey foreignKey = st.newForeignKey(getMainTable());
      foreignKey.addColumnLink(stMtId, getMainTable().getColumn("ID"));
      foreignKey.addColumnLink(stMtVer, getMainTable().getColumn("VER"));
     
      subTable = st;
    }
    return subTable;
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ForeignKey.addColumnLink()

      Index primaryKey = st.newPrimaryKey();
      primaryKey.addColumn(stId);
     
      ForeignKey foreignKey = st.newForeignKey(getMainTable());
      foreignKey.addColumnLink(stMtId, getMainTable().getColumn("ID"));
      foreignKey.addColumnLink(stMtVer, getMainTable().getColumn("VER"));
     
      subTable = st;
    }
    return subTable;
  }
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.