Class IsRelatedToManagement
java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<SET,TET>>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.RelationElementManagement<ResourceManagement,T,org.gcube.informationsystem.types.reference.entities.ResourceSchema,TET>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.instances.relations.RelationManagement<ResourceManagement,org.gcube.informationsystem.types.reference.entities.ResourceSchema>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.instances.relations.IsRelatedToManagement
- All Implemented Interfaces:
ERManagement
public class IsRelatedToManagement
extends RelationManagement<ResourceManagement,org.gcube.informationsystem.types.reference.entities.ResourceSchema>
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.gcube.informationsystem.model.reference.properties.PropagationConstraintThe default propagation constraint for IsRelatedTo relations.Fields inherited from class org.gcube.informationsystem.resourceregistry.persistence.orientdb.instances.relations.RelationManagement
activeOnlyHierarchical, addedToContext, contextsPolicy, defaultPropagationConstraint, forceAddToContext, hierarchical, propagationConstraint, propagationMode, removalFromTarget, skipped, sourceInstanceEnvironment, targetInstanceEnvironment, visitedFields inherited from class org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.RelationElementManagement
IN, includeSource, includeTarget, OUT, sourceEntityClass, sourceEntityManagement, targetEntityClass, targetEntityManagementFields inherited from class org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.ElementManagement
accessType, affectedInstances, AT, cachedType, complete, DELETED, DOLLAR, dryRun, element, elementClass, entryPoint, ignoredFields, ignoreKeys, ignoreStartWithKeys, jsonNode, limit, logger, maskMetadata, metadataPolicy, oClass, oDatabaseDocument, offset, operation, polymorphic, preservePassedMetadata, reload, sanityCheckDeferred, self, typeName, UNDERSCORE, updateMode, uuid, workingEnvironment -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newIsRelatedToManagementinstance with default propagation constraints. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.gcube.com.fasterxml.jackson.databind.JsonNodeAbstract method to create the complete JSON node representation of the element.protected org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentExceptiongetSpecificAlreadyPresentException(String message) Converts a generic AlreadyPresentException into a subclass-specific AlreadyPresentException.org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextExceptionReturns the subclass-specific AvailableInAnotherContextException instance.protected org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundExceptiongetSpecificNotFoundException(org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException e) Converts a generic NotFoundException into a subclass-specific NotFoundException.protected ResourceManagementCreates a new management instance for the target entity of the relation (subclass hook).protected com.orientechnologies.orient.core.record.OEdgePersists a new element in the database (subclass hook).voidPerforms runtime validation of mandatory and not-null schema constraints that cannot be enforced directly by OrientDB in distributed mode.Methods inherited from class org.gcube.informationsystem.resourceregistry.persistence.orientdb.instances.relations.RelationManagement
addToContext, checkPropagationConstraint, checksourceAndTargetEntityCompliancy, forcedAddToContext, fullSerialize, getContexts, getContextsAsObjectNode, getContextsPolicy, getContextsSet, getElement, getEntityTypeNotValidErrroMessage, getMembershipView, getPropagationConstraint, getPropagationMode, getSourceInstanceEnvironment, getTargetInstanceEnvironment, getVisited, getWorkingEnvironment, giveMeSourceEntityManagementAsIs, internalAddToContext, internalRemoveFromContext, isActiveOnlyHierarchical, isAddedToContext, isAvailableOnContext, isForceAddToContext, isHierarchical, newSourceEntityManagement, reallyAddToContext, reallyDelete, reallyGetAll, reallyRemoveFromContext, reallyUpdate, removeFromContext, serializeAsAffectedInstance, serializeJsonNodeCollectionAsString, setActiveOnlyHierarchical, setContextsPolicy, setForceAddToContext, setHierarchical, setMembershipView, setPropagationMode, setRemovalFromTarget, setSourceInstanceEnvironment, setTargetInstanceEnvironment, setVisitedMethods inherited from class org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.RelationElementManagement
carriesContent, getSourceEntityManagement, getSubmittedEndpoint, getSubmittedSourceReference, getTargetEntityManagement, includeSource, includeTarget, setSourceEntityManagement, setTargetEntityManagement, writeTargetMethods inherited from class org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.ElementManagement
addIgnoredFields, all, applyPrivacyMask, applyPrivacyMask, checkERMatch, checkJsonNode, checkUUIDMatch, checkUUIDNotAlreadyInUse, cleanCachedSerialization, concludeTransaction, create, createOrUpdate, createOrUpdateElementWithResult, delete, exists, getAccessType, getAffectedInstances, getAllProperties, getCachedType, getCurrentODatabaseDocumentFromThreadLocal, getIgnoredFields, getLimit, getMandatoryErrorMessage, getMandatoryErrorMessage, getMetadataPolicy, getOClass, getOffset, getPropertyForJson, getPropertyMap, getTypeName, getUpdateMode, getUUID, internalCreate, internalCreateOrUdate, internalDelete, internalUpdate, isDryRun, isMaskMetadata, isPolymorphic, isPreservePassedMetadata, isReload, isSanityCheckDeferred, read, requireExplicitUUID, retrieveElement, retrieveElementFromAnyContext, serializeAsEndpointReference, serializeAsJsonNode, serializeSelfAsJsonNode, setAsEntryPoint, setDryRun, setElement, setElementType, setIgnoredFields, setJson, setJsonNode, setLimit, setMaskMetadata, setMetadataPolicy, setOClass, setODatabaseDocument, setOffset, setOperation, setPolymorphic, setPreservePassedMetadata, setProperty, setReload, setRequireExplicitUUID, setSanityCheckDeferred, setUpdateMode, setUUID, setWorkingEnvironment, typeSatified, update, updatePropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gcube.informationsystem.resourceregistry.persistence.ERManagement
getAffectedInstances
-
Field Details
-
DEFAULT_IS_RELATED_TO_PC
public static final org.gcube.informationsystem.model.reference.properties.PropagationConstraint DEFAULT_IS_RELATED_TO_PCThe default propagation constraint for IsRelatedTo relations.
-
-
Constructor Details
-
IsRelatedToManagement
public IsRelatedToManagement()Creates a newIsRelatedToManagementinstance with default propagation constraints.
-
-
Method Details
-
getSpecificNotFoundException
protected org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException getSpecificNotFoundException(org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException e) Description copied from class:ElementManagementConverts a generic NotFoundException into a subclass-specific NotFoundException.- Specified by:
getSpecificNotFoundExceptionin classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<org.gcube.informationsystem.types.reference.entities.ResourceSchema, org.gcube.informationsystem.types.reference.entities.ResourceSchema>> - Parameters:
e- the generic exception- Returns:
- the specific NotFoundException
-
getSpecificAvailableInAnotherContextException
public org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException getSpecificAvailableInAnotherContextException(String message) Description copied from interface:ERManagementReturns the subclass-specific AvailableInAnotherContextException instance.- Parameters:
message- the exception message- Returns:
- the specific AvailableInAnotherContextException
-
getSpecificAlreadyPresentException
protected org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException getSpecificAlreadyPresentException(String message) Description copied from class:ElementManagementConverts a generic AlreadyPresentException into a subclass-specific AlreadyPresentException.- Specified by:
getSpecificAlreadyPresentExceptionin classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<org.gcube.informationsystem.types.reference.entities.ResourceSchema, org.gcube.informationsystem.types.reference.entities.ResourceSchema>> - Parameters:
message- the exception message- Returns:
- the specific AlreadyPresentException
-
newTargetEntityManagement
protected ResourceManagement newTargetEntityManagement() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDescription copied from class:RelationElementManagementCreates a new management instance for the target entity of the relation (subclass hook).- Specified by:
newTargetEntityManagementin classRelationElementManagement<ResourceManagement,ResourceManagement, org.gcube.informationsystem.types.reference.entities.ResourceSchema, org.gcube.informationsystem.types.reference.entities.ResourceSchema> - Returns:
- the target entity management instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- on database or lookup error
-
reallyCreate
protected com.orientechnologies.orient.core.record.OEdge reallyCreate() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDescription copied from class:ElementManagementPersists a new element in the database (subclass hook).- Overrides:
reallyCreatein classRelationManagement<ResourceManagement,org.gcube.informationsystem.types.reference.entities.ResourceSchema> - Returns:
- the persisted OrientDB vertex
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException- if the element already exists in the databaseorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- on any database error
-
createCompleteJsonNode
protected org.gcube.com.fasterxml.jackson.databind.JsonNode createCompleteJsonNode() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDescription copied from class:ElementManagementAbstract method to create the complete JSON node representation of the element.- Overrides:
createCompleteJsonNodein classRelationElementManagement<ResourceManagement,ResourceManagement, org.gcube.informationsystem.types.reference.entities.ResourceSchema, org.gcube.informationsystem.types.reference.entities.ResourceSchema> - Returns:
- the complete JSON node representing the element and its relationships
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- on serialization or mapping error
-
sanityCheck
public void sanityCheck() throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDescription copied from class:ElementManagementPerforms runtime validation of mandatory and not-null schema constraints that cannot be enforced directly by OrientDB in distributed mode.- Overrides:
sanityCheckin classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<org.gcube.informationsystem.types.reference.entities.ResourceSchema, org.gcube.informationsystem.types.reference.entities.ResourceSchema>> - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if a schema constraint is violatedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- on database lookup failure
-