Class Db2CatalogAccess

  • All Implemented Interfaces:
    ICatalogAccess

    public class Db2CatalogAccess
    extends java.lang.Object
    implements ICatalogAccess
    Abstracts the partition maintenance operations to facilitate better unit testing of the higher business function layers
    • Constructor Summary

      Constructors 
      Constructor Description
      Db2CatalogAccess​(java.sql.Connection c)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDayPartition​(java.lang.String schema, java.lang.String table, java.util.Date lowValue)
      Add a new daily partition to the given table
      void addMonthPartition​(java.lang.String schema, java.lang.String table, java.util.Date lowValue)
      Add a new monthly partition to the given table
      void commitBatch()
      Used for commit after batch operations
      void dropDetachedPartitions​(java.lang.String schema, java.lang.String table, int partMaintBatchSize)
      Drop any tables which have been created as part of the dropPartition process
      void dropPartition​(java.lang.String schema, java.lang.String table, PartitionInfo pi)
      Drop (detach) the partition identified by schema, table and pi
      java.util.List<PartitionInfo> getPartitionList​(java.lang.String schema, java.lang.String table)
      Get the list of partitions for this table
      • Methods inherited from class java.lang.Object

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

      • Db2CatalogAccess

        public Db2CatalogAccess​(java.sql.Connection c)
    • Method Detail

      • getPartitionList

        public java.util.List<PartitionInfo> getPartitionList​(java.lang.String schema,
                                                              java.lang.String table)
        Description copied from interface: ICatalogAccess
        Get the list of partitions for this table
        Specified by:
        getPartitionList in interface ICatalogAccess
        Returns:
      • addMonthPartition

        public void addMonthPartition​(java.lang.String schema,
                                      java.lang.String table,
                                      java.util.Date lowValue)
        Description copied from interface: ICatalogAccess
        Add a new monthly partition to the given table
        Specified by:
        addMonthPartition in interface ICatalogAccess
      • addDayPartition

        public void addDayPartition​(java.lang.String schema,
                                    java.lang.String table,
                                    java.util.Date lowValue)
        Description copied from interface: ICatalogAccess
        Add a new daily partition to the given table
        Specified by:
        addDayPartition in interface ICatalogAccess
      • dropPartition

        public void dropPartition​(java.lang.String schema,
                                  java.lang.String table,
                                  PartitionInfo pi)
        Description copied from interface: ICatalogAccess
        Drop (detach) the partition identified by schema, table and pi
        Specified by:
        dropPartition in interface ICatalogAccess
      • dropDetachedPartitions

        public void dropDetachedPartitions​(java.lang.String schema,
                                           java.lang.String table,
                                           int partMaintBatchSize)
        Description copied from interface: ICatalogAccess
        Drop any tables which have been created as part of the dropPartition process
        Specified by:
        dropDetachedPartitions in interface ICatalogAccess