public class ObjectGroup extends MetadataDocument<ObjectGroup>
Modifier and Type | Field and Description |
---|---|
static String |
COPIES
Copies
|
static String |
DATAOBJECTVERSION
DataObjectVersion
|
static String |
OBJECTCOPIES
Copies
|
static String |
OBJECTDIGEST
Digest
|
static String |
OBJECTDIGEST_TYPE
Digest Type
|
static String |
OBJECTDIGEST_VALUE
Digest Value
|
static String |
OBJECTFORMAT
Object format
|
static com.mongodb.BasicDBObject |
OBJECTGROUP_VITAM_PROJECTION
Unit Id, Vitam fields Only projection (no usage)
|
static String |
OBJECTID
Object UUID
|
static String |
OBJECTSIZE
Object size
|
static String |
OBJECTSTORAGE
Storage Id
|
static String |
OBJECTSTRATEHY
Storage Id
|
static String |
OBJECTVERSION
Version
|
static String |
OGDEPTHS
depths
|
static String |
STORAGE
Storage Id
|
static String |
USAGES
Usages
|
static String |
VERSIONS
Versions
|
static String |
VERSIONS_STORAGE
storage to objectGroup
|
ES_PROJECTION, NBCHILD, OG, OPI, OPS, ORIGINATING_AGENCIES, ORIGINATING_AGENCY, QUALIFIERS, TYPE, UNUSED, UP
ES_FILTER_OUT, ID, SCORE, TENANT_ID, VERSION
Constructor and Description |
---|
ObjectGroup()
Empty constructor
|
ObjectGroup(org.bson.Document content)
Constructor from Document
|
ObjectGroup(com.fasterxml.jackson.databind.JsonNode content)
Constructor from Json
|
ObjectGroup(String content)
Constructor from Json as Text
|
Modifier and Type | Method and Description |
---|---|
protected static void |
addIndexes() |
void |
cleanStructure(boolean all)
Used in loop operation to clean the object
|
protected static void |
dropIndexes() |
ObjectGroup |
getAfterLoad()
To be called after any automatic load or loadFromJson to update HashMap values.
|
protected com.mongodb.client.MongoCollection<ObjectGroup> |
getCollection() |
List<String> |
getFathersUnitIds(boolean remove) |
static int |
getGUIDObjectTypeId() |
protected MetadataCollections |
getMetadataCollections() |
boolean |
isImmediateParent(String unit)
Check if the current ObjectGroup has Unit as immediate parent
|
boolean |
load()
load the object from the database, ignoring any previous data, except ID
|
MetadataDocument<ObjectGroup> |
newInstance(com.fasterxml.jackson.databind.JsonNode content)
Make a new instance of the document with the given json
|
String |
newObjectGuid() |
ObjectGroup |
putBeforeSave()
To be called before any collection.insert() or update if HashMap values is changed.
|
ObjectGroup |
save()
Save the object.
|
protected boolean |
updated()
try to update the object if necessary (difference from the current value in the database)
|
checkId, delete, getDomainId, getId, insert, load, toStringDebug, toStringDirect, update
getConcernedDiffLines, getTenantId, getUnifiedDiff, getVersion, toString
append, clear, containsKey, containsValue, entrySet, equals, get, get, getBoolean, getBoolean, getDate, getDouble, getInteger, getInteger, getLong, getObjectId, getString, hashCode, isEmpty, keySet, parse, parse, put, putAll, remove, size, toBsonDocument, toJson, toJson, toJson, toJson, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public static final String USAGES
public static final String STORAGE
public static final com.mongodb.BasicDBObject OBJECTGROUP_VITAM_PROJECTION
public static final String VERSIONS
public static final String DATAOBJECTVERSION
public static final String VERSIONS_STORAGE
public static final String OBJECTCOPIES
public static final String OBJECTSTORAGE
public static final String OBJECTSTRATEHY
public static final String OBJECTVERSION
public static final String OBJECTID
public static final String OBJECTSIZE
public static final String OBJECTFORMAT
public static final String OBJECTDIGEST
public static final String OBJECTDIGEST_VALUE
public static final String OBJECTDIGEST_TYPE
public static final String COPIES
public static final String OGDEPTHS
public ObjectGroup()
public ObjectGroup(com.fasterxml.jackson.databind.JsonNode content)
content
- the objectgroup of JsonNode formatpublic ObjectGroup(org.bson.Document content)
content
- the objectgroup of Document formatpublic ObjectGroup(String content)
content
- the objectgroup of String formatpublic static final int getGUIDObjectTypeId()
protected MetadataCollections getMetadataCollections()
getMetadataCollections
in class MetadataDocument<ObjectGroup>
protected com.mongodb.client.MongoCollection<ObjectGroup> getCollection()
getCollection
in class MetadataDocument<ObjectGroup>
public MetadataDocument<ObjectGroup> newInstance(com.fasterxml.jackson.databind.JsonNode content)
VitamDocument
newInstance
in class VitamDocument<ObjectGroup>
content
- document structure as jsonpublic String newObjectGuid()
public ObjectGroup save() throws MetaDataExecutionException
MetadataDocument
save
in class MetadataDocument<ObjectGroup>
MetaDataExecutionException
- if an exception on insert/update operations occurredprotected boolean updated() throws MetaDataExecutionException
MetadataDocument
updated
in class MetadataDocument<ObjectGroup>
MetaDataExecutionException
public boolean load()
MetadataDocument
load
in class MetadataDocument<ObjectGroup>
public ObjectGroup getAfterLoad()
MetadataDocument
getAfterLoad
in class MetadataDocument<ObjectGroup>
public ObjectGroup putBeforeSave()
MetadataDocument
putBeforeSave
in class MetadataDocument<ObjectGroup>
public List<String> getFathersUnitIds(boolean remove)
remove
- if remove the link unit/objectgrouppublic final void cleanStructure(boolean all)
all
- If true, all items are cleanedpublic boolean isImmediateParent(String unit)
unit
- the unit could be immediate parent of objectgroupprotected static void addIndexes()
protected static void dropIndexes()
Copyright © 2018 Vitam. All rights reserved.