Class ChangeHistoryData

All Implemented Interfaces:
IdentifiableData, NoAutoUnlinkAnyToAny

public class ChangeHistoryData
extends BasicData
implements NoAutoUnlinkAnyToAny
Represents the changes made in a single transaction. This entity records information about the time, user, active project, used plug-in, etc. Changes made to entities in the transaction are recorded with ChangeHistoryDetailData objects.

NOTE! All references to other items are controlled by regular integer values because we don't want foreign keys from the log tables to block deletion of items. A duplicate mapping using many-to-one with a formula attribute is used since we really need the LEFT JOIN functionality in the web interface and the association is also useful for data export which uses metadata to access the properties. The formula mapping is not supported by XDoclet so we have to do this in the hibernate-properties.ChangeHistoryData.xml file.

Missing items are handled by the core layer at runtime. References in the log to missing items may optionally be deleted by a cleanup thread from time to time.

See Also:
Developer documentation: Other classes
Last modified
$Date: 2023-11-21 10:31:51 +0100 (Tue, 21 Nov 2023) $
Hibernate: class
table="`ChangeHistory`" lazy="true" mutable="false"
  • Field Details

  • Constructor Details

    • ChangeHistoryData

      public ChangeHistoryData()
  • Method Details

    • getTime

      public Date getTime()
      Get the time of the change.
      A Date object
      Hibernate: property
      column="`time`" type="timestamp" not-null="true"
    • setTime

      public void setTime​(Date time)
    • getName

      public String getName()
      Get the name of the transaction.
      A String with the name of the transaction
      Hibernate: property
      Hibernate: column
      name="`name`" length="255" not-null="true" index="name_idx"
    • setName

      public void setName​(String name)
    • getUserId

      public int getUserId()
      The ID of the user that made the change.
      Hibernate: property
      Hibernate: column
      name="`user_id`" not-null="true"
    • setUserId

      public void setUserId​(int userId)
    • getUser

      UserData getUser()
    • setUser

      void setUser​(UserData user)
    • getSessionId

      public int getSessionId()
      The ID of the session in which the changes happened.
      Hibernate: property
      Hibernate: column
      name="`session_id`" not-null="true"
    • setSessionId

      public void setSessionId​(int sessionId)
    • getSession

      SessionData getSession()
    • setSession

      void setSession​(SessionData session)
    • getClientId

      public Integer getClientId()
      The ID of the client application the user used to make the change.
      Hibernate: property
      Hibernate: column
      name="`client_id`" not-null="false"
    • setClientId

      public void setClientId​(Integer clientId)
    • getClient

      ClientData getClient()
    • setClient

      void setClient​(ClientData client)
    • getProjectId

      public Integer getProjectId()
      The ID of the project that was active when the changes were made.
      Hibernate: property
      Hibernate: column
      name="`project_id`" not-null="false"
    • setProjectId

      public void setProjectId​(Integer projectId)
    • getProject

      ProjectData getProject()
    • setProject

      void setProject​(ProjectData project)
    • getPluginId

      public Integer getPluginId()
      The ID of the plug-in that was making the changes.
      Hibernate: property
      Hibernate: column
      name="`plugin_id`" not-null="false"
    • setPluginId

      public void setPluginId​(Integer pluginId)
    • getPlugin

    • setPlugin

      void setPlugin​(PluginDefinitionData plugin)
    • getJobId

      public Integer getJobId()
      The ID of the job that was making the changes.
      Hibernate: property
      Hibernate: column
      name="`job_id`" not-null="false"
    • setJobId

      public void setJobId​(Integer jobId)
    • getJob

      JobData getJob()
    • setJob

      void setJob​(JobData job)
    • getDetails

      This is the inverse end.
      See Also:
      Hibernate: set
      lazy="true" inverse="true" cascade="delete"
      Hibernate: collection-key
      Hibernate: collection-one-to-many
    • setDetails

      void setDetails​(Set<ChangeHistoryDetailData> details)