Interface EntityWithKeyValue<T>

    • Method Detail

      • addKeyValue

        default T addKeyValue​(String key,
                              String value)
        Parameters:
        key - max length of 50 characters (Allowed key chars are a-Z, 0-9 and _-.#)
        key with _ as prefix will not get displayed in REST_API
        value - max length of 255 characters
        Returns:
        itself for fluent api
      • addKeyValue

        default T addKeyValue​(String key,
                              Number value)
        Parameters:
        key - max length of 50 characters (Allowed key chars are a-Z, 0-9 and _-.#)
        key with _ as prefix will not get displayed in REST_API
        value - will get converted to String
        Returns:
        itself for fluent api
      • addKeyValue

        default T addKeyValue​(String key,
                              Boolean value)
        Parameters:
        key - max length of 50 characters (Allowed key chars are a-Z, 0-9 and _-.#)
        key with _ as prefix will not get displayed in REST_API
        value - will get converted to String
        Returns:
        itself for fluent api
      • addKeyValue

        default T addKeyValue​(String key,
                              Collection values)
        Parameters:
        key - max length of 50 characters (Allowed key chars are a-Z, 0-9 and _-.#)
        key with _ as prefix will not get displayed in REST_API
        values - will get converted via ObjectMapper as json array
        Returns:
        itself for fluent api
      • removeKeyValue

        default void removeKeyValue​(String key)
      • checkKeyValue

        default void checkKeyValue​(String key,
                                   String value)
        validate key and value
        Parameters:
        key - not empty and max 50 chars
        Allowed key chars are a-Z, 0-9 and _-.#[]
        value - maximum length 255 chars
      • validateKeyValues

        default void validateKeyValues()
        validate all keyValues
        should be triggered before storing in database