Class OMRSInstanceEvent


  • public class OMRSInstanceEvent
    extends OMRSEvent
    • Constructor Summary

      Constructors 
      Constructor Description
      OMRSInstanceEvent​(org.odpi.openmetadata.repositoryservices.events.beans.v1.OMRSEventV1 inboundEvent)
      Inbound event constructor that takes the object created by the Jackson JSON mapper and unpacks the properties into the instance event.
      OMRSInstanceEvent​(OMRSInstanceEventErrorCode errorCode, java.lang.String errorMessage, java.lang.String targetMetadataCollectionId, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary targetTypeDefSummary, java.lang.String targetInstanceGUID, java.lang.String otherMetadataCollectionId, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType otherOrigin, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary otherTypeDefSummary, java.lang.String otherInstanceGUID)
      Constructor for instance conflict events.
      OMRSInstanceEvent​(OMRSInstanceEventErrorCode errorCode, java.lang.String errorMessage, java.lang.String targetMetadataCollectionId, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary targetTypeDefSummary, java.lang.String targetInstanceGUID, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary otherTypeDefSummary)
      Instance type conflict event.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, java.lang.String typeDefGUID, java.lang.String typeDefName, java.lang.String instanceGUID)
      Constructor for instance events related to a delete or purge of an instance or a request to refresh an instance.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
      Constructor for instance events related to a change to an entity.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification originalClassification, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification classification)
      Constructor for instance events related to a change to an entity's classification.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail originalEntity, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail newEntity)
      Constructor for instance events related to a change to an entity where the old version is supplied.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entityProxy, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification originalClassification, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification classification)
      Constructor for instance events related to a change to an entity's classification.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph instances)
      Constructor for batch instance events.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
      Constructor for instance events related to a change to a relationship.
      OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship originalRelationship, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship newRelationship)
      Constructor for instance events related to a change to a relationship where the original values are also sent.
    • Constructor Detail

      • OMRSInstanceEvent

        public OMRSInstanceEvent​(org.odpi.openmetadata.repositoryservices.events.beans.v1.OMRSEventV1 inboundEvent)
        Inbound event constructor that takes the object created by the Jackson JSON mapper and unpacks the properties into the instance event.
        Parameters:
        inboundEvent - incoming event to parse.
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
        Constructor for instance events related to a change to an entity.
        Parameters:
        instanceEventType - type of event
        entity - new values for entity that changed
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entityProxy,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification originalClassification,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification classification)
        Constructor for instance events related to a change to an entity's classification.
        Parameters:
        instanceEventType - type of event
        entityProxy - entity that changed
        originalClassification - original Classification value (if existed)
        classification - new classification (if relevant)
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification originalClassification,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification classification)
        Constructor for instance events related to a change to an entity's classification.
        Parameters:
        instanceEventType - type of event
        entity - entity that changed
        originalClassification - original Classification value (if existed)
        classification - new classification (if relevant)
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail originalEntity,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail newEntity)
        Constructor for instance events related to a change to an entity where the old version is supplied.
        Parameters:
        instanceEventType - type of event
        originalEntity - original value of the entity
        newEntity - new values for entity that changed
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
        Constructor for instance events related to a change to a relationship.
        Parameters:
        instanceEventType - type of event
        relationship - new values for relationship that changed
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship originalRelationship,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship newRelationship)
        Constructor for instance events related to a change to a relationship where the original values are also sent.
        Parameters:
        instanceEventType - type of event
        originalRelationship - original values of relationship
        newRelationship - new values for relationship that changed
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 java.lang.String typeDefGUID,
                                 java.lang.String typeDefName,
                                 java.lang.String instanceGUID)
        Constructor for instance events related to a delete or purge of an instance or a request to refresh an instance.
        Parameters:
        instanceEventType - type of event
        typeDefGUID - unique identifier for this entity's TypeDef
        typeDefName - name of this entity's TypeDef
        instanceGUID - unique identifier for the entity
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventType instanceEventType,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph instances)
        Constructor for batch instance events.
        Parameters:
        instanceEventType - type of event
        instances - graph of instances
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventErrorCode errorCode,
                                 java.lang.String errorMessage,
                                 java.lang.String targetMetadataCollectionId,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary targetTypeDefSummary,
                                 java.lang.String targetInstanceGUID,
                                 java.lang.String otherMetadataCollectionId,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType otherOrigin,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary otherTypeDefSummary,
                                 java.lang.String otherInstanceGUID)
        Constructor for instance conflict events.
        Parameters:
        errorCode - error code
        errorMessage - description of the error
        targetMetadataCollectionId - metadata collection id of other repository with the conflicting instance
        targetTypeDefSummary - details of the target instance's TypeDef
        targetInstanceGUID - unique identifier for the source instance
        otherMetadataCollectionId - local metadata collection id
        otherOrigin - provenance information of the local instance
        otherTypeDefSummary - TypeDef details of the local instance
        otherInstanceGUID - GUID of the local instance
      • OMRSInstanceEvent

        public OMRSInstanceEvent​(OMRSInstanceEventErrorCode errorCode,
                                 java.lang.String errorMessage,
                                 java.lang.String targetMetadataCollectionId,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary targetTypeDefSummary,
                                 java.lang.String targetInstanceGUID,
                                 org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary otherTypeDefSummary)
        Instance type conflict event.
        Parameters:
        errorCode - error code
        errorMessage - description of the error
        targetMetadataCollectionId - metadata collection id of other repository with the conflicting instance
        targetTypeDefSummary - details of the target instance's TypeDef
        targetInstanceGUID - unique identifier for the source instance
        otherTypeDefSummary - details of the other TypeDef
    • Method Detail

      • setHomeMetadataCollectionId

        public void setHomeMetadataCollectionId​(java.lang.String homeMetadataCollectionId)
        Set up the home metadata collection Id. This is used for when a repository is requesting a refresh of an instance's details.
        Parameters:
        homeMetadataCollectionId - unique id of the metadata collection where this instance comes from.
      • setOriginalHomeMetadataCollectionId

        public void setOriginalHomeMetadataCollectionId​(java.lang.String originalHomeMetadataCollectionId)
        Set up the unique id of the metadata collection that was the original home of a metadata instance that has just been rehomed.
        Parameters:
        originalHomeMetadataCollectionId - unique id of original metadata collection
      • setOriginalTypeDefSummary

        public void setOriginalTypeDefSummary​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary originalTypeDefSummary)
        Set up the details of the original TypeDef of a metadata instance that has just been reTyped.
        Parameters:
        originalTypeDefSummary - details of original TypeDef
      • setOriginalInstanceGUID

        public void setOriginalInstanceGUID​(java.lang.String originalInstanceGUID)
        Set up the original unique id (guid) of an instance that has just been re-identified (ie it has had a new guid assigned.
        Parameters:
        originalInstanceGUID - original guid of an instance
      • getInstanceEventType

        public OMRSInstanceEventType getInstanceEventType()
        Return the code for this event's type.
        Returns:
        OMRSInstanceEventType enum
      • getTypeDefGUID

        public java.lang.String getTypeDefGUID()
        Return the unique identifier for the instance's TypeDef.
        Returns:
        String identifier (guid)
      • getTypeDefName

        public java.lang.String getTypeDefName()
        Return the unique name for the instance's TypeDef.
        Returns:
        String name
      • getInstanceGUID

        public java.lang.String getInstanceGUID()
        Return the unique identifier for the instance itself.
        Returns:
        String identifier (guid)
      • getOriginalEntity

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getOriginalEntity()
        Return the original entity instance (if applicable) or null.
        Returns:
        EntityDetail object
      • getEntity

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity()
        Return the entity instance (if applicable) or null.
        Returns:
        EntityDetail object
      • getEntityProxy

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy getEntityProxy()
        Return the entity proxy (if applicable) or null.
        Returns:
        EntityProxy object
      • getOriginalRelationship

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getOriginalRelationship()
        Return the original relationship instance (if applicable) or null.
        Returns:
        Relationship object
      • getRelationship

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship()
        Return the relationship instance (if applicable) or null.
        Returns:
        Relationship object
      • getOriginalClassification

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification getOriginalClassification()
        Return the original classification if exists
        Returns:
        classification object
      • getClassification

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification getClassification()
        Return the new classification
        Returns:
        classification object
      • getInstanceBatch

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph getInstanceBatch()
        Return the instance batch (if applicable) or null.
        Returns:
        InstanceGraph object
      • getHomeMetadataCollectionId

        public java.lang.String getHomeMetadataCollectionId()
        Return the identifier of the instance's home metadata collection. This is used on refresh requests.
        Returns:
        String unique identifier (guid)
      • getOriginalHomeMetadataCollectionId

        public java.lang.String getOriginalHomeMetadataCollectionId()
        Return the identifier of the original metadata collection for this instance. This is used when an instance is being re-homed.
        Returns:
        String unique identifier (guid)
      • getOriginalTypeDefSummary

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary getOriginalTypeDefSummary()
        Return the original version for this instance's TypeDef. This is used if the type for the instance has been changed to resolve a conflict or to allow a change in the TypeDef Gallery.
        Returns:
        details of the original TypeDef
      • getOriginalInstanceGUID

        public java.lang.String getOriginalInstanceGUID()
        Return the original unique identifier (guid) for this instance. This is used if the guid for the instance has been changed to resolve a conflict.
        Returns:
        String unique identifier (guid)
      • getErrorCode

        public OMRSInstanceEventErrorCode getErrorCode()
        Return the error code for this instance event. If there is no error it is set to NOT_IN_USE.
        Returns:
        OMRSInstanceEventErrorCode enum
      • getOMRSEventV1

        public org.odpi.openmetadata.repositoryservices.events.beans.v1.OMRSEventV1 getOMRSEventV1()
        Returns an OMRSEvent populated with details from this InstanceEvent
        Overrides:
        getOMRSEventV1 in class OMRSEvent
        Returns:
        OMRSEvent (Version 1) object
      • toString

        public java.lang.String toString()
        Standard toString method.
        Overrides:
        toString in class OMRSEvent
        Returns:
        JSON style description of variables.