Class PersistentResourceDateReminder

    • Field Detail

      • NONEDATEREMINDER

        public static final PersistentResourceDateReminder NONEDATEREMINDER
        Represents none dateReminder to replace in more typing way the null keyword.
    • Constructor Detail

      • PersistentResourceDateReminder

        public PersistentResourceDateReminder()
    • Method Detail

      • exists

        public boolean exists()
        Indicates if the dateReminder is well registred
        Returns:
        a boolean indicating if this dateReminder exists in the data source.
      • notExists

        public boolean notExists()
        Indicates if the dateReminder isn't registered.
        Returns:
        a boolean indicating if this dateReminder doesn't exist in the data source.
      • getResource

        public <E,​R extends EntityReference<E>> R getResource​(Class<R> referenceClass)
        Gets a reference to the resource this dateReminder is for.
        Type Parameters:
        E - the concrete type of the entity.
        R - the concrete type of the reference to the entity.
        Parameters:
        referenceClass - the expected concrete class of the EntityReference. This class must be conform to the type of the resource.
        Returns:
        a reference to the resource that owns this dateReminder or null if there is neither no resource defined for this dateReminder nor no reference defined for the targeted type of resource.
      • setResource

        public void setResource​(EntityReference<?> resource)
        Sets the resource to which this dateReminder belongs.
        Parameters:
        resource - an identifier of the resource for which this dateReminder is.
      • getResourceType

        public String getResourceType()
        Get the resource type if the resource.
        Returns:
        the resource type
      • setDateReminder

        public void setDateReminder​(DateReminderDetail dateReminder)
        Sets the date, message, processStatus, creatorId and updaterId
        Parameters:
        dateReminder -
      • isDefined

        public boolean isDefined()
        Return true if resource is defined
        Returns:
        boolean