Interface Event

  • All Superinterfaces:
    BusinessKeyObject, Detail, EventComp, SchedulerEntity, SchedulerEntityComp

    public interface Event
    extends EventComp, Detail, BusinessKeyObject
    An event is a particular instance of an EventDefinition. At most one event per EventDefinition will be raised at any point in time. There may be a list of events that Pending, the most recent of these will be raised when the currently raised Event is Cleared. There may also be a list of Events that have already been cleared, if appropriately configured these will be automatically deleted after a set period of time.
    • Method Detail

      • getClearTime

        DateTimeZone getClearTime()
        Get the value for ClearTime. (Timestamp that notes when this Event was cleared.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getCreationTime

        DateTimeZone getCreationTime()
        Get the value for CreationTime. (Timestamp that notes when the Event was raised.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getLastModificationTime

        DateTimeZone getLastModificationTime()
        Get the value for LastModificationTime. (Timestamp that notes when the Event was raised.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRaiseTime

        DateTimeZone getRaiseTime()
        Get the value for RaiseTime. (Timestamp that notes when the EventDefinition was raised because of this Event.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isRaisedByJob

        boolean isRaisedByJob()
        Get the value for RaisedByJob. (Was this Event raised by a JobRaiseEvent, or directly from a Job? Even if this returns true, the RaiserJob might still be null if the Job has since been deleted.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRaisedSequence

        Long getRaisedSequence()
        Get the value for RaisedSequence. (Unique id for this event generated when it was raised. This is only guaranteed to be unique for this event, that is, if two EventDefinitions are raised, they may have the same RaisedSequence, however, if the same EventDefinition is raised twice, then each raise is guaranteed to generate an unique RaisedSequence.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRaiserComment

        String getRaiserComment()
        Get the value for RaiserComment. (Comment made by the raiser when it raised this event.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRaiserObject

        SchedulerEntity getRaiserObject()
        Get the value for RaiserObject. (The object that raised this event. If the event was raised manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getClearerComment

        String getClearerComment()
        Get the value for ClearerComment. (Comment made by the clearer when it cleared this event.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getClearerObject

        SchedulerEntity getClearerObject()
        Get the value for ClearerObject. (The object that cleared this event. If the event was cleared manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStatus

        EventStatus getStatus()
        Get the value for Status. (In which part of its lifecycle is this Event?) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setRaiserComment

        void setRaiserComment​(String newRaiserComment)
        Set the value for RaiserComment. (Comment made by the raiser when it raised this event.) This value is optional.
        Parameters:
        newRaiserComment - the new value for RaiserComment.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setRaiserObject

        void setRaiserObject​(SchedulerEntity newRaiserObject)
        Set the value for RaiserObject. (The object that raised this event. If the event was raised manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory.
        Parameters:
        newRaiserObject - the new value for RaiserObject. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setClearerComment

        void setClearerComment​(String newClearerComment)
        Set the value for ClearerComment. (Comment made by the clearer when it cleared this event.) This value is optional.
        Parameters:
        newClearerComment - the new value for ClearerComment.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setClearerObject

        void setClearerObject​(SchedulerEntity newClearerObject)
        Set the value for ClearerObject. (The object that cleared this event. If the event was cleared manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory.
        Parameters:
        newClearerObject - the new value for ClearerObject. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • clear

        void clear()
        Clear the currently raised Event for this EventDefinition. This method will not do anything if there is no currently raised event. The session needs to be persisted before the Event will be cleared in the database.
      • getLastModifierSubject

        Subject getLastModifierSubject()
        Get the LastModifierSubject.
        Returns:
        LastModifierSubject
        Throws:
        ObjectDeletedException - If this method is called when the object has been marked for deletion.
        ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setClearerObjectDefinition

        void setClearerObjectDefinition​(ObjectDefinition newClearerObjectDefinition)
        Set the value for ClearerObjectDefinition. This value is optional.
        Parameters:
        newClearerObjectDefinition - is the object to set ClearerObjectDefinition to. What type of object cleared this event?
      • setRaiserObjectDefinition

        void setRaiserObjectDefinition​(ObjectDefinition newRaiserObjectDefinition)
        Set the value for RaiserObjectDefinition. This value is optional.
        Parameters:
        newRaiserObjectDefinition - is the object to set RaiserObjectDefinition to. What type of object raised this event?
      • getFileEvents

        RWIterable<FileEvent> getFileEvents()
        Get an RWIterable over an ordered collection of FileEvents. If the collection is empty, an empty iterator will be returned, that is, this method will never return null. Information about the EventSourceDefinition (if any) that triggered this event.
        Specified by:
        getFileEvents in interface EventComp
        Returns:
        An RWIterable over an ordered collection of FileEvent objects .
      • getJobWaitEvents

        RWIterable<JobWaitEvent> getJobWaitEvents()
        Get an RWIterable over an ordered collection of JobWaitEvents. If the collection is empty, an empty iterator will be returned, that is, this method will never return null. If this is set, then the associated Job no longer needs to wait on its associated EventDefinition.
        Specified by:
        getJobWaitEvents in interface EventComp
        Returns:
        An RWIterable over an ordered collection of JobWaitEvent objects .