// }
return result;
}
public EntDbServiceRequestX readStorePax(FctDetails fctDetails, long irmtabRef, Message message) {
EntDbServiceRequestX result = null;
if (fctDetails != null) {
logLevel = entStartupInitSingleton.getIrmLogLev();
msgLogged = Boolean.FALSE;
if (irmtabRef > 0) {
msgLogged = Boolean.TRUE;
}
EntDbServiceRequestX edpiod = new EntDbServiceRequestX();
// ServiceRequestPK serviceRequestPK = new ServiceRequestPK();
edpiod.setIntSystem("MACS");
// check as it's a mandatory field
if (fctDetails.getFCTID() != null
&& !fctDetails.getFCTID().isEmpty()) {
edpiod.setIntId(fctDetails.getFCTID());
} else {
LOG.info("Mandatory field FCT_ID is null or empty, Fact Message is rejected");
sendErroNotification(EnumExceptionCodes.EMAND.name(),"Mandatory field FCT_ID is null or empty, Fact Message is rejected",irmtabRef, message);
return null;
}
// check as it's a mandatory field
if (fctDetails.getMFLID() != null
&& !fctDetails.getMFLID().isEmpty()) {
// edpiod.setIntFlId(fctDetails.getMFLID());
edpiod.setIntFlId(fctDetails.getMFLID());
} else {
LOG.info("Mandatory field MFL_ID is null or empty, Fact Message is rejected");
sendErroNotification(EnumExceptionCodes.EMAND.name(),"Mandatory field MFL_ID is null or empty, Fact Message is rejected",irmtabRef, message);
return null;
}
// check as it's a mandatory field
if (fctDetails.getREFERENCENUMBER() != null
&& !fctDetails.getREFERENCENUMBER().isEmpty()) {
// edpiod.setIntRefNumber(fctDetails.getREFERENCENUMBER());
edpiod.setIntRefNumber(fctDetails.getREFERENCENUMBER());
} else {
LOG.info("Mandatory field REFERENCENUMBER is null or empty, Fact Message is rejected");
sendErroNotification(EnumExceptionCodes.EMAND.name(),"Mandatory field REFERENCENUMBER is null or empty, Fact Message is rejected",irmtabRef, message);
return null;
}
// edpiod.setServiceRequestPK(serviceRequestPK);
edpiod.setRequestType(fctDetails.getOSISSR());
// edpiod.setServiceCode(fctDetails.getFACTCODE());
edpiod.setServiceType(fctDetails.getFACTTYPE());
edpiod.setExtInfo(fctDetails.getVARIABLEDATA());
// variable data contains service code and service (base on design 2.0) added on 2013-11-29
String serviceCode = "";
if (fctDetails.getVARIABLEDATA() != null ){
int hIndex = fctDetails.getVARIABLEDATA().indexOf("-");
if (hIndex != -1){
serviceCode =fctDetails.getVARIABLEDATA().substring(0,hIndex+1);
}else if (fctDetails.getVARIABLEDATA().trim().length() == 4){
serviceCode = fctDetails.getVARIABLEDATA();
}
}
edpiod.setServiceCode(serviceCode);
// result = (EntDbServiceRequest) SerializationUtils
// .clone(edpiod);
result = edpiod;