public final class DocumentDbUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isSame(Column first,
Column second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(Dbms first,
Dbms second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(ForeignKeyColumn first,
ForeignKeyColumn second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(ForeignKey first,
ForeignKey second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(IndexColumn first,
IndexColumn second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(Index first,
Index second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(PrimaryKeyColumn first,
PrimaryKeyColumn second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(Project first,
Project second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(Schema first,
Schema second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isSame(Table first,
Table second)
Returns
true if the two specified documents represents the same
element in the database. |
static boolean |
isUnique(Column column)
Returns
true if the specified Column represents a column
that can only hold unique values in the database. |
static Column |
referencedColumn(Project project,
String dbmsName,
String schemaName,
String tableName,
String columnName) |
static <T extends HasDbmsName & HasSchemaName & HasTableName & HasColumnName> |
referencedColumn(Project project,
T identifier) |
static Optional<? extends Column> |
referencedColumnIfPresent(Project project,
ColumnIdentifier<?> identifier) |
static Optional<? extends Column> |
referencedColumnIfPresent(Project project,
String dbmsName,
String schemaName,
String tableName,
String columnName) |
static Dbms |
referencedDbms(Project project,
HasDbmsName identifier) |
static Dbms |
referencedDbms(Project project,
String dbmsName) |
static Optional<? extends Dbms> |
referencedDbmsIfPresent(Project project,
ColumnIdentifier<?> identifier) |
static Optional<? extends Dbms> |
referencedDbmsIfPresent(Project project,
String dbmsName) |
static Schema |
referencedSchema(Project project,
String dbmsName,
String schemaName) |
static <T extends HasDbmsName & HasSchemaName> |
referencedSchema(Project project,
T identifier) |
static Optional<? extends Schema> |
referencedSchemaIfPresent(Project project,
ColumnIdentifier<?> identifier) |
static Optional<? extends Schema> |
referencedSchemaIfPresent(Project project,
String dbmsName,
String schemaName) |
static Table |
referencedTable(Project project,
String dbmsName,
String schemaName,
String tableName) |
static <T extends HasDbmsName & HasSchemaName & HasTableName> |
referencedTable(Project project,
T identifier) |
static Optional<? extends Table> |
referencedTableIfPresent(Project project,
ColumnIdentifier<?> identifier) |
static Optional<? extends Table> |
referencedTableIfPresent(Project project,
String dbmsName,
String schemaName,
String tableName) |
static Stream<? extends Document> |
traverseOver(Column column) |
static <T> Stream<T> |
traverseOver(Column column,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(Dbms dbms) |
static <T> Stream<T> |
traverseOver(Dbms dbms,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(ForeignKey foreignKey) |
static <T> Stream<T> |
traverseOver(ForeignKey fk,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(ForeignKeyColumn foreignKeyColumn) |
static <T> Stream<T> |
traverseOver(ForeignKeyColumn foreignKeyColumn,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(Index index) |
static <T> Stream<T> |
traverseOver(Index index,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(IndexColumn indexColumn) |
static <T> Stream<T> |
traverseOver(IndexColumn indexColumn,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(PrimaryKeyColumn primaryKeyColumn) |
static <T> Stream<T> |
traverseOver(PrimaryKeyColumn pkColumn,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(Project project) |
static <T> Stream<T> |
traverseOver(Project project,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(Schema schema) |
static <T> Stream<T> |
traverseOver(Schema schema,
Class<T> clazz) |
static Stream<? extends Document> |
traverseOver(Table table) |
static <T> Stream<T> |
traverseOver(Table table,
Class<T> clazz) |
static Stream<? extends Document> |
typedChildrenOf(Table table) |
public static Stream<? extends Document> traverseOver(PrimaryKeyColumn primaryKeyColumn)
public static Stream<? extends Document> traverseOver(IndexColumn indexColumn)
public static Stream<? extends Document> traverseOver(ForeignKey foreignKey)
public static Stream<? extends Document> traverseOver(ForeignKeyColumn foreignKeyColumn)
public static <T> Stream<T> traverseOver(PrimaryKeyColumn pkColumn, Class<T> clazz)
public static <T> Stream<T> traverseOver(IndexColumn indexColumn, Class<T> clazz)
public static <T> Stream<T> traverseOver(ForeignKey fk, Class<T> clazz)
public static <T> Stream<T> traverseOver(ForeignKeyColumn foreignKeyColumn, Class<T> clazz)
public static boolean isUnique(Column column) throws SpeedmentConfigException
true
if the specified Column
represents a column
that can only hold unique values in the database.column
- the columntrue
if unique, else false
SpeedmentConfigException
- if an index or PK could not be traversedpublic static Optional<? extends Column> referencedColumnIfPresent(Project project, ColumnIdentifier<?> identifier)
public static Optional<? extends Table> referencedTableIfPresent(Project project, ColumnIdentifier<?> identifier)
public static Optional<? extends Schema> referencedSchemaIfPresent(Project project, ColumnIdentifier<?> identifier)
public static Optional<? extends Dbms> referencedDbmsIfPresent(Project project, ColumnIdentifier<?> identifier)
public static Optional<? extends Column> referencedColumnIfPresent(Project project, String dbmsName, String schemaName, String tableName, String columnName)
public static Optional<? extends Table> referencedTableIfPresent(Project project, String dbmsName, String schemaName, String tableName)
public static Optional<? extends Schema> referencedSchemaIfPresent(Project project, String dbmsName, String schemaName)
public static Optional<? extends Dbms> referencedDbmsIfPresent(Project project, String dbmsName)
public static <T extends HasDbmsName & HasSchemaName & HasTableName & HasColumnName> Column referencedColumn(Project project, T identifier)
public static <T extends HasDbmsName & HasSchemaName & HasTableName> Table referencedTable(Project project, T identifier)
public static <T extends HasDbmsName & HasSchemaName> Schema referencedSchema(Project project, T identifier)
public static Dbms referencedDbms(Project project, HasDbmsName identifier)
public static Column referencedColumn(Project project, String dbmsName, String schemaName, String tableName, String columnName)
public static Table referencedTable(Project project, String dbmsName, String schemaName, String tableName)
public static Schema referencedSchema(Project project, String dbmsName, String schemaName)
public static boolean isSame(Column first, Column second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(IndexColumn first, IndexColumn second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(Index first, Index second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(PrimaryKeyColumn first, PrimaryKeyColumn second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(ForeignKeyColumn first, ForeignKeyColumn second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(ForeignKey first, ForeignKey second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(Table first, Table second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(Schema first, Schema second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(Dbms first, Dbms second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
public static boolean isSame(Project first, Project second)
true
if the two specified documents represents the same
element in the database. Two documents are considered same if they have
the same name and type and their parents are considered same.first
- the first documentsecond
- the second documenttrue
if same, else false
Copyright © 2016 Speedment, Inc.. All rights reserved.