protected void generateActionRetractNodeDRL(final ActionRetractNode an, final Node context, final boolean hasDateFieldValue, final StringBuilder drl) { if (context == null) { //No previous context to close } else if (context instanceof ConstraintNode) { drl.append(")\n").append(INDENTATION).append("then \n"); if (hasDateFieldValue) { drl.append(INDENTATION).append(INDENTATION).append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n"); } } else if (context instanceof TypeNode) { drl.append(")\n").append(INDENTATION).append("then \n"); if (hasDateFieldValue) { drl.append(INDENTATION).append(INDENTATION).append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n"); } } drl.append(INDENTATION).append(INDENTATION).append("retract( ").append(an.getBoundNode().getBinding()).append(" );\n"); }
protected void generateActionUpdateNodeDRL(final ActionUpdateNode an, final Node context, final boolean hasDateFieldValue, final StringBuilder drl) { if (context == null) { //No previous context to close } else if (context instanceof ConstraintNode) { drl.append(")\n").append(INDENTATION).append("then \n"); if (hasDateFieldValue) { drl.append(INDENTATION).append(INDENTATION).append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n"); } } else if (context instanceof TypeNode) { drl.append(")\n").append(INDENTATION).append("then \n"); if (hasDateFieldValue) { drl.append(INDENTATION).append(INDENTATION).append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n"); } } if (an.isModify()) { generateActionModifyNodeDRL(an, drl); } else { generateActionSetNodeDRL(an, drl); } }
drl.append(")\n").append(INDENTATION).append("then \n"); if (hasDateFieldValue) { drl.append(INDENTATION).append(INDENTATION).append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n"); drl.append(INDENTATION).append(INDENTATION).append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n");
new SimpleDateFormat(DateUtils.getDateFormatMask(), Locale.ENGLISH).parse(adjustParam(dataType, value,
} else if (DataType.TYPE_DATE.equals(methodParamDataType)) { try { new SimpleDateFormat(DateUtils.getDateFormatMask(), Locale.ENGLISH).parse(adjustParam(methodParamDataType, paramValue,
buf.append(">"); buf.append("java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"" + DateUtils.getDateFormatMask() + "\");\n");