Interface PartitionableObject

    • Method Detail

      • getObjectTags

        RWIterable<ObjectTag> getObjectTags()
        Get the value for ObjectTag. (Get all object tags created for this PartitionableObject)
        Specified by:
        getObjectTags in interface PartitionableObjectComp
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getEditablePartitions

        Set<Long> getEditablePartitions()
        Return the UniqueIds of all partitions to which the current user can write entities of the current type.
        Returns:
        All editable partitions.
      • createObjectTag

        ObjectTag createObjectTag​(ObjectTagDefinition objectTagDefinition)
        Create a new ObjectTag for this PartitionableObject based on given ObjectTagDefinition.
        Parameters:
        objectTagDefinition - The ObjectTagDefinition the ObjectTag is based on.
        Returns:
        Return the newly created ObjectTag
      • getObjectTagByObjectTagDefinition

        ObjectTag getObjectTagByObjectTagDefinition​(ObjectTagDefinition objectTagDefinition)
        Get the ObjectTag for given ObjectTagDefinition that is associated with this PartitionableObject. Will return the ObjectTag when present, null otherwise.
        Parameters:
        objectTagDefinition - The ObjectTagDefinition.
        Returns:
        The ObjectTag associated to the PartitionableObject if found, null otherwise.
      • getPartition

        Partition getPartition()
        Get the Partition.
        Returns:
        Partition
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setPartition

        void setPartition​(Partition newPartition)
        Set the value for Partition. This value is mandatory.
        Parameters:
        newPartition - is the object to set Partition to. The objects in this partition. If this is null, then the object cannot be persisted.