@Test public void sameVariableFroTwoDifferentOperatorsDifferentType() throws Exception { TemplateModel m = new TemplateModel(); m.name = "t1"; m.lhs = new IPattern[1]; FactPattern factPattern = new FactPattern(); m.lhs[0] = factPattern; factPattern.addConstraint(makeConstraint("Applicant", "age", "Integer", "$default", "==")); factPattern.addConstraint(makeConstraint("Applicant", "name", "String", "$default", "!=")); assertEquals(1, m.getInterpolationVariablesList().length); assertEquals(TemplateModel.DEFAULT_TYPE, m.getInterpolationVariablesList()[0].getDataType()); }
public InterpolationVariable[] getInterpolationVariablesList() { Map<InterpolationVariable, Integer> vars = getInterpolationVariables(); InterpolationVariable[] ret = new InterpolationVariable[vars.size() - 1]; for (Map.Entry<InterpolationVariable, Integer> entry : vars.entrySet()) { if (!ID_COLUMN_NAME.equals(entry.getKey().getVarName())) { ret[entry.getValue()] = entry.getKey(); } } return ret; }
TemplateModel extends RuleModel { public InterpolationVariable[] getInterpolationVariablesList() { Map<InterpolationVariable, Integer> vars = getInterpolationVariables(); InterpolationVariable[] ret = new InterpolationVariable[vars.size() - 1]; for (Map.Entry<InterpolationVariable, Integer> entry : vars.entrySet()) { if (!ID_COLUMN_NAME.equals(entry.getKey().getVarName())) { ret[entry.getValue()] = entry.getKey(); } } return ret; } }
TemplateModel extends RuleModel { public InterpolationVariable[] getInterpolationVariablesList() { Map<InterpolationVariable, Integer> vars = getInterpolationVariables(); InterpolationVariable[] ret = new InterpolationVariable[vars.size() - 1]; for (Map.Entry<InterpolationVariable, Integer> entry : vars.entrySet()) { if (!ID_COLUMN_NAME.equals(entry.getKey().getVarName())) { ret[entry.getValue()] = entry.getKey(); } } return ret; }  }
TemplateModel extends RuleModel { public InterpolationVariable[] getInterpolationVariablesList() { Map<InterpolationVariable, Integer> vars = getInterpolationVariables(); InterpolationVariable[] ret = new InterpolationVariable[vars.size() - 1]; for (Map.Entry<InterpolationVariable, Integer> entry : vars.entrySet()) { if (!ID_COLUMN_NAME.equals(entry.getKey().getVarName())) { ret[entry.getValue()] = entry.getKey(); } } return ret; }  String addRow(int index,
                         String[] row); String addRow(String[] row); void clearRows(); int getColsCount(); InterpolationVariable[] getInterpolationVariablesList(); int getRowsCount(); Map<String, List<String>> getTable(); String[][] getTableAsArray(); void putInSync(); void removeRow(int row); boolean removeRowById(String rowId); void setValue(String varName,
                         int rowIndex,
                         String newValue); void setIdCol(final int idCol); }
TemplateModel extends RuleModel { public InterpolationVariable[] getInterpolationVariablesList() { Map<InterpolationVariable, Integer> vars = getInterpolationVariables(); InterpolationVariable[] ret = new InterpolationVariable[vars.size() - 1]; for (Map.Entry<InterpolationVariable, Integer> entry : vars.entrySet()) { if (!ID_COLUMN_NAME.equals(entry.getKey().getVarName())) { ret[entry.getValue()] = entry.getKey(); } } return ret; }  String addRow(int index,
                         String[] row); String addRow(String[] row); void clearRows(); int getColsCount(); InterpolationVariable[] getInterpolationVariablesList(); int getRowsCount(); Map<String, List<String>> getTable(); String[][] getTableAsArray(); void putInSync(); void removeRow(int row); boolean removeRowById(String rowId); void setValue(String varName,
                         int rowIndex,
                         String newValue); void setIdCol(final int idCol); static final String ID_COLUMN_NAME; }