# HG changeset patch # User Felix Wolfsteller # Date 1375866055 -7200 # Node ID 6a67a8f01f5b6203d94b1804de28ffe0313f4c7e # Parent 4902d3ead5411de903b069ecb904fac813e1cc9e QualityMeasurementFactory: Doc about singleton usage. Also force it by making constructor private. diff -r 4902d3ead541 -r 6a67a8f01f5b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java Wed Aug 07 10:59:53 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java Wed Aug 07 11:00:55 2013 +0200 @@ -86,12 +86,15 @@ " m.datum BETWEEN :start AND :end " + "ORDER BY m.km"; + /** Transform query result into objects, use INSTANCE singleton. */ public static final class QualityMeasurementResultTransformer extends BasicTransformerAdapter { - public static QualityMeasurementResultTransformer INSTANCE = new QualityMeasurementResultTransformer(); + // Make a singleton + public static QualityMeasurementResultTransformer INSTANCE = + new QualityMeasurementResultTransformer(); - public QualityMeasurementResultTransformer() { + private QualityMeasurementResultTransformer() { } @Override