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:
java.io.Serializable,java.util.Map<java.lang.String,java.lang.Object>,org.bson.conversions.Bson
public abstract class LogbookDocument<E> extends org.bson.DocumentLogbook Document MongoDb implementation- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEVENT_DETAILSContains the specific data as a json stringstatic java.lang.StringEVENTSContains the series of entries within the very same Logbook operation (1 operation) / Lifecycle (all)static java.lang.StringIDID of each line: different for each sub typestatic java.lang.StringLAST_PERSISTED_DATELast persistence date of the logbook document (timestamp of document storage in DB)static java.lang.StringTENANT_IDTenantIdstatic java.lang.StringVERSIONVersion of the document: Incresed for each update
-
Constructor Summary
Constructors Constructor Description LogbookDocument()Empty constructorLogbookDocument(java.lang.String content)Constructor from JsonLogbookDocument(org.bson.Document content)Constructor from Document
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetId()intgetTenantId()intgetVersion()java.lang.StringtoString()java.lang.StringtoStringDirect()-
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
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
ID of each line: different for each sub type- See Also:
- Constant Field Values
-
TENANT_ID
public static final java.lang.String TENANT_ID
TenantId- See Also:
- Constant Field Values
-
VERSION
public static final java.lang.String VERSION
Version of the document: Incresed for each update- See Also:
- Constant Field Values
-
LAST_PERSISTED_DATE
public static final java.lang.String LAST_PERSISTED_DATE
Last persistence date of the logbook document (timestamp of document storage in DB)- See Also:
- Constant Field Values
-
EVENTS
public static final java.lang.String EVENTS
Contains the series of entries within the very same Logbook operation (1 operation) / Lifecycle (all)- See Also:
- Constant Field Values
-
EVENT_DETAILS
public static final java.lang.String EVENT_DETAILS
Contains the specific data as a json string- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogbookDocument
public LogbookDocument()
Empty constructor
-
LogbookDocument
public LogbookDocument(java.lang.String content)
Constructor from Json- Parameters:
content- in format String- Throws:
java.lang.IllegalArgumentException- if Id is not a GUID
-
LogbookDocument
public LogbookDocument(org.bson.Document content)
Constructor from Document- Parameters:
content- in format Document- Throws:
java.lang.IllegalArgumentException- if Id is not a GUID
-
-
Method Detail
-
getId
public abstract java.lang.String getId()
- Returns:
- the ID
-
getTenantId
public final int getTenantId()
- Returns:
- the TenantId
-
getVersion
public final int getVersion()
- Returns:
- the version
-
toStringDirect
public java.lang.String toStringDirect()
- Returns:
- the bypass toString
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.bson.Document
-
-