Interface DatabaseMapping


  • public interface DatabaseMapping
    This interface allows interacting with the name of columns in the database.

    The user interface also provides features for interacting with the database mapping. See the Administration guide for more information.

    Since:
    5.9.0
    See Also:
    Repository.getDatabaseMapping()
    • Method Detail

      • renameLivingColumn

        void renameLivingColumn​(SchemaNode aNode,
                                String columnNewName)
                         throws OperationException
        Renames an active column of a table.

        If the table exists in several mapped modes (history, replication, relational), the change will affect all of them.

        Parameters:
        aNode - the data model node for the element to be renamed
        columnNewName - the target name for the column
        Throws:
        OperationException - if the new name cannot be assigned because of database constraints.
        Since:
        5.9.0
        See Also:
        Database mapping
      • renameDisabledColumn

        void renameDisabledColumn​(SchemaNode aNode,
                                  String columnNewName,
                                  String columnOldNameOrNull)
                           throws OperationException
        Renames a disabled column of a table.

        If the table exists in several mapped modes (history, replication, relational), the change will affect all of them.

        Parameters:
        aNode - the data model node for the element to be renamed
        columnNewName - the target name for the column
        columnOldNameOrNull - This parameter can be passed as null in most cases. If a non-null parameter value is provided, it has to match the existing name for this column; this extra verification makes non-ambiguous the choice of the column to be renamed; indeed, if the element has undergone several type evolutions, it might be represented in the database by several columns with distinct names.
        Throws:
        OperationException - if the specified parameters do not map to exactly one database column, or if the new name cannot be assigned because of database constraints.
        Since:
        5.9.0
        See Also:
        Database mapping