Author: chatellier Date: 2009-02-04 10:03:57 +0000 (Wed, 04 Feb 2009) New Revision: 1784 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/SimulationStorage.java Log: Re ajout d'une methode d?\195?\169pr?\195?\169ci?\195?\169e qui est en fait toujours utilis?\195?\169e dans les scripts Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/SimulationStorage.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/SimulationStorage.java 2009-02-04 00:32:33 UTC (rev 1783) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/SimulationStorage.java 2009-02-04 10:03:57 UTC (rev 1784) @@ -499,7 +499,7 @@ * Retourne la {@link FisheryRegion} associee a cette simulation * @param context * @return - * @throws fr.ifremer.isisfish.datastore.StorageException + * @throws StorageException */ static public FisheryRegion getFisheryRegion(TopiaContext context) throws StorageException { @@ -521,6 +521,29 @@ } /** + * Retourne la {@link FisheryRegion} associee a cette simulation. + * + * Attention, toujours utilisée dans les scripts !!! + * + * @return la {@link FisheryRegion} + * @throws StorageException + * @deprecated ne plus utiliser car le context n'est jamais ferme, plutot + * utiliser {@link #getFisheryRegion(TopiaContext)} + */ + public FisheryRegion getFisheryRegion() throws StorageException { + // FIXME voir si la methode est vraiment utilisée car le context n'est + // jamais fermé, ce qui est dérangeant + try { + TopiaContext tx = getStorage().beginTransaction(); + FisheryRegion result = getFisheryRegion(tx); + tx.commitTransaction(); + return result; + } catch (TopiaException eee) { + throw new StorageException(_("isisfish.error.get.fisheryRegion"), eee); + } + } + + /** * Checkout not existing Simulation localy from server * * @param name name of simulation to retrieve