Class DefaultNoSqlObject
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.nosql.DefaultNoSqlObject
-
- All Implemented Interfaces:
NoSqlObject<Map<String,Object>>
public class DefaultNoSqlObject extends Object implements NoSqlObject<Map<String,Object>>
Default implementation ofNoSqlObject. Most NoSQL Java APIs tend to re-use the Map interface for storage and retrieval of the underlying JSON documents. Therefore, this implementation is provided for convenience.
-
-
Constructor Summary
Constructors Constructor Description DefaultNoSqlObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidset(String field, Object value)Sets the value of a property on this object to a String or primitive.voidset(String field, Object[] values)Sets the value of a property on this object to an array of Strings or primitives.voidset(String field, NoSqlObject<Map<String,Object>> value)Sets the value of a property on this object to a nested complex object.voidset(String field, NoSqlObject<Map<String,Object>>[] values)Sets the value of a property on this object to an array of nested complex objects.Map<String,Object>unwrap()Obtains the underlying NoSQL library-specific object that this object wraps.
-
-
-
Method Detail
-
set
public void set(String field, Object value)
Description copied from interface:NoSqlObjectSets the value of a property on this object to a String or primitive.- Specified by:
setin interfaceNoSqlObject<Map<String,Object>>- Parameters:
field- The name of the propertyvalue- The value of the property
-
set
public void set(String field, NoSqlObject<Map<String,Object>> value)
Description copied from interface:NoSqlObjectSets the value of a property on this object to a nested complex object.- Specified by:
setin interfaceNoSqlObject<Map<String,Object>>- Parameters:
field- The name of the propertyvalue- The value of the property
-
set
public void set(String field, Object[] values)
Description copied from interface:NoSqlObjectSets the value of a property on this object to an array of Strings or primitives.- Specified by:
setin interfaceNoSqlObject<Map<String,Object>>- Parameters:
field- The name of the propertyvalues- The values for the property
-
set
public void set(String field, NoSqlObject<Map<String,Object>>[] values)
Description copied from interface:NoSqlObjectSets the value of a property on this object to an array of nested complex objects.- Specified by:
setin interfaceNoSqlObject<Map<String,Object>>- Parameters:
field- The name of the propertyvalues- The values for the property
-
unwrap
public Map<String,Object> unwrap()
Description copied from interface:NoSqlObjectObtains the underlying NoSQL library-specific object that this object wraps.- Specified by:
unwrapin interfaceNoSqlObject<Map<String,Object>>- Returns:
- the wrapped object.
-
-