Package com.ibm.fhir.database.utils.db2
Class Db2CatalogAccess
- java.lang.Object
-
- com.ibm.fhir.database.utils.db2.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 voidaddDayPartition(java.lang.String schema, java.lang.String table, java.util.Date lowValue)Add a new daily partition to the given tablevoidaddMonthPartition(java.lang.String schema, java.lang.String table, java.util.Date lowValue)Add a new monthly partition to the given tablevoidcommitBatch()Used for commit after batch operationsvoiddropDetachedPartitions(java.lang.String schema, java.lang.String table, int partMaintBatchSize)Drop any tables which have been created as part of the dropPartition processvoiddropPartition(java.lang.String schema, java.lang.String table, PartitionInfo pi)Drop (detach) the partition identified by schema, table and pijava.util.List<PartitionInfo>getPartitionList(java.lang.String schema, java.lang.String table)Get the list of partitions for this table
-
-
-
Method Detail
-
getPartitionList
public java.util.List<PartitionInfo> getPartitionList(java.lang.String schema, java.lang.String table)
Description copied from interface:ICatalogAccessGet the list of partitions for this table- Specified by:
getPartitionListin interfaceICatalogAccess- Returns:
-
addMonthPartition
public void addMonthPartition(java.lang.String schema, java.lang.String table, java.util.Date lowValue)Description copied from interface:ICatalogAccessAdd a new monthly partition to the given table- Specified by:
addMonthPartitionin interfaceICatalogAccess
-
addDayPartition
public void addDayPartition(java.lang.String schema, java.lang.String table, java.util.Date lowValue)Description copied from interface:ICatalogAccessAdd a new daily partition to the given table- Specified by:
addDayPartitionin interfaceICatalogAccess
-
dropPartition
public void dropPartition(java.lang.String schema, java.lang.String table, PartitionInfo pi)Description copied from interface:ICatalogAccessDrop (detach) the partition identified by schema, table and pi- Specified by:
dropPartitionin interfaceICatalogAccess
-
dropDetachedPartitions
public void dropDetachedPartitions(java.lang.String schema, java.lang.String table, int partMaintBatchSize)Description copied from interface:ICatalogAccessDrop any tables which have been created as part of the dropPartition process- Specified by:
dropDetachedPartitionsin interfaceICatalogAccess
-
commitBatch
public void commitBatch()
Description copied from interface:ICatalogAccessUsed for commit after batch operations- Specified by:
commitBatchin interfaceICatalogAccess
-
-