Class IndexDef


  • public class IndexDef
    extends java.lang.Object
    Definition of an index on a table
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexDef​(java.lang.String indexName, java.util.Collection<OrderedColumnDef> indexColumns, boolean unique)  
      IndexDef​(java.lang.String indexName, java.util.Collection<OrderedColumnDef> indexColumns, java.util.Collection<java.lang.String> includeColumns)
      Construct an index definition for a unique index with include columns.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(java.lang.String schemaName, java.lang.String tableName, ISchemaAdapter target, DistributionType distributionType, java.lang.String distributionColumn)
      Apply this object to the given database target
      CreateIndexStatement createStatement​(java.lang.String schemaName, java.lang.String tableName)
      Create a statement which can be used to create vendor-specific DDL
      void drop​(java.lang.String schemaName, ISchemaAdapter target)
      Drop this index
      boolean isUnique()
      Getter for the unique flag
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • IndexDef

        public IndexDef​(java.lang.String indexName,
                        java.util.Collection<OrderedColumnDef> indexColumns,
                        boolean unique)
      • IndexDef

        public IndexDef​(java.lang.String indexName,
                        java.util.Collection<OrderedColumnDef> indexColumns,
                        java.util.Collection<java.lang.String> includeColumns)
        Construct an index definition for a unique index with include columns. Note that it only makes sense for an index with include columns to be unique, so the unique flag is set true
        Parameters:
        indexName -
        indexColumns -
        includeColumns -
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isUnique

        public boolean isUnique()
        Getter for the unique flag
        Returns:
      • apply

        public void apply​(java.lang.String schemaName,
                          java.lang.String tableName,
                          ISchemaAdapter target,
                          DistributionType distributionType,
                          java.lang.String distributionColumn)
        Apply this object to the given database target
        Parameters:
        schemaName -
        tableName -
        target -
        distributionType -
        distributionColumn -
      • drop

        public void drop​(java.lang.String schemaName,
                         ISchemaAdapter target)
        Drop this index
        Parameters:
        schemaName -
        target -
      • createStatement

        public CreateIndexStatement createStatement​(java.lang.String schemaName,
                                                    java.lang.String tableName)
        Create a statement which can be used to create vendor-specific DDL
        Parameters:
        schemaName -
        tableName -
        Returns: