java.lang.Object
org.bson.Document
fr.gouv.vitam.logbook.common.server.database.collections.LogbookDocument<E>
Type Parameters:
E - Class used to implement the Document
All Implemented Interfaces:
Serializable, Map<String,Object>, org.bson.conversions.Bson

public abstract class LogbookDocument<E> extends org.bson.Document
Logbook Document MongoDb implementation
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface java.util.Map

    Map.Entry<K extends Object,V extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Contains the specific data as a json string
    static final String
    Contains the series of entries within the very same Logbook operation (1 operation) / Lifecycle (all)
    static final String
    ID of each line: different for each sub type
    static final String
    Last persistence date of the logbook document (timestamp of document storage in DB)
    static final String
    TenantId
    static final String
    Version of the document: Incresed for each update

    Fields inherited from interface org.bson.conversions.Bson

    DEFAULT_CODEC_REGISTRY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor
    Constructor from Json
    LogbookDocument(org.bson.Document content)
    Constructor from Document
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
     
    final int
     
    final int
     
     
     

    Methods inherited from class org.bson.Document

    append, clear, containsKey, containsValue, entrySet, equals, get, get, get, getBoolean, getBoolean, getDate, getDouble, getEmbedded, getEmbedded, getInteger, getInteger, getList, getList, getLong, getObjectId, getString, hashCode, isEmpty, keySet, parse, parse, put, putAll, remove, size, toBsonDocument, toJson, toJson, toJson, toJson, values

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bson.conversions.Bson

    toBsonDocument
  • Field Details

    • ID

      public static final String ID
      ID of each line: different for each sub type
      See Also:
    • TENANT_ID

      public static final String TENANT_ID
      TenantId
      See Also:
    • VERSION

      public static final String VERSION
      Version of the document: Incresed for each update
      See Also:
    • LAST_PERSISTED_DATE

      public static final String LAST_PERSISTED_DATE
      Last persistence date of the logbook document (timestamp of document storage in DB)
      See Also:
    • EVENTS

      public static final String EVENTS
      Contains the series of entries within the very same Logbook operation (1 operation) / Lifecycle (all)
      See Also:
    • EVENT_DETAILS

      public static final String EVENT_DETAILS
      Contains the specific data as a json string
      See Also:
  • Constructor Details

    • LogbookDocument

      public LogbookDocument()
      Empty constructor
    • LogbookDocument

      public LogbookDocument(String content)
      Constructor from Json
      Parameters:
      content - in format String
      Throws:
      IllegalArgumentException - if Id is not a GUID
    • LogbookDocument

      public LogbookDocument(org.bson.Document content)
      Constructor from Document
      Parameters:
      content - in format Document
      Throws:
      IllegalArgumentException - if Id is not a GUID
  • Method Details

    • getId

      public abstract String getId()
      Returns:
      the ID
    • getTenantId

      public final int getTenantId()
      Returns:
      the TenantId
    • getVersion

      public final int getVersion()
      Returns:
      the version
    • toStringDirect

      public String toStringDirect()
      Returns:
      the bypass toString
    • toString

      public String toString()
      Overrides:
      toString in class org.bson.Document