Class MTableIndex

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_TableIndex, I_Persistent, Evaluatee

public class MTableIndex extends X_AD_TableIndex
See Also:
  • Constructor Details

    • MTableIndex

      public MTableIndex(Properties ctx, String AD_TableIndex_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_TableIndex_UU - UUID key
      trxName - Transaction
    • MTableIndex

      public MTableIndex(Properties ctx, int AD_TableIndex_ID, String trxName)
      Standard constructor
      Parameters:
      ctx - context
      AD_TableIndex_ID - table index
      trxName - trx name
    • MTableIndex

      public MTableIndex(Properties ctx, ResultSet rs, String trxName)
      Load constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - trx name
    • MTableIndex

      public MTableIndex(MTable parent, String name)
      Parent constructor
      Parameters:
      parent - parent
      name - index name
  • Method Details

    • get

      public static MTableIndex[] get(MTable table)
      Get active indexes of table
      Parameters:
      table - table
      Returns:
      array of table index
    • getTableIndexesByQuery

      public static List<MTableIndex> getTableIndexesByQuery(Properties ctx, String whereClause)
      Get table indexes with where clause
      Parameters:
      ctx - context
      whereClause - SQL where clause
      Returns:
      list of table index
    • getColumns

      public MIndexColumn[] getColumns(boolean reload)
      Get index columns
      Parameters:
      reload - true to reload from DB
      Returns:
      array of index column
    • getColumns

      public MIndexColumn[] getColumns(boolean reload, boolean activeOnly)
      Get index columns
      Parameters:
      reload - true to reload from DB
      activeOnly - return active records only
      Returns:
      array of index column
    • getTableName

      public String getTableName()
      Get table name
      Returns:
      table name
    • getDDL

      public String getDDL()
      Get create index or constraint (if IsCreateConstraint=Y) DDL
      Returns:
      Create Index or Constraint DDL
    • getDropDDL

      public String getDropDDL()
      Get drop index or constraint (if IsCreateConstraint=Y) DDL
      Returns:
      Drop Index or Constraint DDL
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • toString

      public String toString()
      String representation
      Overrides:
      toString in class X_AD_TableIndex
      Returns:
      info