Class DBTableInfoImpl

    • Method Detail

      • copy

        public DBTableInfoImpl copy()
        Description copied from interface: DBTableInfo
        Creates a duplicate copy of this DBTableInfo instance.
        Specified by:
        copy in interface DBTableInfo
        Returns:
        A new DBTableInfo instance.
      • create

        public static DBTableInfoImpl create​(DatabasePlatform dbPlatform,
                                             java.lang.String schema,
                                             java.lang.String tableName,
                                             DBTableInfo.Type type,
                                             java.util.List<DBColInfo> columns,
                                             java.util.List<java.lang.String> primaryKeyColumns,
                                             java.lang.String sql)
        Creates DBTableInfo instance with limited information.
        Parameters:
        dbPlatform - The database platform.
        schema - The database schema name.
        tableName - The database table name.
        type - The type of the created DBTableInfo.
        columns - The database table columns.
        primaryKeyColumns - The columns comprising the primary key.
        sql - The SQL select statement defining DBTableInfo.Type.VIEW and DBTableInfo.Type.INLINE_VIEW. Can be null.
        Returns:
        The new DBTableInfo instance.
        Since:
        16.9.26.0
      • getSchema

        public java.lang.String getSchema()
        Description copied from interface: DBTableInfo
        Gets the database schema name of the associated artefact.
        Specified by:
        getSchema in interface DBTableInfo
        Returns:
        The schema this item belongs to.
      • getName

        public java.lang.String getName()
        Description copied from interface: DBTableInfo
        Gets the name of the database artefact represented by this DBTableInfo.
        Specified by:
        getName in interface DBTableInfo
        Returns:
        The name.
      • getSQL

        public java.lang.String getSQL()
        Getter for SQL that defines this view if it is a view, otherwise null.
        Specified by:
        getSQL in interface DBTableInfo
        Returns:
        Value of property sql.
      • isReadOnly

        public boolean isReadOnly()
        Description copied from interface: DBTableInfo
        Determines whether this database artifact allows modifications.
        Specified by:
        isReadOnly in interface DBTableInfo
        Returns:
        true if this database artifact is readonly and cannot be modified.
      • getColumn

        public DBColInfo getColumn​(java.lang.String columnName)
        Description copied from interface: DBTableInfo
        Finds a DBColInfo by its name. This will search through the columns in this DBTableInfo for a column with the required name.
        Specified by:
        getColumn in interface DBTableInfo
        Parameters:
        columnName - The name of the column to find.
        Returns:
        The DBColInfo with the required name or null if no such column exists.
      • getColumns

        public java.util.List<DBColInfo> getColumns()
        Getter for property columns.
        Specified by:
        getColumns in interface DBTableInfo
        Returns:
        Value of property columns.
      • getImportedFKInfo

        public java.util.List<DBForeignKeyInfo> getImportedFKInfo()
        Get the foreign keys that this table defines. e.g. the primary keys of other tables (or possibly this table) that are referred to in a foreign key constraint definition.
        Specified by:
        getImportedFKInfo in interface DBTableInfo
        Returns:
        A list of foreign keys
      • getExportedFKInfo

        public java.util.List<DBForeignKeyInfo> getExportedFKInfo()
        Get the foreign keys that involve this table but are defined in a foreign key constraint definition that is defined in another table (though possibly this table). e.g. the keys in this table that are referred to in a foreign key constraint definition somewhere.
        Specified by:
        getExportedFKInfo in interface DBTableInfo
        Returns:
        A list of foreign keys
      • getPrimaryKeyColumns

        public java.util.List<java.lang.String> getPrimaryKeyColumns()
        Get the value of primary key columns for the table.
        Specified by:
        getPrimaryKeyColumns in interface DBTableInfo
        Returns:
        The primary key columns for the table in the order that they are defined
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object