Interface ConversionMap<K,​V>

  • All Superinterfaces:
    Map<K,​V>
    All Known Implementing Classes:
    ColumnMap, XMLMap

    public interface ConversionMap<K,​V>
    extends Map<K,​V>
    This is a specific type of map that allows for converting from a data type to a given type. For instance, a ColumnMap contains column names from an SQL table as its keys and the values are the entries, which are strings. A call to getDate(Object) would convert the string to a date object. This encapsulates all the work involved in converting between objects. This is part of the data abstraction layer for all stores.

    Created by Jeff Gaynor
    on 4/16/12 at 12:06 PM

    • Method Detail

      • getDate

        Date getDate​(K key)
        Convenience method to change the value to a date.
        Parameters:
        key -
        Returns:
      • getBoolean

        boolean getBoolean​(K key)
        Convenience method to change the value to a boolean
        Parameters:
        key -
        Returns:
      • getLong

        long getLong​(K key)
        Convenience method to change the value to a long.
        Parameters:
        key -
        Returns:
      • getInteger

        int getInteger​(K key)
        Convenience method to change the value to an integer.
        Parameters:
        key -
        Returns:
      • getString

        String getString​(K key)
        Convenience method to change the value to a string
        Parameters:
        key -
        Returns:
      • getIdentifier

        Identifier getIdentifier​(K key)
        Convenience method to change the value to an identifier
        Parameters:
        key -
        Returns:
      • getURI

        URI getURI​(K key)
        Convenience method to change the value to a URI.
        Parameters:
        key -
        Returns:
      • getBytes

        byte[] getBytes​(K key)
        Convenience method to change the value to a byte array. Note that if the value is already a byte array (such as a BLOB in a database) it is simply returned unaltered.
        Parameters:
        key -
        Returns:
      • removeKeys

        ConversionMap<K,​V> removeKeys​(List<String> attr)
        Returns a copy of this with the given keyus removed.
        Parameters:
        attr -