Class IndexColumn


  • public class IndexColumn
    extends Object
    An IndexColumn holds the column name and whether ascending or descending ordering. For some keys, like text blobs, a length must be provided.
    Version:
    $Revision$
    Author:
    dale
    • Field Detail

      • m_asc_or_desc

        protected String m_asc_or_desc
        ascending or descending?
      • m_columnName

        protected String m_columnName
        column name.
      • m_Length

        protected int m_Length
        the length of the key (e.g., for an index on a text blob).
    • Constructor Detail

      • IndexColumn

        public IndexColumn​(String cname)
        Constructor. Default to ascending.
        Parameters:
        cname - column name
      • IndexColumn

        public IndexColumn​(String cname,
                           boolean ascending)
        Constructor. Key length is -1.
        Parameters:
        cname - column
        ascending - ascending order?
      • IndexColumn

        public IndexColumn​(String cname,
                           boolean ascending,
                           int length)
        Constructor.
        Parameters:
        cname - column
        ascending - ascending order?
        length - the length of the key, use -1 to ignore
      • IndexColumn

        public IndexColumn​(String cname,
                           String asc_or_desc)
        Constructor. Key length is -1.
        Parameters:
        cname - column name
        asc_or_desc - ordering string
      • IndexColumn

        public IndexColumn​(String cname,
                           String asc_or_desc,
                           int length)
        Constructor.
        Parameters:
        cname - column name
        asc_or_desc - ordering string
        length - the length of the index, use -1 to ignore
    • Method Detail

      • getColumnName

        public String getColumnName()
        Returns the name of the column.
        Returns:
        the name of the column
      • getAscOrDesc

        public String getAscOrDesc()
        Returns the order string.
        Returns:
        the order string
      • getLength

        public int getLength()
        Returns the length of the key.
        Returns:
        the key length
      • equals

        public boolean equals​(IndexColumn ic)
        Return true if given IndexColumn matches this one.
        Parameters:
        ic - IndexCOlumn to compare
        Returns:
        equal?