Package org.apache.logging.log4j.mongodb
Class MongoDbObject
- java.lang.Object
-
- org.apache.logging.log4j.mongodb.MongoDbObject
-
- All Implemented Interfaces:
NoSqlObject<com.mongodb.BasicDBObject>
public final class MongoDbObject extends java.lang.Object implements NoSqlObject<com.mongodb.BasicDBObject>
The MongoDB implementation ofNoSqlObject
.
-
-
Constructor Summary
Constructors Constructor Description MongoDbObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
set(java.lang.String field, java.lang.Object value)
Sets the value of a property on this object to a String or primitive.void
set(java.lang.String field, java.lang.Object[] values)
Sets the value of a property on this object to an array of Strings or primitives.void
set(java.lang.String field, NoSqlObject<com.mongodb.BasicDBObject> value)
Sets the value of a property on this object to a nested complex object.void
set(java.lang.String field, NoSqlObject<com.mongodb.BasicDBObject>[] values)
Sets the value of a property on this object to an array of nested complex objects.com.mongodb.BasicDBObject
unwrap()
Obtains the underlying NoSQL library-specific object that this object wraps.
-
-
-
Method Detail
-
set
public void set(java.lang.String field, java.lang.Object value)
Description copied from interface:NoSqlObject
Sets the value of a property on this object to a String or primitive.- Specified by:
set
in interfaceNoSqlObject<com.mongodb.BasicDBObject>
- Parameters:
field
- The name of the propertyvalue
- The value of the property
-
set
public void set(java.lang.String field, NoSqlObject<com.mongodb.BasicDBObject> value)
Description copied from interface:NoSqlObject
Sets the value of a property on this object to a nested complex object.- Specified by:
set
in interfaceNoSqlObject<com.mongodb.BasicDBObject>
- Parameters:
field
- The name of the propertyvalue
- The value of the property
-
set
public void set(java.lang.String field, java.lang.Object[] values)
Description copied from interface:NoSqlObject
Sets the value of a property on this object to an array of Strings or primitives.- Specified by:
set
in interfaceNoSqlObject<com.mongodb.BasicDBObject>
- Parameters:
field
- The name of the propertyvalues
- The values for the property
-
set
public void set(java.lang.String field, NoSqlObject<com.mongodb.BasicDBObject>[] values)
Description copied from interface:NoSqlObject
Sets the value of a property on this object to an array of nested complex objects.- Specified by:
set
in interfaceNoSqlObject<com.mongodb.BasicDBObject>
- Parameters:
field
- The name of the propertyvalues
- The values for the property
-
unwrap
public com.mongodb.BasicDBObject unwrap()
Description copied from interface:NoSqlObject
Obtains the underlying NoSQL library-specific object that this object wraps.- Specified by:
unwrap
in interfaceNoSqlObject<com.mongodb.BasicDBObject>
- Returns:
- the wrapped object.
-
-