public class ChangeLogEntry extends GrouperAPI
represents a user change log record. This is a change to a record in the DB (insert/update/delete). note: if this object is headed for the temp table, then the getters in the composite key will not be null, will be empty. this is a hibernate constraint
Modifier and Type | Field and Description |
---|---|
static String |
CHANGE_LOG_ENTRY_ENTITY_NAME
entity name for change log
|
static String |
CHANGE_LOG_ENTRY_TEMP_ENTITY_NAME
entity name for change log temp
|
static String |
COLUMN_CHANGE_LOG_TYPE_ID
column
|
static String |
COLUMN_CONTEXT_ID
column
|
static String |
COLUMN_CREATED_ON
column
|
static String |
COLUMN_ID
column
|
static String |
COLUMN_SEQUENCE_NUMBER
column
|
static String |
COLUMN_STRING01
column
|
static String |
COLUMN_STRING02
column
|
static String |
COLUMN_STRING03
column
|
static String |
COLUMN_STRING04
column
|
static String |
COLUMN_STRING05
column
|
static String |
COLUMN_STRING06
column
|
static String |
COLUMN_STRING07
column
|
static String |
COLUMN_STRING08
column
|
static String |
COLUMN_STRING09
column
|
static String |
COLUMN_STRING10
column
|
static String |
COLUMN_STRING11
column
|
static String |
COLUMN_STRING12
column
|
static String |
FIELD_CHANGE_LOG_TYPE_ID
constant for field name for: changeLogTypeId
|
static String |
FIELD_CONTEXT_ID
constant for field name for: contextId
|
static String |
FIELD_CREATED_ON_DB
constant for field name for: createdOnDb
|
static String |
FIELD_ID
constant for field name for: id
|
static String |
FIELD_STRING01
constant for field name for: string01
|
static String |
FIELD_STRING02
constant for field name for: string02
|
static String |
FIELD_STRING03
constant for field name for: string03
|
static String |
FIELD_STRING04
constant for field name for: string04
|
static String |
FIELD_STRING05
constant for field name for: string05
|
static String |
FIELD_STRING06
constant for field name for: string06
|
static String |
FIELD_STRING07
constant for field name for: string07
|
static String |
FIELD_STRING08
constant for field name for: string08
|
static String |
FIELD_STRING09
constant for field name for: string09
|
static String |
FIELD_STRING10
constant for field name for: string10
|
static String |
FIELD_STRING11
constant for field name for: string11
|
static String |
FIELD_STRING12
constant for field name for: string12
|
static String |
TABLE_GROUPER_CHANGE_LOG_ENTRY
name of the grouper changeLog entry table in the db
|
static String |
TABLE_GROUPER_CHANGE_LOG_ENTRY_TEMP
name of the grouper changeLog entry temp table in the db, where records go first before being moved to the real table
|
COLUMN_HIBERNATE_VERSION_NUMBER, dbVersion, FIELD_DB_VERSION, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
Constructor and Description |
---|
ChangeLogEntry()
construct
|
ChangeLogEntry(boolean tempObject1,
ChangeLogTypeIdentifier changeLogTypeIdentifier,
String... labelNamesAndValues)
construct, assign an id
|
Modifier and Type | Method and Description |
---|---|
void |
assignStringValue(ChangeLogType changeLogType,
String label,
String value) |
GrouperAPI |
clone()
deep clone the fields in this object
|
void |
delete()
delete the change log entry from either the temp table or the entity table
|
boolean |
equals(Object obj) |
boolean |
equalsCategoryAndAction(ChangeLogTypeIdentifier changeLogTypeIdentifier)
see if this identifier matches the change log type by category and action
|
ChangeLogType |
getChangeLogType()
get the changeLog type, it better be there
|
String |
getChangeLogTypeId()
foreign key to the type of changeLog entry this is
|
String |
getContextId()
context id ties multiple db changes
|
Timestamp |
getCreatedOn()
when created
|
Long |
getCreatedOnDb()
when created, microseconds since 1970
|
String |
getId()
uuid for temp object
|
Long |
getSequenceNumber()
optional sequence for ordering
|
String |
getString01()
misc field 1
|
String |
getString02()
misc field 2
|
String |
getString03()
misc field 3
|
String |
getString04()
misc field 4
|
String |
getString05()
misc field 5
|
String |
getString06()
misc field 6
|
String |
getString07()
misc field 7
|
String |
getString08()
misc field 8
|
String |
getString09() |
String |
getString10()
get string 10
|
String |
getString11() |
String |
getString12()
get string 12
|
int |
hashCode() |
boolean |
isTempObject()
if this is a temp object, destined for the temp table
|
static Long |
maxSequenceNumber(boolean considerConsumers)
max sequence number in DB
|
void |
onPreSave(HibernateSession hibernateSession)
before a save (insert) occurs
|
void |
onPreUpdate(HibernateSession hibernateSession)
before an update occurs
|
String |
retrieveValueForLabel(ChangeLogLabel changeLogLabel)
reutrn the value based on friendly label.
|
String |
retrieveValueForLabel(String label)
reutrn the value based on friendly label.
|
void |
save()
save this object (insert) to the temp table if configured to do so, and set context id and other things
save (insert) this object
|
static void |
saveTempUpdates(ChangeLogTypeIdentifier changeLogTypeIdentifier,
Object theObject,
Object dbVersion,
List<String> labelNamesAndValues,
List<String> objectPropertyNames,
List<String> changeLogPropertyNames) |
void |
setChangeLogTypeId(String changeLogTypeId1)
foreign key to the type of changeLog entry this is
|
void |
setContextId(String contextId1)
context id ties multiple db changes
|
void |
setCreatedOn(Timestamp createdOn1)
when created
|
void |
setCreatedOnDb(Long createdOn1)
when created, microseconds since 1970
|
void |
setId(String id)
set uuid for temp object
|
void |
setSequenceNumber(Long sequenceNumber1)
optional sequence for ordering
|
void |
setString01(String string01a)
misc field 1
|
void |
setString02(String string02a)
misc field 2
|
void |
setString03(String string03a)
misc field 3
|
void |
setString04(String string04a)
misc field 4
|
void |
setString05(String string05a)
misc field 5
|
void |
setString06(String string06a)
misc field 6
|
void |
setString07(String string07a)
misc field 7
|
void |
setString08(String string08a)
misc field 8
|
void |
setString09(String theString09)
set the string 09
|
void |
setString10(String theString10)
set string 10
|
void |
setString11(String _string11)
set string 11
|
void |
setString12(String _string12)
set string 12
|
void |
setTempObject(boolean tempObject1)
if this is a temp object headed for the temp table
|
String |
toStringDeep()
the string repre
|
String |
toStringReport(boolean extended) |
void |
truncate()
make sure this object will fit in the DB
|
void |
update()
update this object to the temp or entity table if configured to do so, and set context id and other things
save (insert) this object
|
dbVersion, dbVersionClear, dbVersionDifferentFields, dbVersionIsDifferent, dbVersionReset, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onSave, onUpdate, setHibernateVersionNumber
public static final String COLUMN_ID
public static final String COLUMN_CHANGE_LOG_TYPE_ID
public static final String COLUMN_CONTEXT_ID
public static final String COLUMN_CREATED_ON
public static final String COLUMN_STRING01
public static final String COLUMN_STRING02
public static final String COLUMN_STRING03
public static final String COLUMN_STRING04
public static final String COLUMN_STRING05
public static final String COLUMN_STRING06
public static final String COLUMN_STRING07
public static final String COLUMN_STRING08
public static final String COLUMN_STRING09
public static final String COLUMN_STRING10
public static final String COLUMN_STRING11
public static final String COLUMN_STRING12
public static final String COLUMN_SEQUENCE_NUMBER
public static final String CHANGE_LOG_ENTRY_TEMP_ENTITY_NAME
public static final String CHANGE_LOG_ENTRY_ENTITY_NAME
public static final String FIELD_CHANGE_LOG_TYPE_ID
public static final String FIELD_ID
public static final String FIELD_CONTEXT_ID
public static final String FIELD_CREATED_ON_DB
public static final String FIELD_STRING01
public static final String FIELD_STRING02
public static final String FIELD_STRING03
public static final String FIELD_STRING04
public static final String FIELD_STRING05
public static final String FIELD_STRING06
public static final String FIELD_STRING07
public static final String FIELD_STRING08
public static final String FIELD_STRING09
public static final String FIELD_STRING10
public static final String FIELD_STRING11
public static final String FIELD_STRING12
public static final String TABLE_GROUPER_CHANGE_LOG_ENTRY
public static final String TABLE_GROUPER_CHANGE_LOG_ENTRY_TEMP
public ChangeLogEntry()
public ChangeLogEntry(boolean tempObject1, ChangeLogTypeIdentifier changeLogTypeIdentifier, String... labelNamesAndValues)
tempObject1
- if this is a temp object, or a normal change log entrychangeLogTypeIdentifier
- points to changeLog typelabelNamesAndValues
- alternate label name and valuepublic static void saveTempUpdates(ChangeLogTypeIdentifier changeLogTypeIdentifier, Object theObject, Object dbVersion, List<String> labelNamesAndValues, List<String> objectPropertyNames, List<String> changeLogPropertyNames)
changeLogTypeIdentifier
- theObject
- dbVersion
- labelNamesAndValues
- objectPropertyNames
- changeLogPropertyNames
- public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public ChangeLogType getChangeLogType()
public String toStringReport(boolean extended)
extended
- if all fields should be printedpublic void save()
public void update()
public void delete()
public String retrieveValueForLabel(ChangeLogLabel changeLogLabel)
changeLogLabel
- is probably from ChangeLogLabels constantspublic String retrieveValueForLabel(String label)
label
- public void assignStringValue(ChangeLogType changeLogType, String label, String value)
changeLogType
- label
- value
- public Long getSequenceNumber()
public void setSequenceNumber(Long sequenceNumber1)
sequenceNumber1
- public String getId()
public void setId(String id)
id
- public String getChangeLogTypeId()
public void setChangeLogTypeId(String changeLogTypeId1)
changeLogTypeId1
- public String getContextId()
public void setContextId(String contextId1)
contextId1
- public String getString01()
public void setString01(String string01a)
string01a
- public String getString02()
public void setString02(String string02a)
string02a
- public String getString03()
public void setString03(String string03a)
string03a
- public String getString04()
public void setString04(String string04a)
string04a
- public String getString05()
public void setString05(String string05a)
string05a
- public String getString06()
public void setString06(String string06a)
string06a
- public String getString07()
public void setString07(String string07a)
string07a
- public String getString08()
public void setString08(String string08a)
string08a
- public Timestamp getCreatedOn()
public Long getCreatedOnDb()
public void setCreatedOn(Timestamp createdOn1)
createdOn1
- public void truncate()
public GrouperAPI clone()
GrouperAPI
clone
in interface GrouperCloneable
clone
in class GrouperAPI
GrouperAPI.clone()
public void onPreSave(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreSave
in interface HibGrouperLifecycle
onPreSave
in class GrouperAPI
GrouperAPI.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public static Long maxSequenceNumber(boolean considerConsumers)
considerConsumers
- if the consumers should be consideredpublic void onPreUpdate(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreUpdate
in interface HibGrouperLifecycle
onPreUpdate
in class GrouperAPI
GrouperAPI.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void setCreatedOnDb(Long createdOn1)
createdOn1
- public String toStringDeep()
public String getString09()
public void setString09(String theString09)
theString09
- public String getString10()
public void setString10(String theString10)
theString10
- public String getString11()
public void setString11(String _string11)
_string11
- public String getString12()
public void setString12(String _string12)
_string12
- public boolean isTempObject()
public void setTempObject(boolean tempObject1)
tempObject1
- public boolean equalsCategoryAndAction(ChangeLogTypeIdentifier changeLogTypeIdentifier)
changeLogTypeIdentifier
- Copyright © 2016 Internet2. All rights reserved.