public class CloneHelper extends Object
| Constructor and Description |
|---|
CloneHelper() |
| Modifier and Type | Method and Description |
|---|---|
Column |
clone(Column source,
boolean clonePrimaryKeyStatus)
Returns a clone of the given source column.
|
Database |
clone(Database source)
Returns a deep clone of the given model object, including all tables, foreign keys, indexes etc.
|
ForeignKey |
clone(ForeignKey source,
Table owningTable,
Database targetModel,
boolean caseSensitive)
Returns a clone of the given source foreign key.
|
IndexColumn |
clone(IndexColumn source,
Table targetTable,
boolean caseSensitive)
Returns a clone of the given index column.
|
Index |
clone(Index source,
Table targetTable,
boolean caseSensitive)
Returns a clone of the given source index.
|
Reference |
clone(Reference source,
Table localTable,
Table foreignTable,
boolean caseSensitive)
Returns a clone of the given source reference.
|
Table |
clone(Table source,
boolean cloneIndexes,
boolean cloneForeignKeys,
Database targetModel,
boolean caseSensitive)
Returns a clone of the given table.
|
public Database clone(Database source)
source - The source modelpublic Table clone(Table source, boolean cloneIndexes, boolean cloneForeignKeys, Database targetModel, boolean caseSensitive)
source - The source tablecloneIndexes - Whether to clone indexes; if false then the clone will
not have any indexescloneForeignKeys - Whether to clone foreign kets; if false then the clone
will not have any foreign keystargetModel - The target model, can be null if
cloneForeignKeys=falsecaseSensitive - Whether comparison is case sensitive (for cloning foreign keys)public Column clone(Column source, boolean clonePrimaryKeyStatus)
source - The source columnclonePrimaryKeyStatus - Whether to clone the column's primary key status; if false
then the clone will not be a primary key columnpublic Index clone(Index source, Table targetTable, boolean caseSensitive)
source - The source indextargetTable - The table whose columns shall be used by the clonecaseSensitive - Whether comparison is case sensitive (for finding the columns
in the target table)public IndexColumn clone(IndexColumn source, Table targetTable, boolean caseSensitive)
source - The source index columntargetTable - The table containing the column to be used by the clonecaseSensitive - Whether comparison is case sensitive (for finding the columns
in the target table)public ForeignKey clone(ForeignKey source, Table owningTable, Database targetModel, boolean caseSensitive)
source - The source foreign keyowningTable - The table owning the source foreign keytargetModel - The target model containing the tables that the clone shall linkcaseSensitive - Whether comparison is case sensitive (for finding the columns
in the target model)public Reference clone(Reference source, Table localTable, Table foreignTable, boolean caseSensitive)
source - The source referencelocalTable - The table containing the local column to be used by the referenceforeignTable - The table containing the foreign column to be used by the referencecaseSensitive - Whether comparison is case sensitive (for finding the columns
in the tables)Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.