Class GenericColumn

java.lang.Object
org.pgcodekeeper.core.schema.GenericColumn
All Implemented Interfaces:
Serializable

public class GenericColumn extends Object implements Serializable
Represents a generic database object reference with schema, table, column, and type information. Used for identifying and referencing database objects across different contexts.
See Also:
  • Field Details

    • schema

      public final String schema
    • table

      public final String table
    • column

      public final String column
    • type

      public final DbObjType type
  • Constructor Details

    • GenericColumn

      public GenericColumn(String schema, String table, String column, DbObjType type)
      Creates a generic column with full specification.
      Parameters:
      schema - the schema name
      table - the table name
      column - the column name
      type - the database object type
    • GenericColumn

      public GenericColumn(String schema, String object, DbObjType type)
      Creates a generic column for a database object within a schema.
      Parameters:
      schema - the schema name
      object - the object name (table, view, function, etc.)
      type - the database object type
    • GenericColumn

      public GenericColumn(String schema, DbObjType type)
      Creates a generic column for a schema-level object.
      Parameters:
      schema - the schema name
      type - the database object type
  • Method Details

    • getObjName

      public String getObjName()
      Gets the name of the most specific object component.
      Returns:
      the column name if present, otherwise table name, otherwise schema name
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getQualifiedName

      public String getQualifiedName()
      Gets the fully qualified name of this object.
      Returns:
      the qualified name as a string
    • toString

      public String toString()
      Overrides:
      toString in class Object