Class 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
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkspaceDAO

        public WorkspaceDAO​(java.sql.Connection conn,
                            NFEModel model)
        Creates a WorkspaceDAO with the specified connection and model.
        Parameters:
        conn - connection
        model - 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 table
        childWorkspace - child workspace
        parentWorkspace - parent workspace
        keyColumnList - 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 NFEIOException
        Discards 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 metadata
        workspace - 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 NFEIOException
        Updates 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 NFEIOException
        Creates a workspace in the database with the specified workspace name.
        Parameters:
        parentWorkspace - the parent workspace of the new workspace
        newWorkspaceName - 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 NFEIOException
        Discards 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.