Class FormRecordAccess

java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, ILockingVersionProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>

@Entity public class FormRecordAccess extends AbstractLockableEntity
Entity representing the access to a form record.

This entity is used to store information about the access granted to a form record, including the type of access, the user reference, and the access token.

See Also:
  • Field Details

  • Constructor Details

    • FormRecordAccess

      public FormRecordAccess()
  • Method Details

    • getId

      public Long getId()
    • setId

      public void setId(Long id)
      Description copied from class: AbstractEntity
      !!!WARNING: Currently values bigger Integer.MAX_VALUE or lower then Integer.MIN_VALUE will be altered to null!!!
      Specified by:
      setId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      Overrides:
      setId in class AbstractEntity
      Parameters:
      id - Long the database-id to set
    • getFormRecord

      public Vorgang getFormRecord()
    • setFormRecord

      public void setFormRecord(Vorgang formRecord)
    • getAccessGrantType

      public EFormRecordAccessGrantType getAccessGrantType()
    • setAccessGrantType

      public void setAccessGrantType(EFormRecordAccessGrantType accessGrantType)
    • getUniversalReferenceId

      public String getUniversalReferenceId()
    • setUniversalReferenceId

      public void setUniversalReferenceId(String userReferenceId)
    • getAccessGrantedAt

      public Instant getAccessGrantedAt()
    • setAccessGrantedAt

      public void setAccessGrantedAt(Instant accessGrantedAt)
    • getAccessExpireAt

      public Instant getAccessExpireAt()
    • setAccessExpireAt

      public void setAccessExpireAt(Instant accessExpireAt)
    • getUserMail

      public String getUserMail()
    • setUserMail

      public void setUserMail(String accessMail)
    • getExternalReferenceId

      public String getExternalReferenceId()
    • setExternalReferenceId

      public void setExternalReferenceId(String externalAccessId)
    • getAccessToken

      public String getAccessToken()
    • setAccessToken

      public void setAccessToken(String accessToken)
    • getAccessPassword

      public String getAccessPassword()
    • setAccessPassword

      public void setAccessPassword(String accessPassword)
    • getUserProfileUuid

      public UUID getUserProfileUuid()
    • setUserProfileUuid

      public void setUserProfileUuid(UUID uuid)
    • setUserRef

      public void setUserRef(@NotNull @NotNull IUserRef userRef)
      Sets the user reference for this access.

      This method sets the universal reference ID and the user profile UUID based on the provided user reference.

      Parameters:
      userRef - The user reference to set.
    • updateUserRef

      public boolean updateUserRef(@NotNull @NotNull IUserRef userRef)
      Updates the user reference for this access.

      This method updates the universal reference ID and the user profile UUID based on the provided user reference and only if they are not already set.

      Parameters:
      userRef - The user reference to update.
      Returns:
      true if the universal reference ID or the user profile UUID was updated, false otherwise.
    • isExpired

      public boolean isExpired()
      Checks if the access is expired.

      This method checks if the access granted until timestamp is before the current instant.

      Returns:
      true if the access is expired, false otherwise.
    • hasUserRefAccess

      public boolean hasUserRefAccess(IUserRef userRef)
      Checks if the access is granted to the given user reference.
      Parameters:
      userRef - the user reference to check
      Returns:
      true if the access is granted to the given user reference, false otherwise