use of com.servoy.j2db.scripting.UsedDataProviderTracker.UsedRelation in project servoy-client by Servoy.
the class Record method manageCalcDependency.
protected void manageCalcDependency(String calc, UsedDataProviderTracker usedDataProviderTracker) {
if (usedDataProviderTracker == null) {
return;
}
Set<String> usedGlobals = usedDataProviderTracker.getGlobals();
if (usedGlobals != null) {
for (String usedGlobal : usedGlobals) {
row.getRowManager().addCalculationGlobalDependency(usedGlobal, calc);
}
}
Set<UsedDataProvider> usedColumns = usedDataProviderTracker.getColumns();
if (usedColumns != null) {
for (UsedDataProvider usedColumn : usedColumns) {
try {
RowManager rowManager = ((FoundSetManager) parent.getFoundSetManager()).getRowManager(usedColumn.dataSource);
if (rowManager != null) {
rowManager.addCalculationDependency(usedColumn.pkHashKey, usedColumn.dataProviderId, parent.getDataSource(), getPKHashKey(), calc);
}
} catch (ServoyException e) {
Debug.error(e);
}
}
}
Set<UsedRelation> uedRelations = usedDataProviderTracker.getRelations();
if (uedRelations != null) {
for (UsedRelation usedRelation : uedRelations) {
row.getRowManager().addCalculationRelationDependency(usedRelation.whereArgsHash, usedRelation.name, parent.getDataSource(), getPKHashKey(), calc);
}
}
Set<UsedAggregate> usedAggregates = usedDataProviderTracker.getAggregates();
if (usedAggregates != null) {
for (UsedAggregate usedAggregate : usedAggregates) {
row.getRowManager().addCalculationAggregateDependency(usedAggregate.foundSet, usedAggregate.name, calc);
}
}
}
Aggregations