Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java @ 7391:9513d1af7d58
Renamed artifacts/**/BedHeight(Single) to BedHeight(Single)Data, to resolve
class name conflict with class in backend.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 17 Oct 2013 15:08:59 +0200 |
parents | fe32a7f9655e |
children | 04b70a6fe8c5 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java Thu Oct 17 11:12:14 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java Thu Oct 17 15:08:59 2013 +0200 @@ -64,9 +64,9 @@ /** - * Get BedHeight for given type and height_id, caring about the cache. + * Get BedHeightData for given type and height_id, caring about the cache. */ - public static BedHeight getHeight(String type, int height_id, int time) { + public static BedHeightData getHeight(String type, int height_id, int time) { log.debug("BedHeightFactory.getHeight"); Cache cache = CacheFactory.getCache(StaticBedHeightCacheKey.CACHE_NAME); @@ -77,14 +77,14 @@ Element element = cache.get(cacheKey); if (element != null) { log.debug("Got static bedheight values from cache"); - return (BedHeight)element.getValue(); + return (BedHeightData)element.getValue(); } } else { cacheKey = null; } - BedHeight values = getBedHeightUncached(type, height_id, time); + BedHeightData values = getBedHeightUncached(type, height_id, time); if (values != null && cacheKey != null) { log.debug("Store static bed height values in cache."); @@ -125,11 +125,11 @@ /** - * Get BedHeight from db. + * Get BedHeightData from db. * @param height_id database id of the bed_height * @return according BedHeight. */ - public static BedHeight getBedHeightUncached( + public static BedHeightData getBedHeightUncached( String type, int height_id, int time) @@ -141,8 +141,8 @@ Session session = SessionHolder.HOLDER.get(); SQLQuery sqlQuery = null; if (type.equals("single")) { - BedHeightSingle height = - new BedHeightSingle(getHeightName(type, height_id)); + BedHeightSingleData height = + new BedHeightSingleData(getHeightName(type, height_id)); sqlQuery = session.createSQLQuery(SQL_SELECT_SINGLE) .addScalar("height", StandardBasicTypes.DOUBLE) .addScalar("station", StandardBasicTypes.DOUBLE) @@ -182,7 +182,7 @@ } return height; } - return new BedHeight(); + return new BedHeightData(); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :