Skip to content

Commit

Permalink
Improvement in the information provided about the creation and modifi…
Browse files Browse the repository at this point in the history
…cation date during the migration
  • Loading branch information
df-git committed Nov 11, 2020
1 parent 9ec9fa9 commit 575d4d7
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 7 deletions.
Binary file modified dist/app/re3gistry2/WEB-INF/lib/Re3gistry2Base-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2/WEB-INF/lib/Re3gistry2CRUDInterface-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2/WEB-INF/lib/Re3gistry2CRUDrdb-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2/WEB-INF/lib/Re3gistry2JavaAPI-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2/WEB-INF/lib/Re3gistry2Migration-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2/WEB-INF/lib/Re3gistry2Model-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2restapi/WEB-INF/lib/Re3gistry2Base-1.0.jar
Binary file not shown.
Binary file not shown.
Binary file modified dist/app/re3gistry2restapi/WEB-INF/lib/Re3gistry2CRUDrdb-1.0.jar
Binary file not shown.
Binary file modified dist/app/re3gistry2restapi/WEB-INF/lib/Re3gistry2Model-1.0.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,14 @@ public RegItem createRegItemWithoutCollection(String uriname, RegItemclass regIt
}

regItem.setCurrentversion(version);
regItem.setInsertdate(datecreation);
regItem.setEditdate(datelastupdate);

if (datecreation != null) {
regItem.setInsertdate(datecreation);
} else {
regItem.setInsertdate(new Date());
}
if (datelastupdate != null) {
regItem.setEditdate(datelastupdate);
}
try {
if (!entityManagerRe3gistry2.getTransaction().isActive()) {
entityManagerRe3gistry2.getTransaction().begin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,14 @@ public RegItem createRegItemWithoutCollection(Item item, RegItemclass regItemcla
}
regItem.setRorExport(Boolean.FALSE);

regItem.setInsertdate(item.getDatecreation());
regItem.setEditdate(item.getDatelastupdate());
if (item.getDatecreation() != null) {
regItem.setInsertdate(item.getDatecreation());
} else {
regItem.setInsertdate(new Date());
}
if (item.getDatelastupdate() != null) {
regItem.setEditdate(item.getDatelastupdate());
}
regItem.setCurrentversion(version);

if (localid.startsWith(BaseConstants.KEY_PARAMETER_HTTP) || localid.startsWith(BaseConstants.KEY_PARAMETER_HTTPS)) {
Expand Down Expand Up @@ -709,8 +715,14 @@ RegItem createRegItemWithCollection(Item item, RegItemclass regItemclass, Item i
}
regItem.setRorExport(Boolean.FALSE);

regItem.setInsertdate(item.getDatecreation());
regItem.setEditdate(item.getDatelastupdate());
if (item.getDatecreation() != null) {
regItem.setInsertdate(item.getDatecreation());
} else {
regItem.setInsertdate(new Date());
}
if (item.getDatelastupdate() != null) {
regItem.setEditdate(item.getDatelastupdate());
}
regItem.setCurrentversion(version);

if (localid.startsWith(BaseConstants.KEY_PARAMETER_HTTP) || localid.startsWith(BaseConstants.KEY_PARAMETER_HTTPS)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class ConstantsMigration {
+ "i.uriname as uriname, "
+ "i.itemclass as itemclass, "
+ "i.versionnumber as versionnumber, "
+ "i.datecreation as datecreation, "
+ "i.datelastupdate as datelastupdate, "
+ "i.status as status\n"
+ "FROM Item i \n"
+ "WHERE i.itemclass = :itemclass AND i.versionnumber = '0'";
Expand Down

0 comments on commit 575d4d7

Please sign in to comment.