| Modifier and Type | Field and Description |
|---|---|
static String |
DIFF_CHANGE_EXPLANATION |
static String |
EMPTY_STRING |
| Constructor and Description |
|---|
HistoryService() |
| Modifier and Type | Method and Description |
|---|---|
void |
createHistoryEntry(EntityTypeOperation operation,
String entityName,
EntityType entityType,
Long entityId,
String entry,
String validityEntry,
String userId)
Creates new history entry.
|
protected String |
escapeDbString(String dbString)
Escapes the characters that have a special meaning in the database LIKE query, '%' and '_'.
|
static String |
getDiffForAttributes(String attrName,
Object value,
Object oldValue)
Returns string with difference between two attribute values.
|
History |
getHistoryById(Long id)
Retrieves and returns history with specified id.
|
LazyService<History> |
getLazyService() |
long |
getRowCount(Map<String,Object> filters)
Return the number of elements in the table.
|
public static final String EMPTY_STRING
public static final String DIFF_CHANGE_EXPLANATION
public LazyService<History> getLazyService()
public History getHistoryById(Long id)
id - history idpublic void createHistoryEntry(EntityTypeOperation operation, String entityName, EntityType entityType, Long entityId, String entry, String validityEntry, String userId)
operation - entity operationentityName - entity nameentityType - entity typeentityId - entity identry - history entryvalidityEntry - history entry for validityuserId - username of the user making the change.public long getRowCount(@Nullable Map<String,Object> filters)
filters - map of filtersprotected String escapeDbString(String dbString)
dbString - the string to escapepublic static String getDiffForAttributes(String attrName, Object value, Object oldValue)
attrName - attribute namevalue - new attribute valueoldValue - old attribute valueCopyright © 2025 European Spallation Source. All rights reserved.