Skip to content

Commit

Permalink
Merge pull request #816 from GIRISANKAR/develop
Browse files Browse the repository at this point in the history
OLE-8932 Imports not setting default values
  • Loading branch information
peris authored Jul 4, 2016
2 parents affb00b + b19b916 commit 4ce58dc
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ private String process(DroolsExchange droolsExchange) {
getOleCheckOutItem().setRenewalCount(oleLoanDocument.getNumberOfRenewals());
getOleCheckOutItem().setUserType(getOlePatronDocument().getBorrowerTypeName());
getOleCheckOutItem().setBarcode(oleLoanDocument.getItemId());
getOleCheckOutItem().setTitleIdentifier(oleLoanDocument.getTitle());
getOleCheckOutItem().setPatronId(getOlePatronDocument().getOlePatronId());
getOleCheckOutItem().setPatronBarcode(getOlePatronDocument().getBarcode());
if (oleLoanDocument.getOleItem() != null && oleLoanDocument.getOleItem().getItemType() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public void process(JSONObject requestJsonObject, Exchange exchange) {
Timestamp createdDate = getDateTimeStamp(createdDateString);

bibRecord.setDateCreated(createdDate);
bibRecord.setDateEntered(createdDate);
bibRecord.setFassAddFlag(false);
bibRecord.setStaffOnlyFlag(false);
BibRecord createdBibRecord = getOleDsNGMemorizeService().getBibDAO().save(bibRecord);

String modifiedcontent = process001And003(record, createdBibRecord.getBibId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public void process(JSONObject requestJsonObject, Exchange exchange) {
Timestamp updatedDate = getDateTimeStamp(updatedDateString);

bibRecord.setDateEntered(updatedDate);

if(bibRecord.getStaffOnlyFlag()==null){
bibRecord.setStaffOnlyFlag(false);
}
String newContent = process001And003(record, bibId);

newContent = processFieldOptions(bibRecord.getContent(), newContent, requestJsonObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ private void setCommonValuesToHoldingsRecord(JSONObject requestJsonObject, Holdi
String createdBy = getStringValueFromJsonObject(requestJsonObject, OleNGConstants.UPDATED_BY);
holdingsRecord.setCreatedBy(createdBy);
holdingsRecord.setCreatedDate(createdDate);

holdingsRecord.setUpdatedDate(createdDate);
if(holdingsRecord.getStaffOnlyFlag()==null){
holdingsRecord.setStaffOnlyFlag(false);
}
holdingsRecord.setUniqueIdPrefix(DocumentUniqueIDPrefix.PREFIX_WORK_HOLDINGS_OLEML);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public void process(JSONObject requestJsonObject, Exchange exchange) {
HoldingsRecord holdingsRecord = holdingsRecordAndDataMapping.getHoldingsRecord();
holdingsRecord.setUpdatedDate(updatedDate);
holdingsRecord.setUpdatedBy(updatedBy);
if(holdingsRecord.getStaffOnlyFlag()==null){
holdingsRecord.setStaffOnlyFlag(false);
}
exchange.add(OleNGConstants.HOLDINGS_RECORD,holdingsRecord);
JSONObject dataMappingByValue = holdingsRecordAndDataMapping.getDataMapping();
if(null != dataMappingByValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ private void setCommonValuesToHoldingsRecord(JSONObject requestJsonObject, Holdi
String createdBy = getStringValueFromJsonObject(requestJsonObject, OleNGConstants.UPDATED_BY);
holdingsRecord.setCreatedBy(createdBy);
holdingsRecord.setCreatedDate(createdDate);

holdingsRecord.setUpdatedDate(createdDate);
setHoldingType(holdingsRecord);

if(holdingsRecord.getStaffOnlyFlag()==null){
holdingsRecord.setStaffOnlyFlag(false);
}
holdingsRecord.setUniqueIdPrefix(DocumentUniqueIDPrefix.PREFIX_WORK_HOLDINGS_OLEML);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public void process(JSONObject requestJsonObject, Exchange exchange) {
HoldingsRecord holdingsRecord = holdingsRecordAndDataMapping.getHoldingsRecord();
holdingsRecord.setUpdatedDate(updatedDate);
holdingsRecord.setUpdatedBy(updatedBy);
if(holdingsRecord.getStaffOnlyFlag()==null){
holdingsRecord.setStaffOnlyFlag(false);
}
exchange.add(OleNGConstants.HOLDINGS_RECORD, holdingsRecord);
JSONObject dataMappingByValue = holdingsRecordAndDataMapping.getDataMapping();
if (null != dataMappingByValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ private void setCommonValuesToItemRecord(JSONObject requestJsonObject, ItemRecor
String createdBy = getStringValueFromJsonObject(requestJsonObject, OleNGConstants.UPDATED_BY);
itemRecord.setCreatedBy(createdBy);
itemRecord.setCreatedDate(createdDate);
itemRecord.setUpdatedDate(createdDate);
itemRecord.setFastAddFlag(false);
if(itemRecord.getStaffOnlyFlag()==null){
itemRecord.setStaffOnlyFlag(false);
}
itemRecord.setUniqueIdPrefix(DocumentUniqueIDPrefix.PREFIX_WORK_ITEM_OLEML);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public void process(JSONObject requestJsonObject, Exchange exchange) {
JSONObject dataMapping = itemRecordAndDataMapping.getDataMapping();
itemRecord.setUpdatedBy(updatedBy);
itemRecord.setUpdatedDate(updatedDate);
if(itemRecord.getStaffOnlyFlag()==null){
itemRecord.setStaffOnlyFlag(false);
}
exchange.add(OleNGConstants.ITEM_RECORD, itemRecord);
if (null != dataMapping) {
processOverlay(exchange, dataMapping, itemRecord);
Expand Down

0 comments on commit 4ce58dc

Please sign in to comment.