Class AbstractRegularTable

All Implemented Interfaces:
IHashable, IOptionContainer, IRelation, ISearchPath, ISimpleOptionContainer, IStatement, IStatementContainer
Direct Known Subclasses:
PartitionGpTable, PartitionPgTable, SimplePgTable, TypedPgTable

public abstract class AbstractRegularTable extends AbstractPgTable implements ISimpleOptionContainer
Base PostgreSQL regular table implementation. Provides common functionality for standard PostgreSQL tables including logging, tablespace, row-level security, partitioning, and Greenplum distribution options.
Since:
4.1.1
Author:
galiev_mr
  • Method Details

    • getAlterTable

      public String getAlterTable(boolean only)
      Description copied from class: AbstractTable
      Generates beginning of alter table statement.
      Specified by:
      getAlterTable in class AbstractTable
      Parameters:
      only - if true, append 'ONLY' to statement
      Returns:
      alter table statement beginning in String format
    • setMethod

      public void setMethod(String using)
    • isLogged

      public boolean isLogged()
      Checks if this table is logged (writes to WAL).
      Returns:
      true if logged, false if unlogged
    • setLogged

      public void setLogged(boolean isLogged)
    • setTablespace

      public void setTablespace(String tablespace)
    • setRowSecurity

      public void setRowSecurity(boolean isRowSecurity)
    • setForceSecurity

      public void setForceSecurity(boolean isForceSecurity)
    • getPartitionBy

      public String getPartitionBy()
      Gets the partition specification for this table.
      Returns:
      partition by clause or null if not partitioned
    • setPartitionBy

      public void setPartitionBy(String partitionBy)
    • setDistribution

      public void setDistribution(String distribution)
    • compare

      public boolean compare(PgStatement obj)
      Description copied from class: PgStatement
      This method does not account for nested child PgStatements. Shallow version of PgStatement.equals(Object)
      Overrides:
      compare in class AbstractPgTable
    • shallowCopy

      public AbstractTable shallowCopy()
      Description copied from class: PgStatement
      Copies all object properties into a new object and leaves all its children empty.
      Overrides:
      shallowCopy in class AbstractPgTable
      Returns:
      shallow copy of a DB object.
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Specified by:
      computeHash in interface IHashable
      Overrides:
      computeHash in class AbstractPgTable
      Parameters:
      hasher - the hasher instance to use for hash computation