spotless and remove comments
This commit is contained in:
parent
a7c53e444f
commit
b727f635df
|
@ -48,7 +48,8 @@ public class DeleteExpungeSvcImpl implements IDeleteExpungeSvc<JpaPid> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int deleteExpunge(List<JpaPid> theJpaPids, boolean theCascade, Integer theCascadeMaxRounds, String theChunkId) {
|
||||
public int deleteExpunge(
|
||||
List<JpaPid> theJpaPids, boolean theCascade, Integer theCascadeMaxRounds, String theChunkId) {
|
||||
DeleteExpungeSqlBuilder.DeleteExpungeSqlResult sqlResult =
|
||||
myDeleteExpungeSqlBuilder.convertPidsToDeleteExpungeSql(theJpaPids, theCascade, theCascadeMaxRounds);
|
||||
List<String> sqlList = sqlResult.getSqlStatements();
|
||||
|
@ -61,15 +62,11 @@ public class DeleteExpungeSvcImpl implements IDeleteExpungeSvc<JpaPid> {
|
|||
ourLog.trace("Executing sql " + sql);
|
||||
totalDeleted += myEntityManager.createNativeQuery(sql).executeUpdate();
|
||||
}
|
||||
// each sql statement is for different table, but its on the same resource ID
|
||||
// eg. HFJ_HISTORY_TAG, HFJ_RES_VER_PROV, HFJ_IDX_CMP_STRING_UNIQ, but all for the same resource ID
|
||||
// Basically, history, tag, versions, subscriptions, ETC
|
||||
// but each delete on diff table results in the records total going up
|
||||
// so this info statement for total deleted is actually the only place that totalDeleted is printed
|
||||
// the return value of getRecordCount() is printed, but =/= to totalDeleted
|
||||
// getRecordCount() is the number of resources actually deleted ie. theJpaPids.length
|
||||
|
||||
ourLog.info("{}Delete expunge sql commands affected {} rows", formattedChunkIdForLogMessage, totalDeleted); // todo jdjd
|
||||
ourLog.info(
|
||||
"{}Delete expunge sql commands affected {} rows",
|
||||
formattedChunkIdForLogMessage,
|
||||
totalDeleted);
|
||||
clearHibernateSearchIndex(theJpaPids);
|
||||
|
||||
// TODO KHS instead of logging progress, produce result chunks that get aggregated into a delete expunge report
|
||||
|
|
|
@ -163,10 +163,11 @@ public class DeleteExpungeStep
|
|||
|
||||
myRecordCount = myDeleteExpungeSvc.deleteExpunge(persistentIds, myCascade, myCascadeMaxRounds, myChunkId);
|
||||
|
||||
ourLog.info("Delete expunge finished deleting {} resources - Instance[{}] Chunk[{}]",
|
||||
myRecordCount,
|
||||
myInstanceId,
|
||||
myChunkId);
|
||||
ourLog.info(
|
||||
"Delete expunge finished deleting {} resources - Instance[{}] Chunk[{}]",
|
||||
myRecordCount,
|
||||
myInstanceId,
|
||||
myChunkId);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue