Package io.rocketbase.commons.model
Interface EntityWithKeyValue<T>
- All Superinterfaces:
HasKeyValue
-
Method Summary
Modifier and TypeMethodDescriptiondefault TaddKeyValue(String key, Boolean value) default TaddKeyValue(String key, Number value) default TaddKeyValue(String key, String value) default TaddKeyValue(String key, Collection values) default voidcheckKeyValue(String key, String value) validate key and valuedefault voidremoveKeyValue(String key) default voidvalidate all keyValues
should be triggered before storing in databaseMethods inherited from interface io.rocketbase.commons.model.HasKeyValue
getKeyValue, getKeyValue, getKeyValueBoolean, getKeyValueCollection, getKeyValueLong, getKeyValues, hasKeyValue, setKeyValues
-
Method Details
-
addKeyValue
- 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_APIvalue- max length of 255 characters- Returns:
- itself for fluent api
-
addKeyValue
- 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_APIvalue- will get converted to String- Returns:
- itself for fluent api
-
addKeyValue
- 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_APIvalue- will get converted to String- Returns:
- itself for fluent api
-
addKeyValue
- 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_APIvalues- will get converted via ObjectMapper as json array- Returns:
- itself for fluent api
-
removeKeyValue
-
checkKeyValue
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
-