Class Tuple


  • public class Tuple
    extends Object
    Contains the tuple value (as an array of Columns) together with a pointer to its definition
    • Method Detail

      • setDefinition

        public void setDefinition​(TupleDefinition definition)
      • setColumns

        public void setColumns​(List<Object> cols)
      • setColumn

        public void setColumn​(int index,
                              Object value)
      • setColumn

        public void setColumn​(String colName,
                              Object value)
      • getColumnIndex

        public int getColumnIndex​(String colName)
      • getColumn

        public <T> T getColumn​(String colName)
      • getLongColumn

        public long getLongColumn​(String colName)
        Get the value of column as long.

        Throws exception if the column does not exist or is of different type

        Parameters:
        colName -
        Returns:
      • getTimestampColumn

        public long getTimestampColumn​(String colName)
      • getBooleanColumn

        public boolean getBooleanColumn​(String colName)
        Get the value of column as boolean.

        Throws exception if the column does not exist or is of different type

        Parameters:
        colName -
        Returns:
      • getByteColumn

        public byte getByteColumn​(String colName)
        Get the value of column as byte.

        Throws exception if the column does not exist or is of different type

        Parameters:
        colName -
        Returns:
      • getShortColumn

        public short getShortColumn​(String colName)
        Get the value of column as short.

        Throws exception if the column does not exist or is of different type

        Parameters:
        colName -
        Returns:
      • getIntColumn

        public int getIntColumn​(String colName)
        Get the value of column as int.

        Throws exception if the column does not exist or is of different type

        Parameters:
        colName -
        Returns:
      • getDoubleColumn

        public double getDoubleColumn​(String colName)
        Get the value of column as double.

        Throws exception if the column does not exist or is of different type

        Parameters:
        colName -
        Returns:
      • hasColumn

        public boolean hasColumn​(String colName)
      • getColumn

        public Object getColumn​(int i)
      • addTimestampColumn

        public void addTimestampColumn​(String colName,
                                       long colValue)
        Add a TIMESTAMP column
        Parameters:
        colName -
        colValue -
      • addColumn

        public void addColumn​(String colName,
                              int colValue)
        Add a INT column
        Parameters:
        colName -
        colValue -
      • addColumn

        public void addColumn​(String colName,
                              boolean colValue)
        Add a BOOLEAN column
        Parameters:
        colName -
        colValue -
      • addColumn

        public void addColumn​(String colName,
                              long colValue)
        Add a LONG column
        Parameters:
        colName -
        colValue -
      • addColumn

        public void addColumn​(String colName,
                              String colValue)
        Add a STRING column
        Parameters:
        colName -
        colValue -
      • addEnumColumn

        public void addEnumColumn​(String colName,
                                  String colValue)
        Add an ENUM column
        Parameters:
        colName -
        colValue -
      • size

        public int size()
        Returns:
        return the number of columns