@Override public boolean CheckTransactionalRule(AddDataRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) { if (nullableFaultMsg == null) { nullableFaultMsg = new AtomicReference<String>(); } NameValuePair GetNameValuePairByName = Utility.getNameValuePairByName(params, "value"); long val=0; String item = GetNameValuePairByName.getValue(); if (GetNameValuePairByName.isEncrypted()) { item = Utility.DE(GetNameValuePairByName.getValue()); } val = Long.parseLong(item); if (req.getRequestSize() < val) { nullableFaultMsg.set("The request message size, " + req.getRequestSize() + ", is less that the value " + val + ", "+ nullableFaultMsg.get()); } return false; }
@Override public boolean CheckTransactionalRule(AddDataRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) { if (nullableFaultMsg == null) { nullableFaultMsg = new AtomicReference<String>(); } NameValuePair GetNameValuePairByName = Utility.getNameValuePairByName(params, "value"); long val = 0; String item = GetNameValuePairByName.getValue(); if (GetNameValuePairByName.isEncrypted()) { item = Utility.DE(GetNameValuePairByName.getValue()); } val = Long.parseLong(item); if (req.getRequestSize() > val) { nullableFaultMsg.set("The request message size, " + req.getRequestSize() + ", is greater that the value " + val + ", " + nullableFaultMsg.get()); } return false; }
com.setLong(4, req.getRequestSize()); com.setString(5, Utility.truncate(req.getURI(), MAXTEXT)); com.setBoolean(6, req.isSuccess());