Class ChangeHistoryData
- All Implemented Interfaces:
IdentifiableData
public class ChangeHistoryData extends BasicData
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: 2021-05-07 13:30:22 +0200 (Fri, 07 May 2021) $
- Hibernate: class
- table="`ChangeHistory`" lazy="true" mutable="false"
-
Field Summary
Fields Modifier and Type Field Description private ClientData
client
private Integer
clientId
private Set<ChangeHistoryDetailData>
details
private JobData
job
private Integer
jobId
private String
name
private PluginDefinitionData
plugin
private Integer
pluginId
private ProjectData
project
private Integer
projectId
private SessionData
session
private int
sessionId
private Date
time
private UserData
user
private int
userId
-
Constructor Summary
Constructors Constructor Description ChangeHistoryData()
-
Method Summary
Modifier and Type Method Description (package private) ClientData
getClient()
Integer
getClientId()
The ID of the client application the user used to make the change.(package private) Set<ChangeHistoryDetailData>
getDetails()
This is the inverse end.(package private) JobData
getJob()
Integer
getJobId()
The ID of the job that was making the changes.String
getName()
Get the name of the transaction.(package private) PluginDefinitionData
getPlugin()
Integer
getPluginId()
The ID of the plug-in that was making the changes.(package private) ProjectData
getProject()
Integer
getProjectId()
The ID of the project that was active when the changes were made.(package private) SessionData
getSession()
int
getSessionId()
The ID of the session in which the changes happened.Date
getTime()
Get the time of the change.(package private) UserData
getUser()
int
getUserId()
The ID of the user that made the change.(package private) void
setClient(ClientData client)
void
setClientId(Integer clientId)
(package private) void
setDetails(Set<ChangeHistoryDetailData> details)
(package private) void
setJob(JobData job)
void
setJobId(Integer jobId)
void
setName(String name)
(package private) void
setPlugin(PluginDefinitionData plugin)
void
setPluginId(Integer pluginId)
(package private) void
setProject(ProjectData project)
void
setProjectId(Integer projectId)
(package private) void
setSession(SessionData session)
void
setSessionId(int sessionId)
void
setTime(Date time)
(package private) void
setUser(UserData user)
void
setUserId(int userId)
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
-
Field Details
-
time
-
name
-
userId
private int userId -
user
-
sessionId
private int sessionId -
session
-
clientId
-
client
-
projectId
-
project
-
pluginId
-
plugin
-
jobId
-
job
-
details
-
-
Constructor Details
-
ChangeHistoryData
public ChangeHistoryData()
-
-
Method Details
-
getTime
Get the time of the change.- Returns:
- A
Date
object - Hibernate: property
- column="`time`" type="timestamp" not-null="true"
-
setTime
-
getName
Get the name of the transaction.- Returns:
- A
String
with the name of the transaction - Since:
- 3.19
- Hibernate: property
- type="string"
- Hibernate: column
- name="`name`" length="255" not-null="true" index="name_idx"
-
setName
-
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) -
getUser
UserData getUser() -
setUser
-
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) -
getSession
SessionData getSession() -
setSession
-
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
-
getClient
ClientData getClient() -
setClient
-
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
-
getProject
ProjectData getProject() -
setProject
-
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
-
getPlugin
PluginDefinitionData getPlugin() -
setPlugin
-
getJobId
The ID of the job that was making the changes.- Hibernate: property
- type="int"
- Hibernate: column
- name="`job_id`" not-null="false"
-
setJobId
-
getJob
JobData getJob() -
setJob
-
getDetails
Set<ChangeHistoryDetailData> getDetails()This is the inverse end.- See Also:
ChangeHistoryDetailData.getChangeHistory()
- Hibernate: set
- lazy="true" inverse="true" cascade="delete"
- Hibernate: collection-key
- column="`history_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.ChangeHistoryDetailData"
-
setDetails
-