Class MTableIndex

    • Constructor Detail

      • 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 - name
    • Method Detail

      • get

        public static MTableIndex[] get​(MTable table)
        Get active indexes from 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 - where clause
        Returns:
        array of table index
      • getColumns

        public MIndexColumn[] getColumns​(boolean reload)
        Get index columns
        Parameters:
        reload - reload data
        Returns:
        array of index column
      • getColumns

        public MIndexColumn[] getColumns​(boolean reload,
                                         boolean activeOnly)
        Get index columns
        Parameters:
        reload - reload data
        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 SQL index create DDL
        Returns:
        SQL DDL
      • getDropDDL

        public String getDropDDL()
        Get SQL index create DDL
        Returns:
        SQL DDL
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true