use of org.drools.verifier.core.index.model.ObjectField in project drools by kiegroup.
the class FieldInspectorRelationsTest method setUp.
@Before
public void setUp() throws Exception {
configurationMock = new AnalyzerConfigurationMock();
ObjectField objectField = mock(ObjectField.class);
a = new FieldInspector(new Field(objectField, "org.Person", "String", "name", configurationMock), mock(RuleInspectorUpdater.class), mock(AnalyzerConfiguration.class));
b = new FieldInspector(new Field(objectField, "org.Person", "String", "name", configurationMock), mock(RuleInspectorUpdater.class), mock(AnalyzerConfiguration.class));
}
use of org.drools.verifier.core.index.model.ObjectField in project drools-wb by kiegroup.
the class Utils method resolveObjectField.
public static ObjectField resolveObjectField(final ObjectType objectType, final String fieldType, final String factField, final AnalyzerConfiguration configuration) {
final ObjectField first = objectType.getFields().where(Field.name().is(factField)).select().first();
if (first == null) {
final ObjectField objectField = new ObjectField(objectType.getType(), fieldType, factField, configuration);
objectType.getFields().add(objectField);
return objectField;
} else {
return first;
}
}
Aggregations