use of org.kie.workbench.common.services.datamodel.model.LazyModelField in project kie-wb-common by kiegroup.
the class DataModelOracleUtilities method makeLazyProxyModelField.
// AsyncPackageDataModelOracle.getFactNameFromType() uses THIS to determine the simple Type from a FQCN.
// Therefore ensure we provide this minimal information for every Type in the DMO to prevent getFactNameFromType()
// needing a callback to the server which makes things more complicated than really needed.
private static ModelField[] makeLazyProxyModelField(final ModelField[] modelFields) {
for (ModelField modelField : modelFields) {
if (DataType.TYPE_THIS.equals(modelField.getName())) {
final ModelField[] result = new ModelField[1];
// LazyModelField is a place-holder to tell AsyncPackageDataModelOracle that it needs to load more information
result[0] = new LazyModelField(modelField.getName(), modelField.getClassName(), modelField.getClassType(), modelField.getOrigin(), modelField.getAccessorsAndMutators(), modelField.getType());
return result;
}
}
return null;
}
Aggregations