private void setupBRLActionColumn() { final BRLActionColumn brl = new BRLActionColumn(); final ActionInsertFact ifc1 = new ActionInsertFact(); ifc1.setFactType("Person"); ifc1.setBoundName("$a"); final ActionFieldValue afv1 = new ActionFieldValue(); afv1.setNature(FieldNatureType.TYPE_TEMPLATE); afv1.setField("name"); afv1.setValue("f1"); ifc1.addFieldValue(afv1); final ActionFieldValue afv2 = new ActionFieldValue(); afv2.setNature(FieldNatureType.TYPE_TEMPLATE); afv2.setField("age"); afv2.setValue("f2"); ifc1.addFieldValue(afv2); brl.getDefinition().add(ifc1); brl.getChildColumns().add(new BRLActionVariableColumn("f1", DataType.TYPE_STRING)); brl.getChildColumns().add(new BRLActionVariableColumn("f2", DataType.TYPE_NUMERIC_INTEGER)); model.getActionCols().add(brl); when(dmo.getFieldType(eq("Person"), eq("name"))).thenReturn(DataType.TYPE_STRING); when(dmo.getFieldType(eq("Person"), eq("age"))).thenReturn(DataType.TYPE_NUMERIC_INTEGER); } }
private ActionInsertFact visitActionFieldList(ActionInsertFact afl) { ActionInsertFact clone = new ActionInsertFact(); clone.setFactType(afl.getFactType()); clone.setBoundName(afl.getBoundName()); for (ActionFieldValue afv : afl.getFieldValues()) { ActionFieldValue afvClone = new ActionFieldValue(); afvClone.setField(afv.getField()); afvClone.setNature(afv.getNature()); afvClone.setType(afv.getType()); afvClone.setValue(afv.getValue()); clone.addFieldValue(afvClone); } return clone; }
private ActionInsertFact visitActionFieldList(ActionInsertFact afl) { ActionInsertFact clone = new ActionInsertFact(); clone.setFactType(afl.getFactType()); clone.setBoundName(afl.getBoundName()); for (ActionFieldValue afv : afl.getFieldValues()) { ActionFieldValue afvClone = new ActionFieldValue(); afvClone.setField(afv.getField()); afvClone.setNature(afv.getNature()); afvClone.setType(afv.getType()); afvClone.setValue(afv.getValue()); clone.addFieldValue(afvClone); } return clone; }
ifc1.setFactType("Applicant"); ifc1.setBoundName("$a"); final ActionFieldValue afv1 = new ActionFieldValue(); ifc2.setFactType("Mortgage"); ifc2.setBoundName("$m"); final ActionFieldValue afv2 = new ActionFieldValue();
ifc1.setFactType("Applicant"); ifc1.setBoundName("$a"); final ActionFieldValue afv1 = new ActionFieldValue(); ifc2.setFactType("Mortgage"); ifc2.setBoundName("$m"); final ActionFieldValue afv2 = new ActionFieldValue();
final BRLActionColumn brl = new BRLActionColumn(); final ActionInsertFact aif = new ActionInsertFact(); aif.setFactType("Fact"); aif.addFieldValue(new ActionFieldValue() {{ setField("field");
final BRLActionColumn brl = new BRLActionColumn(); final ActionInsertFact aif = new ActionInsertFact(); aif.setFactType("Fact"); aif.addFieldValue(new ActionFieldValue() {{ setField("field");
ifc1.setFactType("Applicant"); ifc1.setBoundName("$a"); final ActionFieldValue afv1 = new ActionFieldValue(); ifc2.setFactType("Mortgage"); ifc2.setBoundName("$m"); final ActionFieldValue afv2 = new ActionFieldValue();
actionInsertFact.setFactType("Applicant"); ActionFieldValue actionFieldValue = new ActionFieldValue("age", "123", "Integer"); actionFieldValue.setNature(SingleFieldConstraint.TYPE_LITERAL);
aif.setFactType( "FactType" ); aif.addFieldValue( buildActionFieldValue() ); aif.addFieldValue( buildActionFieldValue() );