Package net.sf.basedb.core.data
Class ChangeHistoryDetailData
- java.lang.Object
-
- net.sf.basedb.core.data.BasicData
-
- net.sf.basedb.core.data.ChangeHistoryDetailData
-
- All Implemented Interfaces:
IdentifiableData
public class ChangeHistoryDetailData extends BasicData
Represents a change (creation/update/deletion) made to a single entity in a transaction. Changes to multiple entities in a single transactions are grouped with a common reference to aChangeHistoryData
object.- Version:
- 2.13
- Author:
- Nicklas
- See Also:
- Developer documentation: Other classes
- Last modified
- $Date: 2016-08-23 13:23:00 +0200 (ti, 23 aug 2016) $
- Hibernate: class
- table="`ChangeHistoryDetails`" lazy="false" mutable="false"
-
-
Field Summary
Fields Modifier and Type Field Description private String
changeInfo
private int
changeType
private ChangeHistoryData
history
private int
itemId
private int
itemType
static int
MAX_CHANGE_INFO_LENGTH
static int
MAX_NEW_VALUE_LENGTH
static int
MAX_OLD_VALUE_LENGTH
private String
newValue
private String
oldValue
-
Constructor Summary
Constructors Constructor Description ChangeHistoryDetailData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangeHistoryData
getChangeHistory()
Get the main history entry the details belong to.String
getChangeInfo()
Get more information about this change.int
getChangeType()
The type of the change: 1 = create, 2 = update, 3 = deleteint
getItemId()
The ID of the item that was changedint
getItemType()
The type code of the item that was changed.String
getNewValue()
Get the new value after the change.String
getOldValue()
Get the previous value before the change.void
setChangeHistory(ChangeHistoryData history)
void
setChangeInfo(String changeInfo)
void
setChangeType(int changeType)
void
setItemId(int itemId)
void
setItemType(int itemType)
void
setNewValue(String newValue)
void
setOldValue(String oldValue)
-
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
-
-
-
-
Field Detail
-
history
private ChangeHistoryData history
-
changeType
private int changeType
-
itemId
private int itemId
-
itemType
private int itemType
-
MAX_CHANGE_INFO_LENGTH
public static final int MAX_CHANGE_INFO_LENGTH
- See Also:
- Constant Field Values
-
changeInfo
private String changeInfo
-
MAX_OLD_VALUE_LENGTH
public static final int MAX_OLD_VALUE_LENGTH
- See Also:
- Constant Field Values
-
oldValue
private String oldValue
-
MAX_NEW_VALUE_LENGTH
public static final int MAX_NEW_VALUE_LENGTH
- See Also:
- Constant Field Values
-
newValue
private String newValue
-
-
Method Detail
-
getChangeHistory
public ChangeHistoryData getChangeHistory()
Get the main history entry the details belong to.- Hibernate: many-to-one
- column="`history_id`" not-null="true" outer-join="false" update="false"
-
setChangeHistory
public void setChangeHistory(ChangeHistoryData history)
-
getChangeType
public int getChangeType()
The type of the change: 1 = create, 2 = update, 3 = delete- Hibernate: property
- type="int"
- Hibernate: column
- name="`change_type`" not-null="true"
-
setChangeType
public void setChangeType(int changeType)
-
getItemId
public int getItemId()
The ID of the item that was changed- Hibernate: property
- type="int"
- Hibernate: column
- name="`item_id`" not-null="true" index="itemindex"
-
setItemId
public void setItemId(int itemId)
-
getItemType
public int getItemType()
The type code of the item that was changed.- Hibernate: property
- type="int"
- Hibernate: column
- name="`item_type`" not-null="true" index="itemindex"
-
setItemType
public void setItemType(int itemType)
-
getChangeInfo
public String getChangeInfo()
Get more information about this change.- Hibernate: property
- column="`change_info`" type="text" not-null="false"
-
setChangeInfo
public void setChangeInfo(String changeInfo)
-
getOldValue
@PropertyPathProtected public String getOldValue()
Get the previous value before the change.- Since:
- 3.3
- Hibernate: property
- column="`old_value`" type="text" not-null="false"
-
setOldValue
public void setOldValue(String oldValue)
-
getNewValue
@PropertyPathProtected public String getNewValue()
Get the new value after the change.- Hibernate: property
- column="`new_value`" type="text" not-null="false"
-
setNewValue
public void setNewValue(String newValue)
-
-