Class IdString

    • Constructor Detail

      • IdString

        public IdString()
      • IdString

        public IdString​(String value)
    • Method Detail

      • getValue

        public Object getValue()
        Description copied from interface: Id
        Get the raw value of this Id.
        Specified by:
        getValue in interface Id<IdString>
        Returns:
        the raw value of this Id.
      • getUrl

        public String getUrl()
        Description copied from interface: Id
        Get the value, formatted for use in a url. String values will be quoted with single quotes.
        Specified by:
        getUrl in interface Id<IdString>
        Returns:
        the value, formatted for use in a url.
      • getJson

        public String getJson()
        Description copied from interface: Id
        Get the value, formatted for inserting into a JSON document. In general, it is better to use a json mapper, and pass it the Object returned by getValue().
        Specified by:
        getJson in interface Id<IdString>
        Returns:
        the value, formatted for use in JSON.
      • writeTo

        public void writeTo​(com.fasterxml.jackson.core.JsonGenerator gen)
                     throws IOException
        Description copied from interface: Id
        Write the value to the given JsonGenerator.
        Specified by:
        writeTo in interface Id<IdString>
        Parameters:
        gen - The JsonGenerator to write to.
        Throws:
        IOException - if the generator throws.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object