Mercurial > dive4elements > river
changeset 6767:6a67a8f01f5b
QualityMeasurementFactory: Doc about singleton usage.
Also force it by making constructor private.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 07 Aug 2013 11:00:55 +0200 |
parents | 4902d3ead541 |
children | 7b81b3c3c0fa |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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