Skip to content

Commit

Permalink
refactor: remove unused constructors and commented code in Analytic a…
Browse files Browse the repository at this point in the history
…nd AnalyticMapper classes
  • Loading branch information
LeonardoMeireles55 committed Feb 10, 2025
1 parent 8ea69a7 commit 0313a0e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,51 +35,11 @@ public class Analytic extends RepresentationModel<Analytic> {
private String unitValue;
private String rules;
private String description;
// @Transient
// private RulesValidatorComponent rulesValidatorComponent;

public Analytic() {}

public Analytic(AnalyticsDTO values) {
AnalyticMapper.toNewEntity(values);
}

// public Analytic(AnalyticsDTO values, RulesValidatorComponent rulesValidatorComponent) {
// AnalyticMapper.toEntity(values, rulesValidatorComponent);
// }

// public Analytic(Long id, LocalDateTime date, String levelLot, String testLot, String name,
// String level, double value, double mean, double sd, String unitValue, String rules,
// String description, RulesValidatorComponent rulesValidatorComponent) {
// this.id = id;
// this.date = date;
// this.levelLot = levelLot;
// this.testLot = testLot;
// this.name = name;
// this.level = level;
// this.value = value;
// this.mean = mean;
// this.sd = sd;
// this.unitValue = unitValue;
// this.rules = rules;
// this.description = description;
// this.rulesValidatorComponent = rulesValidatorComponent;
// }

// public Analytic(AnalyticsDTO values, RulesValidatorComponent rulesValidatorComponent) {
// this.date = values.date();
// this.levelLot = values.level_lot();
// this.testLot = values.test_lot();
// this.name = values.name();
// this.level = values.level();
// this.value = values.value();
// this.mean = values.mean();
// this.sd = values.sd();
// this.unitValue = values.unit_value();
// this.rulesValidatorComponent = rulesValidatorComponent;
// rulesValidatorComponent.validator(this.value, this.mean, this.sd);
// this.rules = rulesValidatorComponent.getRules();
// this.description = rulesValidatorComponent.getDescription();
// }
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@ private AnalyticMapper() {

private static RulesValidatorComponent rulesValidatorComponent = new RulesValidatorComponent();

// public static Analytic toEntity(AnalyticsDTO analyticsDTO,
// RulesValidatorComponent rulesValidatorComponent) {
// Analytic analytic = new Analytic();
// analytic.setId(analyticsDTO.id());
// analytic.setDate(analyticsDTO.date());
// analytic.setLevelLot(analyticsDTO.level_lot());
// analytic.setTestLot(analyticsDTO.test_lot());
// analytic.setName(analyticsDTO.name());
// analytic.setLevel(analyticsDTO.level());
// analytic.setValue(analyticsDTO.value());
// analytic.setMean(analyticsDTO.mean());
// analytic.setSd(analyticsDTO.sd());
// analytic.setUnitValue(analyticsDTO.unit_value());
// rulesValidatorComponent.validator(analyticsDTO.value(), analyticsDTO.mean(),
// analyticsDTO.sd());
// analytic.setRules(rulesValidatorComponent.getRules());
// analytic.setDescription(rulesValidatorComponent.getDescription());

// return analytic;
// }

private static Analytic toEntityRulesValidator(AnalyticsDTO analyticsDTO) {
Analytic analytic = new Analytic();
analytic.setId(analyticsDTO.id());
Expand Down

0 comments on commit 0313a0e

Please sign in to comment.