Class WorkspaceDAO
- java.lang.Object
-
- oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
-
- oracle.spatial.network.nfe.io.jdbc.dao.WorkspaceDAO
-
public class WorkspaceDAO extends AbstractDAO
The WorkspaceDAO data access object provides methods related to the model workspace management. It is not recommended to use the data access objects methods, instead use the NFE services.
-
-
Field Summary
-
Fields inherited from class oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
conn
-
-
Constructor Summary
Constructors Constructor Description WorkspaceDAO(java.sql.Connection conn, NFEModel model)Creates a WorkspaceDAO with the specified connection and model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateModelWorkspaceRel(NFEWorkspace nfeWorkspace)Creates a record in the model workspace relationship table USER_NFE_NFE_MODEL_WORKSPACE.voidcreateWorkspace(java.lang.String parentWorkspace, java.lang.String newWorkspaceName)Creates a workspace in the database with the specified workspace name.voiddeleteWorkspaceRel(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 modeljava.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.voidremoveLeafWorkspace(java.lang.String workspace)Discards all row versions associated with a workspace and its descendant workspaces, and deletes the affected workspaces.voidremoveWorkspace(java.lang.String workspace)Discards all row versions associated with a workspace and deletes the workspace.voidupdateModelWorkspaceRel(NFEWorkspace nfeWorkspace)Updates the table USER_SDO_NFE_MODEL_WORKSPACE with the data in the nfeWorkspace object.voidupdateVersiongForProject(boolean isVersionable)Updates the column USER_SDO_NFE_MODEL_METADATA.VERSIONABLE_IND with the value isVersionable.-
Methods inherited from class oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
close, close, execute, execute, executeQuery, executeUpdate, getConnection, getModel, getSQLValidator
-
-
-
-
Constructor Detail
-
WorkspaceDAO
public WorkspaceDAO(java.sql.Connection conn, NFEModel model)Creates a WorkspaceDAO with the specified connection and model.- Parameters:
conn- connectionmodel- model
-
-
Method Detail
-
getWorkspaceConflicts
public 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
Returns the workspace conflicts between the child and parent workspace for specified the table.- Parameters:
table- the tablechildWorkspace- child workspaceparentWorkspace- parent workspacekeyColumnList- a list with the name of the key columns of the table- Returns:
- list of conflict descriptors.
- Throws:
NFEIOException- if an NFE error occurs.
-
getWorkspaces
public java.util.List<java.lang.String> getWorkspaces(NFEModelMetadata nfeModelMetadata) throws NFEIOException
Returns a list with the names of the workspaces related to the model.- Parameters:
nfeModelMetadata- model metadata- Returns:
- list with the names of the workspaces related to the model
- Throws:
NFEIOException- if an NFE error occurs.
-
removeLeafWorkspace
public void removeLeafWorkspace(java.lang.String workspace) throws NFEIOExceptionDiscards all row versions associated with a workspace and its descendant workspaces, and deletes the affected workspaces.- Parameters:
workspace- workspace name- Throws:
NFEIOException- if an NFE error occurs.
-
deleteWorkspaceRel
public void deleteWorkspaceRel(NFEModelMetadata nfeModelMetadata, java.lang.String workspace) throws NFEIOException
Deletes the record related to the specified workspace in the table USER_SDO_NFE_MODEL_WORKSPACE.- Parameters:
nfeModelMetadata- model metadataworkspace- workspace name- Throws:
NFEIOException- if an NFE error occurs.
-
getModelWorkspaces
public java.util.List<NFEWorkspace> getModelWorkspaces(long modelId) throws NFEIOException
Returns the workspaces that belongs to the model- Parameters:
modelId- model identifier- Returns:
- model workspaces
- Throws:
NFEIOException- if an NFE error occurs.
-
updateVersiongForProject
public void updateVersiongForProject(boolean isVersionable) throws NFEIOExceptionUpdates the column USER_SDO_NFE_MODEL_METADATA.VERSIONABLE_IND with the value isVersionable. This method will not version enable any table.- Parameters:
isVersionable- true if the model is versionable, false otherwise- Throws:
NFEIOException- if an NFE error occurs.
-
createWorkspace
public void createWorkspace(java.lang.String parentWorkspace, java.lang.String newWorkspaceName) throws NFEIOExceptionCreates a workspace in the database with the specified workspace name.- Parameters:
parentWorkspace- the parent workspace of the new workspacenewWorkspaceName- new workspace name- Throws:
NFEIOException- if an NFE error occurs.
-
createModelWorkspaceRel
public void createModelWorkspaceRel(NFEWorkspace nfeWorkspace) throws NFEIOException
Creates a record in the model workspace relationship table USER_NFE_NFE_MODEL_WORKSPACE.- Parameters:
nfeWorkspace- workspace data- Throws:
NFEIOException- if an NFE error occurs.
-
removeWorkspace
public void removeWorkspace(java.lang.String workspace) throws NFEIOExceptionDiscards all row versions associated with a workspace and deletes the workspace.- Parameters:
workspace- workspace to delete- Throws:
NFEIOException- if an NFE error occurs.
-
updateModelWorkspaceRel
public void updateModelWorkspaceRel(NFEWorkspace nfeWorkspace) throws NFEIOException
Updates the table USER_SDO_NFE_MODEL_WORKSPACE with the data in the nfeWorkspace object.- Parameters:
nfeWorkspace- workspace data- Throws:
NFEIOException- if an NFE error occurs.
-
-