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 void
addDayPartition(java.lang.String schema, java.lang.String table, java.util.Date lowValue)
Add a new daily partition to the given tablevoid
addMonthPartition(java.lang.String schema, java.lang.String table, java.util.Date lowValue)
Add a new monthly partition to the given tablevoid
commitBatch()
Used for commit after batch operationsvoid
dropDetachedPartitions(java.lang.String schema, java.lang.String table, int partMaintBatchSize)
Drop any tables which have been created as part of the dropPartition processvoid
dropPartition(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:ICatalogAccess
Get the list of partitions for this table- Specified by:
getPartitionList
in interfaceICatalogAccess
- 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 interfaceICatalogAccess
-
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 interfaceICatalogAccess
-
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 interfaceICatalogAccess
-
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 interfaceICatalogAccess
-
commitBatch
public void commitBatch()
Description copied from interface:ICatalogAccess
Used for commit after batch operations- Specified by:
commitBatch
in interfaceICatalogAccess
-
-