Class MapBackedString


  • public class MapBackedString
    extends MapBackedProperty<java.lang.String>
    A String variable that can be represented as a key-value pair in the POJO internal Map
    • Constructor Summary

      Constructors 
      Constructor Description
      MapBackedString​(java.util.Map sourceMap, java.lang.String property)
      Construct a MapBackedString with a certain property name.
      MapBackedString​(java.util.Map sourceMap, java.lang.String property, java.lang.String valueIfMissing)
      Construct a MapBackedString with a certain property name and default value
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Optional<java.lang.String> queryOption()
      Hook that allows the field to be queryable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapBackedString

        public MapBackedString​(java.util.Map sourceMap,
                               java.lang.String property,
                               java.lang.String valueIfMissing)
        Construct a MapBackedString with a certain property name and default value
        Parameters:
        sourceMap - Map to store the String value in
        property - Key name of the property
        valueIfMissing - value to set if missing
      • MapBackedString

        public MapBackedString​(java.util.Map sourceMap,
                               java.lang.String property)
        Construct a MapBackedString with a certain property name. The default value will be a new ArrayList.
        Parameters:
        sourceMap - Map to store the String value in
        property - Key name of the property
    • Method Detail

      • queryOption

        protected java.util.Optional<java.lang.String> queryOption()
                                                            throws com.legyver.core.exception.CoreException
        Hook that allows the field to be queryable
        Specified by:
        queryOption in class MapBackedProperty<java.lang.String>
        Returns:
        the supported query option
        Throws:
        com.legyver.core.exception.CoreException - if there is a problem marshalling to/from JSON