Changeset 5590
- Timestamp:
- Mar 16, 2011, 12:48:47 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 189 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/Base.java
r5518 r5590 923 923 924 924 /** 925 This method will fail if used to filter on reporter lists or other items926 that require a DbControl.927 @deprecated Use {@link #getConfiguredQuery(DbControl, ItemContext, boolean, ItemQuery, ModeInfo)}928 instead929 */930 public static <T extends BasicItem> ItemQuery<T> getConfiguredQuery(ItemContext cc, boolean autoLeftJoin, ItemQuery<T> query, ModeInfo mode)931 {932 return getConfiguredQuery(null, cc, autoLeftJoin, query, mode);933 }934 935 /**936 925 Configures a query. This method calls {@link ItemContext#configureQuery(DbControl, EntityQuery, boolean)} 937 926 and then adds the following filter: … … 1480 1469 1481 1470 /** 1482 @see #getEncodedName(Nameable, boolean, String) 1483 */ 1484 public static String getEncodedName(Nameable item, boolean denied) 1485 { 1486 return getEncodedName(item, denied, null); 1487 } 1488 1489 /** 1490 Encode an link the name of the nameable item using the {@link HTML#encodeTags(String)} 1471 Encode the name of the nameable item using the {@link HTML#encodeTags(String)} 1491 1472 method. If the item parameter is null, <code>- none -</code> or 1492 1473 <code>- denied -</code> is returned, depending on if the denied 1493 parameter is true or false. The link parameter should contain the relative path 1494 to the JSP page and include the session control ID: 1495 <code>../samples/index.jsp?ID=XXXX</code>. This method will 1496 automatically add the id of the nameable item to the link: 1497 <code>../samples/index.jsp?ID=XXXX&cmd=ViewItem&item_id=YYYY</code> 1474 parameter is true or false. 1498 1475 1499 1476 @param item The nameable item or null 1500 1477 @param denied TRUE if the item is null because the current use 1501 1478 doesn't have read permission 1502 @param link The URL of the JSP page to link the name to, or null if 1503 a link shouldn't be created 1504 @see #getEncodedName(Nameable, boolean) 1505 @deprecated Use {@link #getLinkedName(String, Nameable, boolean, boolean)} instead 1506 */ 1507 public static String getEncodedName(Nameable item, boolean denied, String link) 1479 1480 */ 1481 public static String getEncodedName(Nameable item, boolean denied) 1508 1482 { 1509 1483 String name = "<i>- none -</i>"; … … 1511 1485 { 1512 1486 name = HTML.encodeTags(item.getName()); 1513 if (link != null)1514 {1515 name = "<a href=\""+link+"&cmd=ViewItem&item_id="+item.getId()+1516 "\" title=\"View more information about this item\">"+name+"</a>";1517 }1518 1487 } 1519 1488 else if (denied) … … 1524 1493 } 1525 1494 1495 1526 1496 public static String getLinkedName(String ID, Nameable item, boolean denied, boolean enableEditLink) 1527 1497 { -
trunk/src/clients/web/net/sf/basedb/clients/web/ExperimentExplorer.java
r5218 r5590 125 125 126 126 /** 127 The size of the cache that stores reporter id's matching the search.128 @see #getCacheSize()129 @deprecated In 2.11, for performance reasons the cache always130 contains the full set of reporters131 */132 public static final int DEFAULT_CACHE_SIZE = 100;133 134 /**135 127 Predefined colors for annotation groups 136 128 */ … … 284 276 Get the bioassay with the specified column number in the 285 277 data cube. This method is useful since spot queries (see 286 {@link #getSpotQuery(DbControl, ReporterData, int, List)})278 {@link #getSpotQuery(DbControl, int, int, List)}) 287 279 can only return the column number, but we usually want to display 288 280 the name, etc. … … 313 305 return cache == null ? 0 : cache.length; 314 306 } 315 316 /**317 Set the size of the reporter cache.318 @param cacheSize The size319 @see #getCacheSize()320 @deprecated In 2.11. For performance reasons the full reporter set321 is always cached.322 */323 public void setCacheSize(int cacheSize)324 {}325 307 326 308 /** … … 410 392 411 393 /** 412 Get the id of the selected annotation type.413 @return The id of the selected annotation type or 0 if no annotation type414 is selected415 @deprecated In 2.14, use {@link #getAnnotationTypeIds()} instead416 */417 public int getAnnotationTypeId()418 {419 return annotationTypeIds == null || annotationTypeIds.size() != 1 ?420 0 : annotationTypeIds.iterator().next();421 }422 423 /**424 Set the id of the selected annotation type. Calling this method425 removes all previous selections.426 @param annotationTypeId The annotation type id or 0 if none is427 selected428 @deprecated In 2.14, use {@link #setAnnotationTypeIds(Collection)} instead429 */430 public void setAnnotationTypeId(int annotationTypeId)431 {432 Set<Integer> tmp = getAnnotationTypeIds();433 tmp.clear();434 if (annotationTypeId != 0) tmp.add(annotationTypeId);435 }436 437 /**438 394 Get the selected annotation types. 439 395 @return A set with the id's of the selected annotation types … … 608 564 609 565 /** 610 Get the number of unique positions a reporter is present in611 among all bioassays in the bioassayset.612 @param dc The DbControl to use for database access613 @param reporter The reporter, or null to find spots without any reporter614 @deprecated In 2.11 for performance reasons, use {@link #getNumPositions(DbControl, int)}615 instead616 */617 public int getNumPositions(DbControl dc, ReporterData reporter)618 {619 int index = getReporterIndex(dc, reporter);620 return getNumPositions(dc, index);621 }622 623 /**624 566 Get the index of the current position. It should be a value between 625 567 0 and {@link #getNumPositions(DbControl, int)}-1, or one 626 568 of the {@link #SPOT_ALL} or {@link #SPOT_AVG} special values (negative). 627 569 @return The current index 628 @see #getPosition(DbControl, ReporterData, int)570 @see #getPosition(DbControl, int, int) 629 571 */ 630 572 public int getPositionIndex() … … 637 579 @param positionIndex The new index 638 580 @see #getPositionIndex() 639 @see #getPosition(DbControl, ReporterData, int)581 @see #getPosition(DbControl, int, int) 640 582 */ 641 583 public void setPositionIndex(int positionIndex) … … 681 623 682 624 /** 683 Get the position number for the specified reporter and position index.684 The metod will query the data for all positions with the specified685 reporter, sort them by position and return the value given by the686 <code>positionIndex</code> parameter.687 688 @param dc The DbControl for database access689 @param reporter The reporter to look for, or null to find spots without reporter690 @param positionIndex The index of the position to find691 @return The position number692 @deprecated In 2.11 for performance reasons, use {@link #getPosition(DbControl, int, int)}693 instead694 */695 public int getPosition(DbControl dc, ReporterData reporter, int positionIndex)696 {697 int index = getReporterIndex(dc, reporter);698 return getPosition(dc, index, positionIndex);699 }700 701 /**702 625 Get a query returning the reporter data used by the reporter search page. 703 626 Note that the query is {@link DynamicSpotQuery} and not a … … 726 649 return reporterQuery; 727 650 } 728 729 /**730 @deprecated In 2.11. For performance reasons, use {@link731 #getSpotQuery(DbControl, int, int, List)} instead732 */733 public DynamicSpotQuery getSpotQuery(DbControl dc, ReporterData reporter, int positionIndex, List<TableColumn> selectionList)734 {735 int reporterIndex = getReporterIndex(dc, reporter);736 return getSpotQuery(dc, reporterIndex, positionIndex, selectionList);737 }738 739 651 740 652 /** … … 905 817 } 906 818 907 /**908 Look in the cache for the with the given reporter.909 910 @param reporter A reporter or null911 @return The index or -1 if the reporter is not found912 @deprecated This method is a helper for other deprecated methods.913 Do not use it in non-deprecated methods.914 */915 private int getReporterIndex(DbControl dc, ReporterData reporter)916 {917 if (cache == null) initReporterCache(dc);918 int reporterId = reporter == null ? 0 : reporter.getId();919 int index = 0;920 while (index < cache.length)921 {922 if (cache[index].id == reporterId) return index;923 ++index;924 }925 return -1;926 }927 928 819 @SuppressWarnings("unchecked") 929 820 private void initReporterCache(DbControl dc) -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/TableColumn.java
r4889 r5590 73 73 private final Formula.AverageMethod averageMethod; 74 74 private Formatter<?> formatter; 75 76 /**77 Create TableColumn.78 @param id79 @param property80 @param jepExpression81 @param datatype82 @param title83 @param description84 @deprecated85 */86 public TableColumn(String id, String property, String jepExpression, Type datatype, String title, String description)87 {88 this(id, property, jepExpression, datatype, title, description, "auto", true, true, true,89 datatype.isNumerical() ? Formula.AverageMethod.ARITHMETIC_MEAN : null, null);90 }91 75 92 76 public TableColumn(String id, String property, String jepExpression, Type datatype, String title, String description, String show, -
trunk/src/clients/web/net/sf/basedb/clients/web/util/SimpleSignalProgressReporter.java
r5420 r5590 26 26 import net.sf.basedb.core.SimpleProgressReporter; 27 27 import net.sf.basedb.core.signal.ShutdownSignalSender; 28 import net.sf.basedb.core.signal.Signal;29 28 import net.sf.basedb.core.signal.SignalException; 30 29 import net.sf.basedb.core.signal.SignalHandler; … … 32 31 import net.sf.basedb.core.signal.SignalSender; 33 32 import net.sf.basedb.core.signal.SignalTransporter; 34 import net.sf.basedb.core.signal.SimpleSignalSender;35 33 36 34 /** … … 134 132 return null; 135 133 } 136 137 @Deprecated138 @Override139 public void sendToAll(Signal signal)140 {141 sendToAll(new SimpleSignalSender(signal));142 }143 134 144 135 @Override -
trunk/src/core/net/sf/basedb/core/Affymetrix.java
r4517 r5590 41 41 public class Affymetrix 42 42 { 43 44 /**45 The name of the {@link AnyToAny} link between an array design46 and a file that contains the CDF information.47 @deprecated See {@link DataFileType#AFFYMETRIX_CDF}48 */49 public static final String CDF_LINK_NAME = "cdf-file";50 51 /**52 The name of the {@link AnyToAny} link between a raw bioassay53 and a file that contains the CEL information.54 @deprecated See {@link DataFileType#AFFYMETRIX_CEL}55 */56 public static final String CEL_LINK_NAME = "cel-file";57 43 58 /**59 The name of the {@link AnyToAny} link between a raw bioassay60 and a file that contains the CHP information.61 @deprecated See {@link DataFileType}62 */63 public static final String CHP_LINK_NAME = "chp-file";64 65 /**66 Attach a CDF file to an array design. When an array design67 has got a CDF file it counts as if it has features and it can be used68 for linking with {@link RawBioAssay}:s.69 <p>70 Starting with BASE 2.4 this method validates that71 the specified file is actaully a CDF file. See {@link #loadCdfFile(File)}.72 73 @param design The array design74 @param file The CDF file, or null to remove the file75 @throws PermissionDeniedException If the logged in user doesn't76 have write permission for the design and use permission for the77 file78 @throws InvalidDataException If the design is null or isn't an79 Affymetrix chip or if the file is not a CDF file80 @throws BaseException If there is another error81 @deprecated Use {@link FileStoreUtil#setDataFile(DbControl, FileStoreEnabled, String, File)}82 instead with {@link DataFileType#AFFYMETRIX_CDF} as the file83 type84 */85 public static void setCdfFile(ArrayDesign design, File file)86 throws PermissionDeniedException, InvalidDataException, BaseException87 {88 if (design == null) throw new InvalidUseOfNullException("design");89 if (!design.isPlatform(Platform.AFFYMETRIX))90 {91 throw new InvalidDataException("Array design isn't an Affymetrix chip: " + design);92 }93 DbControl dc = design.getDbControl();94 FileStoreUtil.setDataFile(dc, design, DataFileType.AFFYMETRIX_CDF, file);95 if (file != null) design.getFileSet().validate(dc, true);96 }97 98 /**99 Get the file that has been specified as the CDF file for an100 array design. This method has been deprecated with the101 implementation of the {@link Platform} and {@link DataFileType}102 which solves the problem in a more generic way.103 <p>104 This method is equivalent to:105 <pre class="code">106 DataFileType cdfType =107 DataFileType.getByExternalId(dc, DataFileType.AFFYMETRIX_CDF);108 File cdfFile = design.getFileSet().getMember(cdfType.getFile());109 </pre>110 111 @param design The design to get the CDF file from, it must112 be an Affymetrix chip113 @return The CDF file or null if no CDF file has been specified114 @throws PermissionDeniedException If the logged in user doesn't115 have read permission for the file116 @throws InvalidDataException If the design is null or isn't an117 Affymetrix chip118 @throws BaseException If there is another error119 @deprecated Use {@link FileStoreUtil#getDataFile(DbControl, FileStoreEnabled, String)}120 with a data file type of {@link DataFileType#AFFYMETRIX_CDF}121 instead122 */123 public static File getCdfFile(ArrayDesign design)124 throws PermissionDeniedException, InvalidDataException, BaseException125 {126 if (design == null) throw new InvalidUseOfNullException("design");127 if (!design.isPlatform(Platform.AFFYMETRIX))128 {129 throw new InvalidDataException("Array design isn't an Affymetrix chip: " + design.getName());130 }131 DbControl dc = design.getDbControl();132 return FileStoreUtil.getDataFile(dc, design, DataFileType.AFFYMETRIX_CDF);133 }134 135 /**136 Attach a CEL file to a raw bioassay. When a raw bioassay has got a CEL137 file it counts as if data has been loaded and it can be used138 in experiments for analysis. To be able to add a CEL file the139 array design must also be connected to an array design with140 a CDF file. See {@link #setCdfFile(ArrayDesign, File)}.141 <p>142 Starting with BASE 2.4 this method validates that the specified143 file is a CEL file and that it matches the CDF file attached to144 the array design. The check includes:145 146 <ul>147 <li>That the CEL chip type mathces the file name of the CDF file.148 <li>That the number of rows and columns are the same in both the149 CEL and the CDF150 </ul>151 152 <p>153 This method also sets the number of spots to the number of cells154 found in the CEL file.155 156 @param rawBioAssay The raw bioassay157 @param file The CEL file, or null to remove the file158 @throws PermissionDeniedException If the logged in user doesn't159 have write permission for the raw bioassay and use permission for the160 file161 @throws InvalidDataException If the raw bioassay is null or isn't an Affymetrix162 raw data type163 @throws BaseException If there is another error164 @deprecated Use {@link FileStoreUtil#setDataFile(DbControl, FileStoreEnabled, String, File)}165 instead with {@link DataFileType#AFFYMETRIX_CEL} as the file166 type167 */168 public static void setCelFile(RawBioAssay rawBioAssay, File file)169 throws PermissionDeniedException, InvalidDataException, BaseException170 {171 if (rawBioAssay == null) throw new InvalidUseOfNullException("rawBioAssay");172 rawBioAssay.checkPermission(Permission.WRITE);173 174 if (!rawBioAssay.isPlatform(Platform.AFFYMETRIX))175 {176 throw new InvalidDataException("Raw bioassay isn't an Affymetrix chip: " + rawBioAssay.getName());177 }178 DbControl dc = rawBioAssay.getDbControl();179 FileStoreUtil.setDataFile(dc, rawBioAssay, DataFileType.AFFYMETRIX_CEL, file);180 if (file != null) rawBioAssay.getFileSet().validate(dc, true);181 }182 183 /**184 Get the file that has been specified as the CEL file for a185 raw bioassay.186 187 @param rawBioAssay The raw bioassay to get the CEL file from, it must188 be a raw bioassay of an Affymetrix raw data type189 @return The CEL file or null if no CEL file has been specified190 @throws PermissionDeniedException If the logged in user doesn't191 have read permission for the file192 @throws InvalidDataException If the raw bioassay is null or isn't an193 Affymetrix raw data type194 @throws BaseException If there is another error195 @deprecated196 */197 public static File getCelFile(RawBioAssay rawBioAssay)198 throws PermissionDeniedException, InvalidDataException, BaseException199 {200 if (rawBioAssay == null) throw new InvalidUseOfNullException("rawBioAssay");201 if (!rawBioAssay.isPlatform(Platform.AFFYMETRIX))202 {203 throw new InvalidDataException("Raw data type for " + rawBioAssay.getName() +204 " is not an Affymetrix raw data type");205 }206 DbControl dc = rawBioAssay.getDbControl();207 return FileStoreUtil.getDataFile(dc, rawBioAssay, DataFileType.AFFYMETRIX_CEL);208 }209 210 44 /** 211 45 Check if the CEL file on the raw bioassay matches the CDF file on the … … 261 95 cdf.getHeader().getRows() + ", cols=" + cdf.getHeader().getCols()+")"); 262 96 } 263 }264 265 /**266 Load a CDF file using the Affymetric Fusion SDK. This method267 checks that the file exists, and read all headers.268 269 @param cdfFile The file to load270 @return A FusionCDFData object representing the CDF file271 @throws ItemNotFoundException If the actaul file is not on the server272 @throws InvalidDataException If the file is not a CDF file273 @since 2.4274 @deprecated Use {@link CdfFileHandler#loadCdfFile(File)} instead275 */276 public static FusionCDFData loadCdfFile(File cdfFile)277 throws ItemNotFoundException, InvalidDataException278 {279 return new CdfFileHandler().loadCdfFile(cdfFile);280 }281 282 /**283 Load a CEL file using the Affymetric Fusion SDK. This method284 checks that the file exists, and read all headers.285 286 @param celFile The file to load287 @return A FusionCELData object representing the CEL file288 @throws ItemNotFoundException If the actaul file is not on the server289 @throws InvalidDataException If the file is not a CEL file290 @since 2.4291 @deprecated Use {@link CdfFileHandler#loadCdfFile(File)} instead292 */293 public static FusionCELData loadCelFile(File celFile)294 throws InvalidDataException295 {296 return new CelFileHandler().loadCelFile(celFile);297 97 } 298 98 -
trunk/src/core/net/sf/basedb/core/AnnotationBetweenRestriction.java
r5320 r5590 44 44 private final Object highValue; 45 45 46 /**47 Create a new annotation restriction.48 49 @deprecated Use {@link #AnnotationBetweenRestriction(String, AnnotationType, Object, Object, boolean)}50 instead with alias=null51 */52 public AnnotationBetweenRestriction(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)53 throws InvalidDataException54 {55 this(null, annotationType, lowValue, highValue, includeInheriting);56 }57 58 46 /** 59 47 Create a new annotation restriction. -
trunk/src/core/net/sf/basedb/core/AnnotationInRestriction.java
r5320 r5590 44 44 { 45 45 private final List<?> values; 46 47 /**48 Create a new annotation restriction.49 50 @deprecated Use {@link #AnnotationInRestriction(String, AnnotationType, boolean, Object[])}51 instead with alias=null52 */53 public AnnotationInRestriction(AnnotationType annotationType, boolean includeInheriting, Object... values)54 throws InvalidDataException55 {56 this(null, annotationType, includeInheriting, values);57 }58 46 59 47 /** -
trunk/src/core/net/sf/basedb/core/AnnotationSet.java
r5319 r5590 412 412 } 413 413 414 /**415 Find an annotation of the specified annotation type among all annotations416 including the inherited annotations. This method will first search for the417 annotation in the following order:418 <ol>419 <li>The primary annotations420 <li>The inherited annotations421 <li>The inherited annotation sets422 </ol>423 If no annotation of the specified type is found, null is returned.424 If more than one annotation of the specified type exists only the first425 one found is returned.426 427 @param annotationType The annotation type to look for428 @return An <code>Annotation</code> object or null429 @deprecated Use {@link #findAnnotations(DbControl, AnnotationType, Boolean)} instead430 */431 public Annotation findAnnotation(AnnotationType annotationType)432 throws PermissionDeniedException433 {434 List<Annotation> annotations = findAnnotations(getDbControl(), annotationType, null);435 return annotations.size() > 0 ? annotations.get(0) : null;436 }437 438 414 /** 439 415 Find annotations of the specified annotation type among all annotations … … 741 717 } 742 718 743 /**744 Automatically inherit all annotations of the specified annotation745 type from parent items unless this annotation set already contains746 an annotation of the specified type.747 <p>748 This method will only consider parent items that the logged in user749 has access to with USE permission.750 <p>751 This method may result in inheriting multiple annotations (from different752 parent items) of the specified annotation type.753 754 @param dc The DbControl to use for database access755 @param annotationType The annotation type to look for756 @param preferAnnotationSet If TRUE, the entire annotation set containing the757 found annotation is inherited, otherwise only the found annotation is inherited758 @since 2.9759 @deprecated In 2.15, use {@link #autoInherit(DbControl, Collection, SnapshotManager, boolean)}760 instead since it has better performance761 */762 public int autoInherit(DbControl dc, final AnnotationType annotationType, boolean preferAnnotationSet)763 {764 return autoInherit(dc, Collections.singletonList(annotationType), new SnapshotManager(), preferAnnotationSet);765 }766 767 719 /** 768 720 Automatically inherit all annotations of one or more specified annotation -
trunk/src/core/net/sf/basedb/core/AnnotationSimpleRestriction.java
r5429 r5590 50 50 private final List<Object> values; 51 51 private List<ParameterExpression> parameters; 52 53 /**54 Create a new annotation restriction using a simple expression:55 <code>annotation operator value</code>. The restriction is applied to56 the root element of the query.57 58 @deprecated Use {@link #AnnotationSimpleRestriction(String, AnnotationType, Operator, Object, boolean)}59 instead with alias=null60 */61 public AnnotationSimpleRestriction(AnnotationType annotationType, Operator operator, Object value, boolean includeInheriting)62 throws InvalidDataException63 {64 this(null, annotationType, operator, value, includeInheriting);65 }66 52 67 53 /** … … 103 89 } 104 90 105 106 /**107 Creates a new annotation restriction for a specific <code>valueType</code>.108 The restriction is applied to the root element of the query.109 110 @deprecated Use {@link #AnnotationSimpleRestriction(String, int, Type, Operator, Object, boolean)}111 instead with alias=null112 */113 public AnnotationSimpleRestriction(int annotationTypeId, Type valueType, Operator operator, Object value, boolean includeInheriting)114 throws InvalidDataException115 {116 this(null, annotationTypeId, valueType, operator, value, includeInheriting);117 }118 91 119 92 /** -
trunk/src/core/net/sf/basedb/core/AnyToAny.java
r5345 r5590 339 339 AnyToAny ata = dc.getItem(AnyToAny.class, HibernateUtil.loadData(AnyToAnyData.class, query)); 340 340 return ata != null; 341 }342 343 /**344 @deprecated Use {@link #deleteStrayLinks(ProgressReporter)} instead.345 */346 public static synchronized void deleteStrayLinks()347 {348 deleteStrayLinks(null);349 341 } 350 342 -
trunk/src/core/net/sf/basedb/core/ArrayDesign.java
r5384 r5590 72 72 */ 73 73 public static final Item TYPE = Item.ARRAYDESIGN; 74 75 /**76 Create a new <code>ArrayDesign</code> item.77 78 @param dc The <code>DbControl</code> which will be used for79 permission checking and database access80 @param affyChip <code>true</code> if the new design is an Affymetrix chip,81 <code>false</code> otherwise82 @return The new <code>ArrayDesign</code> item83 @throws BaseException If there is an error84 @deprecated Use {@link #getNew(DbControl, Platform)} instead85 */86 public static ArrayDesign getNew(DbControl dc, boolean affyChip)87 throws BaseException88 {89 Platform platform = Platform.getByExternalId(dc,90 affyChip ? Platform.AFFYMETRIX : Platform.GENERIC);91 return getNew(dc, platform);92 }93 74 94 75 /** … … 342 323 @since 2.5 343 324 */ 344 @SuppressWarnings("deprecation")345 325 public void setPlatform(Platform platform) 346 326 { … … 349 329 getData().setPlatform(platform.getData()); 350 330 getData().setVariant(null); 351 getData().setAffyChip(isPlatform(Platform.AFFYMETRIX));352 331 } 353 332 … … 362 341 @since 2.5 363 342 */ 364 @SuppressWarnings("deprecation")365 343 public void setVariant(PlatformVariant variant) 366 344 { … … 375 353 getData().setVariant(null); 376 354 } 377 getData().setAffyChip(isPlatform(Platform.AFFYMETRIX));378 355 } 379 356 … … 414 391 return getData().getPlatform().isFileOnly(); 415 392 } 416 }417 418 /**419 @return TRUE if this is an Affymetrix chip, FALSE otherwise.420 @deprecated Use {@link #isPlatform(String)} instead with421 {@link Platform#AFFYMETRIX} as the parameter422 */423 public boolean isAffyChip()424 {425 return isPlatform(Platform.AFFYMETRIX);426 393 } 427 394 … … 666 633 the {@link FeatureBatcher} object requires that the block has an id. 667 634 <p> 668 Use the {@link #getFeatureBatcher( )} method to get an batcher object669 that can add features to the new block.635 Use the {@link #getFeatureBatcher(FeatureIdentificationMethod, Job)} 636 method to get an batcher object that can add features to the new block. 670 637 <p> 671 638 It is not possible to add blocks to an array design which uses a … … 704 671 } 705 672 return adb; 706 }707 708 /**709 Get a feature batcher that uses the COORDINATES feature identification710 method.711 @deprecated Use {@link #getFeatureBatcher(FeatureIdentificationMethod, Job)} instead712 */713 public FeatureBatcher getFeatureBatcher()714 throws PermissionDeniedException, BaseException715 {716 return getFeatureBatcher(FeatureIdentificationMethod.COORDINATES, null);717 }718 719 /**720 @since 2.6721 @deprecated Use {@link #getFeatureBatcher(FeatureIdentificationMethod, Job)}722 instead723 */724 public FeatureBatcher xgetFeatureBatcher(FeatureIdentificationMethod fiMethod)725 throws PermissionDeniedException, BaseException726 {727 return getFeatureBatcher(fiMethod, null);728 673 } 729 674 … … 863 808 864 809 /** 865 Get the number of features added to this array design. If the866 array design has features in the database the value from {@link #getNumDbFeatures()}867 is returned, otherwise the value from {@link #getNumFileFeatures()}868 @return The number of features or probesets869 @since 2.4870 @deprecated Use {@link #getNumDbFeatures()} and/or {@link #getNumFileFeatures()}871 instead872 */873 public long getNumFeatures(DbControl dc)874 {875 int dbFeatures = getNumDbFeatures();876 return dbFeatures > 0 ? dbFeatures : getNumFileFeatures();877 }878 879 /**880 810 Get the number of features on this array design that are 881 811 stored in the database. -
trunk/src/core/net/sf/basedb/core/BasicItem.java
r5384 r5590 198 198 @return TRUE if the item is detached, FALSE otherwise 199 199 @see DbControl#detachItem(BasicItem) 200 @see DbControl#reattachItem(BasicItem )200 @see DbControl#reattachItem(BasicItem, boolean) 201 201 @see DbControl#saveItem(BasicItem) 202 202 */ -
trunk/src/core/net/sf/basedb/core/BioPlate.java
r5566 r5590 29 29 import net.sf.basedb.core.data.PlateGeometryData; 30 30 import net.sf.basedb.core.query.Hql; 31 import net.sf.basedb.core.query.Orders;32 31 import net.sf.basedb.core.query.Restrictions; 33 32 34 import java.util.List;35 33 import java.util.Set; 36 34 … … 62 60 */ 63 61 public static final int MAX_BARCODE_LENGTH = BioPlateData.MAX_BARCODE_LENGTH; 64 65 /**66 @deprecated In 2.16, use {@link #getNew(DbControl, PlateGeometry, BioPlateType)} instead67 Will try to find a bioplate type that is not locked to a specific biomaterial68 type. If not found an exception is thrown.69 */70 public static BioPlate getNew(DbControl dc, PlateGeometry plateGeometry)71 throws BaseException, InvalidDataException72 {73 ItemQuery<BioPlateType> query = BioPlateType.getQuery();74 query.include(Include.ALL);75 query.restrict(Restrictions.eq(Hql.property("bioMaterialType"), null));76 query.order(Orders.asc(Hql.property("id")));77 List<BioPlateType> result = query.list(dc);78 if (result.size() == 0) throw new ItemNotFoundException("BioPlateType");79 return getNew(dc, plateGeometry, result.get(0));80 }81 62 82 63 /** -
trunk/src/core/net/sf/basedb/core/DbControl.java
r5535 r5590 997 997 @param item The item to be detached 998 998 @throws BaseException If there is an error 999 @see #reattachItem(BasicItem )999 @see #reattachItem(BasicItem, boolean) 1000 1000 */ 1001 1001 public void detachItem(BasicItem item) … … 1008 1008 itemCache.remove(item.getData()); 1009 1009 item.setDbControl(null); 1010 }1011 1012 /**1013 Reattach a detached item assuming that it has not been1014 updated while it was detached.1015 @deprecated Use {@link #reattachItem(BasicItem, boolean)} instead1016 */1017 public void reattachItem(BasicItem item)1018 throws PermissionDeniedException, ItemNotFoundException, BaseException1019 {1020 reattachItem(item, false);1021 1010 } 1022 1011 … … 1089 1078 if (isClosed()) throw new ConnectionClosedException(); 1090 1079 sc.updateLastAccess(); 1091 if (!isAttached(item)) reattachItem(item );1080 if (!isAttached(item)) reattachItem(item, false); 1092 1081 HibernateUtil.refresh(hSession, item.getData()); 1093 1082 } … … 1116 1105 @throws BaseException If there is an error 1117 1106 @see #detachItem(BasicItem) 1118 @see #reattachItem(BasicItem )1107 @see #reattachItem(BasicItem, boolean) 1119 1108 */ 1120 1109 public void initCollection(BasicItem item, String collectionName) -
trunk/src/core/net/sf/basedb/core/ExtendedProperty.java
r4889 r5590 218 218 } 219 219 220 /**221 Parse a string and return an object of the correct type for this property.222 Numeric properties are parsed with the specified number format.223 @param value The value to parse224 @param numberFormat The number format, or null to use Double.valueOf225 @return An object226 @throws InvalidDataException If the string cannot be converted to the correct type227 @see #getType()228 @since 2.2229 @deprecated Use {@link #parseString(String, NumberFormat, boolean)} instead230 */231 public Object parseString(String value, NumberFormat numberFormat)232 {233 return getType().parseString(value, numberFormat);234 }235 236 220 /** 237 221 Parse a string and return an object of the correct type for this property. -
trunk/src/core/net/sf/basedb/core/Formula.java
r5385 r5590 115 115 } 116 116 117 /**118 @deprecated In 2.12. Use {@link #getQuery(Type, RawDataType, IntensityTransform)} instead119 */120 public static ItemQuery<Formula> xgetQuery(Formula.Type type, RawDataType rawDataType)121 {122 return getQuery(type, rawDataType, null);123 }124 125 117 /** 126 118 Get a query that return formulas that can be used with the specified -
trunk/src/core/net/sf/basedb/core/ItemContext.java
r5574 r5590 454 454 /** 455 455 Get a message that should be displayed by a client application as 456 soon as it is appropriate to do so. Typically, the {@link #configureQuery(EntityQuery, boolean)} 456 soon as it is appropriate to do so. Typically, the 457 {@link #configureQuery(DbControl, EntityQuery, boolean)} 457 458 sets an error message if it couldn't configure the query for some reason. 458 459 */ … … 464 465 /** 465 466 Set a message to be displayed by a client application as soon as 466 it is appropriate to do so. Typically, the {@link #configureQuery( EntityQuery, boolean)}467 it is appropriate to do so. Typically, the {@link #configureQuery(DbControl, EntityQuery, boolean)} 467 468 sets an error message if it couldn't configure the query for some reason. 468 469 This property is not stored in the database. … … 1054 1055 } 1055 1056 1056 /**1057 This method will fail if used to filter on reporter lists or other items1058 that require a DbControl.1059 @deprecated Use {@link #configureQuery(DbControl, EntityQuery, boolean)} instead1060 */1061 public void configureQuery(EntityQuery query, boolean autoLeftJoin)1062 throws BaseException1063 {1064 configureQuery(null, query, autoLeftJoin);1065 }1066 1067 1057 /** 1068 1058 Use the settings in this context to configure a query. -
trunk/src/core/net/sf/basedb/core/ItemKey.java
r5345 r5590 147 147 return ik; 148 148 } 149 150 /**151 @deprecated Use {@link #deleteUnusedItemKeys()} instead which returns the number of152 deleted keys153 */154 public static synchronized void deleteUnusedKeys()155 throws BaseException156 {157 deleteUnusedItemKeys();158 }159 160 149 161 150 /** -
trunk/src/core/net/sf/basedb/core/Job.java
r5453 r5590 64 64 The following methods can only be used by jobs executed by an external program: 65 65 <ul> 66 <li>{@link #start(String, String )}: Tell the core that job has started66 <li>{@link #start(String, String, JobAgent)}: Tell the core that job has started 67 67 <li>{@link #setProgress(int, String)}: Update the progress status of the job 68 68 <li>{@link #doneOk(String)}: Tell the core that the job finished successfully … … 85 85 public static final Item TYPE = Item.JOB; 86 86 87 /**88 Create a new job.89 @deprecated Use {@link #getNew(DbControl, PluginDefinition, PluginConfiguration, Experiment)}90 instead91 */92 public static Job getNew(DbControl dc, PluginDefinition plugin, PluginConfiguration config)93 throws InvalidDataException, BaseException94 {95 return getNew(dc, plugin, config, null);96 }97 98 87 /** 99 88 Create a new <code>Job</code> item. … … 689 678 Get the date and time the job was started. 690 679 @return A date, or null if the job hasn't started 691 @see #start(String, String )680 @see #start(String, String, JobAgent) 692 681 */ 693 682 public Date getStarted() … … 882 871 883 872 /** 884 @deprecated Use {@link #setPrepared(String, JobAgent)} instead885 */886 public void setPrepared(String server)887 throws PermissionDeniedException888 {889 setPrepared(server, null);890 }891 892 /**893 873 Set the job's status to {@link Status#PREPARED}. This status is 894 874 used to signal that a job is about to be executed, but the actual excecution … … 917 897 data.setServer(StringUtil.setNullableString(server, "server", MAX_SERVER_LENGTH)); 918 898 getData().setJobAgentId(agent == null ? null : agent.getId()); 919 }920 921 /**922 @deprecated Use {@link #start(String, String, JobAgent)} instead923 */924 public void start(String statusMessage, String server)925 throws PermissionDeniedException, InvalidDataException926 {927 start(statusMessage, server, null);928 899 } 929 900 … … 1076 1047 data.setEnded(new Date()); 1077 1048 if (getSendMessage()) sendMessage(); 1078 }1079 1080 /**1081 Retry a job which finished with an error.1082 @param useLatestConfiguration If the job should use the latest configuration1083 parameters in case these has changed since the job was created1084 @throws PermissionDeniedException If the logged in user doesn't have write permission1085 @deprecated Use {@link #retry(boolean, boolean)} instead1086 */1087 public void retry(boolean useLatestConfiguration)1088 throws PermissionDeniedException1089 {1090 retry(useLatestConfiguration, false);1091 1049 } 1092 1050 -
trunk/src/core/net/sf/basedb/core/Metadata.java
r5475 r5590 26 26 import net.sf.basedb.core.data.BasicData; 27 27 import net.sf.basedb.core.data.BatchableData; 28 import net.sf.basedb.core.data.ComponentData;29 28 import net.sf.basedb.core.data.IdentifiableData; 30 29 import net.sf.basedb.core.data.ReporterListScoreData; … … 95 94 diskConsumableItems = null; 96 95 fileStoreEnabledItems = null; 97 }98 99 /**100 Get the value of a property of an item. This method can be used101 in place of a regular <code>get</code> method of the item. Ie.102 the following method calls are equivalent:103 <pre class="code">104 String name = item.getName();105 String name = (String)Metadata.getProperty(item, "name");106 </pre>107 You can even use dot notation to navigate to associated items:108 <pre class="code">109 String quota = item.getOwner().getQuota().getName();110 String quota = (String)Metadata.getProperty(item, "owner.quota.name");111 </pre>112 113 @param item The item object to get the value from. Null is not allowed114 @param propertyName The name of the property to get115 @return The value as a java.lang.Object116 @throws BaseException If something goes wrong.117 @throws InvalidUseOfNullException If required parameter is null118 @deprecated In 2.15, use {@link #getPropertyPath(String, boolean)} instead119 */120 @Deprecated121 @SuppressWarnings({"unchecked"})122 public static Object getPropertyValue(BasicItem item, String propertyName)123 throws BaseException124 {125 if (item == null) throw new InvalidUseOfNullException("item");126 127 Metadata md = getInstance(item.getClass());128 return md.getPropertyValue(item.getDbControl(), item, propertyName);129 96 } 130 97 … … 455 422 } 456 423 457 /**458 Get the value of a property of an item. This method can be used459 in place of a regular <code>get</code> method of the item. Ie.460 the following method calls are equivalent:461 <pre class="code">462 String name = item.getName();463 String name = (String)Metadata.getProperty(item, "name");464 </pre>465 You can even use dot notation to navigate to associated items:466 <pre class="code">467 String quota = item.getOwner().getQuota().getName();468 String quota = (String)Metadata.getProperty(item, "owner.quota.name");469 </pre>470 471 @param dc The DbControl object used if database access is needed472 @param item The item object to get the value from. Null is not allowed.473 @param propertyName The name of the property to get. Null is not allowed.474 @return Property value as a java.lang.Object or475 null if the property has no value.476 @throws BaseException If getting the property value goes wrong.477 @throws InvalidUseOfNullException if any of the required arguments is null.478 @deprecated In 2.15, use {@link #getPropertyPath(String, boolean)} instead479 */480 @Deprecated481 public Object getPropertyValue(DbControl dc, C item, String propertyName)482 throws BaseException483 {484 if (item == null) throw new InvalidUseOfNullException("item");485 if (propertyName == null) throw new InvalidUseOfNullException("propertyName");486 String[] propertyPath = propertyName.split("\\.|\\#");487 ClassMetadata currentClassMetadata = classMetadata;488 String currentIdProperty = currentClassMetadata.getIdentifierPropertyName();489 org.hibernate.Session session = dc.getHibernateSession();490 Object value = null;491 Object data = null;492 if (item instanceof BasicItem)493 {494 data = ((BasicItem)item).getData();495 }496 else if (item instanceof BasicData)497 {498 data = (BasicData)item;499 }500 else if (item instanceof ReporterScore)501 {502 data = ((ReporterScore)item).getData();503 }504 else505 {506 throw new AssertionError("Item: " + item + " is not a BasicItem, BasicData or ReporterScore");507 }508 509 try510 {511 for (int i = 0; i < propertyPath.length; ++i)512 {513 if (value instanceof BasicData)514 {515 BasicData bData = (BasicData)value;516 data = value;517 Class<?> dataClass = null;518 // If it is a proxy we must reload it using the current session519 if (data instanceof org.hibernate.proxy.HibernateProxy)520 {521 dataClass = org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(data);522 data = HibernateUtil.loadData(session, dataClass, bData.getId());523 }524 else525 {526 dataClass = data.getClass();527 }528 currentClassMetadata = HibernateUtil.getClassMetadata(dataClass.getName());529 currentIdProperty = currentClassMetadata.getIdentifierPropertyName();530 }531 532 if (propertyPath[i].equals(currentIdProperty))533 {534 value = session.getIdentifier(data);535 }536 else if (value instanceof ComponentData)537 {538 ComponentType type = (ComponentType)currentClassMetadata.getPropertyType(propertyPath[i-1]);539 data = value;540 // There is no get-by-name method, we need to find the index541 String[] subProperties = type.getPropertyNames();542 for (int index = 0; index < subProperties.length; ++index)543 {544 if (subProperties[index].equals(propertyPath[i]))545 {546 value = type.getPropertyValue(data, index, EntityMode.POJO);547 break;548 }549 }550 }551 else552 {553 value = currentClassMetadata.getPropertyValue(data, propertyPath[i], EntityMode.POJO);554 }555 if (value == null) return null;556 }557 }558 catch (Exception ex)559 {560 throw new BaseException(ex);561 }562 563 if (value instanceof BasicData)564 {565 if (value instanceof BatchableData)566 {567 HibernateUtil.evictData(dc.getHibernateSession(), (BasicData)value);568 }569 else570 {571 value = dc.getItem(BasicItem.class, (BasicData)value);572 }573 }574 575 // Must make a copy, or a user with READ permission may change the value576 else if (value instanceof Date)577 {578 value = DateUtil.copy((Date)value);579 }580 // We can only return collections if they don't contain BasicData object,581 // since that would bypass permission checking582 else if (value instanceof Collection)583 {584 Collection<?> c = (Collection<?>)value;585 Object element = null;586 if (!c.isEmpty()) element = c.iterator().next();587 if (element instanceof BasicData)588 {589 throw new PermissionDeniedException(Permission.READ, "collection '"+propertyName+"' of "+item);590 }591 value = Collections.unmodifiableCollection(c);592 }593 else if (value instanceof Map)594 {595 Map<?, ?> m = (Map<?, ?>)value;596 Map.Entry<?, ?> entry = null;597 if (!m.isEmpty()) entry = m.entrySet().iterator().next();598 if (entry != null && (entry.getKey() instanceof BasicData || entry.getValue() instanceof BasicData))599 {600 throw new PermissionDeniedException(Permission.READ, "collection '"+propertyName+"' of "+item);601 }602 value = Collections.unmodifiableMap(m);603 }604 return value;605 }606 607 424 public String toString() 608 425 { -
trunk/src/core/net/sf/basedb/core/PluginConfiguration.java
r4999 r5590 622 622 623 623 /** 624 Create a new job.625 @deprecated Use {@link #newJob(Experiment)} instead626 */627 public Job newJob()628 throws PermissionDeniedException, BaseException629 {630 Job j = Job.getNew(getDbControl(), getPluginDefinition(), this, null);631 return j;632 }633 634 /**635 624 Create a new {@link Job} for this plugin configuration. 636 625 @param experiment The experiment the job is part of, or null -
trunk/src/core/net/sf/basedb/core/Project.java
r5368 r5590 475 475 476 476 /** 477 @deprecated Use {@link #getItems(Item, int, int, Permission, Set)} instead 478 */ 479 public ResultList<Shareable> getItems(Item itemType, int firstItem, int maxItems, Permission permission) 480 { 481 return getItems(itemType == null ? null : Collections.singleton(itemType), 482 firstItem, maxItems, permission, null, null); 483 } 484 485 /** 486 @see #getItems(Set, int, int, Permission, Set) 477 @see #getItems(Set, int, int, Permission, Set, Restriction) 487 478 @since 2.3.1 488 479 */ … … 493 484 firstItem, maxItems, permission, include, null); 494 485 } 495 496 /**497 @since 2.7.1498 @deprecated In 2.15, use {@link #getItems(Set, int, int, Permission, Set, Restriction)}499 instead500 */501 public ResultList<Shareable> getItems(Set<Item> itemTypes, int firstItem, int maxItems,502 Permission permission, Set<Include> include)503 {504 return getItems(itemTypes, firstItem, maxItems, permission, include, null);505 }506 507 486 508 487 /** -
trunk/src/core/net/sf/basedb/core/ProjectKey.java
r5345 r5590 123 123 124 124 /** 125 @deprecated Use {@link #deleteUnusedProjectKeys()} instead which returns the number of126 deleted keys127 */128 public static synchronized void deleteUnusedKeys()129 throws BaseException130 {131 deleteUnusedProjectKeys();132 }133 134 /**135 125 Delete all keys that are currently not used by any item. This method 136 126 is intended to be executed at regular intervals by a cleanup application. -
trunk/src/core/net/sf/basedb/core/PropertyFilter.java
r5451 r5590 426 426 } 427 427 428 /**429 This method will fail if used to filter on reporter lists or collections.430 @deprecated Use {@link #getRestriction(DbControl, EntityQuery)} instead431 */432 public Restriction getRestriction()433 {434 return getRestriction(null, null);435 }436 437 /**438 This method will fail if used to filter on collections.439 @deprecated Use {@link #getRestriction(DbControl, EntityQuery)} instead440 */441 public Restriction getRestriction(DbControl dc)442 {443 return getRestriction(dc, null);444 }445 446 428 /** 447 429 Create a restriction from the filter. There are a few special cases: -
trunk/src/core/net/sf/basedb/core/RawBioAssay.java
r5319 r5590 26 26 import net.sf.basedb.core.data.ArrayDesignData; 27 27 import net.sf.basedb.core.data.FeatureData; 28 import net.sf.basedb.core.data.PlatformData;29 import net.sf.basedb.core.data.PlatformVariantData;30 28 import net.sf.basedb.core.data.ProtocolData; 31 29 import net.sf.basedb.core.data.RawBioAssayData; … … 96 94 public static final int MAX_HEADER_VALUE_LENGTH = RawBioAssayData.MAX_HEADER_VALUE_LENGTH; 97 95 98 /**99 Create a new <code>RawBioAssay</code> item. The platform/variant will100 automatically be set to the values returned by {@link RawDataType#getPlatform(DbControl)}101 and {@link RawDataType#getVariant(DbControl)}. If both return null102 the {@link Platform#GENERIC} is used.103 104 @param dc The <code>DbControl</code> which will be used for105 permission checking and database access106 @param rawDataType The data type of the raw data107 @return The new <code>RawBioAssay</code> item108 @throws BaseException If there is an error109 @deprecated Use {@link #getNew(DbControl, Platform, RawDataType)} or110 {@link #getNew(DbControl, PlatformVariant, RawDataType)} instead.111 This method will set the platform to {@link Platform#GENERIC}.112 */113 public static RawBioAssay getNew(DbControl dc, RawDataType rawDataType)114 throws BaseException115 {116 Platform platform = rawDataType.getPlatform(dc);117 PlatformVariant variant = rawDataType.getVariant(dc);118 RawBioAssay rba = null;119 if (variant != null)120 {121 rba = getNew(dc, variant, rawDataType);122 }123 else124 {125 if (platform == null) platform = Platform.getByExternalId(dc, Platform.GENERIC);126 rba = getNew(dc, platform, rawDataType);127 }128 return rba;129 }130 131 96 /** 132 97 Create a new raw bioassay for a specific platform and/or raw data type. … … 433 398 if (action == Transactional.Action.DELETE) 434 399 { 435 if (getRawDataType().isStoredInDb() && get Spots() > 0)400 if (getRawDataType().isStoredInDb() && getNumDbSpots() > 0) 436 401 { 437 402 RawDataBatcher rdb = RawDataBatcher.getNew(getDbControl(), this, null); … … 626 591 627 592 /** 628 Set the raw data type. The raw data type cannot be changed if raw629 data has been added to the database.630 631 @param rawDataType The raw data type, null is not allowed632 @throws PermissionDeniedException If the logged in user doesn't have633 write permission for the raw bioassay or spots has already been added634 @deprecated Use {@link #setPlatform(Platform, RawDataType)} or635 {@link #setVariant(PlatformVariant, RawDataType)} instead636 */637 public void setRawDataType(RawDataType rawDataType)638 throws PermissionDeniedException, InvalidDataException639 {640 checkPermission(Permission.WRITE);641 if (rawDataType == null) throw new InvalidUseOfNullException("rawDataType");642 if (getData().getSpots() > 0)643 {644 throw new PermissionDeniedException("Not allowed to change the raw data type after raw data has been added");645 }646 647 PlatformData platform = rawDataType.getPlatformProxy();648 PlatformVariantData variant = rawDataType.getVariantProxy();649 650 getData().setPlatform(platform);651 getData().setVariant(variant);652 getData().setRawDataType(rawDataType.getId());653 }654 655 /**656 593 Get the job that imported data to this raw bioassay. 657 594 @return A <code>Job</code> object, ot null if this information is … … 806 743 Set the {@link ArrayDesign} this raw data uses. The array design can't be 807 744 changed with this method once raw data spots has been added. Use 808 the {@link #updateArrayDesign(ArrayDesign, ProgressReporter)} to745 the {@link #updateArrayDesign(ArrayDesign, FeatureIdentificationMethod, ProgressReporter)} to 809 746 do that. 810 747 … … 826 763 arrayDesignHasBeenSet = true; 827 764 getData().setArrayDesign(arrayDesign == null ? null : arrayDesign.getData()); 828 }829 830 /**831 @deprecated Use {@link #updateArrayDesign(ArrayDesign, FeatureIdentificationMethod, ProgressReporter)}832 instead833 */834 public void updateArrayDesign(ArrayDesign arrayDesign, ProgressReporter progress)835 throws PermissionDeniedException, InvalidDataException836 {837 updateArrayDesign(arrayDesign, null, progress);838 765 } 839 766 … … 889 816 890 817 /** 891 Get the number of raw data spots that has been added to this 892 raw bioassay. 818 Utility method that either returns the number of db spots 819 or the number of file spots. If there is spot data in 820 the database, this number is returned, otherwise the number 821 of file spots is returned. 893 822 @return The number of spots 894 @deprecated Use {@link #getNumDbSpots()} or {@link #getNumFileSpots()}895 instead. This method first checks the database and if not 0, it896 returns that value, otherwise it returns the number of file spots897 823 */ 898 824 public int getSpots() … … 1067 993 return query; 1068 994 } 1069 1070 /**1071 @deprecated Use {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)} instead1072 */1073 public RawDataBatcher getRawDataBatcher()1074 throws PermissionDeniedException, BaseException1075 {1076 return getRawDataBatcher(null, null);1077 }1078 1079 /**1080 @deprecated Use {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)}1081 instead.1082 @since 2.61083 */1084 public RawDataBatcher getRawDataBatcher(FeatureIdentificationMethod fiMethod)1085 throws PermissionDeniedException, BaseException1086 {1087 return getRawDataBatcher(fiMethod, null);1088 }1089 1090 995 1091 996 /** … … 1126 1031 Delete the raw data that has been added to the database for this 1127 1032 raw bioassay. You should not call this method in the same transaction as 1128 adding raw data with the batcher from {@link #getRawDataBatcher( )}.1033 adding raw data with the batcher from {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)}. 1129 1034 1130 1035 @throws PermissionDeniedException If the logged in user doesn't have 1131 1036 write permission or a {@link RawDataBatcher} has been fetched 1132 using the {@link #getRawDataBatcher( )} method or the raw bioassay1133 is used by some experiment1037 using the {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)} 1038 method or the raw bioassay is used by some experiment 1134 1039 @throws BaseException If there is another error 1135 1040 */ -
trunk/src/core/net/sf/basedb/core/RawDataBatcher.java
r4889 r5590 53 53 <li>If a feature isn't found, an {@link ItemNotFoundException} is thrown 54 54 <li>If you have specified to verify the external reporter id by using the 55 {@link #insert(RawData, String )} method the external reporter id of the55 {@link #insert(RawData, String, String)} method the external reporter id of the 56 56 feature is checked against the supplied reporter id. If they don't 57 57 match an {@link InvalidDataException} is thrown. … … 65 65 and none of the above apply. The major difference is that you must alsways set a 66 66 reporter youself in this case. We recommend that you use the {@link #insert(RawData)} 67 method if no array design is connected, and the {@link #insert(RawData, String )}67 method if no array design is connected, and the {@link #insert(RawData, String, String)} 68 68 method otherwise. 69 69 … … 480 480 { 481 481 return rawBioAssay; 482 }483 484 /**485 @deprecated Use {@link #insert(RawData, String, String)} instead486 */487 public void insert(RawData data, String externalReporterId)488 throws BaseException489 {490 doInsert(data, externalReporterId, null, externalReporterId != null);491 482 } 492 483 … … 605 596 Create a new raw data object. After you have set all 606 597 properties, use one of the {@link #insert(RawData)} 607 or {@link #insert(RawData, String )} methods to insert the raw data.598 or {@link #insert(RawData, String, String)} methods to insert the raw data. 608 599 You do not have to set the reporter if the raw bioassay is connected to 609 600 an array design. -
trunk/src/core/net/sf/basedb/core/RawDataType.java
r5574 r5590 53 53 private final String description; 54 54 private final boolean fileOnly; 55 private final boolean isAffymetrix;56 55 private final int channels; 57 56 private final PlatformData platform; … … 72 71 String table, List<RawDataProperty> properties, List<IntensityFormula> formulas) 73 72 { 74 this(id, name, description, channels, false, null, null, false,table, properties, formulas);73 this(id, name, description, channels, false, null, null, table, properties, formulas); 75 74 } 76 75 … … 83 82 this("platform." + platform.getExternalId(), platform.getName(), 84 83 platform.getDescription(), platform.getChannels(), true, 85 platform, null, 86 Platform.AFFYMETRIX.equals(platform.getExternalId()), 87 null, null, null); 84 platform, null, null, null, null); 88 85 } 89 86 … … 96 93 this("variant." + variant.getExternalId(), variant.getName(), 97 94 variant.getDescription(), variant.getChannels(), true, 98 variant.getPlatform(), variant, 99 Platform.AFFYMETRIX.equals(variant.getPlatform().getExternalId()), 100 null, null, null); 95 variant.getPlatform(), variant, null, null, null); 101 96 } 102 97 103 98 private RawDataType(String id, String name, String description, int channels, 104 boolean fileOnly, PlatformData platform, PlatformVariantData variant, boolean isAffymetrix,99 boolean fileOnly, PlatformData platform, PlatformVariantData variant, 105 100 String table, List<RawDataProperty> properties, List<IntensityFormula> formulas) 106 101 { … … 112 107 this.platform = platform; 113 108 this.variant = variant; 114 this.isAffymetrix = isAffymetrix;115 109 116 110 // For database raw data types … … 168 162 169 163 /** 170 If this raw data type is the Affymetrix raw data type.171 @deprecated Use {@link #getPlatform(DbControl)} and compare172 the external ID with {@link Platform#AFFYMETRIX}173 */174 public boolean isAffymetrix()175 {176 return isAffymetrix;177 }178 179 /**180 164 Get the platform that this raw data type is associated with. Only 181 165 raw data types representing file-only platforms are associated … … 208 192 } 209 193 210 /**211 Needed to make {@link RawBioAssay#setRawDataType(RawDataType)}212 backwards compatible. Platforms that are not file-only will213 get the {@link Platform#GENERIC} platform.214 @since 2.5215 */216 PlatformData getPlatformProxy()217 {218 return platform == null ? RawDataTypes.generic : platform;219 }220 221 /**222 Needed to make {@link RawBioAssay#setRawDataType(RawDataType)}223 backwards compatible.224 @since 2.5225 */226 PlatformVariantData getVariantProxy()227 {228 return variant;229 }230 231 194 /** 232 195 Get the name of this raw data type. This value is the same as the -
trunk/src/core/net/sf/basedb/core/Scan.java
r4889 r5590 334 334 335 335 /** 336 Create a new {@link RawBioAssay} from this scan.337 338 @param rawDataType The raw data type of the new bioassay339 @return The new <code>RawBioAssay</code> item340 @throws PermissionDeniedException If the logged in user doesn't have341 use permission for the scan342 @throws BaseException If there is another error343 @deprecated Use {@link RawBioAssay#getNew(DbControl, Platform, RawDataType)}344 or {@link RawBioAssay#getNew(DbControl, PlatformVariant, RawDataType)} instead345 */346 public RawBioAssay newRawBioAssay(RawDataType rawDataType)347 throws PermissionDeniedException, BaseException348 {349 RawBioAssay rba = RawBioAssay.getNew(getDbControl(), rawDataType);350 rba.setScan(this);351 return rba;352 }353 354 /**355 336 Get a query that returns all raw bioassays created from this 356 337 scan. -
trunk/src/core/net/sf/basedb/core/ShareableUtil.java
r5384 r5590 44 44 { 45 45 46 /**47 Set the item key of a {@link ShareableData} object.48 @param shareableData The data object to set the item key on. Null is not allowed.49 @param itemKey Item key to be set.50 @deprecated Use {@link #setItemKey(DbControl, ShareableData, ItemKey)} instead51 */52 public static void setItemKey(ShareableData shareableData, ItemKey itemKey)53 {54 shareableData.setItemKey(itemKey == null ? null : itemKey.getData());55 }56 46 57 47 /** -
trunk/src/core/net/sf/basedb/core/Type.java
r5475 r5590 487 487 throws InvalidDataException; 488 488 489 /**490 Parse a string and return a value of the correct type using a specific491 number format for numerical values.492 @param value The string value to parse493 @param numberFormat The number format, or null to use {@link #parseString(String)}494 @throws NumberFormatException If the type is numerical and the string can't be495 parsed as a number496 @since 2.2497 @deprecated Use {@link #parseString(String, NumberFormat, boolean)} instead498 */499 public Object parseString(String value, NumberFormat numberFormat)500 {501 return parseString(value, numberFormat, false);502 }503 504 489 /** 505 490 Parse a string and return a value of the correct type using a specific -
trunk/src/core/net/sf/basedb/core/Update.java
r5566 r5590 1183 1183 { 1184 1184 if (progress != null) progress.display((int)(43*progress_factor), "--Updating schema version: " + schemaVersion + " -> 44..."); 1185 schemaVersion = updateToSchemaVersion44(sc);1185 //schemaVersion = updateToSchemaVersion44(sc); 1186 1186 } 1187 1187 … … 2251 2251 log.error("updateToSchemaVersion43: FAILED", ex); 2252 2252 throw ex; 2253 }2254 return schemaVersion;2255 }2256 2257 /**2258 <ul>2259 <li>Set a platform for array designs and raw bioassays2260 <li>Change experiment raw data type if it is "affymetrix" to "platform.affymetrix"2261 <li>Change project default raw data type if it is "affymetrix" to "platform.affymetrix"2262 <li>Move CEL and CDF files into FileSet:s2263 <li>Remove filters on ArrayDesign.isAffyChip property2264 <li>Add READ permission to PLATFORM and DATAFILETYPE for all plug-ins2265 working with ARRAYDESIGN or RAWBIOASSAY2266 </ul>2267 */2268 @SuppressWarnings("deprecation")2269 private static int updateToSchemaVersion44(SessionControl sc)2270 {2271 final int schemaVersion = 44;2272 DbControl dc = null;2273 try2274 {2275 dc = sc.newDbControl();2276 org.hibernate.Session session = dc.getHibernateSession();2277 2278 // Items that we need2279 Platform affymetrix = Platform.getByExternalId(dc, Platform.AFFYMETRIX);2280 Platform generic = Platform.getByExternalId(dc, Platform.GENERIC);2281 DataFileType cdfType = DataFileType.getByExternalId(dc, DataFileType.AFFYMETRIX_CDF);2282 DataFileType celType = DataFileType.getByExternalId(dc, DataFileType.AFFYMETRIX_CEL);2283 RawDataType affyRaw = affymetrix.getRawDataType();2284 2285 // Query to count number of features in db2286 org.hibernate.Query countQuery = HibernateUtil.getPredefinedQuery(session,2287 "COUNT_FEATURES_FOR_ARRAYDESIGN");2288 2289 // Load array designs2290 org.hibernate.Query designQuery = HibernateUtil.createQuery(session,2291 "SELECT ad FROM ArrayDesignData ad WHERE ad.platform is null");2292 List<ArrayDesignData> arrayDesigns =2293 HibernateUtil.loadList(ArrayDesignData.class, designQuery, sc);2294 for (ArrayDesignData dd : arrayDesigns)2295 {2296 ArrayDesign design = dc.getItem(ArrayDesign.class, dd);2297 if (design.getData().isAffyChip())2298 {2299 design.setPlatform(affymetrix);2300 AnyToAny anyCdf = null;2301 try2302 {2303 anyCdf = AnyToAny.getByName(dc, design, Affymetrix.CDF_LINK_NAME);2304 }2305 catch (Throwable t)2306 {}2307 AnyToAny.unlinkFrom(dc, design, Affymetrix.CDF_LINK_NAME);2308 if (anyCdf != null)2309 {2310 File cdfFile = (File)anyCdf.getTo();2311 FileSet fileSet = design.getFileSet();2312 fileSet.setMember(cdfFile, cdfType);2313 fileSet.validate(dc, true);2314 }2315 }2316 else2317 {2318 design.setPlatform(generic);2319 countQuery.setInteger("arrayDesign", design.getId());2320 int dbFeatures = HibernateUtil.loadData(Long.class, countQuery).intValue();2321 design.getData().setNumDbFeatures(dbFeatures);2322 }2323 }2324 2325 // Load rawbioassays2326 org.hibernate.Query rbaQuery = HibernateUtil.createQuery(session,2327 "SELECT rba FROM RawBioAssayData rba WHERE rba.platform is null");2328 List<RawBioAssayData> rawBioAssays =2329 HibernateUtil.loadList(RawBioAssayData.class, rbaQuery, sc);2330 for (RawBioAssayData dd : rawBioAssays)2331 {2332 RawBioAssay rba = dc.getItem(RawBioAssay.class, dd);2333 if ("affymetrix".equals(rba.getData().getRawDataType()))2334 {2335 rba.getData().setPlatform(affymetrix.getData());2336 rba.getData().setRawDataType(affyRaw.getId());2337 rba.getData().setSpots(0); // No db spots in affy files2338 AnyToAny anyCel = null;2339 try2340 {2341 anyCel = AnyToAny.getByName(dc, rba, Affymetrix.CEL_LINK_NAME);2342 }2343 catch (Throwable t)2344 {}2345 AnyToAny.unlinkFrom(dc, rba, Affymetrix.CEL_LINK_NAME);2346 if (anyCel != null)2347 {2348 File celFile = (File)anyCel.getTo();2349 FileSet fileSet = rba.getFileSet();2350 fileSet.setMember(celFile, celType);2351 fileSet.validate(dc, true);2352 }2353 }2354 else2355 {2356 rba.getData().setPlatform(generic.getData());2357 }2358 }2359 2360 // Change raw data type for 'affymetrix' experiments to 'platform.affymetrix'2361 org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,2362 "CHANGE_EXPERIMENT_RAWDATATYPE");2363 /*2364 UPDATE ExperimentData2365 SET rawDataType = :newRawDataType2366 WHERE rawDataType = :oldRawDataType2367 */2368 query.setString("oldRawDataType", "affymetrix");2369 query.setString("newRawDataType", affyRaw.getId());2370 HibernateUtil.executeUpdate(query);2371 2372 // Change raw data type for 'affymetrix' projects to 'platform.affymetrix'2373 query = HibernateUtil.getPredefinedQuery(session,2374 "GET_PROJECTS_WITH_DEFAULT");2375 /**2376 SELECT prj2377 FROM ProjectData prj2378 WHERE prj.projectDefaults[:name] = :value2379 */2380 query.setString("name", "raw_data_type");2381 query.setString("value", "affymetrix");2382 List<ProjectData> projects = HibernateUtil.loadList(ProjectData.class, query, sc);2383 for (ProjectData project : projects)2384 {2385 Project p = dc.getItem(Project.class, project);2386 p.setDefaultRawDataType(affyRaw);2387 p.setDefaultItem(dc, affymetrix, Project.Default.PLATFORM);2388 }2389 2390 // Update property filters on 'rawDataType=affymetrix' to 'platform.affymetrix'2391 query = HibernateUtil.getPredefinedSQLQuery(session,2392 "UPDATE_PROPERTY_FILTER_VALUE");2393 /*2394 UPDATE [PropertyFilters]2395 SET [value] = :newValue2396 WHERE [property] = :property AND [value] = :oldValue2397 */2398 query.setString("property", "rawDataType");2399 query.setString("oldValue", "affymetrix");2400 query.setString("newValue", affyRaw.getId());2401 HibernateUtil.executeUpdate(query);2402 2403 // Remove filters on the 'affyChip' property2404 query = HibernateUtil.getPredefinedSQLQuery(session,2405 "DELETE_PROPERTY_FILTER");2406 /*2407 DELETE FROM PropertyFilters pf2408 WHERE pf.property = :property2409 */2410 query.setString("property", "affyChip");2411 HibernateUtil.executeUpdate(query);2412 2413 // Add READ permission to PLATFORM and DATAFILETYPE for all plug-ins2414 // working with ARRAYDESIGN or RAWBIOASSAY2415 int adKeyId = SystemItems.getRoleKeyId(Item.ARRAYDESIGN);2416 int rbaKeyId = SystemItems.getRoleKeyId(Item.RAWBIOASSAY);2417 2418 org.hibernate.Query pQuery = HibernateUtil.getPredefinedQuery(session,2419 "GET_PLUGINS_WITH_KEYS");2420 /*2421 SELECT DISTINCT pk.pluginDefinitionId2422 FROM PluginKeys pk WHERE pk.keyId IN (:keys)2423 */2424 pQuery.setParameterList("keys",2425 Arrays.asList( new Integer[] { adKeyId, rbaKeyId }), Type.INT.getTypeWrapper().getHibernateType());2426 List<Integer> pluginIds = HibernateUtil.loadList(Integer.class, pQuery, sc);2427 for (int pluginId : pluginIds)2428 {2429 addPluginPermission(session, pluginId, Item.PLATFORM, 0, 2046);2430 addPluginPermission(session, pluginId, Item.DATAFILETYPE, 0, 2046);2431 }2432 2433 // Update the schema version number2434 setSchemaVersion(session, schemaVersion);2435 2436 // Commit the changes2437 dc.commit();2438 log.info("updateToSchemaVersion44: OK");2439 }2440 catch (BaseException ex)2441 {2442 log.error("updateToSchemaVersion44: FAILED", ex);2443 throw ex;2444 }2445 finally2446 {2447 if (dc != null) dc.close();2448 2253 } 2449 2254 return schemaVersion; -
trunk/src/core/net/sf/basedb/core/User.java
r5442 r5590 1115 1115 1116 1116 /** 1117 @see #getItems(Set, int, int, Permission )1117 @see #getItems(Set, int, int, Permission, Restriction) 1118 1118 */ 1119 1119 public ResultList<Ownable> getItems(Item itemType, int firstItem, int maxItems, Permission permission) 1120 1120 { 1121 1121 return getItems(itemType == null ? null : Collections.singleton(itemType), 1122 firstItem, maxItems, permission); 1123 } 1124 1125 /** 1126 @since 2.7.1 1127 @deprecated In 2.15, use {@link #getItems(Set, int, int, Permission, Restriction)} instead 1128 */ 1129 public ResultList<Ownable> getItems(Set<Item> itemTypes, int firstItem, int maxItems, Permission permission) 1130 { 1131 return getItems(itemTypes, firstItem, maxItems, permission, null); 1132 } 1133 1122 firstItem, maxItems, permission, null); 1123 } 1134 1124 1135 1125 /** -
trunk/src/core/net/sf/basedb/core/VirtualColumn.java
r5475 r5590 170 170 171 171 /** 172 @param channel The channel for which the intensity is calculated.173 @return a VirtualColumn object174 @deprecated In 2.12. Use {@link #channelIntensity(int)} or175 {@link #channelRaw(int)} instead. This method is forwarded176 to {@link #channelIntensity(int)} for maximum backwards177 compatibility.178 */179 public static VirtualColumn channel(int channel)180 {181 return channelIntensity(channel);182 }183 184 /**185 172 Get a column that stores the raw spot value for a channel. This 186 173 may be an intensity value or a transformed value as given by the -
trunk/src/core/net/sf/basedb/core/data/ArrayDesignData.java
r4889 r5590 138 138 } 139 139 140 private boolean affyChip;141 /**142 Check if this design is an Affymetrix chip.143 @hibernate.property column="`affy_chip`" type="boolean" not-null="true"144 @deprecated Has been replaced by platform145 */146 public boolean isAffyChip()147 {148 return affyChip;149 }150 /**151 @deprecated Has been replaced by platform152 */153 public void setAffyChip(boolean affyChip)154 {155 this.affyChip = affyChip;156 }157 158 140 private boolean hasFeatures; 159 141 /** -
trunk/src/core/net/sf/basedb/core/plugin/AbstractPlugin.java
r5405 r5590 33 33 import net.sf.basedb.core.SessionControl; 34 34 import net.sf.basedb.core.PluginParameter; 35 import net.sf.basedb.core.signal.EnhancedThreadSignalHandler;36 import net.sf.basedb.core.signal.ThreadSignalHandler;37 35 38 36 import java.io.OutputStreamWriter; … … 355 353 356 354 /** 357 Check if the current thread has been interrupted and throw358 a SignalException if it has. Subclasses that use the {@link ThreadSignalHandler}359 or {@link EnhancedThreadSignalHandler} to implement signal handling should360 regularly call this method.361 @since 2.6362 @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead363 */364 @Deprecated365 protected void checkInterrupted()366 {367 ThreadSignalHandler.checkInterrupted();368 }369 370 /**371 355 Create a log file in the BASE file system for logging 372 356 detailed information from a plug-in. The log file will -
trunk/src/core/net/sf/basedb/core/query/Annotations.java
r4889 r5590 42 42 /** 43 43 Create a restriction that searches for annotations 44 equal to a given value on the root entity of a query.45 @param annotationType The annotation type to search46 @param value The value to search for47 @param includeInheriting If items inherting the annotation should be returned48 by the query or not49 @deprecated Use {@link #eq(String, AnnotationType, Object, boolean)} instead with alias=null50 */51 public static Restriction eq(AnnotationType annotationType, Object value, boolean includeInheriting)52 throws InvalidDataException53 {54 return eq(null, annotationType, value, includeInheriting);55 }56 57 /**58 Create a restriction that searches for annotations59 44 equal to a given value on the root or a joined entity of a 60 45 query. … … 77 62 /** 78 63 Create a restriction that searches for annotations 79 not equal to a given value on the root entity of a query.80 @param annotationType The annotation type to search81 @param value The value to search for82 @param includeInheriting If items inherting the annotation should be returned83 by the query or not84 @deprecated Use {@link #neq(String, AnnotationType, Object, boolean)} instead with alias=null85 */86 public static Restriction neq(AnnotationType annotationType, Object value, boolean includeInheriting)87 throws InvalidDataException88 {89 return neq(null, annotationType, value, includeInheriting);90 }91 92 /**93 Create a restriction that searches for annotations94 64 not equal to a given value on the root or a joined entity of a 95 65 query. … … 112 82 /** 113 83 Create a restriction that searches for annotations 114 less than a given value on the root entity of a query.115 @param annotationType The annotation type to search116 @param value The value to search for117 @param includeInheriting If items inherting the annotation should be returned118 by the query or not119 @deprecated Use {@link #lt(String, AnnotationType, Object, boolean)} instead with alias=null120 */121 public static Restriction lt(AnnotationType annotationType, Object value, boolean includeInheriting)122 throws InvalidDataException123 {124 return lt(null, annotationType, value, includeInheriting);125 }126 127 /**128 Create a restriction that searches for annotations129 84 less than a given value on the root or a joined entity of a 130 85 query. … … 147 102 /** 148 103 Create a restriction that searches for annotations 149 less than or equal to a given value on the root entity of a query.150 @param annotationType The annotation type to search151 @param value The value to search for152 @param includeInheriting If items inherting the annotation should be returned153 by the query or not154 @deprecated Use {@link #lteq(String, AnnotationType, Object, boolean)} instead with alias=null155 */156 public static Restriction lteq(AnnotationType annotationType, Object value, boolean includeInheriting)157 throws InvalidDataException158 {159 return lteq(null, annotationType, value, includeInheriting);160 }161 162 /**163 Create a restriction that searches for annotations164 104 less than or equal to a given value on the root or a joined entity of a 165 105 query. … … 182 122 /** 183 123 Create a restriction that searches for annotations 184 greater than a given value on the root entity of a query.185 @param annotationType The annotation type to search186 @param value The value to search for187 @param includeInheriting If items inherting the annotation should be returned188 by the query or not189 @deprecated Use {@link #gt(String, AnnotationType, Object, boolean)} instead with alias=null190 */191 public static Restriction gt(AnnotationType annotationType, Object value, boolean includeInheriting)192 throws InvalidDataException193 {194 return gt(null, annotationType, value, includeInheriting);195 }196 197 /**198 Create a restriction that searches for annotations199 124 greater than a given value on the root or a joined entity of a 200 125 query. … … 215 140 } 216 141 217 218 /**219 Create a restriction that searches for annotations220 greater than or equal to a given value on the root entity of a query.221 @param annotationType The annotation type to search222 @param value The value to search for223 @param includeInheriting If items inherting the annotation should be returned224 by the query or not225 @deprecated Use {@link #gteq(String, AnnotationType, Object, boolean)} instead with alias=null226 */227 public static Restriction gteq(AnnotationType annotationType, Object value, boolean includeInheriting)228 throws InvalidDataException229 {230 return gteq(null, annotationType, value, includeInheriting);231 }232 233 142 /** 234 143 Create a restriction that searches for annotations … … 253 162 /** 254 163 Create a restriction that searches for annotations 255 matching a given value on the root entity of a query.256 @param annotationType The annotation type to search257 @param value The value to search for258 @param includeInheriting If items inherting the annotation should be returned259 by the query or not260 @deprecated Use {@link #like(String, AnnotationType, Object, boolean)} instead with alias=null261 */262 public static Restriction like(AnnotationType annotationType, Object value, boolean includeInheriting)263 throws InvalidDataException264 {265 return like(null, annotationType, value, includeInheriting);266 }267 268 /**269 Create a restriction that searches for annotations270 164 matching a given value on the root or a joined entity of a 271 165 query. … … 284 178 { 285 179 return new AnnotationSimpleRestriction(alias, annotationType, Operator.LIKE, value, includeInheriting); 286 }287 288 289 /**290 Create a restriction that searches for annotations291 between two given values on the root entity of a query.292 If the end values are included or excluded293 depends on the database.294 295 @param annotationType The annotation type to search296 @param lowValue The lower bound297 @param highValue The higher bound298 @param includeInheriting If items inherting the annotation should be returned299 by the query or not300 @deprecated Use {@link #between(String, AnnotationType, Object, Object, boolean)}301 instead with alias=null302 */303 public static Restriction between(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)304 throws InvalidDataException305 {306 return between(null, annotationType, lowValue, highValue, includeInheriting);307 180 } 308 181 … … 328 201 return new AnnotationBetweenRestriction(alias, annotationType, lowValue, highValue, includeInheriting); 329 202 } 330 331 /**332 Create a restriction that searches for annotations on the root entity of a query333 equal to any value in a list of given values.334 @param annotationType The annotation type to search335 @param includeInheriting If items inherting the annotation should be returned336 by the query or not337 @param values An array of values338 @deprecated Use {@link #in(String, AnnotationType, boolean, Object[])}339 instead with alias=null340 */341 public static Restriction in(AnnotationType annotationType, boolean includeInheriting, Object... values)342 throws InvalidDataException343 {344 return in(null, annotationType, includeInheriting, values);345 }346 203 347 204 /** -
trunk/src/core/net/sf/basedb/core/signal/AbstractSignalReceiver.java
r5399 r5590 203 203 } 204 204 205 /**206 @deprecated In 2.16, use {@link #sendToAll(SignalSender)} instead207 */208 @Override209 @Deprecated210 public void sendToAll(Signal signal)211 {212 sendToAll(new SimpleSignalSender(signal));213 }214 215 205 @Override 216 206 public void sendToAll(SignalSender sender) -
trunk/src/core/net/sf/basedb/core/signal/SignalReceiver.java
r5399 r5590 98 98 99 99 /** 100 Send a signal to all registered signal handlers that supports101 it. The main purpose of this method is to be able to send102 the {@link Signal#ABORT} when the system is shutting down.103 @param signal The signal to send104 @deprecated In 2.16, use {@link #sendToAll(SignalSender)} instead105 */106 @Deprecated107 public void sendToAll(Signal signal);108 109 /**110 100 Let the signal sender send one or more signals to all registered 111 101 signal handlers on this reciever. -
trunk/src/core/net/sf/basedb/util/AutoDetectFileFormat.java
r5327 r5590 59 59 public class AutoDetectFileFormat 60 60 { 61 62 /**63 Same as {@link #findPlugins(DbControl, GuiContext, File, String, PluginDefinition)}64 with no value for the charset parameter.65 @deprecated66 */67 public static Map<PluginDefinition, List<PluginConfiguration>> findPlugins(DbControl dc,68 GuiContext context, File file, PluginDefinition pluginDef)69 throws InvalidDataException, BaseException70 {71 return findPlugins(dc, context, file, null, pluginDef);72 }73 61 74 62 /** -
trunk/src/core/net/sf/basedb/util/BioAssaySetUtil.java
r5385 r5590 25 25 import net.sf.basedb.core.BaseException; 26 26 import net.sf.basedb.core.BioAssay; 27 import net.sf.basedb.core.BioAssaySet;28 27 import net.sf.basedb.core.DbControl; 29 28 import net.sf.basedb.core.DynamicQuery; … … 33 32 import net.sf.basedb.core.InvalidUseOfNullException; 34 33 import net.sf.basedb.core.ItemQuery; 35 import net.sf.basedb.core.Metadata;36 34 import net.sf.basedb.core.RawBioAssay; 37 35 import net.sf.basedb.core.Metadata.PropertyPath; … … 42 40 import net.sf.basedb.core.snapshot.SnapshotManager; 43 41 import net.sf.basedb.util.filter.Filter; 44 import net.sf.basedb.util.jep.ChannelFunction;45 import net.sf.basedb.util.jep.ExtraValueFunction;46 import net.sf.basedb.util.jep.InReporterListFunction;47 42 import net.sf.basedb.util.jep.Jep; 48 import net.sf.basedb.util.jep.NotInReporterListFunction;49 import net.sf.basedb.util.jep.PositionFunction;50 import net.sf.basedb.util.jep.RawChannelFunction;51 import net.sf.basedb.util.jep.RawFunction;52 import net.sf.basedb.util.jep.ReporterFunction;53 import net.sf.basedb.util.jep.ScoreFunction;54 43 55 44 import java.util.Set; … … 65 54 public class BioAssaySetUtil 66 55 { 67 /**68 Find the annotation values for a given annotation type on a bioassay.69 This method will only check annotations, primary and inherited, on the70 raw bioassays that the bioassay is a child of.71 <p>72 Since a bioassay may73 have more than one parent raw bioassay and each annotation may have74 multiple values it is possible that the set contains multiple values.75 Each value is only present once regardless of how many times it appears76 in the annotations.77 78 @param dc The DbControl for database access79 @param bioAssay The bioassay to get the annotations for80 @param annotationType The annotation type of the annotations81 @return A set containing all values82 @deprecated In BASE 2.14 due to performance problems, use83 {@link #getAnnotationValues(DbControl, SnapshotManager, BioAssay, AnnotationType)}84 instead85 */86 public static Set<?> getAnnotationValues(DbControl dc, BioAssay bioAssay, AnnotationType annotationType)87 {88 return getAnnotationValues(dc, new SnapshotManager(), bioAssay, annotationType);89 }90 56 91 57 /** … … 131 97 } 132 98 133 134 /**135 @deprecated In 2.15, use {@link #getParentProperties(DbControl, BioAssay, Metadata.PropertyPath)} instead136 */137 @Deprecated138 public static Set<Object> getParentProperties(DbControl dc, BioAssay bioAssay, String property)139 {140 Metadata<RawBioAssay> meta = Metadata.getInstance(RawBioAssay.class);141 PropertyPath<RawBioAssay,?> path = meta.getPropertyPath(property, false);142 return getParentProperties(dc, bioAssay, path);143 }144 145 99 /** 146 100 Find the values of parent properties for a given bioassay. This method … … 179 133 return allValues; 180 134 } 181 182 183 /** 184 @deprecated In 2.15, use {@link #createJepRestriction(DbControl, String, DynamicQuery)} 185 instead. The 'allowRawIfMultipleMappings' parameter is replaced with an 186 option on the spot query: {@link DynamicSpotQuery#setDisableRawJoinOnMergedData(boolean)} 187 (it has no meaning on other queries) 188 */ 189 @Deprecated 190 public static Restriction createJepRestriction(DbControl dc, BioAssaySet bioAssaySet, 191 String formula, boolean allowRawIfMultipleMappings) 192 throws InvalidDataException, BaseException 193 { 194 if (bioAssaySet == null) throw new InvalidUseOfNullException("bioAssaySet"); 195 if (formula == null) throw new InvalidUseOfNullException("formula"); 196 RawFunction raw = new RawFunction(bioAssaySet.getMaxRawMappingsForSpot() == 1 || 197 allowRawIfMultipleMappings); 198 ChannelFunction ch = new ChannelFunction(); 199 RawChannelFunction rawCh = new RawChannelFunction(); 200 ReporterFunction reporter = new ReporterFunction(); 201 ScoreFunction score = new ScoreFunction(dc); 202 ExtraValueFunction xtra = new ExtraValueFunction(dc, bioAssaySet); 203 InReporterListFunction inList = new InReporterListFunction(dc); 204 NotInReporterListFunction notInList = new NotInReporterListFunction(dc); 205 return Jep.formulaToRestriction(formula, raw, ch, rawCh, reporter, score, xtra, inList, notInList); 206 } 207 135 208 136 /** 209 137 Parse a JEP expression and create a restrictions that is suitable to … … 235 163 if (formula == null) throw new InvalidUseOfNullException("formula"); 236 164 return Jep.formulaToRestriction(formula, query.getJepFunctions(dc, true)); 237 }238 239 /**240 @deprecated In 2.15, use {@link #createJepExpression(DbControl, String, DynamicQuery)}241 instead. The 'allowRawIfMultipleMappings' parameter is replaced with an242 option on the spot query: {@link DynamicSpotQuery#setDisableRawJoinOnMergedData(boolean)}243 (it has no meaning on other queries)244 */245 @Deprecated246 public static Expression createJepExpression(DbControl dc, BioAssaySet bioAssaySet,247 String formula, boolean allowRawIfMultipleMappings)248 throws InvalidDataException, BaseException249 {250 if (bioAssaySet == null) throw new InvalidUseOfNullException("bioAssaySet");251 if (formula == null) throw new InvalidUseOfNullException("formula");252 RawFunction raw = new RawFunction(bioAssaySet.getMaxRawMappingsForSpot() == 1 ||253 allowRawIfMultipleMappings);254 ChannelFunction ch = new ChannelFunction();255 RawChannelFunction rawCh = new RawChannelFunction();256 PositionFunction pos = new PositionFunction();257 ReporterFunction reporter = new ReporterFunction();258 ScoreFunction score = new ScoreFunction(dc);259 ExtraValueFunction xtra = new ExtraValueFunction(dc, bioAssaySet);260 return Jep.formulaToExpression(formula, raw, ch, rawCh, pos, reporter, score, xtra);261 165 } 262 166 -
trunk/src/core/net/sf/basedb/util/Values.java
r5384 r5590 515 515 } 516 516 517 /**518 Convert a string to a date. The string must be formatted as yyyy-mm-dd.519 @param value The value to convert520 @return The parsed date or null if the value can't be converted521 @deprecated Use a {@link Formatter} for dates instead522 */523 public static final Date getDate(String value)524 {525 return getDate(value, null);526 }527 528 /**529 Convert a string to a date. The string must be formatted as yyyy-mm-dd.530 @param value The value to convert531 @param defaultValue The value to return if the string can't be converted532 @return The parsed date or the default value533 @deprecated Use a {@link Formatter} for dates instead534 */535 public static final Date getDate(String value, Date defaultValue)536 {537 if (value != null)538 {539 try { return DATE_FORMAT.parse(value); }540 catch (Exception ex) {}541 }542 return defaultValue;543 }544 545 /**546 Convert an array of strings to an array of Date:s.547 @param values The array of strings548 @return The converted values549 @deprecated Use a {@link Formatter} for dates instead550 */551 public static final Date[] getDate(String[] values)552 {553 Date[] result;554 if (values != null)555 {556 Date[] temp = new Date[values.length];557 int j = 0;558 for (String v : values)559 {560 Date i = getDate(v, null);561 if (i != null)562 {563 temp[j++] = i;564 }565 }566 if (j < values.length)567 {568 result = new Date[j];569 System.arraycopy(temp, 0, result, 0, j);570 }571 else572 {573 result = temp;574 }575 }576 else577 {578 result = new Date[0];579 }580 return result;581 }582 583 517 public static final Date[] getDate(String[] values, Formatter<Date> dateFormatter) 584 518 { … … 768 702 private static final SimpleDateFormat DATETIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 769 703 770 /**771 Formats a date as four-digit year, two-digit month and two-digit day772 separated with a hyphen. Example: 2004-03-25773 @param date The date to format774 @return The formatted date775 @deprecated Use a {@link Formatter} for dates instead776 */777 public static final String formatDate(Date date)778 {779 return date != null ? DATE_FORMAT.format(date) : "";780 }781 782 /**783 Formats a time as two-digit hour, two-digit minute and two-digit seconds784 separated with a colon. Example: 14:42:15785 @param time The time to format786 @return The formatted time787 @deprecated Use a {@link Formatter} for dates instead788 */789 public static final String formatTime(Date time)790 {791 return time != null ? TIME_FORMAT.format(time) : "";792 }793 794 /**795 Formats a date as four-digit year, two-digit month and two-digit day796 separated with a hyphen and a time as two-digit hour, minute and seconds797 separated with a colon. Example: 2004-03-25 14:42:13798 799 @param datetime The date and time to format800 @return The formatted date with time801 @deprecated Use a {@link Formatter} for dates instead802 */803 public static final String formatDateTime(Date datetime)804 {805 return datetime != null ? DATETIME_FORMAT.format(datetime) : "";806 }807 704 808 705 /** -
trunk/src/core/net/sf/basedb/util/XMLUtil.java
r5319 r5590 90 90 return new Document(new Element(rootElement), new DocType(rootElement, systemId)); 91 91 } 92 93 /** 94 @deprecated Use {@link #getValidatedXML(InputStream, URL, String)} instead 95 */ 96 public static Document getValidatedXML(InputStream is, URL dtdFile) 97 throws JDOMException, IOException 98 { 99 return getValidatedXML(is, dtdFile, null); 100 } 101 92 102 93 /** 103 94 Load and validate an XML file against a DTD, and return it as a -
trunk/src/core/net/sf/basedb/util/basefile/BaseFileParser.java
r5405 r5590 34 34 import net.sf.basedb.core.ItemNotFoundException; 35 35 import net.sf.basedb.core.ProgressReporter; 36 import net.sf.basedb.core.signal.SignalException;37 36 import net.sf.basedb.core.signal.ThreadSignalHandler; 38 37 import net.sf.basedb.util.Values; … … 162 161 while (ffp.hasMoreSections()) 163 162 { 164 checkInterrupted();163 ThreadSignalHandler.checkInterrupted(); 165 164 FlatFileParser.Line section = ffp.nextSection(); 166 165 increaseSectionCount(section.name(), 1); … … 195 194 if (cnt == null) cnt = 0; 196 195 sectionCount.put(section, cnt + count); 197 }198 199 /**200 Checks if the currently executing thread has been interrupted and201 throws a {@link SignalException} if it has.202 @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead203 */204 @Deprecated205 public void checkInterrupted()206 {207 ThreadSignalHandler.checkInterrupted();208 196 } 209 197 -
trunk/src/core/net/sf/basedb/util/basefile/BaseFileSectionParser.java
r5093 r5590 24 24 import java.io.IOException; 25 25 26 import net.sf.basedb.core.signal.ThreadSignalHandler; 26 27 import net.sf.basedb.util.parser.FlatFileParser; 27 28 … … 30 31 that is found in a section in a serial or matrix BASEfile. A 31 32 section parser should check for user abort by calling {@link 32 BaseFileParser#checkInterrupted()} at regular intervals. The parser33 ThreadSignalHandler#checkInterrupted()} at regular intervals. The parser 33 34 should also update progress by calling {@link BaseFileParser#setProgress(long, String)}. 34 35 Note that progress should be reported as the number of bytes parsed, -
trunk/src/core/net/sf/basedb/util/export/spotdata/AbstractBioAssaySetExporter.java
r5405 r5590 51 51 import net.sf.basedb.core.query.Selects; 52 52 import net.sf.basedb.core.query.SqlResult; 53 import net.sf.basedb.core.signal.SignalException;54 53 import net.sf.basedb.core.signal.ThreadSignalHandler; 55 54 import net.sf.basedb.core.snapshot.SnapshotManager; … … 596 595 while (it.hasNext()) 597 596 { 598 checkInterrupted();597 ThreadSignalHandler.checkInterrupted(); 599 598 SqlResult result = it.next(); 600 599 int position = result.getInt(posIndex); … … 681 680 682 681 /** 683 Checks if the currently executing thread has been interrupted and684 throws a {@link SignalException} if it has.685 @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead686 */687 @Deprecated688 protected void checkInterrupted()689 {690 ThreadSignalHandler.checkInterrupted();691 }692 693 /**694 682 Update the progress of the export. 695 683 @see ProgressReporter -
trunk/src/core/net/sf/basedb/util/export/spotdata/ExportableFieldFactory.java
r5385 r5590 78 78 Create a property assay field. This field is used to export, for 79 79 example, name and description, from the bioassay. 80 @param property The property to export, see 81 {@link Metadata#getPropertyValue(net.sf.basedb.core.DbControl, Object, String)} 80 @param property The property to export, see {@link Metadata#getPropertyPath(String, boolean)} 82 81 for more information about the syntax of this parameter. 83 82 @param title The column title … … 95 94 field.setType(type); 96 95 return field; 97 }98 99 /**100 @deprecated In 2.15, use {@link #simple(Expression, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}101 instead102 */103 @Deprecated104 public static SimpleDynamicField simple(Expression e, String title,105 Formula.AverageMethod averageMethod, Formatter<?> formatter)106 {107 return simple(e, title, null, averageMethod, formatter);108 96 } 109 97 … … 129 117 field.setFormatter(formatter); 130 118 return field; 131 }132 133 134 /**135 @deprecated In 2.15, use {@link #jep(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}136 instead137 */138 @Deprecated139 public static JepDynamicField jep(String jep, String title,140 Formula.AverageMethod averageMethod, Formatter<?> formatter)141 {142 return jep(jep, title, null, averageMethod, formatter);143 119 } 144 120 … … 202 178 } 203 179 204 /**205 @deprecated In 2.15, use {@link #rawData(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}206 instead207 */208 @Deprecated209 public static SimpleDynamicField rawData(String property, String title,210 Formula.AverageMethod averageMethod, Formatter<?> formatter)211 {212 return rawData(property, title, null, averageMethod, formatter);213 }214 215 180 /** 216 181 Create a simple dynamic field that exports a raw data value. … … 252 217 property.getAverageMethod(), formatter); 253 218 } 254 255 /**256 @deprecated In 2.15, use {@link #reporter(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}257 instead258 */259 public static DynamicField reporter(String property, String title,260 Formula.AverageMethod averageMethod, Formatter<?> formatter)261 {262 return reporter(property, title, null, averageMethod, formatter);263 }264 219 265 220 /** -
trunk/src/core/net/sf/basedb/util/importer/spotdata/BaseFileImporter.java
r5405 r5590 36 36 import net.sf.basedb.core.DynamicResultIterator; 37 37 import net.sf.basedb.core.DynamicSpotQuery; 38 import net.sf.basedb.core.File;39 38 import net.sf.basedb.core.IntensityTransform; 40 39 import net.sf.basedb.core.InvalidUseOfNullException; … … 51 50 import net.sf.basedb.core.query.JoinType; 52 51 import net.sf.basedb.core.query.SqlResult; 53 import net.sf.basedb.core.signal.SignalException;54 52 import net.sf.basedb.core.signal.ThreadSignalHandler; 55 53 import net.sf.basedb.util.ChainedProgressReporter; 56 54 import net.sf.basedb.util.basefile.BaseFileParser; 57 import net.sf.basedb.util.importer.BaseFileWrapper;58 55 import net.sf.basedb.util.importer.FileWrapper; 59 56 import net.sf.basedb.util.importer.spotdata.BaseFileInfo.ChildBioAssay; … … 65 62 <ul> 66 63 <li>An open DbControl: {@link #setDbControl(DbControl)} 67 <li>The source file: {@link #setSourceFile (File)}64 <li>The source file: {@link #setSourceFileWrapper(FileWrapper)} 68 65 <li>The destination transaction: {@link #setTransformation(Transformation)} 69 66 </ul> … … 100 97 private ProgressReporter progress; 101 98 102 private File oldFile; // For backwards compatibility only103 99 private FileWrapper sourceFile; 104 100 private Transformation transformation; … … 149 145 { 150 146 return progress; 151 }152 153 /**154 Set the source BASEfile to import data from.155 @param source The file156 @deprecated In 2.16, use {@link #setSourceFileWrapper(FileWrapper)} instead157 */158 @Deprecated159 public void setSourceFile(File source)160 {161 setSourceFileWrapper(new BaseFileWrapper(source));162 this.oldFile = source;163 }164 165 /**166 Get the source file.167 @deprecated In 2.16, use {@link #getSourceFileWrapper()} instead168 */169 @Deprecated170 public File getSourceFile()171 {172 return oldFile;173 147 } 174 148 … … 259 233 -------------- 260 234 */ 261 262 /**263 Checks if the currently executing thread has been interrupted and264 throws a {@link SignalException} if it has.265 @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead266 */267 @Deprecated268 protected void checkInterrupted()269 {270 ThreadSignalHandler.checkInterrupted();271 }272 273 235 /** 274 236 Update the progress of the export. … … 461 423 for (Map.Entry<Integer, Integer> entry : mapping.entrySet()) 462 424 { 463 checkInterrupted();425 ThreadSignalHandler.checkInterrupted(); 464 426 if (progress != null && done % delta == 0) 465 427 { … … 523 485 while (spotIterator.hasNext()) 524 486 { 525 checkInterrupted();487 ThreadSignalHandler.checkInterrupted(); 526 488 if (progress != null && done % delta == 0) 527 489 { -
trunk/src/core/net/sf/basedb/util/importer/spotdata/BaseFileInfo.java
r5374 r5590 38 38 import net.sf.basedb.core.DynamicResultIterator; 39 39 import net.sf.basedb.core.ExtraValueType; 40 import net.sf.basedb.core.File;41 40 import net.sf.basedb.core.ItemNotFoundException; 42 41 import net.sf.basedb.core.Type; … … 45 44 import net.sf.basedb.core.query.SqlResult; 46 45 import net.sf.basedb.util.Diff3; 47 import net.sf.basedb.util.importer.BaseFileWrapper;48 46 import net.sf.basedb.util.importer.FileWrapper; 49 47 … … 82 80 private Map<Integer, Integer> childReporterPositions; 83 81 84 85 /**86 The source file which should be a BASEfile.87 @deprecated In 2.16, use {@link #BaseFileInfo(FileWrapper)} instead88 */89 @Deprecated90 public BaseFileInfo(File file)91 {92 this(new BaseFileWrapper(file));93 }94 82 95 83 /** -
trunk/src/core/net/sf/basedb/util/importer/spotdata/BfsImporter.java
r5405 r5590 40 40 import net.sf.basedb.core.SpotBatcher; 41 41 import net.sf.basedb.core.Transformation; 42 import net.sf.basedb.core.signal.SignalException;43 42 import net.sf.basedb.core.signal.ThreadSignalHandler; 44 43 import net.sf.basedb.util.ChainedProgressReporter; … … 237 236 -------------- 238 237 */ 239 240 /**241 Checks if the currently executing thread has been interrupted and242 throws a {@link SignalException} if it has.243 @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead244 */245 @Deprecated246 protected void checkInterrupted()247 {248 ThreadSignalHandler.checkInterrupted();249 }250 251 238 /** 252 239 Update the progress of the export. … … 342 329 int numAssays = pdataModel.getRowCount(); 343 330 int nameIndex = pdataModel.getColumnIndex("Name"); 344 checkInterrupted();331 ThreadSignalHandler.checkInterrupted(); 345 332 setProgress(5, "Creating " + numAssays + " child assays"); 346 333 … … 417 404 418 405 // Initialize a synchronized parser and load data files 419 checkInterrupted();406 ThreadSignalHandler.checkInterrupted(); 420 407 setProgress(10, "Parsing " + numSdata + " spot data files..."); 421 408 SynchronizedSpotDataParser mainParser = new SynchronizedSpotDataParser(); … … 483 470 for (int i = 0; i < fileCount; ++i) 484 471 { 485 checkInterrupted();472 ThreadSignalHandler.checkInterrupted(); 486 473 MetadataModel.SectionEntry entry = files.getEntry(i); 487 474 if (entry.getKey().startsWith("x-")) -
trunk/src/core/net/sf/basedb/util/jep/ChannelFunction.java
r5319 r5590 94 94 95 95 /** 96 @deprecated In 2.12. Use {@link ChannelFunction#ChannelFunction(int[], IntensityTransform)}97 instead. Using this constructor will disable the untransformation98 of transformed values when JEP dynamic evalution is used.99 */100 public ChannelFunction(int[] channelToIndex)101 {102 this.channelToIndex = channelToIndex;103 }104 105 /**106 96 Create a new instance of this function which can be used 107 97 to dynamically evaluate expressions. -
trunk/src/core/net/sf/basedb/util/jobagent/JobAgentInfo.java
r5447 r5590 153 153 154 154 /** 155 Get the ID:s of the jobs that are curently executing. NOTE!156 Since 2.6 this method always returns null.157 @return A set with the ID:s or null if not known158 @deprecated Use {@link #getJobInfo()} instead159 */160 public Set<Integer> getJobs()161 {162 return null;163 }164 165 /**166 155 Get detailed information about the running jobs. 167 156 @return A set with job information or null if not known -
trunk/src/core/net/sf/basedb/util/parser/ColumnMapper.java
r4515 r5590 55 55 { 56 56 this(index, name, null, false); 57 }58 59 /**60 Create a new column mapper using a specific number format.61 @deprecated Use {@link ColumnMapper#ColumnMapper(int, String, NumberFormat, boolean)}62 */63 public ColumnMapper(int index, String name, NumberFormat parser)64 {65 this(index, name, parser, false);66 57 } 67 58 -
trunk/src/core/net/sf/basedb/util/parser/CompoundMapper.java
r4515 r5590 53 53 { 54 54 this(mappers, null, false); 55 }56 57 /**58 Create a new compound mapper, using a specific number formatter as it's parser.59 @param mappers A list of other mappers that will be invoked in60 the order they appear in the list61 @param parser The number format to use or null to use Float.valueOf()62 @since 2.2.363 @deprecated Use {@link CompoundMapper#CompoundMapper(List, NumberFormat, boolean)}64 */65 public CompoundMapper(List<Mapper> mappers, NumberFormat parser)66 {67 this(mappers, parser, false);68 55 } 69 56 -
trunk/src/core/net/sf/basedb/util/parser/ConstantMapper.java
r5384 r5590 53 53 public ConstantMapper(String constant) 54 54 { 55 this(constant, null); 56 } 57 58 /** 59 Create a constant mapper using a specific number formatter as it's parser. 60 @param constant The constant expression 61 @param parser The number format to use or null to use Double.valueOf() 62 @since 2.2 63 @deprecated Use {@link ConstantMapper#ConstantMapper(String, NumberFormat, boolean)} 64 */ 65 public ConstantMapper(String constant, NumberFormat parser) 66 { 67 this(constant, parser, false); 55 this(constant, null, false); 68 56 } 69 57 -
trunk/src/core/net/sf/basedb/util/parser/FlatFileParser.java
r5193 r5590 540 540 { 541 541 this.keepSkippedLines = keep; 542 }543 544 /**545 @deprecated Use {@link #setInputStream(InputStream, String)} instead546 */547 public void setInputStream(InputStream in)548 {549 setInputStream(in, Config.getCharset());550 542 } 551 543 -
trunk/src/plugins/core/net/sf/basedb/plugins/AbstractFlatFileImporter.java
r5405 r5590 27 27 import net.sf.basedb.core.Config; 28 28 import net.sf.basedb.core.InvalidUseOfNullException; 29 import net.sf.basedb.core.Location;30 29 import net.sf.basedb.core.NumberOutOfRangeException; 31 import net.sf.basedb.core.Operator;32 30 import net.sf.basedb.core.ParameterType; 33 import net.sf.basedb.core.PropertyFilter;34 31 import net.sf.basedb.core.StringParameterType; 35 32 import net.sf.basedb.core.FileParameterType; … … 43 40 import net.sf.basedb.core.StringTooLongException; 44 41 import net.sf.basedb.core.StringUtil; 45 import net.sf.basedb.core.Type;46 42 import net.sf.basedb.core.UnsupportedFileFormatException; 47 43 … … 76 72 import java.io.IOException; 77 73 import java.io.InputStream; 78 import java.nio.charset.Charset;79 74 80 75 … … 282 277 ); 283 278 284 /**285 Enumerates all available character sets.286 @see #getCharsetParameter(String, String, String)287 @deprecated Use {@link Parameters#charsetParameter(String, String, String)}288 */289 protected static final StringParameterType charsetType =290 new StringParameterType(255, Config.getCharset(), false, 1, 0, 0,291 new ArrayList<String>(Charset.availableCharsets().keySet()));292 293 /**294 Type for selecting decimal separator.295 @deprecated Use {@link Parameters#decimalSeparatorParameter(String, String, String)}296 */297 protected static final StringParameterType decimalSeparatorType =298 new StringParameterType(255, "dot", false, 1, 0, 0,299 Arrays.asList(new String[] { "dot", "comma" })300 );301 302 279 /** 303 280 Parameter definition that asks for the file that should be imported. … … 1068 1045 } 1069 1046 1070 /**1071 The name of the parameter that asks for the character set.1072 @see #getCharsetParameter(String, String, String)1073 @deprecated Use {@link Parameters#CHARSET_PARAMETER}1074 */1075 protected static final String CHARSET = Parameters.CHARSET_PARAMETER;1076 1077 /**1078 Parameter definition that asks for the character encoding used in the1079 file that is imported. This can be both a job parameter and a configuration1080 parameter. The implementation first checks in the job parameter and1081 if not found in the configuration parameter. If still not found the1082 default charset is used as specified by {@link Config#getCharset()}.1083 @param label The label to use for the parameter or null to use the default label1084 (Character set)1085 @param description The description to use for the parameter or null to use the1086 default description1087 @param defaultValue The default value for the character set or null to use1088 the system default1089 @deprecated USe {@link Parameters#charsetParameter(String, String, String)}1090 */1091 protected PluginParameter<String> getCharsetParameter(String label, String description, String defaultValue)1092 {1093 return Parameters.charsetParameter(label, description, defaultValue);1094 }1095 1096 /**1097 The name of the parameter that asks for the decimal separator.1098 @see #getCharsetParameter(String, String, String)1099 @deprecated Use {@link Parameters#DECIMAL_SEPARATOR_PARAMETER}1100 */1101 protected static final String DECIMAL_SEPARATOR = Parameters.DECIMAL_SEPARATOR_PARAMETER;1102 1103 /**1104 Parameter definition that asks for the decimal separator used by numeric values1105 in the file that is imported. This can be both a job parameter and a configuration1106 parameter. The implementation first checks in the job parameter and1107 if not found in the configuration parameter. If still not found the1108 no decimal separator is used and number parsing is done by Float.valueOf1109 or Double.valueOf.1110 @param label The label to use for the parameter or null to use the default label1111 (Decimal separator)1112 @param description The description to use for the parameter or null to use the1113 default description1114 @param defaultValue The default value for the decimal separator1115 @since 2.21116 @deprecated Use {@link Parameters#decimalSeparatorParameter(String, String, String)}1117 */1118 protected PluginParameter<String> getDecimalSeparatorParameter(String label, String description, String defaultValue)1119 {1120 return Parameters.decimalSeparatorParameter(label, description, defaultValue);1121 }1122 1123 1047 private Pattern getPattern(String name) 1124 1048 throws BaseException … … 1127 1051 return regexp != null ? Pattern.compile(regexp) : null; 1128 1052 } 1129 1130 /**1131 A property filter that can be used to filter files that are not1132 in the primary location. Typical use is:1133 <pre class="code">1134 ItemContext fileContext = sc.getCurrentContext(Item.FILE);1135 fileContext.setPropertyFilter(primaryLocationFilter);1136 </pre>1137 @deprecated In 2.16. Since files can now be references to external URL:s1138 this filter no longer makes sense. Plug-ins should not use the location1139 to filter files.1140 */1141 @Deprecated1142 protected PropertyFilter getPrimaryLocationFilter()1143 {1144 return new PropertyFilter("location", Operator.EQ,1145 Integer.toString(Location.PRIMARY.getValue()), Type.INT);1146 }1147 1053 1148 1054 /** -
trunk/src/plugins/core/net/sf/basedb/plugins/GalExporter.java
r5481 r5590 309 309 310 310 /** 311 @deprecated Use312 {@link #exportGal(DbControl, ArrayDesign, Integer, PrintWriter, ProgressReporter)}313 instead314 */315 public void exportGal(DbControl dc, ArrayDesign design,316 PrintWriter writer, ProgressReporter progress)317 throws IOException318 {319 exportGal(dc, design, null, writer, progress);320 }321 322 /**323 311 Exports an array design with features to a GAL file. The array 324 312 must have features in the database. -
trunk/src/plugins/core/net/sf/basedb/plugins/HelpImporter.java
r5481 r5590 454 454 455 455 /** 456 @deprecated Use {@link #installHelpTexts(Client, boolean, InputStream, String)} instead457 */458 public void installHelpTexts(Client client, boolean overwrite, InputStream is)459 {460 installHelpTexts(client, overwrite, is, null);461 }462 463 /**464 456 This method installs the helptexts from an inputstream. 465 457 -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/PropertyIdMethod.java
r5384 r5590 64 64 new PropertyIdMethod("barcode", "Barcode", "barcode", 65 65 ArraySlideImporter.barcodeColumnMapping.getName(), false, Type.STRING); 66 67 /**68 @deprecated In 2.16, due to possible problems with circular class initialization69 with the {@link FallbackIdMethod} class. This array is now empty.70 */71 @Deprecated72 public static final IdMethod[] DEFAULT_METHODS = {};73 66 74 67 private final String method; -
trunk/src/webservices/client/java/net/sf/basedb/ws/client/BioAssaySetClient.java
r4931 r5590 52 52 super(session.getUrl(), "BioAssaySet", session.getServiceFactory()); 53 53 this.session = session; 54 }55 56 /**57 Calls the BioAssaySetService and gets the available formats to export58 a BioAssaySet from BASE in.59 @return An array with the formats.60 @throws AxisFault If communication with the service fails.61 @deprecated In 2.12. Use {@link #getDataFileTypes(int, QueryOptions)} instead.62 */63 public String[] getExportFormats()64 throws AxisFault65 {66 String[] formats = invokeBlocking("getExportFormats", String[].class, session.getId());67 return formats;68 }69 70 /**71 Call the service in BioAssaySetService that exports a bioassay set and72 then sends it as a file.73 @param bioAssaySetId Id of the bioAssay set to export74 @param format Export format to use when exporting the bioassay set75 @param reporterFields Reporter fields to include in the export76 @param spotFields Spot fields to include in the export77 @param mergeReporters If the reporters should be merged or not.78 @return An InputStream to read the file data from79 @throws AxisFault If communication with services fails.80 @throws IOException If accessing the file files.81 @deprecated In 2.12.82 See {@link net.sf.basedb.ws.server.BioAssaySetService#downloadBioAssaySet(String, int, String, String[], String[], Boolean)}83 for more information. Use {@link #downloadDataFile(int, String)} instead.84 */85 public InputStream downloadBioAssaySet(int bioAssaySetId, String format,86 String[] reporterFields, String[] spotFields, boolean mergeReporters)87 throws AxisFault, IOException88 {89 RPCServiceClient service = getService();90 Options options = service.getOptions();91 options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);92 service.setOptions(options);93 return invokeFileBlocking94 (95 "downloadBioAssaySet",96 session.getId(),97 bioAssaySetId,98 format,99 reporterFields,100 spotFields,101 mergeReporters102 );103 54 } 104 55 -
trunk/src/webservices/server/net/sf/basedb/ws/server/BioAssaySetService.java
r4931 r5590 22 22 package net.sf.basedb.ws.server; 23 23 24 import net.sf.basedb.core.BaseException;25 24 import net.sf.basedb.core.BioAssaySet; 26 25 import net.sf.basedb.core.DataFileType; … … 33 32 import net.sf.basedb.info.DataFileTypeInfo; 34 33 import net.sf.basedb.info.QueryOptions; 35 36 import java.io.File;37 import java.io.FileOutputStream;38 import java.util.ArrayList;39 import java.util.Arrays;40 import java.util.Collections;41 import java.util.List;42 43 import javax.activation.DataSource;44 34 45 35 import org.apache.axiom.om.OMElement; … … 63 53 public BioAssaySetService() 64 54 {} 65 66 /**67 Gets the available file formats a bioassay set can be exported in68 through webservices.69 @param ID A string that identify the active session70 @return A string-array with the available formats or71 null if there is no active session.72 @deprecated In 2.12. Use {@link #getDataFileTypes(String, int, QueryOptions)}73 instead74 */75 public String[] getExportFormats(String ID)76 {77 String[] formats = {SERIAL_BASEFILE, MATRIX_BASEFILE, MEV};78 return formats;79 }80 81 /**82 Returns an OMElement with an attached file that contains the exported bioassay set.83 Different file formats to export the bioassay set is available84 There may be some parameters that needs to be configured85 depending on the selected file format.86 @param ID An id to identify the active session with87 @param bioAssaySetId The id of the bioassay-set, which should be exported.88 @param format File format of which the bioassay set should be exported in.89 Available formats are:90 <ul>91 <li>{@value #MEV} (deprecated in BASE 2.12). MeV support has been92 completely moved to the MeV extension (http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev)93 This web service will continue to94 <li>{@value #SERIAL_BASEFILE}95 <li>{@value #MATRIX_BASEFILE}96 </ul>97 @param reporterFieldArray The reporter fields to include in the export98 @param spotFieldArray The spot fields to include in the export99 @param mergeReporters TRUE to merge spot data having the same reporter.100 see {@link net.sf.basedb.plugins.BioAssaySetExporter}101 @return An OMElement containing the exported file or102 NULL if there an exception is thrown.103 @throws Exception If the data could not be exported to the file.104 @deprecated In 2.12. Spot data should not be exported dynamically. Instead,105 plug-ins should be used and attach the result to the bioassay set and106 the files can then be downloaded when needed. Use107 {@link #downloadDataFile(String, int, String)} instead.108 */109 @SuppressWarnings("unchecked")110 public OMElement downloadBioAssaySet(String ID, int bioAssaySetId, String format, String[] reporterFieldArray,111 String[] spotFieldArray, Boolean mergeReporters)112 throws Exception113 {114 if (format == null) return null;115 116 String elementName = "downloadFile";117 OMElement elementWithAttachment = null;118 119 SessionControl sc = getSessionControl(ID);120 DbControl dc = sc.newDbControl();121 File exportFile = null;122 FileOutputStream fos = null;123 try124 {125 BioAssaySet bioassayset = BioAssaySet.getById(dc, bioAssaySetId);126 List<String> reporterFields = new ArrayList<String>();127 List<String> spotFields = new ArrayList<String>();128 if (reporterFieldArray != null) reporterFields = Arrays.asList(reporterFieldArray);129 if (spotFieldArray != null) spotFields = Arrays.asList(spotFieldArray);130 mergeReporters = mergeReporters == null ? false : mergeReporters;131 132 exportFile = File.createTempFile("BioAssaySetFile", null);133 fos = new FileOutputStream(exportFile);134 135 net.sf.basedb.plugins.BioAssaySetExporter exporter =136 new net.sf.basedb.plugins.BioAssaySetExporter();137 //Export to MeV-file format138 if (format.equals(MEV))139 {140 exporter.exportMeV(bioassayset, fos, null);141 }142 //Export the data from the bioassayset as one big matrix in a BASEfile143 else if(format.equals(MATRIX_BASEFILE))144 {145 exporter.exportBaseFileMatrix(bioassayset, fos, Collections.EMPTY_MAP, reporterFields, spotFields, mergeReporters, null);146 }147 //Export the data from a bioassayset as a serial BASEfile.148 else if (format.equals(SERIAL_BASEFILE))149 {150 exporter.exportBaseFileSerial(bioassayset, fos, Collections.EMPTY_MAP, reporterFields, spotFields, mergeReporters, null);151 }152 else153 {154 throw new BaseException("BASE web services does not support this format: " + format);155 }156 fos.close();157 DataSource source = new TempFileDataSource(exportFile, "text/plain");158 elementWithAttachment = attachFile(source, elementName);159 }160 finally161 {162 if (dc != null) dc.close();163 }164 165 return elementWithAttachment;166 }167 55 168 56 /** -
trunk/www/admin/annotationtypecategories/index.jsp
r5510 r5590 303 303 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 304 304 final ItemQuery<AnnotationTypeCategory> query = AnnotationTypeCategory.getQuery(); 305 cc.configureQuery(query, true); 305 dc = sc.newDbControl(); 306 cc.configureQuery(dc, query, true); 307 dc.close(); 306 308 cc.setQuery(query); 307 309 registerExportUtils(cc); … … 320 322 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 321 323 final ItemQuery<AnnotationTypeCategory> query = AnnotationTypeCategory.getQuery(); 322 cc.configureQuery(query, true); 324 dc = sc.newDbControl(); 325 cc.configureQuery(dc, query, true); 326 dc.close(); 323 327 cc.setQuery(query); 324 328 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+annotation+types+categories"; … … 335 339 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 336 340 final ItemQuery<AnnotationTypeCategory> query = AnnotationTypeCategory.getQuery(); 337 cc.configureQuery(query, true); 341 dc = sc.newDbControl(); 342 cc.configureQuery(dc, query, true); 343 dc.close(); 338 344 cc.setQuery(query); 339 345 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/annotationtypecategories/list_categories.jsp
r5426 r5590 100 100 { 101 101 final ItemQuery<AnnotationTypeCategory> query = 102 Base.getConfiguredQuery( cc, true, AnnotationTypeCategory.getQuery(), mode);102 Base.getConfiguredQuery(dc, cc, true, AnnotationTypeCategory.getQuery(), mode); 103 103 annotationTypeCategories = query.iterate(dc); 104 104 } -
trunk/www/admin/annotationtypes/index.jsp
r5510 r5590 428 428 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 429 429 final ItemQuery<AnnotationType> query = AnnotationType.getQuery(null); 430 cc.configureQuery(query, true); 430 dc = sc.newDbControl(); 431 cc.configureQuery(dc, query, true); 432 dc.close(); 431 433 cc.setQuery(query); 432 434 registerExportUtils(cc); … … 445 447 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 446 448 final ItemQuery<AnnotationType> query = AnnotationType.getQuery(null); 447 cc.configureQuery(query, true); 449 dc = sc.newDbControl(); 450 cc.configureQuery(dc, query, true); 451 dc.close(); 448 452 cc.setQuery(query); 449 453 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+annotation+types"; … … 460 464 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 461 465 final ItemQuery<AnnotationType> query = AnnotationType.getQuery(null); 462 cc.configureQuery(query, true); 466 dc = sc.newDbControl(); 467 cc.configureQuery(dc, query, true); 468 dc.close(); 463 469 cc.setQuery(query); 464 470 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/annotationtypes/list_annotationtypes.jsp
r5426 r5590 119 119 try 120 120 { 121 final ItemQuery<AnnotationType> query = Base.getConfiguredQuery( cc, true, AnnotationType.getQuery(null), mode);121 final ItemQuery<AnnotationType> query = Base.getConfiguredQuery(dc, cc, true, AnnotationType.getQuery(null), mode); 122 122 annotationTypes = query.iterate(dc); 123 123 } -
trunk/www/admin/clients/help/index.jsp
r5506 r5590 191 191 dc = sc.newDbControl(); 192 192 final Client client = Client.getById(dc, clientId); 193 final ItemQuery<Help> query = client.getHelp(); 194 cc.configureQuery(dc, query, true); 193 195 dc.close(); 194 final ItemQuery<Help> query = client.getHelp();195 cc.configureQuery(query, true);196 196 cc.setQuery(query); 197 197 redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+help"; … … 209 209 dc = sc.newDbControl(); 210 210 final Client client = Client.getById(dc, clientId); 211 final ItemQuery<Help> query = client.getHelp(); 212 cc.configureQuery(dc, query, true); 211 213 dc.close(); 212 final ItemQuery<Help> query = client.getHelp();213 cc.configureQuery(query, true);214 214 cc.setQuery(query); 215 215 redirect = "../../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+help"; … … 227 227 dc = sc.newDbControl(); 228 228 final Client client = Client.getById(dc, clientId); 229 final ItemQuery<Help> query = client.getHelp(); 230 cc.configureQuery(dc, query, true); 229 231 dc.close(); 230 final ItemQuery<Help> query = client.getHelp();231 cc.configureQuery(query, true);232 232 cc.setQuery(query); 233 233 redirect = "../../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/clients/help/list_help.jsp
r5426 r5590 85 85 try 86 86 { 87 final ItemQuery<Help> query = Base.getConfiguredQuery( cc, true, client.getHelp(), mode);87 final ItemQuery<Help> query = Base.getConfiguredQuery(dc, cc, true, client.getHelp(), mode); 88 88 help = query.iterate(dc); 89 89 } -
trunk/www/admin/clients/index.jsp
r5506 r5590 261 261 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 262 262 final ItemQuery<Client> query = Client.getQuery(); 263 cc.configureQuery(query, true); 263 dc = sc.newDbControl(); 264 cc.configureQuery(dc, query, true); 265 dc.close(); 264 266 cc.setQuery(query); 265 267 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+client+applications"; … … 276 278 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 277 279 final ItemQuery<Client> query = Client.getQuery(); 278 cc.configureQuery(query, true); 280 dc = sc.newDbControl(); 281 cc.configureQuery(dc, query, true); 282 dc.close(); 279 283 cc.setQuery(query); 280 284 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+client+applications"; … … 291 295 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 292 296 final ItemQuery<Client> query = Client.getQuery(); 293 cc.configureQuery(query, true); 297 dc = sc.newDbControl(); 298 cc.configureQuery(dc, query, true); 299 dc.close(); 294 300 cc.setQuery(query); 295 301 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/clients/list_clients.jsp
r5426 r5590 81 81 { 82 82 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 83 final ItemQuery<Client> query = Base.getConfiguredQuery(cc, true, Client.getQuery(), mode);84 83 85 84 Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); 86 85 try 87 86 { 87 final ItemQuery<Client> query = Base.getConfiguredQuery(dc, cc, true, Client.getQuery(), mode); 88 88 clients = query.iterate(dc); 89 89 } -
trunk/www/admin/datafiletypes/index.jsp
r5508 r5590 231 231 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 232 232 final ItemQuery<DataFileType> query = DataFileType.getQuery(); 233 cc.configureQuery(query, true); 233 dc = sc.newDbControl(); 234 cc.configureQuery(dc, query, true); 235 dc.close(); 234 236 cc.setQuery(query); 235 237 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+data+file+types"; … … 246 248 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 247 249 final ItemQuery<DataFileType> query = DataFileType.getQuery(); 248 cc.configureQuery(query, true); 250 dc = sc.newDbControl(); 251 cc.configureQuery(dc, query, true); 252 dc.close(); 249 253 cc.setQuery(query); 250 254 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+data+file+types"; … … 261 265 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 262 266 final ItemQuery<DataFileType> query = DataFileType.getQuery(); 263 cc.configureQuery(query, true); 267 dc = sc.newDbControl(); 268 cc.configureQuery(dc, query, true); 269 dc.close(); 264 270 cc.setQuery(query); 265 271 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/datafiletypes/list_filetypes.jsp
r5426 r5590 114 114 try 115 115 { 116 final ItemQuery<DataFileType> query = Base.getConfiguredQuery( cc, true, DataFileType.getQuery(), mode);116 final ItemQuery<DataFileType> query = Base.getConfiguredQuery(dc, cc, true, DataFileType.getQuery(), mode); 117 117 fileTypes = query.iterate(dc); 118 118 } -
trunk/www/admin/diskusage/details/view_details.jsp
r5426 r5590 140 140 try 141 141 { 142 final ItemQuery<DiskUsage> query = Base.getConfiguredQuery( cc, true, DiskUsage.getQuery(user, group), null);142 final ItemQuery<DiskUsage> query = Base.getConfiguredQuery(dc, cc, true, DiskUsage.getQuery(user, group), null); 143 143 diskUsage = query.iterate(dc); 144 144 totalCount = diskUsage.getTotalCount(); -
trunk/www/admin/diskusage/list_groups.jsp
r5426 r5590 99 99 try 100 100 { 101 final ItemQuery<Group> query = Base.getConfiguredQuery( cc, true, Group.getQuery(), mode);101 final ItemQuery<Group> query = Base.getConfiguredQuery(dc, cc, true, Group.getQuery(), mode); 102 102 query.include(Include.ALL); 103 103 query.restrict( -
trunk/www/admin/diskusage/list_users.jsp
r5426 r5590 102 102 try 103 103 { 104 final ItemQuery<User> query = Base.getConfiguredQuery( cc, true, User.getQuery(), mode);104 final ItemQuery<User> query = Base.getConfiguredQuery(dc, cc, true, User.getQuery(), mode); 105 105 query.include(Include.ALL); 106 106 users = query.iterate(dc); -
trunk/www/admin/extravaluetypes/index.jsp
r5510 r5590 226 226 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 227 227 final ItemQuery<ExtraValueType> query = ExtraValueType.getQuery(); 228 cc.configureQuery(query, true); 228 dc = sc.newDbControl(); 229 cc.configureQuery(dc, query, true); 230 dc.close(); 229 231 cc.setQuery(query); 230 232 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+extra+value+types"; … … 241 243 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 242 244 final ItemQuery<ExtraValueType> query = ExtraValueType.getQuery(); 243 cc.configureQuery(query, true); 245 dc = sc.newDbControl(); 246 cc.configureQuery(dc, query, true); 247 dc.close(); 244 248 cc.setQuery(query); 245 249 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+extra+value+types"; … … 256 260 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 257 261 final ItemQuery<ExtraValueType> query = ExtraValueType.getQuery(); 258 cc.configureQuery(query, true); 262 dc = sc.newDbControl(); 263 cc.configureQuery(dc, query, true); 264 dc.close(); 259 265 cc.setQuery(query); 260 266 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/extravaluetypes/list_extravaluetypes.jsp
r5426 r5590 99 99 try 100 100 { 101 final ItemQuery<ExtraValueType> query = Base.getConfiguredQuery( cc, true, ExtraValueType.getQuery(), mode);101 final ItemQuery<ExtraValueType> query = Base.getConfiguredQuery(dc, cc, true, ExtraValueType.getQuery(), mode); 102 102 extraValueTypes = query.iterate(dc); 103 103 } -
trunk/www/admin/filetypes/index.jsp
r5510 r5590 148 148 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 149 149 final ItemQuery<FileType> query = FileType.getQuery(); 150 cc.configureQuery(query, true); 150 dc = sc.newDbControl(); 151 cc.configureQuery(dc, query, true); 152 dc.close(); 151 153 cc.setQuery(query); 152 154 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+file+types"; … … 163 165 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 164 166 final ItemQuery<FileType> query = FileType.getQuery(); 165 cc.configureQuery(query, true); 167 dc = sc.newDbControl(); 168 cc.configureQuery(dc, query, true); 169 dc.close(); 166 170 cc.setQuery(query); 167 171 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/filetypes/list_filetypes.jsp
r5426 r5590 78 78 { 79 79 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 80 final ItemQuery<FileType> query = Base.getConfiguredQuery( cc, true, FileType.getQuery(), mode);80 final ItemQuery<FileType> query = Base.getConfiguredQuery(dc, cc, true, FileType.getQuery(), mode); 81 81 82 82 Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); -
trunk/www/admin/groups/index.jsp
r5506 r5590 284 284 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 285 285 final ItemQuery<Group> query = Group.getQuery(); 286 cc.configureQuery(query, true); 286 dc = sc.newDbControl(); 287 cc.configureQuery(dc, query, true); 288 dc.close(); 287 289 cc.setQuery(query); 288 290 registerExportUtils(cc); … … 301 303 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 302 304 final ItemQuery<Group> query = Group.getQuery(); 303 cc.configureQuery(query, true); 305 dc = sc.newDbControl(); 306 cc.configureQuery(dc, query, true); 307 dc.close(); 304 308 cc.setQuery(query); 305 309 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+groups"; … … 316 320 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 317 321 final ItemQuery<Group> query = Group.getQuery(); 318 cc.configureQuery(query, true); 322 dc = sc.newDbControl(); 323 cc.configureQuery(dc, query, true); 324 dc.close(); 319 325 cc.setQuery(query); 320 326 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/groups/list_groups.jsp
r5426 r5590 101 101 try 102 102 { 103 final ItemQuery<Group> query = Base.getConfiguredQuery( cc, true, Group.getQuery(), mode);103 final ItemQuery<Group> query = Base.getConfiguredQuery(dc, cc, true, Group.getQuery(), mode); 104 104 groups = query.iterate(dc); 105 105 } -
trunk/www/admin/hardware/index.jsp
r5506 r5590 270 270 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 271 271 final ItemQuery<Hardware> query = Hardware.getQuery(); 272 cc.configureQuery(query, true); 272 dc = sc.newDbControl(); 273 cc.configureQuery(dc, query, true); 274 dc.close(); 273 275 cc.setQuery(query); 274 276 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays"; … … 285 287 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 286 288 final ItemQuery<Hardware> query = Hardware.getQuery(); 287 cc.configureQuery(query, true); 289 dc = sc.newDbControl(); 290 cc.configureQuery(dc, query, true); 291 dc.close(); 288 292 cc.setQuery(query); 289 293 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays"; … … 300 304 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 301 305 final ItemQuery<Hardware> query = Hardware.getQuery(); 302 cc.configureQuery(query, true); 306 dc = sc.newDbControl(); 307 cc.configureQuery(dc, query, true); 308 dc.close(); 303 309 cc.setQuery(query); 304 310 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/hardware/list_hardware.jsp
r5426 r5590 82 82 { 83 83 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 84 final ItemQuery<Hardware> query = Base.getConfiguredQuery(cc, true, Hardware.getQuery(), mode);85 84 86 85 final ItemQuery<HardwareType> typeQuery = HardwareType.getQuery(); … … 91 90 try 92 91 { 92 final ItemQuery<Hardware> query = Base.getConfiguredQuery(dc, cc, true, Hardware.getQuery(), mode); 93 93 hardware = query.iterate(dc); 94 94 } -
trunk/www/admin/hardwaretypes/index.jsp
r5510 r5590 236 236 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 237 237 final ItemQuery<HardwareType> query = HardwareType.getQuery(); 238 cc.configureQuery(query, true); 238 dc = sc.newDbControl(); 239 cc.configureQuery(dc, query, true); 240 dc.close(); 239 241 cc.setQuery(query); 240 242 registerExportUtils(cc); … … 253 255 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 254 256 final ItemQuery<HardwareType> query = HardwareType.getQuery(); 255 cc.configureQuery(query, true); 257 dc = sc.newDbControl(); 258 cc.configureQuery(dc, query, true); 259 dc.close(); 256 260 cc.setQuery(query); 257 261 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/hardwaretypes/list_hardwaretypes.jsp
r5426 r5590 95 95 try 96 96 { 97 final ItemQuery<HardwareType> query = Base.getConfiguredQuery( cc, true, HardwareType.getQuery(), mode);97 final ItemQuery<HardwareType> query = Base.getConfiguredQuery(dc, cc, true, HardwareType.getQuery(), mode); 98 98 hardwareTypes = query.iterate(dc); 99 99 } -
trunk/www/admin/jobagents/index.jsp
r5508 r5590 305 305 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 306 306 final ItemQuery<JobAgent> query = JobAgent.getQuery(); 307 cc.configureQuery(query, true); 307 dc = sc.newDbControl(); 308 cc.configureQuery(dc, query, true); 309 dc.close(); 308 310 cc.setQuery(query); 309 311 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+job+agents"; … … 320 322 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 321 323 final ItemQuery<JobAgent> query = JobAgent.getQuery(); 322 cc.configureQuery(query, true); 324 dc = sc.newDbControl(); 325 cc.configureQuery(dc, query, true); 326 dc.close(); 323 327 cc.setQuery(query); 324 328 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+job+agents"; … … 335 339 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 336 340 final ItemQuery<JobAgent> query = JobAgent.getQuery(); 337 cc.configureQuery(query, true); 341 dc = sc.newDbControl(); 342 cc.configureQuery(dc, query, true); 343 dc.close(); 338 344 cc.setQuery(query); 339 345 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/jobagents/list_agents.jsp
r5426 r5590 92 92 try 93 93 { 94 final ItemQuery<JobAgent> query = Base.getConfiguredQuery( cc, true, JobAgent.getQuery(), mode);94 final ItemQuery<JobAgent> query = Base.getConfiguredQuery(dc, cc, true, JobAgent.getQuery(), mode); 95 95 agents = query.iterate(dc); 96 96 } -
trunk/www/admin/mimetypes/index.jsp
r5510 r5590 225 225 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 226 226 final ItemQuery<MimeType> query = MimeType.getQuery(); 227 cc.configureQuery(query, true); 227 dc = sc.newDbControl(); 228 cc.configureQuery(dc, query, true); 229 dc.close(); 228 230 cc.setQuery(query); 229 231 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+mime+types"; … … 240 242 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 241 243 final ItemQuery<MimeType> query = MimeType.getQuery(); 242 cc.configureQuery(query, true); 244 dc = sc.newDbControl(); 245 cc.configureQuery(dc, query, true); 246 dc.close(); 243 247 cc.setQuery(query); 244 248 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+mime+types"; … … 255 259 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 256 260 final ItemQuery<MimeType> query = MimeType.getQuery(); 257 cc.configureQuery(query, true); 261 dc = sc.newDbControl(); 262 cc.configureQuery(dc, query, true); 263 dc.close(); 258 264 cc.setQuery(query); 259 265 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/mimetypes/list_mimetypes.jsp
r5426 r5590 81 81 { 82 82 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 83 final ItemQuery<MimeType> query = Base.getConfiguredQuery(cc, true, MimeType.getQuery(), mode);84 83 85 84 // Get all file types … … 91 90 try 92 91 { 92 final ItemQuery<MimeType> query = Base.getConfiguredQuery(dc, cc, true, MimeType.getQuery(), mode); 93 93 mimeTypes = query.iterate(dc); 94 94 } -
trunk/www/admin/news/index.jsp
r5506 r5590 232 232 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 233 233 final ItemQuery<News> query = News.getQuery(); 234 cc.configureQuery(query, true); 234 dc = sc.newDbControl(); 235 cc.configureQuery(dc, query, true); 236 dc.close(); 235 237 cc.setQuery(query); 236 238 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+news"; … … 247 249 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 248 250 final ItemQuery<News> query = News.getQuery(); 249 cc.configureQuery(query, true); 251 dc = sc.newDbControl(); 252 cc.configureQuery(dc, query, true); 253 dc.close(); 250 254 cc.setQuery(query); 251 255 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+news"; … … 262 266 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 263 267 final ItemQuery<News> query = News.getQuery(); 264 cc.configureQuery(query, true); 268 dc = sc.newDbControl(); 269 cc.configureQuery(dc, query, true); 270 dc.close(); 265 271 cc.setQuery(query); 266 272 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/news/list_news.jsp
r5426 r5590 83 83 try 84 84 { 85 final ItemQuery<News> query = Base.getConfiguredQuery( cc, true, News.getQuery(), mode);85 final ItemQuery<News> query = Base.getConfiguredQuery(dc, cc, true, News.getQuery(), mode); 86 86 news = query.iterate(dc); 87 87 } -
trunk/www/admin/platforms/index.jsp
r5508 r5590 273 273 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 274 274 final ItemQuery<Platform> query = Platform.getQuery(); 275 cc.configureQuery(query, true); 275 dc = sc.newDbControl(); 276 cc.configureQuery(dc, query, true); 277 dc.close(); 276 278 cc.setQuery(query); 277 279 registerExportUtils(cc); … … 290 292 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 291 293 final ItemQuery<Platform> query = Platform.getQuery(); 292 cc.configureQuery(query, true); 294 dc = sc.newDbControl(); 295 cc.configureQuery(dc, query, true); 296 dc.close(); 293 297 cc.setQuery(query); 294 298 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+platforms"; … … 305 309 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 306 310 final ItemQuery<Platform> query = Platform.getQuery(); 307 cc.configureQuery(query, true); 311 dc = sc.newDbControl(); 312 cc.configureQuery(dc, query, true); 313 dc.close(); 308 314 cc.setQuery(query); 309 315 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/platforms/list_platforms.jsp
r5426 r5590 93 93 try 94 94 { 95 final ItemQuery<Platform> query = Base.getConfiguredQuery( cc, true, Platform.getQuery(), mode);95 final ItemQuery<Platform> query = Base.getConfiguredQuery(dc, cc, true, Platform.getQuery(), mode); 96 96 platforms = query.iterate(dc); 97 97 } -
trunk/www/admin/platforms/variants/index.jsp
r5508 r5590 255 255 dc = sc.newDbControl(); 256 256 final Platform platform = Platform.getById(dc, platformId); 257 final ItemQuery<PlatformVariant> query = platform.getVariants(); 258 cc.configureQuery(dc, query, true); 257 259 dc.close(); 258 final ItemQuery<PlatformVariant> query = platform.getVariants();259 cc.configureQuery(query, true);260 260 cc.setQuery(query); 261 261 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+platform+variants"; … … 273 273 dc = sc.newDbControl(); 274 274 final Platform platform = Platform.getById(dc, platformId); 275 final ItemQuery<PlatformVariant> query = platform.getVariants(); 276 cc.configureQuery(dc, query, true); 275 277 dc.close(); 276 final ItemQuery<PlatformVariant> query = platform.getVariants();277 cc.configureQuery(query, true);278 278 cc.setQuery(query); 279 279 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+platform+variants"; … … 291 291 dc = sc.newDbControl(); 292 292 final Platform platform = Platform.getById(dc, platformId); 293 final ItemQuery<PlatformVariant> query = platform.getVariants(); 294 cc.configureQuery(dc, query, true); 293 295 dc.close(); 294 final ItemQuery<PlatformVariant> query = platform.getVariants();295 cc.configureQuery(query, true);296 296 cc.setQuery(query); 297 297 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/platforms/variants/list_variants.jsp
r5426 r5590 86 86 try 87 87 { 88 final ItemQuery<PlatformVariant> query = Base.getConfiguredQuery( cc, true, platform.getVariants(), mode);88 final ItemQuery<PlatformVariant> query = Base.getConfiguredQuery(dc, cc, true, platform.getVariants(), mode); 89 89 variants = query.iterate(dc); 90 90 } -
trunk/www/admin/pluginconfigurations/index.jsp
r5508 r5590 301 301 query.join(Hql.leftJoin(Item.PLUGINDEFINITION.getAlias(), "guiContexts", "ctx", null, false)); 302 302 query.setDistinct(true); 303 cc.configureQuery(query, true); 303 dc = sc.newDbControl(); 304 cc.configureQuery(dc, query, true); 305 dc.close(); 304 306 cc.setQuery(query); 305 307 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+plugin+configurations"; … … 319 321 query.join(Hql.leftJoin(Item.PLUGINDEFINITION.getAlias(), "guiContexts", "ctx", null, false)); 320 322 query.setDistinct(true); 321 cc.configureQuery(query, true); 323 dc = sc.newDbControl(); 324 cc.configureQuery(dc, query, true); 325 dc.close(); 322 326 cc.setQuery(query); 323 327 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plugin+configurations"; … … 337 341 query.join(Hql.leftJoin(Item.PLUGINDEFINITION.getAlias(), "guiContexts", "ctx", null, false)); 338 342 query.setDistinct(true); 339 cc.configureQuery(query, true); 343 dc = sc.newDbControl(); 344 cc.configureQuery(dc, query, true); 345 dc.close(); 340 346 cc.setQuery(query); 341 347 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/plugindefinitions/index.jsp
r5508 r5590 500 500 query.join(Hql.leftJoin("guiContexts", "ctx")); 501 501 query.setDistinct(true); 502 cc.configureQuery(query, true); 502 dc = sc.newDbControl(); 503 cc.configureQuery(dc, query, true); 504 dc.close(); 503 505 cc.setQuery(query); 504 506 registerExportUtils(cc); … … 519 521 query.join(Hql.leftJoin("guiContexts", "ctx")); 520 522 query.setDistinct(true); 521 cc.configureQuery(query, true); 523 dc = sc.newDbControl(); 524 cc.configureQuery(dc, query, true); 525 dc.close(); 522 526 cc.setQuery(query); 523 527 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plugins"; … … 536 540 query.join(Hql.leftJoin("guiContexts", "ctx")); 537 541 query.setDistinct(true); 538 cc.configureQuery(query, true); 542 dc = sc.newDbControl(); 543 cc.configureQuery(dc, query, true); 544 dc.close(); 539 545 cc.setQuery(query); 540 546 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/plugintypes/index.jsp
r5508 r5590 240 240 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 241 241 final ItemQuery<PluginType> query = PluginType.getQuery(); 242 cc.configureQuery(query, true); 242 dc = sc.newDbControl(); 243 cc.configureQuery(dc, query, true); 244 dc.close(); 243 245 cc.setQuery(query); 244 246 registerExportUtils(cc); … … 257 259 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 258 260 final ItemQuery<PluginType> query = PluginType.getQuery(); 259 cc.configureQuery(query, true); 261 dc = sc.newDbControl(); 262 cc.configureQuery(dc, query, true); 263 dc.close(); 260 264 cc.setQuery(query); 261 265 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plugin+types"; … … 272 276 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 273 277 final ItemQuery<PluginType> query = PluginType.getQuery(); 274 cc.configureQuery(query, true); 278 dc = sc.newDbControl(); 279 cc.configureQuery(dc, query, true); 280 dc.close(); 275 281 cc.setQuery(query); 276 282 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/plugintypes/list_plugintypes.jsp
r5426 r5590 95 95 try 96 96 { 97 final ItemQuery<PluginType> query = Base.getConfiguredQuery( cc, true, PluginType.getQuery(), mode);97 final ItemQuery<PluginType> query = Base.getConfiguredQuery(dc, cc, true, PluginType.getQuery(), mode); 98 98 pluginTypes = query.iterate(dc); 99 99 } -
trunk/www/admin/protocols/index.jsp
r5506 r5590 296 296 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 297 297 final ItemQuery<Protocol> query = Protocol.getQuery(); 298 cc.configureQuery(query, true); 298 dc = sc.newDbControl(); 299 cc.configureQuery(dc, query, true); 300 dc.close(); 299 301 cc.setQuery(query); 300 302 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays"; … … 311 313 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 312 314 final ItemQuery<Protocol> query = Protocol.getQuery(); 313 cc.configureQuery(query, true); 315 dc = sc.newDbControl(); 316 cc.configureQuery(dc, query, true); 317 dc.close(); 314 318 cc.setQuery(query); 315 319 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays"; … … 326 330 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 327 331 final ItemQuery<Protocol> query = Protocol.getQuery(); 328 cc.configureQuery(query, true); 332 dc = sc.newDbControl(); 333 cc.configureQuery(dc, query, true); 334 dc.close(); 329 335 cc.setQuery(query); 330 336 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/protocols/list_protocol.jsp
r5426 r5590 89 89 90 90 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 91 final ItemQuery<Protocol> query = Base.getConfiguredQuery( cc, true, Protocol.getQuery(), mode);91 final ItemQuery<Protocol> query = Base.getConfiguredQuery(dc, cc, true, Protocol.getQuery(), mode); 92 92 93 93 final ItemQuery<ProtocolType> typeQuery = ProtocolType.getQuery(); -
trunk/www/admin/protocoltypes/index.jsp
r5510 r5590 236 236 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 237 237 final ItemQuery<ProtocolType> query = ProtocolType.getQuery(); 238 cc.configureQuery(query, true); 238 dc = sc.newDbControl(); 239 cc.configureQuery(dc, query, true); 240 dc.close(); 239 241 cc.setQuery(query); 240 242 registerExportUtils(cc); … … 253 255 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 254 256 final ItemQuery<ProtocolType> query = ProtocolType.getQuery(); 255 cc.configureQuery(query, true); 257 dc = sc.newDbControl(); 258 cc.configureQuery(dc, query, true); 259 dc.close(); 256 260 cc.setQuery(query); 257 261 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+protocol+types"; … … 268 272 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 269 273 final ItemQuery<ProtocolType> query = ProtocolType.getQuery(); 270 cc.configureQuery(query, true); 274 dc = sc.newDbControl(); 275 cc.configureQuery(dc, query, true); 276 dc.close(); 271 277 cc.setQuery(query); 272 278 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/protocoltypes/list_protocoltype.jsp
r5426 r5590 95 95 try 96 96 { 97 final ItemQuery<ProtocolType> query = Base.getConfiguredQuery( cc, true, ProtocolType.getQuery(), mode);97 final ItemQuery<ProtocolType> query = Base.getConfiguredQuery(dc, cc, true, ProtocolType.getQuery(), mode); 98 98 protocolTypes = query.iterate(dc); 99 99 } -
trunk/www/admin/quantities/index.jsp
r5510 r5590 237 237 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 238 238 final ItemQuery<Quantity> query = Quantity.getQuery(); 239 cc.configureQuery(query, true); 239 dc = sc.newDbControl(); 240 cc.configureQuery(dc, query, true); 241 dc.close(); 240 242 cc.setQuery(query); 241 243 registerExportUtils(cc); … … 254 256 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 255 257 final ItemQuery<Quantity> query = Quantity.getQuery(); 256 cc.configureQuery(query, true); 258 dc = sc.newDbControl(); 259 cc.configureQuery(dc, query, true); 260 dc.close(); 257 261 cc.setQuery(query); 258 262 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+quantities"; … … 269 273 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 270 274 final ItemQuery<Quantity> query = Quantity.getQuery(); 271 cc.configureQuery(query, true); 275 dc = sc.newDbControl(); 276 cc.configureQuery(dc, query, true); 277 dc.close(); 272 278 cc.setQuery(query); 273 279 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/quantities/list_quantities.jsp
r5426 r5590 92 92 try 93 93 { 94 final ItemQuery<Quantity> query = Base.getConfiguredQuery( cc, true, Quantity.getQuery(), mode);94 final ItemQuery<Quantity> query = Base.getConfiguredQuery(dc, cc, true, Quantity.getQuery(), mode); 95 95 quantities = query.iterate(dc); 96 96 } -
trunk/www/admin/quantities/units/index.jsp
r5510 r5590 218 218 dc = sc.newDbControl(); 219 219 final Quantity quantity = Quantity.getById(dc, quantityId); 220 final ItemQuery<Unit> query = quantity.getUnits(); 221 cc.configureQuery(dc, query, true); 220 222 dc.close(); 221 final ItemQuery<Unit> query = quantity.getUnits();222 cc.configureQuery(query, true);223 223 cc.setQuery(query); 224 224 redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+units"; … … 236 236 dc = sc.newDbControl(); 237 237 final Quantity quantity = Quantity.getById(dc, quantityId); 238 final ItemQuery<Unit> query = quantity.getUnits(); 239 cc.configureQuery(dc, query, true); 238 240 dc.close(); 239 final ItemQuery<Unit> query = quantity.getUnits();240 cc.configureQuery(query, true);241 241 cc.setQuery(query); 242 242 redirect = "../../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+units"; … … 254 254 dc = sc.newDbControl(); 255 255 final Quantity quantity = Quantity.getById(dc, quantityId); 256 final ItemQuery<Unit> query = quantity.getUnits(); 257 cc.configureQuery(dc, query, true); 256 258 dc.close(); 257 final ItemQuery<Unit> query = quantity.getUnits();258 cc.configureQuery(query, true);259 259 cc.setQuery(query); 260 260 redirect = "../../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/quota/index.jsp
r5506 r5590 248 248 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 249 249 final ItemQuery<Quota> query = Quota.getQuery(); 250 cc.configureQuery(query, true); 250 dc = sc.newDbControl(); 251 cc.configureQuery(dc, query, true); 252 dc.close(); 251 253 cc.setQuery(query); 252 254 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+quota"; … … 263 265 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 264 266 final ItemQuery<Quota> query = Quota.getQuery(); 265 cc.configureQuery(query, true); 267 dc = sc.newDbControl(); 268 cc.configureQuery(dc, query, true); 269 dc.close(); 266 270 cc.setQuery(query); 267 271 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+quota"; … … 278 282 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 279 283 final ItemQuery<Quota> query = Quota.getQuery(); 280 cc.configureQuery(query, true); 284 dc = sc.newDbControl(); 285 cc.configureQuery(dc, query, true); 286 dc.close(); 281 287 cc.setQuery(query); 282 288 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/quota/list_quota.jsp
r5426 r5590 80 80 { 81 81 final QuotaType total = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL)); 82 final ItemQuery<Quota> query = Base.getConfiguredQuery(cc, true, Quota.getQuery(), mode);83 82 84 83 Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); 85 84 try 86 85 { 86 final ItemQuery<Quota> query = Base.getConfiguredQuery(dc, cc, true, Quota.getQuery(), mode); 87 87 quota = query.iterate(dc); 88 88 } -
trunk/www/admin/quotatypes/index.jsp
r5510 r5590 148 148 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 149 149 final ItemQuery<QuotaType> query = QuotaType.getQuery(); 150 cc.configureQuery(query, true); 150 dc = sc.newDbControl(); 151 cc.configureQuery(dc, query, true); 152 dc.close(); 151 153 cc.setQuery(query); 152 154 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+quota+types"; … … 163 165 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 164 166 final ItemQuery<QuotaType> query = QuotaType.getQuery(); 165 cc.configureQuery(query, true); 167 dc = sc.newDbControl(); 168 cc.configureQuery(dc, query, true); 169 dc.close(); 166 170 cc.setQuery(query); 167 171 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/quotatypes/list_quotatypes.jsp
r5426 r5590 78 78 { 79 79 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 80 final ItemQuery<QuotaType> query = Base.getConfiguredQuery(cc, true, QuotaType.getQuery(), mode);81 80 82 81 Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); 83 82 try 84 83 { 84 final ItemQuery<QuotaType> query = Base.getConfiguredQuery(dc, cc, true, QuotaType.getQuery(), mode); 85 85 quotaTypes = query.iterate(dc); 86 86 } -
trunk/www/admin/reportertypes/index.jsp
r5510 r5590 214 214 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 215 215 final ItemQuery<ReporterType> query = ReporterType.getQuery(); 216 cc.configureQuery(query, true); 216 dc = sc.newDbControl(); 217 cc.configureQuery(dc, query, true); 218 dc.close(); 217 219 cc.setQuery(query); 218 220 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+reporter+types"; … … 229 231 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 230 232 final ItemQuery<ReporterType> query = ReporterType.getQuery(); 231 cc.configureQuery(query, true); 233 dc = sc.newDbControl(); 234 cc.configureQuery(dc, query, true); 235 dc.close(); 232 236 cc.setQuery(query); 233 237 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+reporter+types"; … … 244 248 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 245 249 final ItemQuery<ReporterType> query = ReporterType.getQuery(); 246 cc.configureQuery(query, true); 250 dc = sc.newDbControl(); 251 cc.configureQuery(dc, query, true); 252 dc.close(); 247 253 cc.setQuery(query); 248 254 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/reportertypes/list_reportertypes.jsp
r5426 r5590 80 80 { 81 81 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 82 final ItemQuery<ReporterType> query = Base.getConfiguredQuery(cc, true, ReporterType.getQuery(), mode);83 82 84 83 Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); 85 84 try 86 85 { 86 final ItemQuery<ReporterType> query = Base.getConfiguredQuery(dc, cc, true, ReporterType.getQuery(), mode); 87 87 reporterTypes = query.iterate(dc); 88 88 } -
trunk/www/admin/roles/index.jsp
r5506 r5590 265 265 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 266 266 final ItemQuery<Role> query = Role.getQuery(); 267 cc.configureQuery(query, true); 267 dc = sc.newDbControl(); 268 cc.configureQuery(dc, query, true); 269 dc.close(); 268 270 cc.setQuery(query); 269 271 registerExportUtils(cc); … … 282 284 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 283 285 final ItemQuery<Role> query = Role.getQuery(); 284 cc.configureQuery(query, true); 286 dc = sc.newDbControl(); 287 cc.configureQuery(dc, query, true); 288 dc.close(); 285 289 cc.setQuery(query); 286 290 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+roles"; … … 297 301 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 298 302 final ItemQuery<Role> query = Role.getQuery(); 299 cc.configureQuery(query, true); 303 dc = sc.newDbControl(); 304 cc.configureQuery(dc, query, true); 305 dc.close(); 300 306 cc.setQuery(query); 301 307 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/roles/list_roles.jsp
r5426 r5590 94 94 try 95 95 { 96 final ItemQuery<Role> query = Base.getConfiguredQuery( cc, true, Role.getQuery(), mode);96 final ItemQuery<Role> query = Base.getConfiguredQuery(dc, cc, true, Role.getQuery(), mode); 97 97 roles = query.iterate(dc); 98 98 } -
trunk/www/admin/software/index.jsp
r5506 r5590 270 270 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 271 271 final ItemQuery<Software> query = Software.getQuery(); 272 cc.configureQuery(query, true); 272 dc = sc.newDbControl(); 273 cc.configureQuery(dc, query, true); 274 dc.close(); 273 275 cc.setQuery(query); 274 276 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays"; … … 285 287 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 286 288 final ItemQuery<Software> query = Software.getQuery(); 287 cc.configureQuery(query, true); 289 dc = sc.newDbControl(); 290 cc.configureQuery(dc, query, true); 291 dc.close(); 288 292 cc.setQuery(query); 289 293 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays"; … … 300 304 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 301 305 final ItemQuery<Software> query = Software.getQuery(); 302 cc.configureQuery(query, true); 306 dc = sc.newDbControl(); 307 cc.configureQuery(dc, query, true); 308 dc.close(); 303 309 cc.setQuery(query); 304 310 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/software/list_software.jsp
r5426 r5590 82 82 { 83 83 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 84 final ItemQuery<Software> query = Base.getConfiguredQuery(cc, true, Software.getQuery(), mode);85 84 86 85 final ItemQuery<SoftwareType> typeQuery = SoftwareType.getQuery(); … … 91 90 try 92 91 { 92 final ItemQuery<Software> query = Base.getConfiguredQuery(dc, cc, true, Software.getQuery(), mode); 93 93 software = query.iterate(dc); 94 94 } -
trunk/www/admin/softwaretypes/index.jsp
r5510 r5590 170 170 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 171 171 final ItemQuery<SoftwareType> query = SoftwareType.getQuery(); 172 cc.configureQuery(query, true); 172 dc = sc.newDbControl(); 173 cc.configureQuery(dc, query, true); 174 dc.close(); 173 175 cc.setQuery(query); 174 176 registerExportUtils(cc); … … 187 189 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 188 190 final ItemQuery<SoftwareType> query = SoftwareType.getQuery(); 189 cc.configureQuery(query, true); 191 dc = sc.newDbControl(); 192 cc.configureQuery(dc, query, true); 193 dc.close(); 190 194 cc.setQuery(query); 191 195 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/softwaretypes/list_softwaretypes.jsp
r5426 r5590 93 93 try 94 94 { 95 final ItemQuery<SoftwareType> query = Base.getConfiguredQuery( cc, true, SoftwareType.getQuery(), mode);95 final ItemQuery<SoftwareType> query = Base.getConfiguredQuery(dc, cc, true, SoftwareType.getQuery(), mode); 96 96 softwareTypes = query.iterate(dc); 97 97 } -
trunk/www/admin/users/index.jsp
r5506 r5590 379 379 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 380 380 final ItemQuery<User> query = User.getQuery(); 381 cc.configureQuery(query, true); 381 dc = sc.newDbControl(); 382 cc.configureQuery(dc, query, true); 383 dc.close(); 382 384 cc.setQuery(query); 383 385 registerExportUtils(cc); … … 396 398 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 397 399 final ItemQuery<User> query = User.getQuery(); 398 cc.configureQuery(query, true); 400 dc = sc.newDbControl(); 401 cc.configureQuery(dc, query, true); 402 dc.close(); 399 403 cc.setQuery(query); 400 404 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+users"; … … 411 415 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 412 416 final ItemQuery<User> query = User.getQuery(); 413 cc.configureQuery(query, true); 417 dc = sc.newDbControl(); 418 cc.configureQuery(dc, query, true); 419 dc.close(); 414 420 cc.setQuery(query); 415 421 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/admin/users/list_users.jsp
r5426 r5590 108 108 try 109 109 { 110 final ItemQuery<User> query = Base.getConfiguredQuery( cc, true, User.getQuery(), mode);110 final ItemQuery<User> query = Base.getConfiguredQuery(dc, cc, true, User.getQuery(), mode); 111 111 users = query.iterate(dc); 112 112 } -
trunk/www/biomaterials/bioplateeventtypes/index.jsp
r5525 r5590 220 220 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 221 221 final ItemQuery<BioPlateEventType> query = BioPlateEventType.getQuery(); 222 cc.configureQuery(query, true); 222 dc = sc.newDbControl(); 223 cc.configureQuery(dc, query, true); 224 dc.close(); 223 225 cc.setQuery(query); 224 226 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bio+plate+event+types"; … … 235 237 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 236 238 final ItemQuery<BioPlateEventType> query = BioPlateEventType.getQuery(); 237 cc.configureQuery(query, true); 239 dc = sc.newDbControl(); 240 cc.configureQuery(dc, query, true); 241 dc.close(); 238 242 cc.setQuery(query); 239 243 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+bio+plate+event+types"; … … 250 254 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 251 255 final ItemQuery<BioPlateEventType> query = BioPlateEventType.getQuery(); 252 cc.configureQuery(query, true); 256 dc = sc.newDbControl(); 257 cc.configureQuery(dc, query, true); 258 dc.close(); 253 259 cc.setQuery(query); 254 260 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/bioplateeventtypes/list_eventtypes.jsp
r5525 r5590 83 83 try 84 84 { 85 final ItemQuery<BioPlateEventType> query = Base.getConfiguredQuery( cc, true, BioPlateEventType.getQuery(), mode);85 final ItemQuery<BioPlateEventType> query = Base.getConfiguredQuery(dc, cc, true, BioPlateEventType.getQuery(), mode); 86 86 bioPlateEventTypes = query.iterate(dc); 87 87 } -
trunk/www/biomaterials/bioplates/events/index.jsp
r5525 r5590 270 270 dc = sc.newDbControl(); 271 271 final BioPlate bioplate = BioPlate.getById(dc, bioplateId); 272 dc.close();273 272 final ItemQuery<BioPlateEvent> query = bioplate.getEvents(); 274 cc.configureQuery(query, true); 273 cc.configureQuery(dc, query, true); 274 dc.close(); 275 275 cc.setQuery(query); 276 276 redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bioplate+events"; … … 288 288 dc = sc.newDbControl(); 289 289 final BioPlate bioplate = BioPlate.getById(dc, bioplateId); 290 dc.close();291 290 final ItemQuery<BioPlateEvent> query = bioplate.getEvents(); 292 cc.configureQuery(query, true); 291 cc.configureQuery(dc, query, true); 292 dc.close(); 293 293 cc.setQuery(query); 294 294 redirect = "../../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+bioplate+events"; … … 306 306 dc = sc.newDbControl(); 307 307 final BioPlate bioplate = BioPlate.getById(dc, bioplateId); 308 dc.close();309 308 final ItemQuery<BioPlateEvent> query = bioplate.getEvents(); 310 cc.configureQuery(query, true); 309 cc.configureQuery(dc, query, true); 310 dc.close(); 311 311 cc.setQuery(query); 312 312 redirect = "../../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/bioplates/index.jsp
r5548 r5590 275 275 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 276 276 final ItemQuery<BioPlate> query = BioPlate.getQuery(); 277 cc.configureQuery(query, true); 277 dc = sc.newDbControl(); 278 cc.configureQuery(dc, query, true); 279 dc.close(); 278 280 cc.setQuery(query); 279 281 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bioplates"; … … 290 292 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 291 293 final ItemQuery<BioPlate> query = BioPlate.getQuery(); 292 cc.configureQuery(query, true); 294 dc = sc.newDbControl(); 295 cc.configureQuery(dc, query, true); 296 dc.close(); 293 297 cc.setQuery(query); 294 298 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plates"; … … 305 309 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 306 310 final ItemQuery<BioPlate> query = BioPlate.getQuery(); 307 cc.configureQuery(query, true); 311 dc = sc.newDbControl(); 312 cc.configureQuery(dc, query, true); 313 dc.close(); 308 314 cc.setQuery(query); 309 315 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/bioplates/wells/index.jsp
r5492 r5590 183 183 dc = sc.newDbControl(); 184 184 final BioPlate bioplate = BioPlate.getById(dc, bioplateId); 185 dc.close();186 185 final ItemQuery<BioWell> query = bioplate.getBioWells(); 187 cc.configureQuery( query, true);186 cc.configureQuery(dc, query, true); 188 187 if (!"row".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("row"))); 189 188 if (!"column".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("column"))); 189 dc.close(); 190 190 cc.setQuery(query); 191 191 registerExportFormatters(cc); … … 205 205 dc = sc.newDbControl(); 206 206 final BioPlate bioplate = BioPlate.getById(dc, bioplateId); 207 final ItemQuery<BioWell> query = bioplate.getBioWells(); 208 cc.configureQuery(dc, query, true); 207 209 dc.close(); 208 final ItemQuery<BioWell> query = bioplate.getBioWells();209 cc.configureQuery(query, true);210 210 cc.setQuery(query); 211 211 redirect = root + "/common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+biowells"; … … 223 223 dc = sc.newDbControl(); 224 224 final BioPlate bioplate = BioPlate.getById(dc, bioplateId); 225 final ItemQuery<BioWell> query = bioplate.getBioWells(); 226 cc.configureQuery(dc, query, true); 225 227 dc.close(); 226 final ItemQuery<BioWell> query = bioplate.getBioWells();227 cc.configureQuery(query, true);228 228 cc.setQuery(query); 229 229 redirect = root + "/common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/bioplatetypes/index.jsp
r5492 r5590 227 227 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 228 228 final ItemQuery<BioPlateType> query = BioPlateType.getQuery(); 229 cc.configureQuery(query, true); 229 dc = sc.newDbControl(); 230 cc.configureQuery(dc, query, true); 231 dc.close(); 230 232 cc.setQuery(query); 231 233 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bio+plate+types"; … … 242 244 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 243 245 final ItemQuery<BioPlateType> query = BioPlateType.getQuery(); 244 cc.configureQuery(query, true); 246 dc = sc.newDbControl(); 247 cc.configureQuery(dc, query, true); 248 dc.close(); 245 249 cc.setQuery(query); 246 250 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+bio+plate+types"; … … 257 261 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 258 262 final ItemQuery<BioPlateType> query = BioPlateType.getQuery(); 259 cc.configureQuery(query, true); 263 dc = sc.newDbControl(); 264 cc.configureQuery(dc, query, true); 265 dc.close(); 260 266 cc.setQuery(query); 261 267 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/bioplatetypes/list_platetypes.jsp
r5459 r5590 102 102 try 103 103 { 104 final ItemQuery<BioPlateType> query = Base.getConfiguredQuery( cc, true, BioPlateType.getQuery(), mode);104 final ItemQuery<BioPlateType> query = Base.getConfiguredQuery(dc, cc, true, BioPlateType.getQuery(), mode); 105 105 bioPlateTypes = query.iterate(dc); 106 106 } -
trunk/www/biomaterials/biosources/index.jsp
r5492 r5590 287 287 registerExportUtils(cc); 288 288 final ItemQuery<BioSource> query = BioSource.getQuery(); 289 cc.configureQuery(query, true); 289 dc = sc.newDbControl(); 290 cc.configureQuery(dc, query, true); 291 dc.close(); 290 292 cc.setQuery(query); 291 293 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+biosources"; … … 303 305 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 304 306 final ItemQuery<BioSource> query = BioSource.getQuery(); 305 cc.configureQuery(query, true); 307 dc = sc.newDbControl(); 308 cc.configureQuery(dc, query, true); 309 dc.close(); 306 310 cc.setQuery(query); 307 311 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+biosources"; … … 318 322 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 319 323 final ItemQuery<BioSource> query = BioSource.getQuery(); 320 cc.configureQuery(query, true); 324 dc = sc.newDbControl(); 325 cc.configureQuery(dc, query, true); 326 dc.close(); 321 327 cc.setQuery(query); 322 328 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; … … 332 338 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 333 339 final ItemQuery<BioSource> query = BioSource.getQuery(); 334 cc.configureQuery(query, true); 340 dc = sc.newDbControl(); 341 cc.configureQuery(dc, query, true); 342 dc.close(); 335 343 cc.setQuery(query); 336 344 redirect = "../lists/index.jsp?ID="+ID+"&cmd=NewItem&addBioMaterials=1&formId=biosources&fromContext=BIOSOURCE"; -
trunk/www/biomaterials/events/index.jsp
r5492 r5590 203 203 MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId); 204 204 final ItemQuery<BioMaterialEvent> query = BioMaterialEvent.getQuery(bioMaterial); 205 cc.configureQuery(query, true); 205 cc.configureQuery(dc, query, true); 206 dc.close(); 206 207 cc.setQuery(query); 207 208 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+events"; … … 220 221 MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId); 221 222 final ItemQuery<BioMaterialEvent> query = BioMaterialEvent.getQuery(bioMaterial); 222 cc.configureQuery(query, true); 223 cc.configureQuery(dc, query, true); 224 dc.close(); 223 225 cc.setQuery(query); 224 226 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+events"; … … 237 239 MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId); 238 240 final ItemQuery<BioMaterialEvent> query = BioMaterialEvent.getQuery(bioMaterial); 239 cc.configureQuery(query, true); 241 cc.configureQuery(dc, query, true); 242 dc.close(); 240 243 cc.setQuery(query); 241 244 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/extracts/index.jsp
r5567 r5590 392 392 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 393 393 final ItemQuery<Extract> query = Extract.getQuery(); 394 cc.configureQuery(query, true); 394 dc = sc.newDbControl(); 395 cc.configureQuery(dc, query, true); 396 dc.close(); 395 397 registerExportFormatters(cc); 396 398 cc.setQuery(query); … … 409 411 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 410 412 final ItemQuery<Extract> query = Extract.getQuery(); 411 cc.configureQuery(query, true); 413 dc = sc.newDbControl(); 414 cc.configureQuery(dc, query, true); 415 dc.close(); 412 416 cc.setQuery(query); 413 417 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+extracts"; … … 424 428 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 425 429 final ItemQuery<Extract> query = Extract.getQuery(); 426 cc.configureQuery(query, true); 430 dc = sc.newDbControl(); 431 cc.configureQuery(dc, query, true); 432 dc.close(); 427 433 cc.setQuery(query); 428 434 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; … … 438 444 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 439 445 final ItemQuery<Extract> query = Extract.getQuery(); 440 cc.configureQuery(query, true); 446 dc = sc.newDbControl(); 447 cc.configureQuery(dc, query, true); 448 dc.close(); 441 449 cc.setQuery(query); 442 450 redirect = "../lists/index.jsp?ID="+ID+"&cmd=NewItem&addBioMaterials=1&formId=extracts&fromContext=EXTRACT"; … … 446 454 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 447 455 final ItemQuery<Extract> query = Extract.getQuery(); 448 cc.configureQuery(query, true); 456 dc = sc.newDbControl(); 457 cc.configureQuery(dc, query, true); 458 dc.close(); 449 459 cc.filterOnSelectedItems(query); 450 460 sc.getCurrentContext(Item.BIOPLATEEVENT, BioPlateEventType.PLACE_ON_PLATE).setQuery(query); -
trunk/www/biomaterials/labeledextracts/index.jsp
r5567 r5590 396 396 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 397 397 final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 398 cc.configureQuery(query, true); 398 dc = sc.newDbControl(); 399 cc.configureQuery(dc, query, true); 400 dc.close(); 399 401 registerExportUtils(cc); 400 402 cc.setQuery(query); … … 413 415 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 414 416 final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 415 cc.configureQuery(query, true); 417 dc = sc.newDbControl(); 418 cc.configureQuery(dc, query, true); 419 dc.close(); 416 420 cc.setQuery(query); 417 421 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+labeled+extracts"; … … 428 432 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 429 433 final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 430 cc.configureQuery(query, true); 434 dc = sc.newDbControl(); 435 cc.configureQuery(dc, query, true); 436 dc.close(); 431 437 cc.setQuery(query); 432 438 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; … … 442 448 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 443 449 final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 444 cc.configureQuery(query, true); 450 dc = sc.newDbControl(); 451 cc.configureQuery(dc, query, true); 452 dc.close(); 445 453 cc.setQuery(query); 446 454 redirect = "../lists/index.jsp?ID="+ID+"&cmd=NewItem&addBioMaterials=1&formId=labeledextracts&fromContext=LABELEDEXTRACT"; … … 450 458 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 451 459 final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 452 cc.configureQuery(query, true); 460 dc = sc.newDbControl(); 461 cc.configureQuery(dc, query, true); 462 dc.close(); 453 463 cc.filterOnSelectedItems(query); 454 464 sc.getCurrentContext(Item.BIOPLATEEVENT, BioPlateEventType.PLACE_ON_PLATE).setQuery(query); -
trunk/www/biomaterials/labels/index.jsp
r5492 r5590 261 261 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 262 262 final ItemQuery<Label> query = Label.getQuery(); 263 cc.configureQuery(query, true); 263 dc = sc.newDbControl(); 264 cc.configureQuery(dc, query, true); 265 dc.close(); 264 266 cc.setQuery(query); 265 267 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+labels"; … … 276 278 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 277 279 final ItemQuery<Label> query = Label.getQuery(); 278 cc.configureQuery(query, true); 280 dc = sc.newDbControl(); 281 cc.configureQuery(dc, query, true); 282 dc.close(); 279 283 cc.setQuery(query); 280 284 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+labels"; … … 291 295 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 292 296 final ItemQuery<Label> query = Label.getQuery(); 293 cc.configureQuery(query, true); 297 dc = sc.newDbControl(); 298 cc.configureQuery(dc, query, true); 299 dc.close(); 294 300 cc.setQuery(query); 295 301 redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin"; -
trunk/www/biomaterials/labels/list_labels.jsp
r5426 r5590 78 78 try 79 79 { 80 final ItemQuery<Label> query = Base.getConfiguredQuery(cc, true, Label.getQuery(), mode);81 80 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 82 81 … … 84 83 try 85 84 { 85 final ItemQuery<Label> query = Base.getConfiguredQuery(dc, cc, true, Label.getQuery(), mode); 86 86 labels = query.iterate(dc); 87 87 } -
trunk/www/biomaterials/lists/index.jsp
r5492 r5590 342 342 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 343 343 final ItemQuery<BioMaterialList> query = BioMaterialList.getQuery(); 344 cc.configureQuery(query, true); 344 dc = sc.newDbControl(); 345 cc.configureQuery(dc, query, true); 346 dc.close(); 345 347 cc.setQuery(query); 346 348 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+biomaterial+lists"; … … 357 359 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 358 360 final ItemQuery<BioMaterialList> query = BioMaterialList.getQuery();