Examples of SQLColumn


Examples of com.mycila.testing.plugin.db.api.SqlColumn

            // create columns
            this.sqlColumnsByName = new HashMap<String, SqlColumn>(columnCount);
            final List<SqlColumn> columns = new ArrayList<SqlColumn>(columnCount);
            for (int i = 0; i < columnCount; i++) {
                SqlColumn col = new SqlColumnImpl(this, columnHeaders.get(i));
                columns.add(col);
                sqlColumnsByName.put(columnHeaders.get(i).name(), col);
            }
            this.sqlColumns = Collections.unmodifiableList(columns);
View Full Code Here

Examples of com.mycila.testing.plugin.db.api.SqlColumn

        return sqlColumns.get(index);
    }

    public SqlColumn column(String name) {
        notNull("Column name", name);
        SqlColumn column = sqlColumnsByName.get(name.toUpperCase());
        if (column == null) {
            throw new IllegalArgumentException("Inexisting column name: " + name);
        }
        return column;
    }
View Full Code Here

Examples of org.sf.bee.persistence.sql.SQLColumn

        final DatabaseMetaData metadata = conn.getMetaData();
        final ResultSet resultset = metadata.getColumns(dbName,
                null, table, null);
        if (null != resultset) {
            while (resultset.next()) {
                final SQLColumn item = new SQLColumn(resultset);
                result.add(item);
            }
        }
        return result.toArray(new SQLColumn[result.size()]);
    }
View Full Code Here

Examples of org.sf.bee.persistence.sql.SQLColumn

            }
        }

        //-- update fields --//
        for (final SQLColumn sourceCol : sourceCols) {
            final SQLColumn targetCol = this.getColumn(targetCols, sourceCol);
            if (!sourceCol.equals(targetCol)) {
                this.addCommand(commands,
                        this.createAlterColumnCommand(tableName, sourceCol, targetCol));
            }
        }
View Full Code Here

Examples of org.xmlBlaster.contrib.dbwriter.info.SqlColumn

    * @return true if all foreign keys are resolved or if there was no foreign key, false otherwise.
    */
   private static boolean checkIfForeignKeysAreResolved(SqlDescription desc, Set setOfProcessedTables, Map allTables) throws Exception {
      SqlColumn[] cols = desc.getColumns();
      for (int i=0; i < cols.length; i++) {
         SqlColumn col = cols[i];
         if (col.isFk()) {
            String fkTable = col.getFkTable();
            if (fkTable == null)
               throw new Exception("The column '" + cols[i].getTable() + "' has a column '" + cols[i].getColName() + "' which is a foreign key but no associated table name was found");
            if (!setOfProcessedTables.contains(fkTable)) {
               if (!allTables.containsKey(fkTable))
                  log.warning("The column '" + cols[i].getTable() + "' has a column '" + cols[i].getColName() + "' which is a foreign key. It is associated with a table which is not replicated (remember to make sure that this table is available on the destination also.");
View Full Code Here

Examples of org.xmlBlaster.contrib.dbwriter.info.SqlColumn

      // we still don't know the name, this will be handed in end of tag
      if (name.equalsIgnoreCase(SqlColumn.COLNAME_TAG)) {
         if (!this.inRootTag)
            return;
         this.colDescription = new SqlColumn(this.info);
         if (attrs != null) {
            String tmp = attrs.getValue(SqlColumn.TABLE_ATTR);
            if (tmp != null)
               colDescription.setTable(tmp.trim());
            tmp = attrs.getValue(SqlColumn.SCHEMA_ATTR);
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.