Class LogbookDocument<E>
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Contains the specific data as a json stringstatic 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 typestatic final String
Last persistence date of the logbook document (timestamp of document storage in DB)static final String
TenantIdstatic final String
Version of the document: Incresed for each updateFields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY
-
Constructor Summary
ConstructorDescriptionEmpty constructorLogbookDocument
(String content) Constructor from JsonLogbookDocument
(org.bson.Document content) Constructor from Document -
Method Summary
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
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
ID
ID of each line: different for each sub type- See Also:
-
TENANT_ID
TenantId- See Also:
-
VERSION
Version of the document: Incresed for each update- See Also:
-
LAST_PERSISTED_DATE
Last persistence date of the logbook document (timestamp of document storage in DB)- See Also:
-
EVENTS
Contains the series of entries within the very same Logbook operation (1 operation) / Lifecycle (all)- See Also:
-
EVENT_DETAILS
Contains the specific data as a json string- See Also:
-
-
Constructor Details
-
LogbookDocument
public LogbookDocument()Empty constructor -
LogbookDocument
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
- Returns:
- the ID
-
getTenantId
public final int getTenantId()- Returns:
- the TenantId
-
getVersion
public final int getVersion()- Returns:
- the version
-
toStringDirect
- Returns:
- the bypass toString
-
toString
- Overrides:
toString
in classorg.bson.Document
-