Package org.apache.ws.jaxme.sqls

Examples of org.apache.ws.jaxme.sqls.ForeignKey


      StringColumn sstId = (StringColumn) sst.newColumn("ID", Column.Type.VARCHAR);
      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());
      foreignKeySst.addColumnLink(sstStId, getSubTable().getColumn("ID"));
     
      sst.newColumn("MTTS", Column.Type.TIMESTAMP);
    }
    return subsubTable;
  }
View Full Code Here


        sb.append(s).append(st);
      }
    }
    if (isForeignKeyPartOfCreateTable()) {
      for (Iterator iter = pTable.getForeignKeys();  iter.hasNext()) {
        ForeignKey key = (ForeignKey) iter.next();
        String st = createForeignKeyAsPartOfCreateTable(key);
        if (st != null) {
          sb.append(s).append(st);
        }
      }
View Full Code Here

      }
      result.addAll(getCreate(index));
    }
    if (!isForeignKeyPartOfCreateTable()) {
      for (Iterator iter = pTable.getForeignKeys();  iter.hasNext()) {
        ForeignKey key = (ForeignKey) iter.next();
        result.addAll(getCreate(key));
      }
    }
    return result;
  }
View Full Code Here

    for (Iterator iter = pTable.getIndexes();  iter.hasNext()) {
      Index index = (Index) iter.next();
      result.addAll(getDrop(index));
    }
    for (Iterator iter = pTable.getForeignKeys();  iter.hasNext()) {
      ForeignKey key = (ForeignKey) iter.next();
      result.addAll(getDrop(key));
    }
    result.addAll(getDrop(pTable));
    return result;
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.sqls.ForeignKey

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.