Class FieldBundle


  • public class FieldBundle
    extends Object
    FieldBundle is an abstraction that allows retrieval of raw values from different sources.
    • Constructor Detail

      • FieldBundle

        public FieldBundle​(com.google.common.collect.ListMultimap<String,​Object> fields)
    • Method Detail

      • getValue

        public <T> T getValue​(FieldDef<?,​T> fieldDef)
        Get a field's value based on the field definition.
        Type Parameters:
        T - Data type of the returned object based on the field definition
        Parameters:
        fieldDef - the definition of the field of which the value should be retrieved. The field must be stored and contained in the result set as specified by QueryOptions.
        Returns:
        Either a single element or an Iterable based on the field definition. An empty list is returned for repeated fields that are not contained in the result.
        Throws:
        IllegalArgumentException - if the requested field is not stored or not present. This check is only enforced on non-repeatable fields.