Class KeyValNameSpace
java.lang.Object
com.tccc.kos.commons.core.service.keyval.KeyValNameSpace
Wrapper around 
KeyValService that binds all accesses to a particular namespace.- Version:
- 2023-09-06
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturn true if the specified key exists.Get the value of the specified key.<T> TGet the value of the specified key and convert the string to an instance of the specified type.getAll()Return all key/val pairs in this name space.Return all key/val pairs in this name space as instance of the specified class.Return all keys in this name space.byte[]Get the value of the specified key as a blob.Return the name space name.voidRemove the specified key/val.voidRemove all the key/vals in this name space.voidSet the value of the specified key.voidSet the value of the specified key with optional encryption.voidSet the value of the specified key to the specified blob.voidSet the value of the specified key to the specified blob with optional encryption.voidSet the value of the specified key to the json of the specified value object.voidSet the value of the specified key to the json of the specified value object with optional encryption.
- 
Constructor Details- 
KeyValNameSpace
 
- 
- 
Method Details- 
setSet the value of the specified key with optional encryption.- Parameters:
- name- the key name
- val- the value
- encrypted- if true, encrypt the value
 
- 
setSet the value of the specified key.- Parameters:
- name- the key name
- val- the value
 
- 
setObjSet the value of the specified key to the json of the specified value object.- Parameters:
- name- the key name
- val- the object to convert to json and store
 
- 
setObjSet the value of the specified key to the json of the specified value object with optional encryption.- Parameters:
- name- the key name
- val- the object to convert to json and store
- encrypted- if true, encrypt value in the database
 
- 
setBlobSet the value of the specified key to the specified blob.- Parameters:
- name- the key name
- val- the array of bytes to store
 
- 
setBlobSet the value of the specified key to the specified blob with optional encryption.- Parameters:
- name- the key name
- val- the object to convert to json and store
- encrypted- if true, encrypt the data in storage
 
- 
existsReturn true if the specified key exists.- Parameters:
- name- the key name
 
- 
getGet the value of the specified key. If the value is encrypted it will automatically be decrypted.- Parameters:
- name- the key name
 
- 
getGet the value of the specified key and convert the string to an instance of the specified type. If the value is encrypted it will automatically be decrypted.- Parameters:
- name- the key name
- clazz- the type to convert the value to
- Throws:
- Exception
 
- 
getBlobGet the value of the specified key as a blob. This is only valid for fetching values that were stored usingsetBlob().- Parameters:
- name- the key name
- Throws:
- Exception
 
- 
removeRemove the specified key/val.- Parameters:
- name- the key name
 
- 
getAllKeysReturn all keys in this name space.
- 
getAllReturn all key/val pairs in this name space.
- 
getAllReturn all key/val pairs in this name space as instance of the specified class.
- 
removeAllpublic void removeAll()Remove all the key/vals in this name space.
- 
getNameSpaceReturn the name space name.
 
-