Class ChangeHistoryData

  • All Implemented Interfaces:
    IdentifiableData

    public class ChangeHistoryData
    extends BasicData
    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.

    Version:
    2.13
    Author:
    Nicklas
    See Also:
    Developer documentation: Other classes
    Last modified
    $Date: 2013-11-25 09:20:23 +0100 (må, 25 nov 2013) $
    Hibernate: class
    table="`ChangeHistory`" lazy="true" mutable="false"
    • Constructor Detail

      • ChangeHistoryData

        public ChangeHistoryData()
    • Method Detail

      • getTime

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

        public void setTime​(Date time)
      • getUserId

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

        public void setUserId​(int userId)
      • setUser

        void setUser​(UserData user)
      • getSessionId

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

        public void setSessionId​(int sessionId)
      • getClientId

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

        public void setClientId​(Integer clientId)
      • setClient

        void setClient​(ClientData client)
      • getProjectId

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

        public void setProjectId​(Integer projectId)
      • getPluginId

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

        public void setPluginId​(Integer pluginId)
      • getJobId

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

        public void setJobId​(Integer jobId)
      • setJob

        void setJob​(JobData job)