public class WorkspaceDAO extends AbstractDAO
| Constructor and Description |
|---|
WorkspaceDAO(java.sql.Connection conn, NFEModel model)
Creates a WorkspaceDAO with the specified connection and model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createModelWorkspaceRel(NFEWorkspace nfeWorkspace)
Creates a record in the model workspace relationship table USER_NFE_NFE_MODEL_WORKSPACE.
|
void |
createWorkspace(java.lang.String parentWorkspace, java.lang.String newWorkspaceName)
Creates a workspace in the database with the specified workspace name.
|
void |
deleteWorkspaceRel(NFEModelMetadata nfeModelMetadata, java.lang.String workspace)
Deletes the record related to the specified workspace in the table USER_SDO_NFE_MODEL_WORKSPACE.
|
java.util.List<NFEWorkspace> |
getModelWorkspaces(long modelId)
Returns the workspaces that belongs to the model
|
java.util.List<ConflictDescriptor> |
getWorkspaceConflicts(java.lang.String table, java.lang.String childWorkspace, java.lang.String parentWorkspace, java.util.List<java.lang.String> keyColumnList)
Returns the workspace conflicts between the child and parent workspace for specified the table.
|
java.util.List<java.lang.String> |
getWorkspaces(NFEModelMetadata nfeModelMetadata)
Returns a list with the names of the workspaces related to the model.
|
void |
removeLeafWorkspace(java.lang.String workspace)
Discards all row versions associated with a workspace and its descendant workspaces, and deletes the affected workspaces.
|
void |
removeWorkspace(java.lang.String workspace)
Discards all row versions associated with a workspace and deletes the workspace.
|
void |
updateModelWorkspaceRel(NFEWorkspace nfeWorkspace)
Updates the table USER_SDO_NFE_MODEL_WORKSPACE with the data in the nfeWorkspace object.
|
void |
updateVersiongForProject(boolean isVersionable)
Updates the column USER_SDO_NFE_MODEL_METADATA.VERSIONABLE_IND with the value isVersionable.
|
getConnection, getModel, getSQLValidator
public WorkspaceDAO(java.sql.Connection conn,
NFEModel model)
conn - connectionmodel - modelpublic java.util.List<ConflictDescriptor> getWorkspaceConflicts(java.lang.String table, java.lang.String childWorkspace, java.lang.String parentWorkspace, java.util.List<java.lang.String> keyColumnList) throws NFEIOException
table - the tablechildWorkspace - child workspaceparentWorkspace - parent workspacekeyColumnList - a list with the name of the key columns of the tableNFEIOException - if an NFE error occurs.public java.util.List<java.lang.String> getWorkspaces(NFEModelMetadata nfeModelMetadata) throws NFEIOException
nfeModelMetadata - model metadataNFEIOException - if an NFE error occurs.
public void removeLeafWorkspace(java.lang.String workspace)
throws NFEIOException
workspace - workspace nameNFEIOException - if an NFE error occurs.public void deleteWorkspaceRel(NFEModelMetadata nfeModelMetadata, java.lang.String workspace) throws NFEIOException
nfeModelMetadata - model metadataworkspace - workspace nameNFEIOException - if an NFE error occurs.public java.util.List<NFEWorkspace> getModelWorkspaces(long modelId) throws NFEIOException
modelId - model identifierNFEIOException - if an NFE error occurs.
public void updateVersiongForProject(boolean isVersionable)
throws NFEIOException
isVersionable - true if the model is versionable, false otherwiseNFEIOException - if an NFE error occurs.
public void createWorkspace(java.lang.String parentWorkspace,
java.lang.String newWorkspaceName)
throws NFEIOException
parentWorkspace - the parent workspace of the new workspacenewWorkspaceName - new workspace nameNFEIOException - if an NFE error occurs.public void createModelWorkspaceRel(NFEWorkspace nfeWorkspace) throws NFEIOException
nfeWorkspace - workspace dataNFEIOException - if an NFE error occurs.
public void removeWorkspace(java.lang.String workspace)
throws NFEIOException
workspace - workspace to deleteNFEIOException - if an NFE error occurs.public void updateModelWorkspaceRel(NFEWorkspace nfeWorkspace) throws NFEIOException
nfeWorkspace - workspace dataNFEIOException - if an NFE error occurs.