public interface Model extends Exportable, RelationalObject
Modifier and Type | Interface and Description |
---|---|
static class |
Model.Type
The type of a model.
|
RelationalObject.Filter
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_METADATA_TYPE
The default value for the
metadataType property. |
static boolean |
DEFAULT_VISIBLE
The default value for the
is visible property. |
static KomodoType |
IDENTIFIER
Identifier of this object
|
static Model[] |
NO_MODELS
An empty array of models.
|
static TypeResolver<Model> |
RESOLVER
The resolver of a
Model . |
static int |
TYPE_ID
The type identifier.
|
DDL_QNAMES_FILTER, DEFAULT_FILTERS, JCR_FILTER, NO_FILTERS, NT_FILTER, RESIDUAL_FILTER
EMPTY_ARRAY
export, getDocumentType, getName
getFilters, setFilters
accept, addChild, addDescriptor, getChild, getChild, getChildren, getChildrenOfType, getChildTypes, getDescriptor, getDescriptors, getIndex, getObjectFactory, getPrimaryType, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyFactory, getPropertyNames, getRawChildren, getRawDescriptors, getRawParent, getRawProperty, getRawPropertyDescriptors, getRawPropertyNames, getTypeId, getTypeIdentifier, hasChild, hasChild, hasChildren, hasDescriptor, hasProperties, hasProperty, hasRawChild, hasRawChild, hasRawChildren, hasRawProperty, isChildRestricted, print, remove, removeChild, removeDescriptor, rename, setPrimaryType, setProperty
getAbsolutePath, getName, getRepository
static final String DEFAULT_METADATA_TYPE
metadataType
property. Value is "DDL" .static final boolean DEFAULT_VISIBLE
is visible
property. Value is true .static final int TYPE_ID
static final KomodoType IDENTIFIER
static final Model[] NO_MODELS
static final TypeResolver<Model> RESOLVER
Model
.Vdb getParent(Repository.UnitOfWork transaction) throws KException
getParent
in interface KNode
KException
KNode.getParent(org.komodo.spi.repository.Repository.UnitOfWork)
PushdownFunction addPushdownFunction(Repository.UnitOfWork transaction, String functionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)functionName
- the name of the function to create (cannot be empty)null
)KException
- if an error occursStoredProcedure addStoredProcedure(Repository.UnitOfWork transaction, String procedureName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)procedureName
- the name of the procedure to create (cannot be empty)null
)KException
- if an error occursUserDefinedFunction addUserDefinedFunction(Repository.UnitOfWork transaction, String functionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)functionName
- the name of the function to create (cannot be empty)null
)KException
- if an error occursVirtualProcedure addVirtualProcedure(Repository.UnitOfWork transaction, String procedureName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)procedureName
- the name of the procedure to create (cannot be empty)null
)KException
- if an error occursModelSource addSource(Repository.UnitOfWork transaction, String sourceName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)sourceName
- the name of the model source to create (cannot be empty)null
)KException
- if an error occursTable addTable(Repository.UnitOfWork transaction, String tableName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)tableName
- the name of the table to create (cannot be empty)null
)KException
- if an error occursView addView(Repository.UnitOfWork transaction, String viewName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)viewName
- the name of the view to create (cannot be empty)null
)KException
- if an error occursString getDescription(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)description
property (can be empty)KException
- if an error occursFunction[] getFunctions(Repository.UnitOfWork transaction, String... namePatterns) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)null
but can be empty)KException
- if an error occursString getMetadataType(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
and its state must be Repository.UnitOfWork.State.NOT_STARTED
)KException
- if error occursDEFAULT_METADATA_TYPE
String getModelDefinition(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)KException
- if error occursModel.Type getModelType(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)null
)KException
- if error occursModel.Type.DEFAULT_VALUE
Procedure[] getProcedures(Repository.UnitOfWork transaction, String... namePatterns) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)null
but can be empty)KException
- if an error occursModelSource[] getSources(Repository.UnitOfWork transaction, String... namePatterns) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)KException
- if an error occursTable[] getTables(Repository.UnitOfWork transaction, String... namePatterns) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)null
but can be empty)KException
- if an error occursView[] getViews(Repository.UnitOfWork transaction, String... namePatterns) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)namePatterns
- optional name patterns (can be null
or empty but cannot have null
or empty elements)null
but can be empty)KException
- if an error occursboolean isVisible(Repository.UnitOfWork transaction) throws KException
transaction
- the transaction (cannot be null
and its state must be Repository.UnitOfWork.State.NOT_STARTED
)true
if this model is visibleKException
- if an error occursDEFAULT_VISIBLE
void removeFunction(Repository.UnitOfWork transaction, String functionName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)functionName
- the name of the function being deleted (cannot be empty)KException
- if an error occursvoid removeProcedure(Repository.UnitOfWork transaction, String procedureName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)procedureName
- the name of the procedure being deleted (cannot be empty)KException
- if an error occursvoid removeSource(Repository.UnitOfWork transaction, String sourceName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)sourceName
- the name of the model source being deleted (cannot be empty)KException
- if an error occursvoid removeTable(Repository.UnitOfWork transaction, String tableName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)tableName
- the name of the table being deleted (cannot be empty)KException
- if an error occursvoid removeView(Repository.UnitOfWork transaction, String viewName) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)viewName
- the name of the view being deleted (cannot be empty)KException
- if an error occursvoid setDescription(Repository.UnitOfWork transaction, String newDescription) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newDescription
- the new value of the description
property (can only be empty when removing)KException
- if an error occursvoid setMetadataType(Repository.UnitOfWork transaction, String newMetadataType) throws KException
transaction
- the transaction (cannot be null
and must have a state of Repository.UnitOfWork.State.NOT_STARTED
)newMetadataType
- the new value of the metadataType
property (can be empty)KException
- if error occursvoid setModelDefinition(Repository.UnitOfWork transaction, String modelDefinition) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)modelDefinition
- the model definition, eg. a string of ddlKException
- if error occursvoid setModelType(Repository.UnitOfWork transaction, Model.Type newModelType) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)newModelType
- the new model type (can be null
)KException
- if error occursModel.Type.DEFAULT_VALUE
void setVisible(Repository.UnitOfWork transaction, boolean newVisible) throws KException
transaction
- the transaction (cannot be null
and must have a state of Repository.UnitOfWork.State.NOT_STARTED
)newVisible
- the new value for the visible
propertyKException
- if an error occursDEFAULT_VISIBLE
Copyright © 2013–2019. All rights reserved.