Class SettableLongVirtualColumn

  • All Implemented Interfaces:
    Cacheable, VirtualColumn

    public class SettableLongVirtualColumn
    extends Object
    implements VirtualColumn
    Virtual column that returns a changeable value, via setValue(long). Useful for injecting synthetic values into a cursor, such as row numbers.
    • Constructor Detail

      • SettableLongVirtualColumn

        public SettableLongVirtualColumn​(String columnName)
    • Method Detail

      • requiredColumns

        public List<String> requiredColumns()
        Description copied from interface: VirtualColumn
        Returns a list of columns that this virtual column will access. This may include the names of other virtual columns. May be empty if a virtual column doesn't access any underlying columns. Does not pass columnName because there is an assumption that the list of columns needed by a dot-notation supporting virtual column will not vary based on the columnName.
        Specified by:
        requiredColumns in interface VirtualColumn
        Returns:
        column names
      • usesDotNotation

        public boolean usesDotNotation()
        Description copied from interface: VirtualColumn
        Indicates that this virtual column can be referenced with dot notation. For example, a virtual column named "foo" could be referred to as "foo.bar" with the Cursor it is registered with. In that case, init will be called with columnName "foo.bar" rather than "foo".
        Specified by:
        usesDotNotation in interface VirtualColumn
        Returns:
        whether to use dot notation
      • getCacheKey

        public byte[] getCacheKey()
        Description copied from interface: Cacheable
        Get a byte array used as a cache key.
        Specified by:
        getCacheKey in interface Cacheable
        Returns:
        a cache key
      • getValue

        public long getValue()
      • setValue

        public void setValue​(long theValue)