Skip to content

Commit

Permalink
fix: Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
larshelge committed Dec 16, 2024
1 parent bdaf60f commit 58a8771
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.hisp.dhis.analytics.table.model.Skip;
import org.hisp.dhis.analytics.table.setting.AnalyticsTableSettings;
import org.hisp.dhis.category.CategoryService;
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.common.IdentifiableObjectManager;
import org.hisp.dhis.common.ValueType;
import org.hisp.dhis.dataapproval.DataApprovalLevelService;
Expand Down Expand Up @@ -295,16 +294,4 @@ protected String getAttributeValueJoinClause(Program program) {
.map(attribute -> replaceQualify(template, toVariableMap(attribute)))
.collect(Collectors.joining());
}

/**
* Returns a map of identifiable properties and values.
*
* @param object the {@link IdentifiableObject}.
* @return a {@link Map}.
*/
protected Map<String, String> toVariableMap(IdentifiableObject object) {
return Map.of(
"id", String.valueOf(object.getId()),
"uid", quote(object.getUid()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import org.hisp.dhis.calendar.Calendar;
import org.hisp.dhis.category.CategoryService;
import org.hisp.dhis.common.DimensionalObject;
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.common.IdentifiableObjectManager;
import org.hisp.dhis.common.ValueType;
import org.hisp.dhis.commons.collection.ListUtils;
Expand Down Expand Up @@ -452,6 +453,18 @@ protected void invokeTimeAndLog(String sql, String logPattern, Object... args) {
log.info("{} in: {}", logMessage, timer.stop().toString());
}

/**
* Returns a map of identifiable properties and values.
*
* @param object the {@link IdentifiableObject}.
* @return a {@link Map}.
*/
protected Map<String, String> toVariableMap(IdentifiableObject object) {
return Map.of(
"id", String.valueOf(object.getId()),
"uid", quote(object.getUid()));
}

/**
* Filters out analytics table columns which were created after the time of the last successful
* resource table update. This so that the create table query does not refer to columns not
Expand Down

0 comments on commit 58a8771

Please sign in to comment.