public final class ModelImpl extends RelationalObjectImpl implements Model
Model.Type
RelationalObject.Filter
LOGGER, VALIDATE_INITIAL_STATE
index, path
DEFAULT_METADATA_TYPE, DEFAULT_VISIBLE, IDENTIFIER, NO_MODELS, RESOLVER, TYPE_ID
DDL_QNAMES_FILTER, DEFAULT_FILTERS, JCR_FILTER, NO_FILTERS, NT_FILTER, RESIDUAL_FILTER
EMPTY_ARRAY
AMPERSAND, AT, BR, CLASS, CLOSE_ANGLE_BRACKET, CLOSE_BRACE, CLOSE_BRACKET, CLOSE_PRE_CMT, CLOSE_PRE_TAG, CLOSE_SQUARE_BRACKET, COLON, COMMA, CONNECTION_SUFFIX, CURRENT_FOLDER_SYMBOL, DDL, DEFAULT_LOCAL_WORKSPACE_NAME, DIVIDE, DOLLAR_SIGN, DOT, DOT_CHAR, DOT_DOT, DOT_KOMODO, DOUBLE_BACK_SLASH, DRIVE_SEPARATOR, EMPTY_ARRAY, EMPTY_STRING, ENUM, EQUALS, FILE_EXTENSION_SEPARATOR, FILE_NAME_WILDCARD, FINAL, FORWARD_SLASH, HASH, HYPHEN, INTERFACE, JAR, JAVA, JAVA_IO_TMPDIR, JBOSS_SERVER_TMP_DIR, KOMODO, LINE_SEPARATOR, LINE_SEPARATOR_PROPERTY_NAME, LOG, MINUS, MULTIPLY, NBSP, NEW_LINE, OPEN_ANGLE_BRACKET, OPEN_BRACE, OPEN_BRACKET, OPEN_PRE_CMT, OPEN_PRE_TAG, OPEN_SQUARE_BRACKET, PARENT_FOLDER_SYMBOL, PERCENT, PIPE, PLUS, PREFIX_PATTERN, PRIVATE, PUBLIC, QUESTION_MARK, QUOTE_MARK, SEMI_COLON, SERVICE_VDB_SUFFIX, SERVICE_VDB_VIEW_MODEL, SERVICE_VDB_VIEW_SUFFIX, SOURCES, SPACE, SPEECH_MARK, SRC, STAR, STATIC, TAB, TARGET, UNDERSCORE, UNDERSCORE_CHAR, VDB_DEPLOYMENT_SUFFIX, VDB_PREFIX, XML, XML_SUFFIX, ZIP, ZIP_SUFFIX
Constructor and Description |
---|
ModelImpl(Repository.UnitOfWork uow,
Repository repository,
String workspacePath) |
getChildrenOfType, getDescriptor, getDescriptors, getFilters, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyNames, hasDescriptor, hasProperty, isChildRestricted, removeDescriptor, resolveType, setFilters, setPrimaryType, toString, validateInitialState
accept, addChild, addDescriptor, equals, getAbsolutePath, getAllDescriptors, getIndex, getName, getObjectFactory, getObjectProperty, getPrimaryType, getPropertyFactory, getRawChildren, getRawDescriptors, getRawParent, getRawProperty, getRawPropertyDescriptors, getRawPropertyNames, getRepository, handleError, hashCode, hasProperties, hasRawChild, hasRawChild, hasRawChildren, hasRawProperty, print, provision, remove, removeChild, rename, setObjectProperty, setProperty, validatePropertyValue, validateType
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName
getFilters, setFilters
accept, addChild, addDescriptor, getChildrenOfType, getDescriptor, getDescriptors, getIndex, getObjectFactory, getPrimaryType, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyFactory, getPropertyNames, getRawChildren, getRawDescriptors, getRawParent, getRawProperty, getRawPropertyDescriptors, getRawPropertyNames, hasDescriptor, hasProperties, hasProperty, hasRawChild, hasRawChild, hasRawChildren, hasRawProperty, isChildRestricted, print, remove, removeChild, removeDescriptor, rename, setPrimaryType, setProperty
getAbsolutePath, getName, getRepository
public ModelImpl(Repository.UnitOfWork uow, Repository repository, String workspacePath) throws KException
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository where the relational object exists (cannot be null
)workspacePath
- the workspace relative path (cannot be empty)KException
- if an error occurs or if node at specified path is not a modelpublic KomodoType getTypeIdentifier(Repository.UnitOfWork uow)
getTypeIdentifier
in interface KomodoObject
getTypeIdentifier
in class ObjectImpl
public PushdownFunction addPushdownFunction(Repository.UnitOfWork transaction, String functionName) throws KException
addPushdownFunction
in interface Model
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 occursModel.addPushdownFunction(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public UserDefinedFunction addUserDefinedFunction(Repository.UnitOfWork transaction, String functionName) throws KException
addUserDefinedFunction
in interface Model
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 occursModel.addUserDefinedFunction(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public StoredProcedure addStoredProcedure(Repository.UnitOfWork transaction, String procedureName) throws KException
addStoredProcedure
in interface Model
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 occursModel.addStoredProcedure(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public VirtualProcedure addVirtualProcedure(Repository.UnitOfWork transaction, String procedureName) throws KException
addVirtualProcedure
in interface Model
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 occursModel.addVirtualProcedure(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public ModelSource addSource(Repository.UnitOfWork transaction, String sourceName) throws KException
addSource
in interface Model
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 occursModel.addSource(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public Table addTable(Repository.UnitOfWork transaction, String tableName) throws KException
addTable
in interface Model
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 occursModel.addTable(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public View addView(Repository.UnitOfWork transaction, String viewName) throws KException
addView
in interface Model
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 occursModel.addView(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public KomodoObject getChild(Repository.UnitOfWork transaction, String name) throws KException
getChild
in interface KomodoObject
getChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChild(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public KomodoObject getChild(Repository.UnitOfWork transaction, String name, String typeName) throws KException
getChild
in interface KomodoObject
getChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChild(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String, java.lang.String)
public KomodoObject[] getChildren(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getChildren
in interface KomodoObject
getChildren
in class RelationalObjectImpl
KException
RelationalObjectImpl.getChildren(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String[])
public KomodoType[] getChildTypes()
getChildTypes
in interface KomodoObject
getChildTypes
in class ObjectImpl
ObjectImpl.getChildTypes()
public String getDescription(Repository.UnitOfWork transaction) throws KException
getDescription
in interface Model
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 occursModel.getDescription(org.komodo.spi.repository.Repository.UnitOfWork)
public Function[] getFunctions(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getFunctions
in interface Model
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 occursModel.getFunctions(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public String getMetadataType(Repository.UnitOfWork transaction) throws KException
getMetadataType
in interface Model
transaction
- the transaction (cannot be null
and its state must be Repository.UnitOfWork.State.NOT_STARTED
)KException
- if error occursModel.getMetadataType(org.komodo.spi.repository.Repository.UnitOfWork)
public String getModelDefinition(Repository.UnitOfWork uow) throws KException
getModelDefinition
in interface Model
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)KException
- if error occursModel.getModelDefinition(org.komodo.spi.repository.Repository.UnitOfWork)
public Model.Type getModelType(Repository.UnitOfWork uow) throws KException
getModelType
in interface Model
uow
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)null
)KException
- if error occursModel.getModelType(org.komodo.spi.repository.Repository.UnitOfWork)
public Procedure[] getProcedures(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getProcedures
in interface Model
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 occursModel.getProcedures(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public ModelSource[] getSources(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getSources
in interface Model
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 occursModel.getSources(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public Table[] getTables(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getTables
in interface Model
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 occursModel.getTables(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public int getTypeId()
getTypeId
in interface KomodoObject
getTypeId
in class ObjectImpl
KomodoObject.getTypeId()
public View[] getViews(Repository.UnitOfWork transaction, String... namePatterns) throws KException
getViews
in interface Model
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 occursModel.getViews(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String[])
public Vdb getParent(Repository.UnitOfWork transaction) throws KException
getParent
in interface Model
getParent
in interface KNode
getParent
in class RelationalObjectImpl
KException
RelationalObjectImpl.getParent(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean hasChild(Repository.UnitOfWork transaction, String name) throws KException
hasChild
in interface KomodoObject
hasChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.hasChild(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public boolean hasChild(Repository.UnitOfWork transaction, String name, String typeName) throws KException
hasChild
in interface KomodoObject
hasChild
in class RelationalObjectImpl
KException
RelationalObjectImpl.hasChild(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String, java.lang.String)
public boolean hasChildren(Repository.UnitOfWork transaction) throws KException
hasChildren
in interface KomodoObject
hasChildren
in class RelationalObjectImpl
KException
RelationalObjectImpl.hasChildren(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isVisible(Repository.UnitOfWork transaction) throws KException
isVisible
in interface Model
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 occursModel.isVisible(org.komodo.spi.repository.Repository.UnitOfWork)
public void removeFunction(Repository.UnitOfWork transaction, String functionName) throws KException
removeFunction
in interface Model
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 occursModel.removeFunction(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void removeProcedure(Repository.UnitOfWork transaction, String procedureName) throws KException
removeProcedure
in interface Model
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 occursModel.removeProcedure(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void removeSource(Repository.UnitOfWork transaction, String sourceToRemove) throws KException
removeSource
in interface Model
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)sourceToRemove
- the name of the model source being deleted (cannot be empty)KException
- if an error occursModel.removeSource(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void removeTable(Repository.UnitOfWork transaction, String tableName) throws KException
removeTable
in interface Model
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 occursModel.removeTable(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void removeView(Repository.UnitOfWork transaction, String viewName) throws KException
removeView
in interface Model
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 occursModel.removeView(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void setDescription(Repository.UnitOfWork transaction, String newDescription) throws KException
setDescription
in interface Model
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 occursModel.setDescription(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void setMetadataType(Repository.UnitOfWork transaction, String newMetadataType) throws KException
setMetadataType
in interface Model
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 occursModel.setMetadataType(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)
public void setModelDefinition(Repository.UnitOfWork uow, String modelDefinition) throws KException
setModelDefinition
in interface Model
uow
- 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 occursModel.setModelDefinition(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public void setModelType(Repository.UnitOfWork uow, Model.Type newModelType) throws KException
setModelType
in interface Model
uow
- 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.setModelType(org.komodo.spi.repository.Repository.UnitOfWork,
org.komodo.relational.model.Model.Type)
public void setVisible(Repository.UnitOfWork transaction, boolean newVisible) throws KException
setVisible
in interface Model
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 occursModel.setVisible(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public byte[] export(Repository.UnitOfWork transaction, Properties exportProperties) throws KException
export
in interface Exportable
KException
Exportable.export(org.komodo.spi.repository.Repository.UnitOfWork, java.util.Properties)
public DocumentType getDocumentType(Repository.UnitOfWork transaction) throws KException
getDocumentType
in interface Exportable
KException
Copyright © 2013–2019. All rights reserved.