Author: tchemit Date: 2008-02-21 11:46:17 +0000 (Thu, 21 Feb 2008) New Revision: 1172 Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java Log: a revoir la cas limite ou on cherche un LE inexistant dans le service Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-02-21 11:45:39 UTC (rev 1171) +++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-02-21 11:46:17 UTC (rev 1172) @@ -165,12 +165,12 @@ */ public LoggableElement getLoggableElement(String token, String uuid, String version) throws SimExplorerException { MetaData mde = getMetadata(token, uuid, version); - - LoggableElement le; - BaseEntityFactory<? extends DataEntity> factory; - factory = BaseEntityFactory.getFactory(LoggableElement.class.getPackage().getName() + DOT + mde.getType()); - le = (LoggableElement) factory.loadElement(getStorageEngine().retrieveData(token, mde, getXMLAttachment())); - + LoggableElement le=null; + if (mde!=null) { + BaseEntityFactory<? extends DataEntity> factory; + factory = BaseEntityFactory.getFactory(LoggableElement.class.getPackage().getName() + DOT + mde.getType()); + le = (LoggableElement) factory.loadElement(getStorageEngine().retrieveData(token, mde, getXMLAttachment())); + } return le; } @@ -511,9 +511,7 @@ * @param token the token * @param uuid the uuid * @param set the set - * - * @return the orphans - * + * * @throws SimExplorerException the sim explorer exception */ private void getOrphans(String token, String uuid, Set<MetaData> set) throws SimExplorerException { @@ -531,8 +529,6 @@ * @param version the version * @param set the set * - * @return the parents - * * @throws SimExplorerException the sim explorer exception */ private void getParents(String token, String uuid, String version, Set<MetaData> set) throws SimExplorerException { @@ -553,8 +549,6 @@ * @param uuid the uuid * @param set the set * - * @return the parents - * * @throws SimExplorerException the sim explorer exception */ private void getParents(String token, String uuid, Set<MetaData> set) throws SimExplorerException {