public final class RelationalModelFactory extends Object
relational model objects
.public static AccessPattern createAccessPattern(Repository.UnitOfWork transaction, Repository repository, Table parentTable, String accessPatternName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentTable
- the parent of the model object being created (cannot be null
)accessPatternName
- the name of the access pattern to create (cannot be empty)null
)KException
- if an error occurspublic static KException handleError(Exception e)
KException
e
- the exceptionKException
from the given Exception
public static Column createColumn(Repository.UnitOfWork transaction, Repository repository, Table table, String columnName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)table
- the table where the column is being created (cannot be null
)columnName
- the name of the column to create (cannot be empty)null
)KException
- if an error occurspublic static Condition createCondition(Repository.UnitOfWork transaction, Repository repository, Permission parentPermission, String conditionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentPermission
- the permission where the condition model object is being created (cannot be null
)conditionName
- the name of the condition to create (cannot be empty)null
)KException
- if an error occurspublic static ConnectionEntry createConnectionEntry(Repository.UnitOfWork transaction, Repository repository, Dataservice dataService, String connectionEntryName) throws KException
transaction
- the transaction (cannot be null
and must have a state of Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)dataService
- the data service where the connection entry is being created (cannot be null
)connectionEntryName
- the name of the connection entry to create (cannot be empty)null
)KException
- if an error occurspublic static DataRole createDataRole(Repository.UnitOfWork transaction, Repository repository, Vdb parentVdb, String dataRoleName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentVdb
- the VDB where the data role model object is being created (cannot be null
)dataRoleName
- the name of the data role to create (cannot be empty)null
)KException
- if an error occurspublic static Dataservice createDataservice(Repository.UnitOfWork transaction, Repository repository, String parentWorkspacePath, String serviceName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentWorkspacePath
- the parent path (can be empty)serviceName
- the name of the dataservice fragment to create (cannot be empty)null
)KException
- if an error occurspublic static Connection createConnection(Repository.UnitOfWork transaction, Repository repository, String parentWorkspacePath, String connectionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentWorkspacePath
- the parent path (can be empty)connectionName
- the name of the connection fragment to create (cannot be empty)null
)KException
- if an error occurspublic static DataTypeResultSet createDataTypeResultSet(Repository.UnitOfWork transaction, Repository repository, AbstractProcedure parentProcedure) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentProcedure
- the procedure where the procedure result set model object is being created (cannot be null
)null
)KException
- if an error occurspublic static DdlEntry createDdlEntry(Repository.UnitOfWork transaction, Repository repository, Dataservice dataService, String ddlEntryName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)dataService
- the data service where the DDL file entry is being created (cannot be null
)ddlEntryName
- the name of the DDL file entry to create (cannot be empty)null
)KException
- if an error occurspublic static DdlFile createDdlFile(Repository.UnitOfWork transaction, Repository repository, KomodoObject parent, String ddlFileName, byte[] content) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the parent where the resource file is being created (cannot be null
)ddlFileName
- the name of the DDL file to create (cannot be empty)content
- the file content (cannot be null
)null
)KException
- if an error occurspublic static DriverEntry createDriverEntry(Repository.UnitOfWork transaction, Repository repository, Dataservice dataService, String driverEntryName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)dataService
- the data service where the driver entry is being created (cannot be null
)driverEntryName
- the name of the DDL file entry to create (cannot be empty)null
)KException
- if an error occurspublic static Driver createDriver(Repository.UnitOfWork transaction, Repository repository, KomodoObject parent, String driverFileName, byte[] content) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the parent where the resource file is being created (cannot be null
)driverFileName
- the name of the driver file to create (cannot be empty)content
- the file content (can be null
)null
)KException
- if an error occurspublic static Driver createDriver(Repository.UnitOfWork transaction, Repository repository, KomodoObject parent, String driverFileName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the parent where the resource file is being created (cannot be null
)driverFileName
- the name of the driver file to create (cannot be empty)null
)KException
- if an error occurspublic static Entry createEntry(Repository.UnitOfWork transaction, Repository repository, Vdb parentVdb, String entryName, String entryPath) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentVdb
- the VDB where the entry model object is being created (cannot be null
)entryName
- the name of the VDB entry to create (cannot be empty)entryPath
- the imported VDB path (cannot be empty)null
)KException
- if an error occurspublic static Folder createFolder(Repository.UnitOfWork transaction, Repository repository, String parentWorkspacePath, String folderName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentWorkspacePath
- the parent path (can be empty)folderName
- the name of the folder to create (cannot be empty)null
)KException
- if an error occurspublic static ForeignKey createForeignKey(Repository.UnitOfWork transaction, Repository repository, Table parentTable, String foreignKeyName, Table tableReference) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentTable
- the table model object where the foreign key is being created (cannot be null
)foreignKeyName
- the name of the foreign key to create (cannot be empty)tableReference
- the table referenced by this constraint (cannot be null
)null
)KException
- if an error occurspublic static GitRepository createGitRepository(Repository.UnitOfWork transaction, Repository repository, Profile profile, String repoName, URL url, String user, String password) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)profile
- the profile object where the object is being created (cannot be null
)repo~Name
- the name of the git repository to create (cannot be empty)null
)KException
- if an error occurspublic static PushdownFunction createPushdownFunction(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String functionName) throws KException
Create Foreign Function
command.transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the function is being created (cannot be null
)functionName
- the name of the function to create (cannot be empty)null
)KException
- if an error occurspublic static Index createIndex(Repository.UnitOfWork transaction, Repository repository, Table parentTable, String indexName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentTable
- the table where the index model object is being created (cannot be null
)indexName
- the name of the index to create (cannot be empty)null
)KException
- if an error occurspublic static Mask createMask(Repository.UnitOfWork transaction, Repository repository, Permission parentPermission, String maskName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentPermission
- the permission where the mask model object is being created (cannot be null
)maskName
- the name of the mask to create (cannot be empty)null
)KException
- if an error occurspublic static Model createModel(Repository.UnitOfWork transaction, Repository repository, Vdb vdb, String modelName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)vdb
- the VDB where the model is being created (cannot be null
)modelName
- the name of the model to create (cannot be empty)null
)KException
- if an error occurspublic static ModelSource createModelSource(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String sourceName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the model source is being created (cannot be null
)sourceName
- the name of the model source to create (cannot be empty)null
)KException
- if an error occurspublic static Parameter createParameter(Repository.UnitOfWork transaction, Repository repository, AbstractProcedure parentProcedure, String parameterName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentProcedure
- the procedure where the parameter model object is being created (cannot be null
)parameterName
- the name of the parameter to create (cannot be empty)null
)KException
- if an error occurspublic static Permission createPermission(Repository.UnitOfWork transaction, Repository repository, DataRole parentDataRole, String permissionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentDataRole
- the data role where the permission model object is being created (cannot be null
)permissionName
- the name of the permission to create (cannot be empty)null
)KException
- if an error occurspublic static PrimaryKey createPrimaryKey(Repository.UnitOfWork transaction, Repository repository, Table parentTable, String primaryKeyName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentTable
- the parent of the model object being created (cannot be null
)primaryKeyName
- the name of the primary key to create (cannot be empty)null
)KException
- if an error occurspublic static ResourceEntry createResourceEntry(Repository.UnitOfWork transaction, Repository repository, Dataservice dataService, String resourceEntryName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)dataService
- the data service where the resource file entry is being created (cannot be null
)resourceEntryName
- the name of the resource file entry to create (cannot be empty)null
)KException
- if an error occurspublic static ResourceFile createResourceFile(Repository.UnitOfWork transaction, Repository repository, KomodoObject parent, String resourceFileName, byte[] content) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the parent where the resource file is being created (cannot be null
)resourceFileName
- the name of the resource file to create (cannot be empty)content
- the file content (cannot be null
)null
)KException
- if an error occurspublic static StoredProcedure createStoredProcedure(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String procedureName) throws KException
Create Foreign Procedure
command.transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the procedure is being created (cannot be null
)procedureName
- the name of the procedure to create (cannot be empty)null
)KException
- if an error occurspublic static ResultSetColumn createResultSetColumn(Repository.UnitOfWork transaction, Repository repository, TabularResultSet resultSet, String columnName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)resultSet
- the tabular result set where the column is being created (cannot be null
)columnName
- the name of the column to create (cannot be empty)null
)KException
- if an error occurspublic static Schema createSchema(Repository.UnitOfWork transaction, Repository repository, String parentWorkspacePath, String schemaName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentWorkspacePath
- the parent path (can be empty)schemaName
- the name of the schema fragment to create (cannot be empty)null
)KException
- if an error occurspublic static ServiceVdbEntry createServiceVdbEntry(Repository.UnitOfWork transaction, Repository repository, Dataservice dataService, String serviceVdbEntryName) throws KException
transaction
- the transaction (cannot be null
and must have a state of Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)dataService
- the data service where the VDB file entry is being created (cannot be null
)serviceVdbEntryName
- the name of the service VDB entry to create (cannot be empty)null
)KException
- if an error occurspublic static StatementOption createStatementOption(Repository.UnitOfWork transaction, Repository repository, OptionContainer optionContainer, String optionName, String optionValue) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)optionContainer
- the parent where the option is being created (can be empty if created at the root of the workspace)optionName
- the name of the statement option to create (cannot be empty)optionValue
- the option value (cannot be empty)null
)KException
- if an error occurspublic static Table createTable(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String tableName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the table is being created (cannot be null
)tableName
- the name of the table to create (cannot be empty)null
)KException
- if an error occurspublic static TabularResultSet createTabularResultSet(Repository.UnitOfWork transaction, Repository repository, AbstractProcedure parentProcedure) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentProcedure
- the procedure where the procedure result set model object is being created (cannot be null
)null
)KException
- if an error occurspublic static Translator createTranslator(Repository.UnitOfWork transaction, Repository repository, Vdb parentVdb, String translatorName, String translatorType) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentVdb
- the VDB where the VDB import model object is being created (cannot be null
)translatorName
- the name of the VDB translator to create (cannot be empty)translatorType
- the type of translator (cannot be empty)null
)KException
- if an error occurspublic static Template createTemplate(Repository.UnitOfWork transaction, Repository repository, KomodoObject parent, String templateName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the parent of the template created (cannot be null
)templateName
- the name of the template to create (cannot be empty)null
)KException
- if an error occurspublic static TemplateEntry createTemplateEntry(Repository.UnitOfWork transaction, Repository repository, Template parent, String entryName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the Template where the templateEntry is being created (cannot be null
)entryName
- the name of the templateEntry to create (cannot be empty)null
)KException
- if an error occurspublic static UdfEntry createUdfEntry(Repository.UnitOfWork transaction, Repository repository, Dataservice dataService, String udfEntryName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)dataService
- the data service where the UDF file entry is being created (cannot be null
)udfEntryName
- the name of the UDF file entry to create (cannot be empty)null
)KException
- if an error occurspublic static UdfFile createUdfFile(Repository.UnitOfWork transaction, Repository repository, KomodoObject parent, String udfFileName, byte[] content) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parent
- the parent where the UDF file is being created (cannot be null
)udfFileName
- the name of the UDF file to create (cannot be empty)content
- the file content (cannot be null
)null
)KException
- if an error occurspublic static UniqueConstraint createUniqueConstraint(Repository.UnitOfWork transaction, Repository repository, Table parentTable, String uniqueConstraintName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentTable
- the parent of the model object being created (cannot be null
)uniqueConstraintName
- the name of the unique constraint to create (cannot be empty)null
)KException
- if an error occurspublic static UserDefinedFunction createUserDefinedFunction(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String functionName) throws KException
Create Virtual Function
command.transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the function is being created (cannot be null
)functionName
- the name of the function to create (cannot be empty)null
)KException
- if an error occurspublic static Vdb createVdb(Repository.UnitOfWork transaction, Repository repository, String parentWorkspacePath, String vdbName, String externalFilePath) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentWorkspacePath
- the parent path (can be empty)vdbName
- the name of the VDB to create (cannot be empty)externalFilePath
- the VDB file path on the local file system (cannot be empty)null
)KException
- if an error occurspublic static VdbEntry createVdbEntry(Repository.UnitOfWork transaction, Repository repository, VdbEntryContainer container, String vdbEntryName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)container
- the container where the VDB file entry is being created (cannot be null
)vdbEntryName
- the name of the VDB entry to create (cannot be empty)null
)KException
- if an error occurspublic static VdbImport createVdbImport(Repository.UnitOfWork transaction, Repository repository, Vdb parentVdb, String vdbName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentVdb
- the VDB where the VDB import model object is being created (cannot be null
)vdbName
- the name of the VDB import to create (cannot be empty)null
)KException
- if an error occurspublic static View createView(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String viewName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the view is being created (cannot be null
)viewName
- the name of the view to create (cannot be empty)null
)KException
- if an error occurspublic static ViewEditorState createViewEditorState(Repository.UnitOfWork transaction, Repository repository, Profile profile, String stateId) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)profile
- the parent profile objectstateId
- the id of the view editor stateKException
- if an error occurspublic static ViewDefinition createViewDefinition(Repository.UnitOfWork transaction, Repository repository, ViewEditorState viewEditorState) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)profile
- the parent profile objectstateId
- the id of the view definitionKException
- if an error occurspublic static SqlComposition createSqlComposition(Repository.UnitOfWork transaction, Repository repository, ViewDefinition viewDefinition, String compositionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)viewDefinition
- the parent view definitioncompositionName
- the sql composition nameKException
- if an error occurspublic static SqlProjectedColumn createSqlProjectedColumn(Repository.UnitOfWork transaction, Repository repository, ViewDefinition viewDefinition, String columnName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)viewDefinition
- the parent view definitioncolumnName
- the sql projected column nameKException
- if an error occurspublic static StateCommandAggregate createStateCommandAggregate(Repository.UnitOfWork transaction, Repository repository, ViewEditorState viewEditorState) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)viewEditorState
- the parent view editor state objectKException
- if an error occurspublic static StateCommand createStateCommand(Repository.UnitOfWork transaction, Repository repository, StateCommandAggregate stateCommandAgg, String stateCommandType, String commandId, Map<String,String> arguments) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)stateCommandAgg
- the parent state command aggregatestateCommandType
- the state command type (either 'undo' or 'redo')commandId
- the id of the commandarguments
- the command argumentsKException
- if an error occurspublic static VirtualProcedure createVirtualProcedure(Repository.UnitOfWork transaction, Repository repository, Model parentModel, String procedureName) throws KException
Create Virtual Procedure
command.transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the model object will be created (cannot be null
)parentModel
- the model where the procedure is being created (cannot be null
)procedureName
- the name of the procedure to create (cannot be empty)null
)KException
- if an error occursCopyright © 2013–2019. All rights reserved.