Package org.jooq.util

Examples of org.jooq.util.ColumnDefinition


                record.getValue(SYSDOMAIN.DOMAIN_NAME),
                record.getValue(SYSTABCOL.WIDTH),
                record.getValue(SYSTABCOL.WIDTH),
                record.getValue(SYSTABCOL.SCALE));

            ColumnDefinition column = new DefaultColumnDefinition(
              getDatabase().getTable(getSchema(), getName()),
                record.getValue(SYSTABCOL.COLUMN_NAME),
                record.getValue(SYSTABCOL.COLUMN_ID),
                type,
                record.getValue(SYSTABCOL.NULLS, boolean.class),
View Full Code Here


            String foreignKeyColumnName = record.getValue(ALL_CONS_COLUMNS.COLUMN_NAME);
            String uniqueKeyName = record.getValue(ALL_CONSTRAINTS.R_CONSTRAINT_NAME);

            TableDefinition referencingTable = getTable(foreignKeySchema, foreignKeyTableName);
            if (referencingTable != null) {
                ColumnDefinition column = referencingTable.getColumn(foreignKeyColumnName);
                relations.addForeignKey(foreignKeyName, uniqueKeyName, column, uniqueKeySchema);
            }
        }
    }
View Full Code Here

                    // Generate a primary key name
                    String key = "pk_" + tableName + "_" + columnName;
                    TableDefinition table = getTable(getSchemata().get(0), tableName);

                    if (table != null) {
                        ColumnDefinition column = table.getColumn(columnName);
                        relations.addPrimaryKey(key, column);
                    }
                }
            }
        }
View Full Code Here

                    String uniqueKey =
                        "pk_" + referencedTable.getName() +
                        "_" + referencedTable.getColumn(record.getValueAsString("to"), true).getName();

                    if (referencingTable != null) {
                        ColumnDefinition referencingColumn = referencingTable.getColumn(foreignKeyColumn);
                        relations.addForeignKey(foreignKey, uniqueKey, referencingColumn, getSchemata().get(0));
                    }
                }
            }
        }
View Full Code Here

                dataType,
                precision,
                precision,
                scale);

            ColumnDefinition column = new DefaultColumnDefinition(
                getDatabase().getTable(getSchema(), getName()),
                name,
                position,
                type,
                !record.getValue("notnull", boolean.class),
View Full Code Here

            String uniqueKey = record.getValue(REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME);

            TableDefinition referencingTable = getTable(foreignKeySchema, foreignKeyTable);

            if (referencingTable != null) {
                ColumnDefinition referencingColumn = referencingTable.getColumn(foreignKeyColumn);
                relations.addForeignKey(foreignKey, uniqueKey, referencingColumn, uniqueKeySchema);
            }
        }
    }
View Full Code Here

                 * space) here we split the combined string into individual
                 * columns
                 */
                String[] referencingColumnNames = foreignKeyColumn.trim().split("[ ]+");
                for (int i = 0; i < referencingColumnNames.length; i++) {
                    ColumnDefinition column = foreignKeyTable.getColumn(referencingColumnNames[i]);

                    relations.addForeignKey(foreignKey, uniqueKey, column, uniqueKeySchema);
                }
            }
        }
View Full Code Here

            String uniqueKeyName = record.getValue(ukName);

          TableDefinition referencingTable = getTable(foreignKeySchema, foreignKeyTableName);
            if (referencingTable != null) {
                for (int i = 0; i < foreignKeyIndexes.size(); i++) {
                    ColumnDefinition column = referencingTable.getColumn(foreignKeyIndexes.get(i));

                    relations.addForeignKey(foreignKeyName, uniqueKeyName, column, uniqueKeySchema);
                }
            }
      }
View Full Code Here

                typeName,
                record.getValue(Iicolumns.COLUMN_LENGTH),
                record.getValue(Iicolumns.COLUMN_LENGTH),
                record.getValue(Iicolumns.COLUMN_SCALE));

            ColumnDefinition column = new DefaultColumnDefinition(
                getDatabase().getTable(getSchema(), getName()),
                record.getValue(trim(Iicolumns.COLUMN_NAME)),
                record.getValue(Iicolumns.COLUMN_SEQUENCE),
                type,
                record.getValue(Iicolumns.COLUMN_NULLS, boolean.class),
View Full Code Here

                record.getValue(COLUMNS.CHARACTER_MAXIMUM_LENGTH),
                record.getValue(COLUMNS.NUMERIC_PRECISION),
                record.getValue(COLUMNS.NUMERIC_SCALE),
                record.getValue(COLUMNS.UDT_NAME));

      ColumnDefinition column = new DefaultColumnDefinition(
          getDatabase().getTable(getSchema(), getName()),
          record.getValue(COLUMNS.COLUMN_NAME),
          record.getValueAsInteger(COLUMNS.ORDINAL_POSITION),
          type,
          record.getValue(COLUMNS.IS_NULLABLE, boolean.class),
View Full Code Here

TOP

Related Classes of org.jooq.util.ColumnDefinition

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.