org.apache.logging.log4j.nosql.appender.mongodb

Class MongoDbObject

  • java.lang.Object
    • org.apache.logging.log4j.nosql.appender.mongodb.MongoDbObject
  • All Implemented Interfaces:
    NoSqlObject<com.mongodb.BasicDBObject>


    public final class MongoDbObject
    extends Object
    implements NoSqlObject<com.mongodb.BasicDBObject>
    The MongoDB implementation of NoSqlObject.
    • Constructor Summary

      Constructors 
      Constructor and Description
      MongoDbObject() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void set(String field, NoSqlObject<com.mongodb.BasicDBObject> value)
      Sets the value of a property on this object to a nested complex object.
      void set(String field, NoSqlObject<com.mongodb.BasicDBObject>[] values)
      Sets the value of a property on this object to an array of nested complex objects.
      void set(String field, Object value)
      Sets the value of a property on this object to a String or primitive.
      void set(String field, Object[] values)
      Sets the value of a property on this object to an array of Strings or primitives.
      com.mongodb.BasicDBObject unwrap()
      Obtains the underlying NoSQL library-specific object that this object wraps.
    • Constructor Detail

      • MongoDbObject

        public MongoDbObject()
    • Method Detail

      • set

        public void set(String field,
               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 interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        value - The value of the property
      • set

        public void set(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 interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        value - The value of the property
      • set

        public void set(String field,
               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 interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        values - The values for the property
      • set

        public void set(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 interface NoSqlObject<com.mongodb.BasicDBObject>
        Parameters:
        field - The name of the property
        values - 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 interface NoSqlObject<com.mongodb.BasicDBObject>
        Returns:
        the wrapped object.

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.