Class ViewLog


  • public class ViewLog
    extends HibernateObject
    Represents a log entry that records when a user views a particular entity in the system. This class is used to track viewing actions by storing the type of entity, its identifier, the user who viewed it, and the timestamp of the view. It also provides static methods to add a new view log entry and to verify if an entity has been viewed.
    • Constructor Detail

      • ViewLog

        public ViewLog()
    • Method Detail

      • getType

        public java.lang.String getType()
      • setType

        public void setType​(java.lang.String type)
      • getTypeId

        public java.lang.Integer getTypeId()
      • setTypeId

        public void setTypeId​(java.lang.Integer typeId)
      • getViewedBy

        public User getViewedBy()
      • setViewedBy

        public void setViewedBy​(User viewedBy)
      • getViewedAt

        public java.util.Date getViewedAt()
      • setViewedAt

        public void setViewedAt​(java.util.Date viewedAt)
      • addViewLogEntry

        public static void addViewLogEntry​(java.lang.String type,
                                           java.lang.Integer id,
                                           User activeUser)
      • isViewed

        public static boolean isViewed​(java.lang.String type,
                                       java.lang.Integer typeId,
                                       User user,
                                       boolean showError,
                                       java.util.Date afterCreatedDate)