Changeset 5590


Ignore:
Timestamp:
Mar 16, 2011, 12:48:47 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

References #1589: Delete deprecated classes and methods

Removed deprecated methods and classes from the core API.

Location:
trunk
Files:
4 deleted
189 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/Base.java

    r5518 r5590  
    923923 
    924924  /**
    925     This method will fail if used to filter on reporter lists or other items
    926     that require a DbControl.
    927     @deprecated Use {@link #getConfiguredQuery(DbControl, ItemContext, boolean, ItemQuery, ModeInfo)}
    928       instead
    929   */
    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   /**
    936925    Configures a query. This method calls {@link ItemContext#configureQuery(DbControl, EntityQuery, boolean)}
    937926    and then adds the following filter:
     
    14801469 
    14811470  /**
    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)}
    14911472    method. If the item parameter is null, <code>- none -</code> or
    14921473    <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.
    14981475   
    14991476    @param item The nameable item or null
    15001477    @param denied TRUE if the item is null because the current use
    15011478      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)
    15081482  {
    15091483    String name = "<i>- none -</i>";
     
    15111485    {
    15121486      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       }
    15181487    }
    15191488    else if (denied)
     
    15241493  }
    15251494 
     1495
    15261496  public static String getLinkedName(String ID, Nameable item, boolean denied, boolean enableEditLink)
    15271497  {
  • trunk/src/clients/web/net/sf/basedb/clients/web/ExperimentExplorer.java

    r5218 r5590  
    125125 
    126126  /**
    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 always
    130       contains the full set of reporters
    131   */
    132   public static final int DEFAULT_CACHE_SIZE = 100;
    133 
    134   /**
    135127    Predefined colors for annotation groups
    136128  */
     
    284276    Get the bioassay with the specified column number in the
    285277    data cube. This method is useful since spot queries (see
    286     {@link #getSpotQuery(DbControl, ReporterData, int, List)})
     278    {@link #getSpotQuery(DbControl, int, int, List)})
    287279    can only return the column number, but we usually want to display
    288280    the name, etc.
     
    313305    return cache == null ? 0 : cache.length;
    314306  }
    315  
    316   /**
    317     Set the size of the reporter cache.
    318     @param cacheSize The size
    319     @see #getCacheSize()
    320     @deprecated In 2.11. For performance reasons the full reporter set
    321       is always cached.
    322   */
    323   public void setCacheSize(int cacheSize)
    324   {}
    325307 
    326308  /**
     
    410392 
    411393  /**
    412     Get the id of the selected annotation type.
    413     @return The id of the selected annotation type or 0 if no annotation type
    414       is selected
    415     @deprecated In 2.14, use {@link #getAnnotationTypeIds()} instead
    416   */
    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 method
    425     removes all previous selections.
    426     @param annotationTypeId The annotation type id or 0 if none is
    427       selected
    428     @deprecated In 2.14, use {@link #setAnnotationTypeIds(Collection)} instead
    429   */
    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   /**
    438394    Get the selected annotation types.
    439395    @return A set with the id's of the selected annotation types
     
    608564 
    609565  /**
    610     Get the number of unique positions a reporter is present in
    611     among all bioassays in the bioassayset.
    612     @param dc The DbControl to use for database access
    613     @param reporter The reporter, or null to find spots without any reporter
    614     @deprecated In 2.11 for performance reasons, use {@link #getNumPositions(DbControl, int)}
    615       instead
    616   */
    617   public int getNumPositions(DbControl dc, ReporterData reporter)
    618   {
    619     int index = getReporterIndex(dc, reporter);
    620     return getNumPositions(dc, index);
    621   }
    622 
    623   /**
    624566    Get the index of the current position. It should be a value between
    625567    0 and {@link #getNumPositions(DbControl, int)}-1, or one
    626568    of the {@link #SPOT_ALL} or {@link #SPOT_AVG} special values (negative).
    627569    @return The current index
    628     @see #getPosition(DbControl, ReporterData, int)
     570    @see #getPosition(DbControl, int, int)
    629571  */
    630572  public int getPositionIndex()
     
    637579    @param positionIndex The new index
    638580    @see #getPositionIndex()
    639     @see #getPosition(DbControl, ReporterData, int)
     581    @see #getPosition(DbControl, int, int)
    640582  */
    641583  public void setPositionIndex(int positionIndex)
     
    681623 
    682624  /**
    683     Get the position number for the specified reporter and position index.
    684     The metod will query the data for all positions with the specified
    685     reporter, sort them by position and return the value given by the
    686     <code>positionIndex</code> parameter.
    687    
    688     @param dc The DbControl for database access
    689     @param reporter The reporter to look for, or null to find spots without reporter
    690     @param positionIndex The index of the position to find
    691     @return The position number
    692     @deprecated In 2.11 for performance reasons, use {@link #getPosition(DbControl, int, int)}
    693       instead
    694   */
    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   /**
    702625    Get a query returning the reporter data used by the reporter search page.
    703626    Note that the query is {@link DynamicSpotQuery} and not a
     
    726649    return reporterQuery;
    727650  }
    728  
    729   /**
    730     @deprecated In 2.11. For performance reasons, use {@link
    731       #getSpotQuery(DbControl, int, int, List)} instead
    732   */
    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 
    739651 
    740652  /**
     
    905817  }
    906818 
    907   /**
    908     Look in the cache for the with the given reporter.
    909    
    910     @param reporter A reporter or null
    911     @return The index or -1 if the reporter is not found
    912     @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  
    928819  @SuppressWarnings("unchecked")
    929820  private void initReporterCache(DbControl dc)
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/TableColumn.java

    r4889 r5590  
    7373  private final Formula.AverageMethod averageMethod;
    7474  private Formatter<?> formatter;
    75  
    76   /**
    77     Create TableColumn.
    78     @param id
    79     @param property
    80     @param jepExpression
    81     @param datatype
    82     @param title
    83     @param description
    84     @deprecated
    85    */
    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   }
    9175 
    9276  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  
    2626import net.sf.basedb.core.SimpleProgressReporter;
    2727import net.sf.basedb.core.signal.ShutdownSignalSender;
    28 import net.sf.basedb.core.signal.Signal;
    2928import net.sf.basedb.core.signal.SignalException;
    3029import net.sf.basedb.core.signal.SignalHandler;
     
    3231import net.sf.basedb.core.signal.SignalSender;
    3332import net.sf.basedb.core.signal.SignalTransporter;
    34 import net.sf.basedb.core.signal.SimpleSignalSender;
    3533
    3634/**
     
    134132    return null;
    135133  }
    136 
    137   @Deprecated
    138   @Override
    139   public void sendToAll(Signal signal)
    140   {
    141     sendToAll(new SimpleSignalSender(signal));
    142   }
    143134 
    144135  @Override
  • trunk/src/core/net/sf/basedb/core/Affymetrix.java

    r4517 r5590  
    4141public class Affymetrix
    4242{
    43  
    44   /**
    45     The name of the {@link AnyToAny} link between an array design
    46     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 bioassay
    53     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";
    5743
    58   /**
    59     The name of the {@link AnyToAny} link between a raw bioassay
    60     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 design
    67     has got a CDF file it counts as if it has features and it can be used
    68     for linking with {@link RawBioAssay}:s.
    69     <p>
    70     Starting with BASE 2.4 this method validates that
    71     the specified file is actaully a CDF file. See {@link #loadCdfFile(File)}.
    72 
    73     @param design The array design
    74     @param file The CDF file, or null to remove the file
    75     @throws PermissionDeniedException If the logged in user doesn't
    76       have write permission for the design and use permission for the
    77       file
    78     @throws InvalidDataException If the design is null or isn't an
    79       Affymetrix chip or if the file is not a CDF file
    80     @throws BaseException If there is another error
    81     @deprecated Use {@link FileStoreUtil#setDataFile(DbControl, FileStoreEnabled, String, File)}
    82       instead with {@link DataFileType#AFFYMETRIX_CDF} as the file
    83       type
    84   */
    85   public static void setCdfFile(ArrayDesign design, File file)
    86     throws PermissionDeniedException, InvalidDataException, BaseException
    87   {
    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 an
    100     array design. This method has been deprecated with the
    101     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 must
    112       be an Affymetrix chip
    113     @return The CDF file or null if no CDF file has been specified
    114     @throws PermissionDeniedException If the logged in user doesn't
    115       have read permission for the file
    116     @throws InvalidDataException If the design is null or isn't an
    117       Affymetrix chip
    118     @throws BaseException If there is another error
    119     @deprecated Use {@link FileStoreUtil#getDataFile(DbControl, FileStoreEnabled, String)}
    120       with a data file type of {@link DataFileType#AFFYMETRIX_CDF}
    121       instead
    122   */
    123   public static File getCdfFile(ArrayDesign design)
    124     throws PermissionDeniedException, InvalidDataException, BaseException
    125   {
    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 CEL
    137     file it counts as if data has been loaded and it can be used
    138     in experiments for analysis. To be able to add a CEL file the
    139     array design must also be connected to an array design with
    140     a CDF file. See {@link #setCdfFile(ArrayDesign, File)}.
    141     <p>
    142     Starting with BASE 2.4 this method validates that the specified
    143     file is a CEL file and that it matches the CDF file attached to
    144     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 the
    149       CEL and the CDF
    150     </ul>
    151        
    152     <p>
    153     This method also sets the number of spots to the number of cells
    154     found in the CEL file.
    155  
    156     @param rawBioAssay The raw bioassay
    157     @param file The CEL file, or null to remove the file
    158     @throws PermissionDeniedException If the logged in user doesn't
    159       have write permission for the raw bioassay and use permission for the
    160       file
    161     @throws InvalidDataException If the raw bioassay is null or isn't an Affymetrix
    162       raw data type
    163     @throws BaseException If there is another error
    164     @deprecated Use {@link FileStoreUtil#setDataFile(DbControl, FileStoreEnabled, String, File)}
    165       instead with {@link DataFileType#AFFYMETRIX_CEL} as the file
    166       type
    167   */
    168   public static void setCelFile(RawBioAssay rawBioAssay, File file)
    169     throws PermissionDeniedException, InvalidDataException, BaseException
    170   {
    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 a
    185     raw bioassay.
    186    
    187     @param rawBioAssay The raw bioassay to get the CEL file from, it must
    188       be a raw bioassay of an Affymetrix raw data type
    189     @return The CEL file or null if no CEL file has been specified
    190     @throws PermissionDeniedException If the logged in user doesn't
    191       have read permission for the file
    192     @throws InvalidDataException If the raw bioassay is null or isn't an
    193       Affymetrix raw data type
    194     @throws BaseException If there is another error
    195     @deprecated
    196   */
    197   public static File getCelFile(RawBioAssay rawBioAssay)
    198     throws PermissionDeniedException, InvalidDataException, BaseException
    199   {
    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  
    21044  /**
    21145    Check if the CEL file on the raw bioassay matches the CDF file on the
     
    26195        cdf.getHeader().getRows() + ", cols=" + cdf.getHeader().getCols()+")");
    26296    }   
    263   }
    264  
    265   /**
    266     Load a CDF file using the Affymetric Fusion SDK. This method
    267     checks that the file exists, and read all headers.
    268    
    269     @param cdfFile The file to load
    270     @return A FusionCDFData object representing the CDF file
    271     @throws ItemNotFoundException If the actaul file is not on the server
    272     @throws InvalidDataException If the file is not a CDF file
    273     @since 2.4
    274     @deprecated Use {@link CdfFileHandler#loadCdfFile(File)} instead
    275   */
    276   public static FusionCDFData loadCdfFile(File cdfFile)
    277     throws ItemNotFoundException, InvalidDataException
    278   {
    279     return new CdfFileHandler().loadCdfFile(cdfFile);
    280   }
    281  
    282   /**
    283     Load a CEL file using the Affymetric Fusion SDK. This method
    284     checks that the file exists, and read all headers.
    285    
    286     @param celFile The file to load
    287     @return A FusionCELData object representing the CEL file
    288     @throws ItemNotFoundException If the actaul file is not on the server
    289     @throws InvalidDataException If the file is not a CEL file
    290     @since 2.4
    291     @deprecated Use {@link CdfFileHandler#loadCdfFile(File)} instead
    292   */
    293   public static FusionCELData loadCelFile(File celFile)
    294     throws InvalidDataException
    295   {
    296     return new CelFileHandler().loadCelFile(celFile);
    29797  }
    29898 
  • trunk/src/core/net/sf/basedb/core/AnnotationBetweenRestriction.java

    r5320 r5590  
    4444  private final Object highValue;
    4545
    46   /**
    47     Create a new annotation restriction.
    48    
    49     @deprecated Use {@link #AnnotationBetweenRestriction(String, AnnotationType, Object, Object, boolean)}
    50       instead with alias=null
    51   */
    52   public AnnotationBetweenRestriction(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
    53     throws InvalidDataException
    54   {
    55     this(null, annotationType, lowValue, highValue, includeInheriting);
    56   }
    57  
    5846  /**
    5947    Create a new annotation restriction.
  • trunk/src/core/net/sf/basedb/core/AnnotationInRestriction.java

    r5320 r5590  
    4444{
    4545  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=null
    52   */
    53   public AnnotationInRestriction(AnnotationType annotationType, boolean includeInheriting, Object... values)
    54     throws InvalidDataException
    55   {
    56     this(null, annotationType, includeInheriting, values);
    57   }
    5846
    5947  /**
  • trunk/src/core/net/sf/basedb/core/AnnotationSet.java

    r5319 r5590  
    412412  }
    413413
    414   /**
    415     Find an annotation of the specified annotation type among all annotations
    416     including the inherited annotations. This method will first search for the
    417     annotation in the following order:
    418     <ol>
    419     <li>The primary annotations
    420     <li>The inherited annotations
    421     <li>The inherited annotation sets
    422     </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 first
    425     one found is returned.
    426    
    427     @param annotationType The annotation type to look for
    428     @return An <code>Annotation</code> object or null
    429     @deprecated Use {@link #findAnnotations(DbControl, AnnotationType, Boolean)} instead
    430   */
    431   public Annotation findAnnotation(AnnotationType annotationType)
    432     throws PermissionDeniedException
    433   {
    434     List<Annotation> annotations = findAnnotations(getDbControl(), annotationType, null);
    435     return annotations.size() > 0 ? annotations.get(0) : null;
    436   }
    437  
    438414  /**
    439415    Find annotations of the specified annotation type among all annotations
     
    741717  }
    742718
    743   /**
    744     Automatically inherit all annotations of the specified annotation
    745     type from parent items unless this annotation set already contains
    746     an annotation of the specified type.
    747     <p>
    748     This method will only consider parent items that the logged in user
    749     has access to with USE permission.
    750     <p>
    751     This method may result in inheriting multiple annotations (from different
    752     parent items) of the specified annotation type.
    753    
    754     @param dc The DbControl to use for database access
    755     @param annotationType The annotation type to look for
    756     @param preferAnnotationSet If TRUE, the entire annotation set containing the
    757       found annotation is inherited, otherwise only the found annotation is inherited
    758     @since 2.9
    759     @deprecated In 2.15, use {@link #autoInherit(DbControl, Collection, SnapshotManager, boolean)}
    760       instead since it has better performance
    761   */
    762   public int autoInherit(DbControl dc, final AnnotationType annotationType, boolean preferAnnotationSet)
    763   {
    764     return autoInherit(dc, Collections.singletonList(annotationType), new SnapshotManager(), preferAnnotationSet);
    765   }
    766  
    767719  /**
    768720    Automatically inherit all annotations of one or more specified annotation
  • trunk/src/core/net/sf/basedb/core/AnnotationSimpleRestriction.java

    r5429 r5590  
    5050  private final List<Object> values;
    5151  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 to
    56     the root element of the query.
    57    
    58     @deprecated Use {@link #AnnotationSimpleRestriction(String, AnnotationType, Operator, Object, boolean)}
    59       instead with alias=null
    60   */
    61   public AnnotationSimpleRestriction(AnnotationType annotationType, Operator operator, Object value, boolean includeInheriting)
    62     throws InvalidDataException
    63   {
    64     this(null, annotationType, operator, value, includeInheriting);
    65   }
    6652
    6753  /**
     
    10389  }
    10490
    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=null
    112   */
    113   public AnnotationSimpleRestriction(int annotationTypeId, Type valueType, Operator operator, Object value, boolean includeInheriting)
    114     throws InvalidDataException
    115   {
    116     this(null, annotationTypeId, valueType, operator, value, includeInheriting);
    117   }
    11891 
    11992  /**
  • trunk/src/core/net/sf/basedb/core/AnyToAny.java

    r5345 r5590  
    339339    AnyToAny ata = dc.getItem(AnyToAny.class, HibernateUtil.loadData(AnyToAnyData.class, query));
    340340    return ata != null;
    341   }
    342  
    343   /**
    344     @deprecated Use {@link #deleteStrayLinks(ProgressReporter)} instead.
    345   */
    346   public static synchronized void deleteStrayLinks()
    347   {
    348     deleteStrayLinks(null);
    349341  }
    350342
  • trunk/src/core/net/sf/basedb/core/ArrayDesign.java

    r5384 r5590  
    7272  */
    7373  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 for
    79       permission checking and database access
    80     @param affyChip <code>true</code> if the new design is an Affymetrix chip,
    81       <code>false</code> otherwise
    82     @return The new <code>ArrayDesign</code> item
    83     @throws BaseException If there is an error
    84     @deprecated Use {@link #getNew(DbControl, Platform)} instead
    85   */
    86   public static ArrayDesign getNew(DbControl dc, boolean affyChip)
    87     throws BaseException
    88   {
    89     Platform platform = Platform.getByExternalId(dc,
    90         affyChip ? Platform.AFFYMETRIX : Platform.GENERIC);
    91     return getNew(dc, platform);
    92   }
    9374
    9475  /**
     
    342323    @since 2.5
    343324  */
    344   @SuppressWarnings("deprecation")
    345325  public void setPlatform(Platform platform)
    346326  {
     
    349329    getData().setPlatform(platform.getData());
    350330    getData().setVariant(null);
    351     getData().setAffyChip(isPlatform(Platform.AFFYMETRIX));
    352331  }
    353332 
     
    362341    @since 2.5
    363342  */
    364   @SuppressWarnings("deprecation")
    365343  public void setVariant(PlatformVariant variant)
    366344  {
     
    375353      getData().setVariant(null);
    376354    }
    377     getData().setAffyChip(isPlatform(Platform.AFFYMETRIX));
    378355  }
    379356 
     
    414391      return getData().getPlatform().isFileOnly();
    415392    }
    416   }
    417  
    418   /**
    419       @return TRUE if this is an Affymetrix chip, FALSE otherwise.
    420       @deprecated Use {@link #isPlatform(String)} instead with
    421         {@link Platform#AFFYMETRIX} as the parameter
    422   */
    423   public boolean isAffyChip()
    424   {
    425     return isPlatform(Platform.AFFYMETRIX);
    426393  }
    427394
     
    666633    the {@link FeatureBatcher} object requires that the block has an id.
    667634    <p>
    668     Use the {@link #getFeatureBatcher()} method to get an batcher object
    669     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.
    670637    <p>
    671638    It is not possible to add blocks to an array design which uses a
     
    704671    }
    705672    return adb;
    706   }
    707  
    708   /**
    709     Get a feature batcher that uses the COORDINATES feature identification
    710     method.
    711     @deprecated Use {@link #getFeatureBatcher(FeatureIdentificationMethod, Job)} instead
    712   */
    713   public FeatureBatcher getFeatureBatcher()
    714     throws PermissionDeniedException, BaseException
    715   {
    716     return getFeatureBatcher(FeatureIdentificationMethod.COORDINATES, null);
    717   }
    718 
    719   /**
    720     @since 2.6
    721     @deprecated Use {@link #getFeatureBatcher(FeatureIdentificationMethod, Job)}
    722       instead
    723   */
    724   public FeatureBatcher xgetFeatureBatcher(FeatureIdentificationMethod fiMethod)
    725     throws PermissionDeniedException, BaseException
    726   {
    727     return getFeatureBatcher(fiMethod, null);
    728673  }
    729674 
     
    863808 
    864809  /**
    865     Get the number of features added to this array design. If the
    866     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 probesets
    869     @since 2.4
    870     @deprecated Use {@link #getNumDbFeatures()} and/or {@link #getNumFileFeatures()}
    871       instead
    872   */
    873   public long getNumFeatures(DbControl dc)
    874   {
    875     int dbFeatures = getNumDbFeatures();
    876     return dbFeatures > 0 ? dbFeatures : getNumFileFeatures();
    877   }
    878  
    879   /**
    880810    Get the number of features on this array design that are
    881811    stored in the database.
  • trunk/src/core/net/sf/basedb/core/BasicItem.java

    r5384 r5590  
    198198    @return TRUE if the item is detached, FALSE otherwise
    199199    @see DbControl#detachItem(BasicItem)
    200     @see DbControl#reattachItem(BasicItem)
     200    @see DbControl#reattachItem(BasicItem, boolean)
    201201    @see DbControl#saveItem(BasicItem)
    202202  */
  • trunk/src/core/net/sf/basedb/core/BioPlate.java

    r5566 r5590  
    2929import net.sf.basedb.core.data.PlateGeometryData;
    3030import net.sf.basedb.core.query.Hql;
    31 import net.sf.basedb.core.query.Orders;
    3231import net.sf.basedb.core.query.Restrictions;
    3332
    34 import java.util.List;
    3533import java.util.Set;
    3634
     
    6260  */
    6361  public static final int MAX_BARCODE_LENGTH = BioPlateData.MAX_BARCODE_LENGTH;
    64  
    65   /**
    66       @deprecated In 2.16, use {@link #getNew(DbControl, PlateGeometry, BioPlateType)} instead
    67       Will try to find a bioplate type that is not locked to a specific biomaterial
    68       type. If not found an exception is thrown.
    69   */
    70   public static BioPlate getNew(DbControl dc, PlateGeometry plateGeometry)
    71     throws BaseException, InvalidDataException
    72   {
    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   }
    8162 
    8263  /**
  • trunk/src/core/net/sf/basedb/core/DbControl.java

    r5535 r5590  
    997997    @param item The item to be detached
    998998    @throws BaseException If there is an error
    999     @see #reattachItem(BasicItem)
     999    @see #reattachItem(BasicItem, boolean)
    10001000  */
    10011001  public void detachItem(BasicItem item)
     
    10081008    itemCache.remove(item.getData());
    10091009    item.setDbControl(null);
    1010   }
    1011  
    1012   /**
    1013     Reattach a detached item assuming that it has not been
    1014     updated while it was detached.
    1015     @deprecated Use {@link #reattachItem(BasicItem, boolean)} instead
    1016   */
    1017   public void reattachItem(BasicItem item)
    1018     throws PermissionDeniedException, ItemNotFoundException, BaseException
    1019   {
    1020     reattachItem(item, false);
    10211010  }
    10221011 
     
    10891078    if (isClosed()) throw new ConnectionClosedException();
    10901079    sc.updateLastAccess();
    1091     if (!isAttached(item)) reattachItem(item);
     1080    if (!isAttached(item)) reattachItem(item, false);
    10921081    HibernateUtil.refresh(hSession, item.getData());
    10931082  }
     
    11161105    @throws BaseException If there is an error
    11171106    @see #detachItem(BasicItem)
    1118     @see #reattachItem(BasicItem)
     1107    @see #reattachItem(BasicItem, boolean)
    11191108  */
    11201109  public void initCollection(BasicItem item, String collectionName)
  • trunk/src/core/net/sf/basedb/core/ExtendedProperty.java

    r4889 r5590  
    218218  }
    219219
    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 parse
    224     @param numberFormat The number format, or null to use Double.valueOf
    225     @return An object
    226     @throws InvalidDataException If the string cannot be converted to the correct type
    227     @see #getType()
    228     @since 2.2
    229     @deprecated Use {@link #parseString(String, NumberFormat, boolean)} instead
    230   */
    231   public Object parseString(String value, NumberFormat numberFormat)
    232   {
    233     return getType().parseString(value, numberFormat);
    234   }
    235  
    236220  /**
    237221    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  
    115115  }
    116116
    117   /**
    118     @deprecated In 2.12. Use {@link #getQuery(Type, RawDataType, IntensityTransform)} instead
    119   */
    120   public static ItemQuery<Formula> xgetQuery(Formula.Type type, RawDataType rawDataType)
    121   {
    122     return getQuery(type, rawDataType, null);
    123   }
    124  
    125117  /**
    126118    Get a query that return formulas that can be used with the specified
  • trunk/src/core/net/sf/basedb/core/ItemContext.java

    r5574 r5590  
    454454  /**
    455455    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)}
    457458    sets an error message if it couldn't configure the query for some reason.
    458459  */
     
    464465  /**
    465466    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)}
    467468    sets an error message if it couldn't configure the query for some reason.
    468469    This property is not stored in the database.
     
    10541055  }
    10551056 
    1056   /**
    1057     This method will fail if used to filter on reporter lists or other items
    1058     that require a DbControl.
    1059     @deprecated Use {@link #configureQuery(DbControl, EntityQuery, boolean)} instead
    1060   */
    1061   public void configureQuery(EntityQuery query, boolean autoLeftJoin)
    1062     throws BaseException
    1063   {
    1064     configureQuery(null, query, autoLeftJoin);
    1065   }
    1066 
    10671057  /**
    10681058    Use the settings in this context to configure a query.
  • trunk/src/core/net/sf/basedb/core/ItemKey.java

    r5345 r5590  
    147147    return ik;
    148148  }
    149 
    150   /**
    151     @deprecated Use {@link #deleteUnusedItemKeys()} instead which returns the number of
    152       deleted keys
    153   */
    154   public static synchronized void deleteUnusedKeys()
    155     throws BaseException
    156   {
    157     deleteUnusedItemKeys();
    158   }
    159 
    160149 
    161150  /**
  • trunk/src/core/net/sf/basedb/core/Job.java

    r5453 r5590  
    6464  The following methods can only be used by jobs executed by an external program:
    6565  <ul>
    66   <li>{@link #start(String, String)}: Tell the core that job has started
     66  <li>{@link #start(String, String, JobAgent)}: Tell the core that job has started
    6767  <li>{@link #setProgress(int, String)}: Update the progress status of the job
    6868  <li>{@link #doneOk(String)}: Tell the core that the job finished successfully
     
    8585  public static final Item TYPE = Item.JOB;
    8686
    87   /**
    88     Create a new job.
    89     @deprecated Use {@link #getNew(DbControl, PluginDefinition, PluginConfiguration, Experiment)}
    90       instead
    91   */
    92   public static Job getNew(DbControl dc, PluginDefinition plugin, PluginConfiguration config)
    93     throws InvalidDataException, BaseException
    94   {
    95     return getNew(dc, plugin, config, null);
    96   }
    97  
    9887  /**
    9988    Create a new <code>Job</code> item.
     
    689678    Get the date and time the job was started.
    690679    @return A date, or null if the job hasn't started
    691     @see #start(String, String)
     680    @see #start(String, String, JobAgent)
    692681  */
    693682  public Date getStarted()
     
    882871
    883872  /**
    884     @deprecated Use {@link #setPrepared(String, JobAgent)} instead
    885   */
    886   public void setPrepared(String server)
    887     throws PermissionDeniedException
    888   {
    889     setPrepared(server, null);
    890   }
    891  
    892   /**
    893873    Set the job's status to {@link Status#PREPARED}. This status is
    894874    used to signal that a job is about to be executed, but the actual excecution
     
    917897    data.setServer(StringUtil.setNullableString(server, "server", MAX_SERVER_LENGTH));
    918898    getData().setJobAgentId(agent == null ? null : agent.getId());
    919   }
    920 
    921   /**
    922     @deprecated Use {@link #start(String, String, JobAgent)} instead
    923   */
    924   public void start(String statusMessage, String server)
    925     throws PermissionDeniedException, InvalidDataException
    926   {
    927     start(statusMessage, server, null);
    928899  }
    929900 
     
    10761047    data.setEnded(new Date());
    10771048    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 configuration
    1083       parameters in case these has changed since the job was created
    1084     @throws PermissionDeniedException If the logged in user doesn't have write permission
    1085     @deprecated Use {@link #retry(boolean, boolean)} instead
    1086   */
    1087   public void retry(boolean useLatestConfiguration)
    1088     throws PermissionDeniedException
    1089   {
    1090     retry(useLatestConfiguration, false);
    10911049  }
    10921050 
  • trunk/src/core/net/sf/basedb/core/Metadata.java

    r5475 r5590  
    2626import net.sf.basedb.core.data.BasicData;
    2727import net.sf.basedb.core.data.BatchableData;
    28 import net.sf.basedb.core.data.ComponentData;
    2928import net.sf.basedb.core.data.IdentifiableData;
    3029import net.sf.basedb.core.data.ReporterListScoreData;
     
    9594    diskConsumableItems = null;
    9695    fileStoreEnabledItems = null;
    97   }
    98 
    99   /**
    100     Get the value of a property of an item. This method can be used
    101     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 allowed
    114     @param propertyName The name of the property to get
    115     @return The value as a java.lang.Object 
    116     @throws BaseException If something goes wrong.
    117     @throws InvalidUseOfNullException If required parameter is null
    118     @deprecated In 2.15, use {@link #getPropertyPath(String, boolean)} instead
    119   */
    120   @Deprecated
    121   @SuppressWarnings({"unchecked"})
    122   public static Object getPropertyValue(BasicItem item, String propertyName)
    123     throws BaseException
    124   {
    125     if (item == null) throw new InvalidUseOfNullException("item");
    126    
    127     Metadata md = getInstance(item.getClass());
    128     return md.getPropertyValue(item.getDbControl(), item, propertyName);
    12996  }
    13097
     
    455422  }
    456423 
    457   /**
    458     Get the value of a property of an item. This method can be used
    459     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 needed
    472     @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 or
    475       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)} instead
    479   */
    480   @Deprecated
    481   public Object getPropertyValue(DbControl dc, C item, String propertyName)
    482     throws BaseException
    483   {
    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     else
    505     {
    506       throw new AssertionError("Item: " + item + " is not a BasicItem, BasicData or ReporterScore");
    507     }
    508    
    509     try
    510     {
    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 session
    519           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           else
    525           {
    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 index
    541           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         else
    552         {
    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       else
    570       {
    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 value
    576     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 checking
    582     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  
    607424  public String toString()
    608425  {
  • trunk/src/core/net/sf/basedb/core/PluginConfiguration.java

    r4999 r5590  
    622622 
    623623  /**
    624     Create a new job.
    625     @deprecated Use {@link #newJob(Experiment)} instead
    626   */
    627   public Job newJob()
    628     throws PermissionDeniedException, BaseException
    629   {
    630     Job j = Job.getNew(getDbControl(), getPluginDefinition(), this, null);
    631     return j;
    632   }
    633  
    634   /**
    635624    Create a new {@link Job} for this plugin configuration.
    636625    @param experiment The experiment the job is part of, or null
  • trunk/src/core/net/sf/basedb/core/Project.java

    r5368 r5590  
    475475
    476476  /**
    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)
    487478    @since 2.3.1
    488479  */
     
    493484      firstItem, maxItems, permission, include, null);
    494485  }
    495  
    496   /**
    497     @since 2.7.1
    498     @deprecated In 2.15, use {@link #getItems(Set, int, int, Permission, Set, Restriction)}
    499       instead
    500   */
    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 
    507486 
    508487  /**
  • trunk/src/core/net/sf/basedb/core/ProjectKey.java

    r5345 r5590  
    123123
    124124  /**
    125     @deprecated Use {@link #deleteUnusedProjectKeys()} instead which returns the number of
    126       deleted keys
    127   */
    128   public static synchronized void deleteUnusedKeys()
    129     throws BaseException
    130   {
    131     deleteUnusedProjectKeys();
    132   }
    133 
    134   /**
    135125    Delete all keys that are currently not used by any item. This method
    136126    is intended to be executed at regular intervals by a cleanup application.
  • trunk/src/core/net/sf/basedb/core/PropertyFilter.java

    r5451 r5590  
    426426  }
    427427 
    428   /**
    429     This method will fail if used to filter on reporter lists or collections.
    430     @deprecated Use {@link #getRestriction(DbControl, EntityQuery)} instead
    431   */
    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)} instead
    440   */
    441   public Restriction getRestriction(DbControl dc)
    442   {
    443     return getRestriction(dc, null);
    444   }
    445 
    446428  /**
    447429    Create a restriction from the filter. There are a few special cases:
  • trunk/src/core/net/sf/basedb/core/RawBioAssay.java

    r5319 r5590  
    2626import net.sf.basedb.core.data.ArrayDesignData;
    2727import net.sf.basedb.core.data.FeatureData;
    28 import net.sf.basedb.core.data.PlatformData;
    29 import net.sf.basedb.core.data.PlatformVariantData;
    3028import net.sf.basedb.core.data.ProtocolData;
    3129import net.sf.basedb.core.data.RawBioAssayData;
     
    9694  public static final int MAX_HEADER_VALUE_LENGTH = RawBioAssayData.MAX_HEADER_VALUE_LENGTH;
    9795
    98   /**
    99     Create a new <code>RawBioAssay</code> item. The platform/variant will
    100     automatically be set to the values returned by {@link RawDataType#getPlatform(DbControl)}
    101     and {@link RawDataType#getVariant(DbControl)}. If both return null
    102     the {@link Platform#GENERIC} is used.
    103 
    104     @param dc The <code>DbControl</code> which will be used for
    105       permission checking and database access
    106     @param rawDataType The data type of the raw data
    107     @return The new <code>RawBioAssay</code> item
    108     @throws BaseException If there is an error
    109     @deprecated Use {@link #getNew(DbControl, Platform, RawDataType)} or
    110       {@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 BaseException
    115   {
    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     else
    124     {
    125       if (platform == null) platform = Platform.getByExternalId(dc, Platform.GENERIC);
    126       rba = getNew(dc, platform, rawDataType);
    127     }
    128     return rba;
    129   }
    130  
    13196  /**
    13297    Create a new raw bioassay for a specific platform and/or raw data type.
     
    433398    if (action == Transactional.Action.DELETE)
    434399    {
    435       if (getRawDataType().isStoredInDb() && getSpots() > 0)
     400      if (getRawDataType().isStoredInDb() && getNumDbSpots() > 0)
    436401      {
    437402        RawDataBatcher rdb = RawDataBatcher.getNew(getDbControl(), this, null);
     
    626591 
    627592  /**
    628     Set the raw data type. The raw data type cannot be changed if raw
    629     data has been added to the database.
    630    
    631     @param rawDataType The raw data type, null is not allowed
    632     @throws PermissionDeniedException If the logged in user doesn't have
    633       write permission for the raw bioassay or spots has already been added
    634     @deprecated Use {@link #setPlatform(Platform, RawDataType)} or
    635       {@link #setVariant(PlatformVariant, RawDataType)} instead
    636   */
    637   public void setRawDataType(RawDataType rawDataType)
    638     throws PermissionDeniedException, InvalidDataException
    639   {
    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   /**
    656593    Get the job that imported data to this raw bioassay.
    657594    @return A <code>Job</code> object, ot null if this information is
     
    806743    Set the {@link ArrayDesign} this raw data uses. The array design can't be
    807744    changed with this method once raw data spots has been added. Use
    808     the {@link #updateArrayDesign(ArrayDesign, ProgressReporter)} to
     745    the {@link #updateArrayDesign(ArrayDesign, FeatureIdentificationMethod, ProgressReporter)} to
    809746    do that.
    810747 
     
    826763    arrayDesignHasBeenSet = true;
    827764    getData().setArrayDesign(arrayDesign == null ? null : arrayDesign.getData());
    828   }
    829 
    830   /**
    831     @deprecated Use {@link #updateArrayDesign(ArrayDesign, FeatureIdentificationMethod, ProgressReporter)}
    832     instead
    833   */
    834   public void updateArrayDesign(ArrayDesign arrayDesign, ProgressReporter progress)
    835     throws PermissionDeniedException, InvalidDataException
    836   {
    837     updateArrayDesign(arrayDesign, null, progress);
    838765  }
    839766
     
    889816 
    890817  /**
    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.
    893822    @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, it
    896       returns that value, otherwise it returns the number of file spots
    897823  */
    898824  public int getSpots()
     
    1067993    return query;
    1068994  }
    1069 
    1070   /**
    1071     @deprecated Use {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)} instead
    1072   */
    1073   public RawDataBatcher getRawDataBatcher()
    1074     throws PermissionDeniedException, BaseException
    1075   {
    1076     return getRawDataBatcher(null, null);
    1077   }
    1078  
    1079   /**
    1080     @deprecated Use {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)}
    1081     instead.
    1082     @since 2.6
    1083   */
    1084   public RawDataBatcher getRawDataBatcher(FeatureIdentificationMethod fiMethod)
    1085     throws PermissionDeniedException, BaseException
    1086   {
    1087     return getRawDataBatcher(fiMethod, null);
    1088   }
    1089 
    1090995 
    1091996  /**
     
    11261031    Delete the raw data that has been added to the database for this
    11271032    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)}.
    11291034
    11301035    @throws PermissionDeniedException If the logged in user doesn't have
    11311036      write permission or a {@link RawDataBatcher} has been fetched
    1132       using the {@link #getRawDataBatcher()} method or the raw bioassay
    1133       is used by some experiment
     1037      using the {@link #getRawDataBatcher(FeatureIdentificationMethod, Job)}
     1038      method or the raw bioassay is used by some experiment
    11341039    @throws BaseException If there is another error
    11351040  */
  • trunk/src/core/net/sf/basedb/core/RawDataBatcher.java

    r4889 r5590  
    5353  <li>If a feature isn't found, an {@link ItemNotFoundException} is thrown
    5454  <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 the
     55    {@link #insert(RawData, String, String)} method the external reporter id of the
    5656    feature is checked against the supplied reporter id. If they don't
    5757    match an {@link InvalidDataException} is thrown.
     
    6565  and none of the above apply. The major difference is that you must alsways set a
    6666  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)}
    6868  method otherwise.
    6969
     
    480480  {
    481481    return rawBioAssay;
    482   }
    483 
    484   /**
    485     @deprecated Use {@link #insert(RawData, String, String)} instead
    486   */
    487   public void insert(RawData data, String externalReporterId)
    488     throws BaseException
    489   {
    490     doInsert(data, externalReporterId, null, externalReporterId != null);
    491482  }
    492483
     
    605596    Create a new raw data object. After you have set all
    606597    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.
    608599    You do not have to set the reporter if the raw bioassay is connected to
    609600    an array design.
  • trunk/src/core/net/sf/basedb/core/RawDataType.java

    r5574 r5590  
    5353  private final String description;
    5454  private final boolean fileOnly;
    55   private final boolean isAffymetrix;
    5655  private final int channels;
    5756  private final PlatformData platform;
     
    7271    String table, List<RawDataProperty> properties, List<IntensityFormula> formulas)
    7372  {
    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);
    7574  }
    7675 
     
    8382    this("platform." + platform.getExternalId(), platform.getName(),
    8483      platform.getDescription(), platform.getChannels(), true,
    85       platform, null,
    86       Platform.AFFYMETRIX.equals(platform.getExternalId()),
    87       null, null, null);
     84      platform, null, null, null, null);
    8885  }
    8986
     
    9693    this("variant." + variant.getExternalId(), variant.getName(),
    9794        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);   
    10196  }
    10297 
    10398  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,
    105100    String table, List<RawDataProperty> properties, List<IntensityFormula> formulas)
    106101  {
     
    112107    this.platform = platform;
    113108    this.variant = variant;
    114     this.isAffymetrix = isAffymetrix;
    115109   
    116110    // For database raw data types
     
    168162
    169163  /**
    170     If this raw data type is the Affymetrix raw data type.
    171     @deprecated Use {@link #getPlatform(DbControl)} and compare
    172       the external ID with {@link Platform#AFFYMETRIX}
    173   */
    174   public boolean isAffymetrix()
    175   {
    176     return isAffymetrix;
    177   }
    178  
    179   /**
    180164    Get the platform that this raw data type is associated with. Only
    181165    raw data types representing file-only platforms are associated
     
    208192  }
    209193
    210   /**
    211     Needed to make {@link RawBioAssay#setRawDataType(RawDataType)}
    212     backwards compatible. Platforms that are not file-only will
    213     get the {@link Platform#GENERIC} platform.
    214     @since 2.5
    215   */
    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.5
    225   */
    226   PlatformVariantData getVariantProxy()
    227   {
    228     return variant;
    229   }
    230  
    231194  /**
    232195    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  
    334334 
    335335  /**
    336     Create a new {@link RawBioAssay} from this scan.
    337    
    338     @param rawDataType The raw data type of the new bioassay
    339     @return The new <code>RawBioAssay</code> item
    340     @throws PermissionDeniedException If the logged in user doesn't have
    341       use permission for the scan
    342     @throws BaseException If there is another error
    343     @deprecated Use {@link RawBioAssay#getNew(DbControl, Platform, RawDataType)}
    344       or {@link RawBioAssay#getNew(DbControl, PlatformVariant, RawDataType)} instead
    345   */
    346   public RawBioAssay newRawBioAssay(RawDataType rawDataType)
    347     throws PermissionDeniedException, BaseException
    348   {
    349     RawBioAssay rba = RawBioAssay.getNew(getDbControl(), rawDataType);
    350     rba.setScan(this);
    351     return rba;
    352   }
    353 
    354   /**
    355336    Get a query that returns all raw bioassays created from this
    356337    scan.
  • trunk/src/core/net/sf/basedb/core/ShareableUtil.java

    r5384 r5590  
    4444{
    4545
    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)} instead
    51   */
    52   public static void setItemKey(ShareableData shareableData, ItemKey itemKey)
    53   {
    54     shareableData.setItemKey(itemKey == null ? null : itemKey.getData());
    55   }
    5646 
    5747  /**
  • trunk/src/core/net/sf/basedb/core/Type.java

    r5475 r5590  
    487487    throws InvalidDataException;
    488488 
    489   /**
    490     Parse a string and return a value of the correct type using a specific
    491     number format for numerical values.
    492     @param value The string value to parse
    493     @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 be
    495       parsed as a number
    496     @since 2.2
    497     @deprecated Use {@link #parseString(String, NumberFormat, boolean)} instead
    498   */
    499   public Object parseString(String value, NumberFormat numberFormat)
    500   {
    501     return parseString(value, numberFormat, false);
    502   }
    503 
    504489  /**
    505490    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  
    11831183      {
    11841184        if (progress != null) progress.display((int)(43*progress_factor), "--Updating schema version: " + schemaVersion + " -> 44...");
    1185         schemaVersion = updateToSchemaVersion44(sc);
     1185        //schemaVersion = updateToSchemaVersion44(sc);
    11861186      }
    11871187     
     
    22512251      log.error("updateToSchemaVersion43: FAILED", ex);
    22522252      throw ex;
    2253     }
    2254     return schemaVersion;   
    2255   }
    2256 
    2257   /**
    2258     <ul>
    2259     <li>Set a platform for array designs and raw bioassays
    2260     <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:s
    2263     <li>Remove filters on ArrayDesign.isAffyChip property
    2264     <li>Add READ permission to PLATFORM and DATAFILETYPE for all plug-ins
    2265       working with ARRAYDESIGN or RAWBIOASSAY
    2266     </ul>
    2267   */
    2268   @SuppressWarnings("deprecation")
    2269   private static int updateToSchemaVersion44(SessionControl sc)
    2270   {
    2271     final int schemaVersion = 44;
    2272     DbControl dc = null;
    2273     try
    2274     {
    2275       dc = sc.newDbControl();
    2276       org.hibernate.Session session = dc.getHibernateSession();
    2277  
    2278       // Items that we need
    2279       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 db
    2286       org.hibernate.Query countQuery = HibernateUtil.getPredefinedQuery(session,
    2287         "COUNT_FEATURES_FOR_ARRAYDESIGN");
    2288 
    2289       // Load array designs
    2290       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           try
    2302           {
    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         else
    2317         {
    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 rawbioassays
    2326       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 files
    2338           AnyToAny anyCel = null;
    2339           try
    2340           {
    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         else
    2355         {
    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 ExperimentData
    2365         SET rawDataType = :newRawDataType
    2366         WHERE rawDataType = :oldRawDataType
    2367       */
    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 prj
    2377         FROM ProjectData prj
    2378         WHERE prj.projectDefaults[:name] = :value
    2379       */
    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] = :newValue
    2396         WHERE [property] = :property AND [value] = :oldValue
    2397        */
    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' property
    2404       query = HibernateUtil.getPredefinedSQLQuery(session,
    2405         "DELETE_PROPERTY_FILTER");
    2406       /*
    2407         DELETE FROM PropertyFilters pf
    2408         WHERE pf.property = :property
    2409        */
    2410       query.setString("property", "affyChip");
    2411       HibernateUtil.executeUpdate(query);
    2412 
    2413       // Add READ permission to PLATFORM and DATAFILETYPE for all plug-ins
    2414       // working with ARRAYDESIGN or RAWBIOASSAY
    2415       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.pluginDefinitionId
    2422         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 number
    2434       setSchemaVersion(session, schemaVersion);
    2435  
    2436       // Commit the changes
    2437       dc.commit();
    2438       log.info("updateToSchemaVersion44: OK");
    2439     }
    2440     catch (BaseException ex)
    2441     {
    2442       log.error("updateToSchemaVersion44: FAILED", ex);
    2443       throw ex;
    2444     }
    2445     finally
    2446     {
    2447       if (dc != null) dc.close();
    24482253    }
    24492254    return schemaVersion;   
  • trunk/src/core/net/sf/basedb/core/User.java

    r5442 r5590  
    11151115
    11161116  /**
    1117     @see #getItems(Set, int, int, Permission)
     1117    @see #getItems(Set, int, int, Permission, Restriction)
    11181118  */
    11191119  public ResultList<Ownable> getItems(Item itemType, int firstItem, int maxItems, Permission permission)
    11201120  {
    11211121    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  }
    11341124 
    11351125  /**
  • trunk/src/core/net/sf/basedb/core/VirtualColumn.java

    r5475 r5590  
    170170 
    171171  /**
    172     @param channel The channel for which the intensity is calculated. 
    173     @return a VirtualColumn object
    174     @deprecated In 2.12. Use {@link #channelIntensity(int)} or
    175       {@link #channelRaw(int)} instead. This method is forwarded
    176       to {@link #channelIntensity(int)} for maximum backwards
    177       compatibility.
    178   */
    179   public static VirtualColumn channel(int channel)
    180   {
    181     return channelIntensity(channel);
    182   }
    183 
    184   /**
    185172    Get a column that stores the raw spot value for a channel. This
    186173    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  
    138138  }
    139139 
    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 platform
    145   */
    146   public boolean isAffyChip()
    147   {
    148     return affyChip;
    149   }
    150   /**
    151     @deprecated Has been replaced by platform
    152   */
    153   public void setAffyChip(boolean affyChip)
    154   {
    155     this.affyChip = affyChip;
    156   }
    157 
    158140  private boolean hasFeatures;
    159141  /**
  • trunk/src/core/net/sf/basedb/core/plugin/AbstractPlugin.java

    r5405 r5590  
    3333import net.sf.basedb.core.SessionControl;
    3434import net.sf.basedb.core.PluginParameter;
    35 import net.sf.basedb.core.signal.EnhancedThreadSignalHandler;
    36 import net.sf.basedb.core.signal.ThreadSignalHandler;
    3735
    3836import java.io.OutputStreamWriter;
     
    355353 
    356354  /**
    357     Check if the current thread has been interrupted and throw
    358     a SignalException if it has. Subclasses that use the {@link ThreadSignalHandler}
    359     or {@link EnhancedThreadSignalHandler} to implement signal handling should
    360     regularly call this method.
    361     @since 2.6
    362     @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead
    363   */
    364   @Deprecated
    365   protected void checkInterrupted()
    366   {
    367     ThreadSignalHandler.checkInterrupted();
    368   }
    369  
    370   /**
    371355    Create a log file in the BASE file system for logging
    372356    detailed information from a plug-in. The log file will
  • trunk/src/core/net/sf/basedb/core/query/Annotations.java

    r4889 r5590  
    4242  /**
    4343    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 search
    46     @param value The value to search for
    47     @param includeInheriting If items inherting the annotation should be returned
    48       by the query or not
    49     @deprecated Use {@link #eq(String, AnnotationType, Object, boolean)} instead with alias=null
    50   */
    51   public static Restriction eq(AnnotationType annotationType, Object value, boolean includeInheriting)
    52     throws InvalidDataException
    53   {
    54     return eq(null, annotationType, value, includeInheriting);
    55   }
    56 
    57   /**
    58     Create a restriction that searches for annotations
    5944    equal to a given value on the root or a joined entity of a
    6045    query.
     
    7762  /**
    7863    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 search
    81     @param value The value to search for
    82     @param includeInheriting If items inherting the annotation should be returned
    83       by the query or not
    84     @deprecated Use {@link #neq(String, AnnotationType, Object, boolean)} instead with alias=null
    85   */
    86   public static Restriction neq(AnnotationType annotationType, Object value, boolean includeInheriting)
    87     throws InvalidDataException
    88   {
    89     return neq(null, annotationType, value, includeInheriting);
    90   }
    91  
    92   /**
    93     Create a restriction that searches for annotations
    9464    not equal to a given value on the root or a joined entity of a
    9565    query.
     
    11282  /**
    11383    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 search
    116     @param value The value to search for
    117     @param includeInheriting If items inherting the annotation should be returned
    118       by the query or not
    119     @deprecated Use {@link #lt(String, AnnotationType, Object, boolean)} instead with alias=null
    120   */
    121   public static Restriction lt(AnnotationType annotationType, Object value, boolean includeInheriting)
    122     throws InvalidDataException
    123   {
    124     return lt(null, annotationType, value, includeInheriting);
    125   }
    126 
    127   /**
    128     Create a restriction that searches for annotations
    12984    less than a given value on the root or a joined entity of a
    13085    query.
     
    147102  /**
    148103    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 search
    151     @param value The value to search for
    152     @param includeInheriting If items inherting the annotation should be returned
    153       by the query or not
    154     @deprecated Use {@link #lteq(String, AnnotationType, Object, boolean)} instead with alias=null
    155   */
    156   public static Restriction lteq(AnnotationType annotationType, Object value, boolean includeInheriting)
    157     throws InvalidDataException
    158   {
    159     return lteq(null, annotationType, value, includeInheriting);
    160   }
    161 
    162   /**
    163     Create a restriction that searches for annotations
    164104    less than or equal to a given value on the root or a joined entity of a
    165105    query.
     
    182122  /**
    183123    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 search
    186     @param value The value to search for
    187     @param includeInheriting If items inherting the annotation should be returned
    188       by the query or not
    189     @deprecated Use {@link #gt(String, AnnotationType, Object, boolean)} instead with alias=null
    190   */
    191   public static Restriction gt(AnnotationType annotationType, Object value, boolean includeInheriting)
    192     throws InvalidDataException
    193   {
    194     return gt(null, annotationType, value, includeInheriting);
    195   }
    196 
    197   /**
    198     Create a restriction that searches for annotations
    199124    greater than a given value on the root or a joined entity of a
    200125    query.
     
    215140  }
    216141 
    217  
    218   /**
    219     Create a restriction that searches for annotations
    220     greater than or equal to a given value on the root entity of a query.
    221     @param annotationType The annotation type to search
    222     @param value The value to search for
    223     @param includeInheriting If items inherting the annotation should be returned
    224       by the query or not
    225     @deprecated Use {@link #gteq(String, AnnotationType, Object, boolean)} instead with alias=null
    226   */
    227   public static Restriction gteq(AnnotationType annotationType, Object value, boolean includeInheriting)
    228     throws InvalidDataException
    229   {
    230     return gteq(null, annotationType, value, includeInheriting);
    231   }
    232 
    233142  /**
    234143    Create a restriction that searches for annotations
     
    253162  /**
    254163    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 search
    257     @param value The value to search for
    258     @param includeInheriting If items inherting the annotation should be returned
    259       by the query or not
    260     @deprecated Use {@link #like(String, AnnotationType, Object, boolean)} instead with alias=null
    261   */
    262   public static Restriction like(AnnotationType annotationType, Object value, boolean includeInheriting)
    263     throws InvalidDataException
    264   {
    265     return like(null, annotationType, value, includeInheriting);
    266   }
    267 
    268   /**
    269     Create a restriction that searches for annotations
    270164    matching a given value on the root or a joined entity of a
    271165    query.
     
    284178  {
    285179    return new AnnotationSimpleRestriction(alias, annotationType, Operator.LIKE, value, includeInheriting);
    286   }
    287 
    288  
    289   /**
    290     Create a restriction that searches for annotations
    291     between two given values on the root entity of a query.
    292     If the end values are included or excluded
    293     depends on the database.
    294    
    295     @param annotationType The annotation type to search
    296     @param lowValue The lower bound
    297     @param highValue The higher bound
    298     @param includeInheriting If items inherting the annotation should be returned
    299       by the query or not
    300     @deprecated Use {@link #between(String, AnnotationType, Object, Object, boolean)}
    301       instead with alias=null
    302   */
    303   public static Restriction between(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
    304     throws InvalidDataException
    305   {
    306     return between(null, annotationType, lowValue, highValue, includeInheriting);
    307180  }
    308181
     
    328201    return new AnnotationBetweenRestriction(alias, annotationType, lowValue, highValue, includeInheriting);
    329202  }
    330  
    331   /**
    332     Create a restriction that searches for annotations on the root entity of a query
    333     equal to any value in a list of given values.
    334     @param annotationType The annotation type to search
    335     @param includeInheriting If items inherting the annotation should be returned
    336       by the query or not
    337     @param values An array of values
    338     @deprecated Use {@link #in(String, AnnotationType, boolean, Object[])}
    339       instead with alias=null
    340   */
    341   public static Restriction in(AnnotationType annotationType, boolean includeInheriting, Object... values)
    342     throws InvalidDataException
    343   {
    344     return in(null, annotationType, includeInheriting, values);
    345   }
    346203
    347204  /**
  • trunk/src/core/net/sf/basedb/core/signal/AbstractSignalReceiver.java

    r5399 r5590  
    203203  }
    204204 
    205   /**
    206     @deprecated In 2.16, use {@link #sendToAll(SignalSender)} instead
    207   */
    208   @Override
    209   @Deprecated
    210   public void sendToAll(Signal signal)
    211   {
    212     sendToAll(new SimpleSignalSender(signal));
    213   }
    214  
    215205  @Override
    216206  public void sendToAll(SignalSender sender)
  • trunk/src/core/net/sf/basedb/core/signal/SignalReceiver.java

    r5399 r5590  
    9898 
    9999  /**
    100     Send a signal to all registered signal handlers that supports
    101     it. The main purpose of this method is to be able to send
    102     the {@link Signal#ABORT} when the system is shutting down.
    103     @param signal The signal to send
    104     @deprecated In 2.16, use {@link #sendToAll(SignalSender)} instead
    105   */
    106   @Deprecated
    107   public void sendToAll(Signal signal);
    108  
    109   /**
    110100    Let the signal sender send one or more signals to all registered
    111101    signal handlers on this reciever.
  • trunk/src/core/net/sf/basedb/util/AutoDetectFileFormat.java

    r5327 r5590  
    5959public class AutoDetectFileFormat
    6060{
    61 
    62   /**
    63     Same as {@link #findPlugins(DbControl, GuiContext, File, String, PluginDefinition)}
    64     with no value for the charset parameter.
    65     @deprecated
    66   */
    67   public static Map<PluginDefinition, List<PluginConfiguration>> findPlugins(DbControl dc,
    68     GuiContext context, File file, PluginDefinition pluginDef)
    69     throws InvalidDataException, BaseException
    70   {
    71     return findPlugins(dc, context, file, null, pluginDef);
    72   }
    7361
    7462  /**
  • trunk/src/core/net/sf/basedb/util/BioAssaySetUtil.java

    r5385 r5590  
    2525import net.sf.basedb.core.BaseException;
    2626import net.sf.basedb.core.BioAssay;
    27 import net.sf.basedb.core.BioAssaySet;
    2827import net.sf.basedb.core.DbControl;
    2928import net.sf.basedb.core.DynamicQuery;
     
    3332import net.sf.basedb.core.InvalidUseOfNullException;
    3433import net.sf.basedb.core.ItemQuery;
    35 import net.sf.basedb.core.Metadata;
    3634import net.sf.basedb.core.RawBioAssay;
    3735import net.sf.basedb.core.Metadata.PropertyPath;
     
    4240import net.sf.basedb.core.snapshot.SnapshotManager;
    4341import 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;
    4742import 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;
    5443
    5544import java.util.Set;
     
    6554public class BioAssaySetUtil
    6655{
    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 the
    70     raw bioassays that the bioassay is a child of.
    71     <p>
    72     Since a bioassay may
    73     have more than one parent raw bioassay and each annotation may have
    74     multiple values it is possible that the set contains multiple values.
    75     Each value is only present once regardless of how many times it appears
    76     in the annotations.
    77    
    78     @param dc The DbControl for database access
    79     @param bioAssay The bioassay to get the annotations for
    80     @param annotationType The annotation type of the annotations
    81     @return A set containing all values
    82     @deprecated In BASE 2.14 due to performance problems, use
    83       {@link #getAnnotationValues(DbControl, SnapshotManager, BioAssay, AnnotationType)}
    84       instead
    85   */
    86   public static Set<?> getAnnotationValues(DbControl dc, BioAssay bioAssay, AnnotationType annotationType)
    87   {
    88     return getAnnotationValues(dc, new SnapshotManager(), bioAssay, annotationType);
    89   }
    9056
    9157  /**
     
    13197  }
    13298
    133  
    134   /**
    135     @deprecated In 2.15, use {@link #getParentProperties(DbControl, BioAssay, Metadata.PropertyPath)} instead
    136   */
    137   @Deprecated
    138   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  
    14599  /**
    146100    Find the values of parent properties for a given bioassay. This method
     
    179133    return allValues;
    180134  }
    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   
    208136  /**
    209137    Parse a JEP expression and create a restrictions that is suitable to
     
    235163    if (formula == null) throw new InvalidUseOfNullException("formula");
    236164    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 an
    242       option on the spot query: {@link DynamicSpotQuery#setDisableRawJoinOnMergedData(boolean)}
    243       (it has no meaning on other queries)
    244   */
    245   @Deprecated
    246   public static Expression createJepExpression(DbControl dc, BioAssaySet bioAssaySet,
    247     String formula, boolean allowRawIfMultipleMappings)
    248     throws InvalidDataException, BaseException
    249   {
    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);
    261165  }
    262166 
  • trunk/src/core/net/sf/basedb/util/Values.java

    r5384 r5590  
    515515  }
    516516
    517   /**
    518     Convert a string to a date. The string must be formatted as yyyy-mm-dd.
    519     @param value The value to convert
    520     @return The parsed date or null if the value can't be converted
    521     @deprecated Use a {@link Formatter} for dates instead
    522   */
    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 convert
    531     @param defaultValue The value to return if the string can't be converted
    532     @return The parsed date or the default value
    533     @deprecated Use a {@link Formatter} for dates instead
    534   */
    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 strings
    548     @return The converted values
    549     @deprecated Use a {@link Formatter} for dates instead
    550   */
    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       else
    572       {
    573         result = temp;
    574       }
    575     }
    576     else
    577     {
    578       result = new Date[0];
    579     }
    580     return result;
    581   }
    582 
    583517  public static final Date[] getDate(String[] values, Formatter<Date> dateFormatter)
    584518  {
     
    768702  private static final SimpleDateFormat DATETIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    769703
    770   /**
    771     Formats a date as four-digit year, two-digit month and two-digit day
    772     separated with a hyphen. Example: 2004-03-25
    773     @param date The date to format
    774     @return The formatted date
    775     @deprecated Use a {@link Formatter} for dates instead
    776   */
    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 seconds
    784     separated with a colon. Example: 14:42:15
    785     @param time The time to format
    786     @return The formatted time
    787     @deprecated Use a {@link Formatter} for dates instead
    788   */
    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 day
    796     separated with a hyphen and a time as two-digit hour, minute and seconds
    797     separated with a colon. Example: 2004-03-25 14:42:13
    798 
    799     @param datetime The date and time to format
    800     @return The formatted date with time
    801     @deprecated Use a {@link Formatter} for dates instead
    802   */
    803   public static final String formatDateTime(Date datetime)
    804   {
    805     return datetime != null ? DATETIME_FORMAT.format(datetime) : "";
    806   }
    807704
    808705  /**
  • trunk/src/core/net/sf/basedb/util/XMLUtil.java

    r5319 r5590  
    9090    return new Document(new Element(rootElement), new DocType(rootElement, systemId));
    9191  }
    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
    10293  /**
    10394    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  
    3434import net.sf.basedb.core.ItemNotFoundException;
    3535import net.sf.basedb.core.ProgressReporter;
    36 import net.sf.basedb.core.signal.SignalException;
    3736import net.sf.basedb.core.signal.ThreadSignalHandler;
    3837import net.sf.basedb.util.Values;
     
    162161    while (ffp.hasMoreSections())
    163162    {
    164       checkInterrupted();
     163      ThreadSignalHandler.checkInterrupted();
    165164      FlatFileParser.Line section = ffp.nextSection();     
    166165      increaseSectionCount(section.name(), 1);
     
    195194    if (cnt == null) cnt = 0;
    196195    sectionCount.put(section, cnt + count);
    197   }
    198  
    199   /**
    200     Checks if the currently executing thread has been interrupted and
    201     throws a {@link SignalException} if it has.
    202     @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead
    203   */
    204   @Deprecated
    205   public void checkInterrupted()
    206   {
    207     ThreadSignalHandler.checkInterrupted();
    208196  }
    209197 
  • trunk/src/core/net/sf/basedb/util/basefile/BaseFileSectionParser.java

    r5093 r5590  
    2424import java.io.IOException;
    2525
     26import net.sf.basedb.core.signal.ThreadSignalHandler;
    2627import net.sf.basedb.util.parser.FlatFileParser;
    2728
     
    3031  that is found in a section in a serial or matrix BASEfile. A
    3132  section parser should check for user abort by calling {@link
    32   BaseFileParser#checkInterrupted()} at regular intervals. The parser
     33  ThreadSignalHandler#checkInterrupted()} at regular intervals. The parser
    3334  should also update progress by calling {@link BaseFileParser#setProgress(long, String)}.
    3435  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  
    5151import net.sf.basedb.core.query.Selects;
    5252import net.sf.basedb.core.query.SqlResult;
    53 import net.sf.basedb.core.signal.SignalException;
    5453import net.sf.basedb.core.signal.ThreadSignalHandler;
    5554import net.sf.basedb.core.snapshot.SnapshotManager;
     
    596595      while (it.hasNext())
    597596      {
    598         checkInterrupted();
     597        ThreadSignalHandler.checkInterrupted();
    599598        SqlResult result = it.next();
    600599        int position = result.getInt(posIndex);
     
    681680 
    682681  /**
    683     Checks if the currently executing thread has been interrupted and
    684     throws a {@link SignalException} if it has.
    685     @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead
    686   */
    687   @Deprecated
    688   protected void checkInterrupted()
    689   {
    690     ThreadSignalHandler.checkInterrupted();
    691   }
    692  
    693   /**
    694682    Update the progress of the export.
    695683    @see ProgressReporter
  • trunk/src/core/net/sf/basedb/util/export/spotdata/ExportableFieldFactory.java

    r5385 r5590  
    7878    Create a property assay field. This field is used to export, for
    7979    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)}
    8281      for more information about the syntax of this parameter.
    8382    @param title The column title
     
    9594    field.setType(type);
    9695    return field;
    97   }
    98  
    99   /**
    100     @deprecated In 2.15, use {@link #simple(Expression, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}
    101       instead
    102   */
    103   @Deprecated
    104   public static SimpleDynamicField simple(Expression e, String title,
    105     Formula.AverageMethod averageMethod, Formatter<?> formatter)
    106   {
    107     return simple(e, title, null, averageMethod, formatter);
    10896  }
    10997 
     
    129117    field.setFormatter(formatter);
    130118    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     instead
    137   */
    138   @Deprecated
    139   public static JepDynamicField jep(String jep, String title,
    140     Formula.AverageMethod averageMethod, Formatter<?> formatter)
    141   {
    142     return jep(jep, title, null, averageMethod, formatter);
    143119  }
    144120 
     
    202178  }
    203179 
    204   /**
    205     @deprecated In 2.15, use {@link #rawData(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}
    206       instead
    207   */
    208   @Deprecated
    209   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 
    215180  /**
    216181    Create a simple dynamic field that exports a raw data value.
     
    252217        property.getAverageMethod(), formatter);
    253218  }
    254  
    255   /**
    256     @deprecated In 2.15, use {@link #reporter(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter)}
    257       instead
    258   */
    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   }
    264219
    265220  /**
  • trunk/src/core/net/sf/basedb/util/importer/spotdata/BaseFileImporter.java

    r5405 r5590  
    3636import net.sf.basedb.core.DynamicResultIterator;
    3737import net.sf.basedb.core.DynamicSpotQuery;
    38 import net.sf.basedb.core.File;
    3938import net.sf.basedb.core.IntensityTransform;
    4039import net.sf.basedb.core.InvalidUseOfNullException;
     
    5150import net.sf.basedb.core.query.JoinType;
    5251import net.sf.basedb.core.query.SqlResult;
    53 import net.sf.basedb.core.signal.SignalException;
    5452import net.sf.basedb.core.signal.ThreadSignalHandler;
    5553import net.sf.basedb.util.ChainedProgressReporter;
    5654import net.sf.basedb.util.basefile.BaseFileParser;
    57 import net.sf.basedb.util.importer.BaseFileWrapper;
    5855import net.sf.basedb.util.importer.FileWrapper;
    5956import net.sf.basedb.util.importer.spotdata.BaseFileInfo.ChildBioAssay;
     
    6562  <ul>
    6663  <li>An open DbControl: {@link #setDbControl(DbControl)}
    67   <li>The source file: {@link #setSourceFile(File)}
     64  <li>The source file: {@link #setSourceFileWrapper(FileWrapper)}
    6865  <li>The destination transaction: {@link #setTransformation(Transformation)}
    6966  </ul>
     
    10097  private ProgressReporter progress;
    10198
    102   private File oldFile; // For backwards compatibility only
    10399  private FileWrapper sourceFile;
    104100  private Transformation transformation;
     
    149145  {
    150146    return progress;
    151   }
    152  
    153   /**
    154     Set the source BASEfile to import data from.
    155     @param source The file
    156     @deprecated In 2.16, use {@link #setSourceFileWrapper(FileWrapper)} instead
    157   */
    158   @Deprecated
    159   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()} instead
    168   */
    169   @Deprecated
    170   public File getSourceFile()
    171   {
    172     return oldFile;
    173147  }
    174148 
     
    259233    --------------
    260234  */
    261 
    262   /**
    263     Checks if the currently executing thread has been interrupted and
    264     throws a {@link SignalException} if it has.
    265     @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead
    266   */
    267   @Deprecated
    268   protected void checkInterrupted()
    269   {
    270     ThreadSignalHandler.checkInterrupted();
    271   }
    272 
    273235  /**
    274236    Update the progress of the export.
     
    461423    for (Map.Entry<Integer, Integer> entry : mapping.entrySet())
    462424    {
    463       checkInterrupted();
     425      ThreadSignalHandler.checkInterrupted();
    464426      if (progress != null && done % delta == 0)
    465427      {
     
    523485      while (spotIterator.hasNext())
    524486      {
    525         checkInterrupted();
     487        ThreadSignalHandler.checkInterrupted();
    526488        if (progress != null && done % delta == 0)
    527489        {
  • trunk/src/core/net/sf/basedb/util/importer/spotdata/BaseFileInfo.java

    r5374 r5590  
    3838import net.sf.basedb.core.DynamicResultIterator;
    3939import net.sf.basedb.core.ExtraValueType;
    40 import net.sf.basedb.core.File;
    4140import net.sf.basedb.core.ItemNotFoundException;
    4241import net.sf.basedb.core.Type;
     
    4544import net.sf.basedb.core.query.SqlResult;
    4645import net.sf.basedb.util.Diff3;
    47 import net.sf.basedb.util.importer.BaseFileWrapper;
    4846import net.sf.basedb.util.importer.FileWrapper;
    4947
     
    8280  private Map<Integer, Integer> childReporterPositions;
    8381 
    84  
    85   /**
    86     The source file which should be a BASEfile.
    87     @deprecated In 2.16, use {@link #BaseFileInfo(FileWrapper)} instead
    88   */
    89   @Deprecated
    90   public BaseFileInfo(File file)
    91   {
    92     this(new BaseFileWrapper(file));
    93   }
    9482 
    9583  /**
  • trunk/src/core/net/sf/basedb/util/importer/spotdata/BfsImporter.java

    r5405 r5590  
    4040import net.sf.basedb.core.SpotBatcher;
    4141import net.sf.basedb.core.Transformation;
    42 import net.sf.basedb.core.signal.SignalException;
    4342import net.sf.basedb.core.signal.ThreadSignalHandler;
    4443import net.sf.basedb.util.ChainedProgressReporter;
     
    237236    --------------
    238237  */
    239  
    240   /**
    241     Checks if the currently executing thread has been interrupted and
    242     throws a {@link SignalException} if it has.
    243     @deprecated In 2.16, use {@link ThreadSignalHandler#checkInterrupted()} instead
    244   */
    245   @Deprecated
    246   protected void checkInterrupted()
    247   {
    248     ThreadSignalHandler.checkInterrupted();
    249   }
    250  
    251238  /**
    252239    Update the progress of the export.
     
    342329      int numAssays = pdataModel.getRowCount();
    343330      int nameIndex = pdataModel.getColumnIndex("Name");
    344       checkInterrupted();
     331      ThreadSignalHandler.checkInterrupted();
    345332      setProgress(5, "Creating " + numAssays + " child assays");
    346333 
     
    417404   
    418405      // Initialize a synchronized parser and load data files
    419       checkInterrupted();
     406      ThreadSignalHandler.checkInterrupted();
    420407      setProgress(10, "Parsing " + numSdata + " spot data files...");
    421408      SynchronizedSpotDataParser mainParser = new SynchronizedSpotDataParser();
     
    483470      for (int i = 0; i < fileCount; ++i)
    484471      {
    485         checkInterrupted();
     472        ThreadSignalHandler.checkInterrupted();
    486473        MetadataModel.SectionEntry entry = files.getEntry(i);
    487474        if (entry.getKey().startsWith("x-"))
  • trunk/src/core/net/sf/basedb/util/jep/ChannelFunction.java

    r5319 r5590  
    9494 
    9595  /**
    96     @deprecated In 2.12. Use {@link ChannelFunction#ChannelFunction(int[], IntensityTransform)}
    97       instead. Using this constructor will disable the untransformation
    98       of transformed values when JEP dynamic evalution is used.
    99   */
    100   public ChannelFunction(int[] channelToIndex)
    101   {
    102     this.channelToIndex = channelToIndex;
    103   }
    104  
    105   /**
    10696    Create a new instance of this function which can be used
    10797    to dynamically evaluate expressions.
  • trunk/src/core/net/sf/basedb/util/jobagent/JobAgentInfo.java

    r5447 r5590  
    153153 
    154154  /**
    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 known
    158     @deprecated Use {@link #getJobInfo()} instead
    159   */
    160   public Set<Integer> getJobs()
    161   {
    162     return null;
    163   }
    164  
    165   /**
    166155    Get detailed information about the running jobs.
    167156    @return A set with job information or null if not known
  • trunk/src/core/net/sf/basedb/util/parser/ColumnMapper.java

    r4515 r5590  
    5555  {
    5656    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);
    6657  }
    6758 
  • trunk/src/core/net/sf/basedb/util/parser/CompoundMapper.java

    r4515 r5590  
    5353  {
    5454    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 in
    60       the order they appear in the list
    61     @param parser The number format to use or null to use Float.valueOf()
    62     @since 2.2.3
    63     @deprecated Use {@link CompoundMapper#CompoundMapper(List, NumberFormat, boolean)}
    64   */
    65   public CompoundMapper(List<Mapper> mappers, NumberFormat parser)
    66   {
    67     this(mappers, parser, false);
    6855  }
    6956 
  • trunk/src/core/net/sf/basedb/util/parser/ConstantMapper.java

    r5384 r5590  
    5353  public ConstantMapper(String constant)
    5454  {
    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);
    6856  }
    6957 
  • trunk/src/core/net/sf/basedb/util/parser/FlatFileParser.java

    r5193 r5590  
    540540  {
    541541    this.keepSkippedLines = keep;
    542   }
    543  
    544   /**
    545     @deprecated Use {@link #setInputStream(InputStream, String)} instead
    546   */
    547   public void setInputStream(InputStream in)
    548   {
    549     setInputStream(in, Config.getCharset());
    550542  }
    551543 
  • trunk/src/plugins/core/net/sf/basedb/plugins/AbstractFlatFileImporter.java

    r5405 r5590  
    2727import net.sf.basedb.core.Config;
    2828import net.sf.basedb.core.InvalidUseOfNullException;
    29 import net.sf.basedb.core.Location;
    3029import net.sf.basedb.core.NumberOutOfRangeException;
    31 import net.sf.basedb.core.Operator;
    3230import net.sf.basedb.core.ParameterType;
    33 import net.sf.basedb.core.PropertyFilter;
    3431import net.sf.basedb.core.StringParameterType;
    3532import net.sf.basedb.core.FileParameterType;
     
    4340import net.sf.basedb.core.StringTooLongException;
    4441import net.sf.basedb.core.StringUtil;
    45 import net.sf.basedb.core.Type;
    4642import net.sf.basedb.core.UnsupportedFileFormatException;
    4743
     
    7672import java.io.IOException;
    7773import java.io.InputStream;
    78 import java.nio.charset.Charset;
    7974
    8075
     
    282277  );
    283278
    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  
    302279  /**
    303280    Parameter definition that asks for the file that should be imported.
     
    10681045  }
    10691046 
    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 the
    1079     file that is imported. This can be both a job parameter and a configuration
    1080     parameter. The implementation first checks in the job parameter and
    1081     if not found in the configuration parameter. If still not found the
    1082     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 label
    1084       (Character set)
    1085     @param description The description to use for the parameter or null to use the
    1086       default description
    1087     @param defaultValue The default value for the character set or null to use
    1088       the system default
    1089     @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 values
    1105     in the file that is imported. This can be both a job parameter and a configuration
    1106     parameter. The implementation first checks in the job parameter and
    1107     if not found in the configuration parameter. If still not found the
    1108     no decimal separator is used and number parsing is done by Float.valueOf
    1109     or Double.valueOf.
    1110     @param label The label to use for the parameter or null to use the default label
    1111       (Decimal separator)
    1112     @param description The description to use for the parameter or null to use the
    1113       default description
    1114     @param defaultValue The default value for the decimal separator
    1115     @since 2.2
    1116     @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  
    11231047  private Pattern getPattern(String name)
    11241048    throws BaseException
     
    11271051    return regexp != null ? Pattern.compile(regexp) : null;
    11281052  }
    1129  
    1130   /**
    1131     A property filter that can be used to filter files that are not
    1132     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:s
    1138       this filter no longer makes sense. Plug-ins should not use the location
    1139       to filter files.
    1140   */
    1141   @Deprecated
    1142   protected PropertyFilter getPrimaryLocationFilter()
    1143   {
    1144     return new PropertyFilter("location", Operator.EQ,
    1145       Integer.toString(Location.PRIMARY.getValue()), Type.INT);
    1146   }
    11471053 
    11481054  /**
  • trunk/src/plugins/core/net/sf/basedb/plugins/GalExporter.java

    r5481 r5590  
    309309 
    310310  /**
    311     @deprecated Use
    312     {@link #exportGal(DbControl, ArrayDesign, Integer, PrintWriter, ProgressReporter)}
    313     instead
    314   */
    315   public void exportGal(DbControl dc, ArrayDesign design,
    316     PrintWriter writer, ProgressReporter progress)
    317     throws IOException
    318   {
    319     exportGal(dc, design, null, writer, progress);
    320   }
    321  
    322   /**
    323311    Exports an array design with features to a GAL file. The array
    324312    must have features in the database.
  • trunk/src/plugins/core/net/sf/basedb/plugins/HelpImporter.java

    r5481 r5590  
    454454 
    455455  /**
    456     @deprecated Use {@link #installHelpTexts(Client, boolean, InputStream, String)} instead
    457   */
    458   public void installHelpTexts(Client client, boolean overwrite, InputStream is)
    459   {
    460     installHelpTexts(client, overwrite, is, null);
    461   }
    462  
    463   /**
    464456    This method installs the helptexts from an inputstream.
    465457 
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/PropertyIdMethod.java

    r5384 r5590  
    6464    new PropertyIdMethod("barcode", "Barcode", "barcode",
    6565      ArraySlideImporter.barcodeColumnMapping.getName(), false, Type.STRING);
    66 
    67   /**
    68     @deprecated In 2.16, due to possible problems with circular class initialization
    69       with the {@link FallbackIdMethod} class. This array is now empty.
    70   */
    71   @Deprecated
    72   public static final IdMethod[] DEFAULT_METHODS = {};
    7366
    7467  private final String method;
  • trunk/src/webservices/client/java/net/sf/basedb/ws/client/BioAssaySetClient.java

    r4931 r5590  
    5252    super(session.getUrl(), "BioAssaySet", session.getServiceFactory());
    5353    this.session = session;
    54   }
    55  
    56   /**
    57     Calls the BioAssaySetService and gets the available formats to export
    58     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 AxisFault
    65   {
    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 and
    72     then sends it as a file.
    73       @param bioAssaySetId Id of the bioAssay set to export
    74       @param format Export format to use when exporting the bioassay set
    75       @param reporterFields Reporter fields to include in the export
    76       @param spotFields Spot fields to include in the export
    77       @param mergeReporters If the reporters should be merged or not.
    78       @return An InputStream to read the file data from
    79       @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, IOException
    88   {
    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 invokeFileBlocking
    94       (
    95         "downloadBioAssaySet",
    96         session.getId(),
    97         bioAssaySetId,
    98         format,
    99         reporterFields,
    100         spotFields,
    101         mergeReporters
    102       );     
    10354  }
    10455 
  • trunk/src/webservices/server/net/sf/basedb/ws/server/BioAssaySetService.java

    r4931 r5590  
    2222package net.sf.basedb.ws.server;
    2323
    24 import net.sf.basedb.core.BaseException;
    2524import net.sf.basedb.core.BioAssaySet;
    2625import net.sf.basedb.core.DataFileType;
     
    3332import net.sf.basedb.info.DataFileTypeInfo;
    3433import 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;
    4434
    4535import org.apache.axiom.om.OMElement;
     
    6353  public BioAssaySetService()
    6454  {}
    65  
    66   /**
    67     Gets the available file formats a bioassay set can be exported in
    68     through webservices.
    69       @param ID A string that identify the active session
    70       @return A string-array with the available formats or
    71         null if there is no active session.
    72       @deprecated In 2.12. Use {@link #getDataFileTypes(String, int, QueryOptions)}
    73         instead
    74   */
    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 available
    84     There may be some parameters that needs to be configured
    85     depending on the selected file format.
    86       @param ID An id to identify the active session with
    87       @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 been
    92             completely moved to the MeV extension (http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev)
    93             This web service will continue to
    94           <li>{@value #SERIAL_BASEFILE}
    95           <li>{@value #MATRIX_BASEFILE}
    96         </ul>         
    97       @param reporterFieldArray The reporter fields to include in the export
    98       @param spotFieldArray The spot fields to include in the export
    99       @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 or
    102         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 and
    106       the files can then be downloaded when needed. Use
    107       {@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 Exception
    113   {
    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     try
    124     {
    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 format     
    138       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 BASEfile
    143       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       else
    153       {
    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     finally
    161     {   
    162       if (dc != null) dc.close();
    163     }
    164    
    165     return elementWithAttachment;
    166   }
    16755 
    16856  /**
  • trunk/www/admin/annotationtypecategories/index.jsp

    r5510 r5590  
    303303    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    304304    final ItemQuery<AnnotationTypeCategory> query = AnnotationTypeCategory.getQuery();
    305     cc.configureQuery(query, true);
     305    dc = sc.newDbControl();
     306    cc.configureQuery(dc, query, true);
     307    dc.close();
    306308    cc.setQuery(query);
    307309    registerExportUtils(cc);
     
    320322    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    321323    final ItemQuery<AnnotationTypeCategory> query = AnnotationTypeCategory.getQuery();
    322     cc.configureQuery(query, true);
     324    dc = sc.newDbControl();
     325    cc.configureQuery(dc, query, true);
     326    dc.close();
    323327    cc.setQuery(query);
    324328    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+annotation+types+categories";
     
    335339    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    336340    final ItemQuery<AnnotationTypeCategory> query = AnnotationTypeCategory.getQuery();
    337     cc.configureQuery(query, true);
     341    dc = sc.newDbControl();
     342    cc.configureQuery(dc, query, true);
     343    dc.close();
    338344    cc.setQuery(query);
    339345    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  
    100100  {
    101101    final ItemQuery<AnnotationTypeCategory> query =
    102       Base.getConfiguredQuery(cc, true, AnnotationTypeCategory.getQuery(), mode);
     102      Base.getConfiguredQuery(dc, cc, true, AnnotationTypeCategory.getQuery(), mode);
    103103    annotationTypeCategories = query.iterate(dc);
    104104  }
  • trunk/www/admin/annotationtypes/index.jsp

    r5510 r5590  
    428428    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    429429    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();
    431433    cc.setQuery(query);
    432434    registerExportUtils(cc);
     
    445447    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    446448    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();
    448452    cc.setQuery(query);
    449453    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+annotation+types";
     
    460464    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    461465    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();
    463469    cc.setQuery(query);
    464470    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  
    119119  try
    120120  {
    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);
    122122    annotationTypes = query.iterate(dc);
    123123  }
  • trunk/www/admin/clients/help/index.jsp

    r5506 r5590  
    191191    dc = sc.newDbControl();
    192192    final Client client = Client.getById(dc, clientId);
     193    final ItemQuery<Help> query = client.getHelp();
     194    cc.configureQuery(dc, query, true);
    193195    dc.close();
    194     final ItemQuery<Help> query = client.getHelp();
    195     cc.configureQuery(query, true);
    196196    cc.setQuery(query);
    197197    redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+help";
     
    209209    dc = sc.newDbControl();
    210210    final Client client = Client.getById(dc, clientId);
     211    final ItemQuery<Help> query = client.getHelp();
     212    cc.configureQuery(dc, query, true);
    211213    dc.close();
    212     final ItemQuery<Help> query = client.getHelp();
    213     cc.configureQuery(query, true);
    214214    cc.setQuery(query);
    215215    redirect = "../../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+help";
     
    227227    dc = sc.newDbControl();
    228228    final Client client = Client.getById(dc, clientId);
     229    final ItemQuery<Help> query = client.getHelp();
     230    cc.configureQuery(dc, query, true);
    229231    dc.close();
    230     final ItemQuery<Help> query = client.getHelp();
    231     cc.configureQuery(query, true);
    232232    cc.setQuery(query);
    233233    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  
    8585  try
    8686  {
    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);
    8888    help = query.iterate(dc);
    8989  }
  • trunk/www/admin/clients/index.jsp

    r5506 r5590  
    261261    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    262262    final ItemQuery<Client> query = Client.getQuery();
    263     cc.configureQuery(query, true);
     263    dc = sc.newDbControl();
     264    cc.configureQuery(dc, query, true);
     265    dc.close();
    264266    cc.setQuery(query);
    265267    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+client+applications";
     
    276278    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    277279    final ItemQuery<Client> query = Client.getQuery();
    278     cc.configureQuery(query, true);
     280    dc = sc.newDbControl();
     281    cc.configureQuery(dc, query, true);
     282    dc.close();
    279283    cc.setQuery(query);
    280284    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+client+applications";
     
    291295    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    292296    final ItemQuery<Client> query = Client.getQuery();
    293     cc.configureQuery(query, true);
     297    dc = sc.newDbControl();
     298    cc.configureQuery(dc, query, true);
     299    dc.close();
    294300    cc.setQuery(query);
    295301    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  
    8181{
    8282  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    83   final ItemQuery<Client> query = Base.getConfiguredQuery(cc, true, Client.getQuery(), mode);
    8483
    8584  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
    8685  try
    8786  {
     87    final ItemQuery<Client> query = Base.getConfiguredQuery(dc, cc, true, Client.getQuery(), mode);
    8888    clients = query.iterate(dc);
    8989  }
  • trunk/www/admin/datafiletypes/index.jsp

    r5508 r5590  
    231231    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    232232    final ItemQuery<DataFileType> query = DataFileType.getQuery();
    233     cc.configureQuery(query, true);
     233    dc = sc.newDbControl();
     234    cc.configureQuery(dc, query, true);
     235    dc.close();
    234236    cc.setQuery(query);
    235237    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+data+file+types";
     
    246248    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    247249    final ItemQuery<DataFileType> query = DataFileType.getQuery();
    248     cc.configureQuery(query, true);
     250    dc = sc.newDbControl();
     251    cc.configureQuery(dc, query, true);
     252    dc.close();
    249253    cc.setQuery(query);
    250254    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+data+file+types";
     
    261265    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    262266    final ItemQuery<DataFileType> query = DataFileType.getQuery();
    263     cc.configureQuery(query, true);
     267    dc = sc.newDbControl();
     268    cc.configureQuery(dc, query, true);
     269    dc.close();
    264270    cc.setQuery(query);
    265271    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  
    114114  try
    115115  {
    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);
    117117    fileTypes = query.iterate(dc);
    118118  }
  • trunk/www/admin/diskusage/details/view_details.jsp

    r5426 r5590  
    140140  try
    141141  {
    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);
    143143    diskUsage = query.iterate(dc);
    144144    totalCount = diskUsage.getTotalCount();
  • trunk/www/admin/diskusage/list_groups.jsp

    r5426 r5590  
    9999  try
    100100  {
    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);
    102102    query.include(Include.ALL);
    103103    query.restrict(
  • trunk/www/admin/diskusage/list_users.jsp

    r5426 r5590  
    102102  try
    103103  {
    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);
    105105    query.include(Include.ALL);
    106106    users = query.iterate(dc);
  • trunk/www/admin/extravaluetypes/index.jsp

    r5510 r5590  
    226226    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    227227    final ItemQuery<ExtraValueType> query = ExtraValueType.getQuery();
    228     cc.configureQuery(query, true);
     228    dc = sc.newDbControl();
     229    cc.configureQuery(dc, query, true);
     230    dc.close();
    229231    cc.setQuery(query);
    230232    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+extra+value+types";
     
    241243    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    242244    final ItemQuery<ExtraValueType> query = ExtraValueType.getQuery();
    243     cc.configureQuery(query, true);
     245    dc = sc.newDbControl();
     246    cc.configureQuery(dc, query, true);
     247    dc.close();
    244248    cc.setQuery(query);
    245249    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+extra+value+types";
     
    256260    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    257261    final ItemQuery<ExtraValueType> query = ExtraValueType.getQuery();
    258     cc.configureQuery(query, true);
     262    dc = sc.newDbControl();
     263    cc.configureQuery(dc, query, true);
     264    dc.close();
    259265    cc.setQuery(query);
    260266    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  
    9999  try
    100100  {
    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);
    102102    extraValueTypes = query.iterate(dc);
    103103  }
  • trunk/www/admin/filetypes/index.jsp

    r5510 r5590  
    148148    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    149149    final ItemQuery<FileType> query = FileType.getQuery();
    150     cc.configureQuery(query, true);
     150    dc = sc.newDbControl();
     151    cc.configureQuery(dc, query, true);
     152    dc.close();
    151153    cc.setQuery(query);
    152154    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+file+types";
     
    163165    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    164166    final ItemQuery<FileType> query = FileType.getQuery();
    165     cc.configureQuery(query, true);
     167    dc = sc.newDbControl();
     168    cc.configureQuery(dc, query, true);
     169    dc.close();
    166170    cc.setQuery(query);
    167171    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  
    7878{
    7979  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);
    8181
    8282  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
  • trunk/www/admin/groups/index.jsp

    r5506 r5590  
    284284    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    285285    final ItemQuery<Group> query = Group.getQuery();
    286     cc.configureQuery(query, true);
     286    dc = sc.newDbControl();
     287    cc.configureQuery(dc, query, true);
     288    dc.close();
    287289    cc.setQuery(query);
    288290    registerExportUtils(cc);
     
    301303    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    302304    final ItemQuery<Group> query = Group.getQuery();
    303     cc.configureQuery(query, true);
     305    dc = sc.newDbControl();
     306    cc.configureQuery(dc, query, true);
     307    dc.close();
    304308    cc.setQuery(query);
    305309    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+groups";
     
    316320    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    317321    final ItemQuery<Group> query = Group.getQuery();
    318     cc.configureQuery(query, true);
     322    dc = sc.newDbControl();
     323    cc.configureQuery(dc, query, true);
     324    dc.close();
    319325    cc.setQuery(query);
    320326    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  
    101101  try
    102102  {
    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);
    104104    groups = query.iterate(dc);
    105105  }
  • trunk/www/admin/hardware/index.jsp

    r5506 r5590  
    270270    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    271271    final ItemQuery<Hardware> query = Hardware.getQuery();
    272     cc.configureQuery(query, true);
     272    dc = sc.newDbControl();
     273    cc.configureQuery(dc, query, true);
     274    dc.close();
    273275    cc.setQuery(query);
    274276    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays";
     
    285287    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    286288    final ItemQuery<Hardware> query = Hardware.getQuery();
    287     cc.configureQuery(query, true);
     289    dc = sc.newDbControl();
     290    cc.configureQuery(dc, query, true);
     291    dc.close();
    288292    cc.setQuery(query);
    289293    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays";
     
    300304    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    301305    final ItemQuery<Hardware> query = Hardware.getQuery();
    302     cc.configureQuery(query, true);
     306    dc = sc.newDbControl();
     307    cc.configureQuery(dc, query, true);
     308    dc.close();
    303309    cc.setQuery(query);
    304310    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  
    8282{
    8383  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    84   final ItemQuery<Hardware> query = Base.getConfiguredQuery(cc, true, Hardware.getQuery(), mode);
    8584
    8685  final ItemQuery<HardwareType> typeQuery = HardwareType.getQuery();
     
    9190  try
    9291  {
     92    final ItemQuery<Hardware> query = Base.getConfiguredQuery(dc, cc, true, Hardware.getQuery(), mode);
    9393    hardware = query.iterate(dc);
    9494  }
  • trunk/www/admin/hardwaretypes/index.jsp

    r5510 r5590  
    236236    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    237237    final ItemQuery<HardwareType> query = HardwareType.getQuery();
    238     cc.configureQuery(query, true);
     238    dc = sc.newDbControl();
     239    cc.configureQuery(dc, query, true);
     240    dc.close();
    239241    cc.setQuery(query);
    240242    registerExportUtils(cc);
     
    253255    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    254256    final ItemQuery<HardwareType> query = HardwareType.getQuery();
    255     cc.configureQuery(query, true);
     257    dc = sc.newDbControl();
     258    cc.configureQuery(dc, query, true);
     259    dc.close();
    256260    cc.setQuery(query);
    257261    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  
    9595  try
    9696  {
    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);
    9898    hardwareTypes = query.iterate(dc);
    9999  }
  • trunk/www/admin/jobagents/index.jsp

    r5508 r5590  
    305305    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    306306    final ItemQuery<JobAgent> query = JobAgent.getQuery();
    307     cc.configureQuery(query, true);
     307    dc = sc.newDbControl();
     308    cc.configureQuery(dc, query, true);
     309    dc.close();
    308310    cc.setQuery(query);
    309311    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+job+agents";
     
    320322    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    321323    final ItemQuery<JobAgent> query = JobAgent.getQuery();
    322     cc.configureQuery(query, true);
     324    dc = sc.newDbControl();
     325    cc.configureQuery(dc, query, true);
     326    dc.close();
    323327    cc.setQuery(query);
    324328    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+job+agents";
     
    335339    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    336340    final ItemQuery<JobAgent> query = JobAgent.getQuery();
    337     cc.configureQuery(query, true);
     341    dc = sc.newDbControl();
     342    cc.configureQuery(dc, query, true);
     343    dc.close();
    338344    cc.setQuery(query);
    339345    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  
    9292  try
    9393  {
    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);
    9595    agents = query.iterate(dc);
    9696  }
  • trunk/www/admin/mimetypes/index.jsp

    r5510 r5590  
    225225    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    226226    final ItemQuery<MimeType> query = MimeType.getQuery();
    227     cc.configureQuery(query, true);
     227    dc = sc.newDbControl();
     228    cc.configureQuery(dc, query, true);
     229    dc.close();
    228230    cc.setQuery(query);
    229231    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+mime+types";
     
    240242    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    241243    final ItemQuery<MimeType> query = MimeType.getQuery();
    242     cc.configureQuery(query, true);
     244    dc = sc.newDbControl();
     245    cc.configureQuery(dc, query, true);
     246    dc.close();
    243247    cc.setQuery(query);
    244248    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+mime+types";
     
    255259    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    256260    final ItemQuery<MimeType> query = MimeType.getQuery();
    257     cc.configureQuery(query, true);
     261    dc = sc.newDbControl();
     262    cc.configureQuery(dc, query, true);
     263    dc.close();
    258264    cc.setQuery(query);
    259265    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  
    8181{
    8282  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    83   final ItemQuery<MimeType> query = Base.getConfiguredQuery(cc, true, MimeType.getQuery(), mode);
    8483
    8584  // Get all file types
     
    9190  try
    9291  {
     92    final ItemQuery<MimeType> query = Base.getConfiguredQuery(dc, cc, true, MimeType.getQuery(), mode);
    9393    mimeTypes = query.iterate(dc);
    9494  }
  • trunk/www/admin/news/index.jsp

    r5506 r5590  
    232232    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    233233    final ItemQuery<News> query = News.getQuery();
    234     cc.configureQuery(query, true);
     234    dc = sc.newDbControl();
     235    cc.configureQuery(dc, query, true);
     236    dc.close();
    235237    cc.setQuery(query);
    236238    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+news";
     
    247249    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    248250    final ItemQuery<News> query = News.getQuery();
    249     cc.configureQuery(query, true);
     251    dc = sc.newDbControl();
     252    cc.configureQuery(dc, query, true);
     253    dc.close();
    250254    cc.setQuery(query);
    251255    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+news";
     
    262266    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    263267    final ItemQuery<News> query = News.getQuery();
    264     cc.configureQuery(query, true);
     268    dc = sc.newDbControl();
     269    cc.configureQuery(dc, query, true);
     270    dc.close();
    265271    cc.setQuery(query);
    266272    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  
    8383  try
    8484  {
    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);
    8686    news = query.iterate(dc);
    8787  }
  • trunk/www/admin/platforms/index.jsp

    r5508 r5590  
    273273    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    274274    final ItemQuery<Platform> query = Platform.getQuery();
    275     cc.configureQuery(query, true);
     275    dc = sc.newDbControl();
     276    cc.configureQuery(dc, query, true);
     277    dc.close();
    276278    cc.setQuery(query);
    277279    registerExportUtils(cc);
     
    290292    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    291293    final ItemQuery<Platform> query = Platform.getQuery();
    292     cc.configureQuery(query, true);
     294    dc = sc.newDbControl();
     295    cc.configureQuery(dc, query, true);
     296    dc.close();
    293297    cc.setQuery(query);
    294298    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+platforms";
     
    305309    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    306310    final ItemQuery<Platform> query = Platform.getQuery();
    307     cc.configureQuery(query, true);
     311    dc = sc.newDbControl();
     312    cc.configureQuery(dc, query, true);
     313    dc.close();
    308314    cc.setQuery(query);
    309315    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  
    9393  try
    9494  {
    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);
    9696    platforms = query.iterate(dc);
    9797  }
  • trunk/www/admin/platforms/variants/index.jsp

    r5508 r5590  
    255255    dc = sc.newDbControl();
    256256    final Platform platform = Platform.getById(dc, platformId);
     257    final ItemQuery<PlatformVariant> query = platform.getVariants();
     258    cc.configureQuery(dc, query, true);
    257259    dc.close();
    258     final ItemQuery<PlatformVariant> query = platform.getVariants();
    259     cc.configureQuery(query, true);
    260260    cc.setQuery(query);
    261261    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+platform+variants";
     
    273273    dc = sc.newDbControl();
    274274    final Platform platform = Platform.getById(dc, platformId);
     275    final ItemQuery<PlatformVariant> query = platform.getVariants();
     276    cc.configureQuery(dc, query, true);
    275277    dc.close();
    276     final ItemQuery<PlatformVariant> query = platform.getVariants();
    277     cc.configureQuery(query, true);
    278278    cc.setQuery(query);
    279279    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+platform+variants";
     
    291291    dc = sc.newDbControl();
    292292    final Platform platform = Platform.getById(dc, platformId);
     293    final ItemQuery<PlatformVariant> query = platform.getVariants();
     294    cc.configureQuery(dc, query, true);
    293295    dc.close();
    294     final ItemQuery<PlatformVariant> query = platform.getVariants();
    295     cc.configureQuery(query, true);
    296296    cc.setQuery(query);
    297297    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  
    8686  try
    8787  {
    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);
    8989    variants = query.iterate(dc);
    9090  }
  • trunk/www/admin/pluginconfigurations/index.jsp

    r5508 r5590  
    301301    query.join(Hql.leftJoin(Item.PLUGINDEFINITION.getAlias(), "guiContexts", "ctx", null, false));
    302302    query.setDistinct(true);
    303     cc.configureQuery(query, true);
     303    dc = sc.newDbControl();
     304    cc.configureQuery(dc, query, true);
     305    dc.close();
    304306    cc.setQuery(query);
    305307    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+plugin+configurations";
     
    319321    query.join(Hql.leftJoin(Item.PLUGINDEFINITION.getAlias(), "guiContexts", "ctx", null, false));
    320322    query.setDistinct(true);
    321     cc.configureQuery(query, true);
     323    dc = sc.newDbControl();
     324    cc.configureQuery(dc, query, true);
     325    dc.close();
    322326    cc.setQuery(query);
    323327    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plugin+configurations";
     
    337341    query.join(Hql.leftJoin(Item.PLUGINDEFINITION.getAlias(), "guiContexts", "ctx", null, false));
    338342    query.setDistinct(true);
    339     cc.configureQuery(query, true);
     343    dc = sc.newDbControl();
     344    cc.configureQuery(dc, query, true);
     345    dc.close();
    340346    cc.setQuery(query);
    341347    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  
    500500    query.join(Hql.leftJoin("guiContexts", "ctx"));
    501501    query.setDistinct(true);
    502     cc.configureQuery(query, true);
     502    dc = sc.newDbControl();
     503    cc.configureQuery(dc, query, true);
     504    dc.close();
    503505    cc.setQuery(query);
    504506    registerExportUtils(cc);
     
    519521    query.join(Hql.leftJoin("guiContexts", "ctx"));
    520522    query.setDistinct(true);
    521     cc.configureQuery(query, true);
     523    dc = sc.newDbControl();
     524    cc.configureQuery(dc, query, true);
     525    dc.close();
    522526    cc.setQuery(query);
    523527    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plugins";
     
    536540    query.join(Hql.leftJoin("guiContexts", "ctx"));
    537541    query.setDistinct(true);
    538     cc.configureQuery(query, true);
     542    dc = sc.newDbControl();
     543    cc.configureQuery(dc, query, true);
     544    dc.close();
    539545    cc.setQuery(query);
    540546    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  
    240240    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    241241    final ItemQuery<PluginType> query = PluginType.getQuery();
    242     cc.configureQuery(query, true);
     242    dc = sc.newDbControl();
     243    cc.configureQuery(dc, query, true);
     244    dc.close();
    243245    cc.setQuery(query);
    244246    registerExportUtils(cc);
     
    257259    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    258260    final ItemQuery<PluginType> query = PluginType.getQuery();
    259     cc.configureQuery(query, true);
     261    dc = sc.newDbControl();
     262    cc.configureQuery(dc, query, true);
     263    dc.close();
    260264    cc.setQuery(query);
    261265    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plugin+types";
     
    272276    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    273277    final ItemQuery<PluginType> query = PluginType.getQuery();
    274     cc.configureQuery(query, true);
     278    dc = sc.newDbControl();
     279    cc.configureQuery(dc, query, true);
     280    dc.close();
    275281    cc.setQuery(query);
    276282    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  
    9595  try
    9696  {
    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);
    9898    pluginTypes = query.iterate(dc);
    9999  }
  • trunk/www/admin/protocols/index.jsp

    r5506 r5590  
    296296    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    297297    final ItemQuery<Protocol> query = Protocol.getQuery();
    298     cc.configureQuery(query, true);
     298    dc = sc.newDbControl();
     299    cc.configureQuery(dc, query, true);
     300    dc.close();
    299301    cc.setQuery(query);
    300302    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays";
     
    311313    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    312314    final ItemQuery<Protocol> query = Protocol.getQuery();
    313     cc.configureQuery(query, true);
     315    dc = sc.newDbControl();
     316    cc.configureQuery(dc, query, true);
     317    dc.close();
    314318    cc.setQuery(query);
    315319    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays";
     
    326330    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    327331    final ItemQuery<Protocol> query = Protocol.getQuery();
    328     cc.configureQuery(query, true);
     332    dc = sc.newDbControl();
     333    cc.configureQuery(dc, query, true);
     334    dc.close();
    329335    cc.setQuery(query);
    330336    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  
    8989 
    9090  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);
    9292
    9393  final ItemQuery<ProtocolType> typeQuery = ProtocolType.getQuery();
  • trunk/www/admin/protocoltypes/index.jsp

    r5510 r5590  
    236236    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    237237    final ItemQuery<ProtocolType> query = ProtocolType.getQuery();
    238     cc.configureQuery(query, true);
     238    dc = sc.newDbControl();
     239    cc.configureQuery(dc, query, true);
     240    dc.close();
    239241    cc.setQuery(query);
    240242    registerExportUtils(cc);
     
    253255    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    254256    final ItemQuery<ProtocolType> query = ProtocolType.getQuery();
    255     cc.configureQuery(query, true);
     257    dc = sc.newDbControl();
     258    cc.configureQuery(dc, query, true);
     259    dc.close();
    256260    cc.setQuery(query);
    257261    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+protocol+types";
     
    268272    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    269273    final ItemQuery<ProtocolType> query = ProtocolType.getQuery();
    270     cc.configureQuery(query, true);
     274    dc = sc.newDbControl();
     275    cc.configureQuery(dc, query, true);
     276    dc.close();
    271277    cc.setQuery(query);
    272278    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  
    9595  try
    9696  {
    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);
    9898    protocolTypes = query.iterate(dc);
    9999  }
  • trunk/www/admin/quantities/index.jsp

    r5510 r5590  
    237237    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    238238    final ItemQuery<Quantity> query = Quantity.getQuery();
    239     cc.configureQuery(query, true);
     239    dc = sc.newDbControl();
     240    cc.configureQuery(dc, query, true);
     241    dc.close();
    240242    cc.setQuery(query);
    241243    registerExportUtils(cc);
     
    254256    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    255257    final ItemQuery<Quantity> query = Quantity.getQuery();
    256     cc.configureQuery(query, true);
     258    dc = sc.newDbControl();
     259    cc.configureQuery(dc, query, true);
     260    dc.close();
    257261    cc.setQuery(query);
    258262    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+quantities";
     
    269273    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    270274    final ItemQuery<Quantity> query = Quantity.getQuery();
    271     cc.configureQuery(query, true);
     275    dc = sc.newDbControl();
     276    cc.configureQuery(dc, query, true);
     277    dc.close();
    272278    cc.setQuery(query);
    273279    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  
    9292  try
    9393  {
    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);
    9595    quantities = query.iterate(dc);
    9696  }
  • trunk/www/admin/quantities/units/index.jsp

    r5510 r5590  
    218218    dc = sc.newDbControl();
    219219    final Quantity quantity = Quantity.getById(dc, quantityId);
     220    final ItemQuery<Unit> query = quantity.getUnits();
     221    cc.configureQuery(dc, query, true);
    220222    dc.close();
    221     final ItemQuery<Unit> query = quantity.getUnits();
    222     cc.configureQuery(query, true);
    223223    cc.setQuery(query);
    224224    redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+units";
     
    236236    dc = sc.newDbControl();
    237237    final Quantity quantity = Quantity.getById(dc, quantityId);
     238    final ItemQuery<Unit> query = quantity.getUnits();
     239    cc.configureQuery(dc, query, true);
    238240    dc.close();
    239     final ItemQuery<Unit> query = quantity.getUnits();
    240     cc.configureQuery(query, true);
    241241    cc.setQuery(query);
    242242    redirect = "../../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+units";
     
    254254    dc = sc.newDbControl();
    255255    final Quantity quantity = Quantity.getById(dc, quantityId);
     256    final ItemQuery<Unit> query = quantity.getUnits();
     257    cc.configureQuery(dc, query, true);
    256258    dc.close();
    257     final ItemQuery<Unit> query = quantity.getUnits();
    258     cc.configureQuery(query, true);
    259259    cc.setQuery(query);
    260260    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  
    248248    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    249249    final ItemQuery<Quota> query = Quota.getQuery();
    250     cc.configureQuery(query, true);
     250    dc = sc.newDbControl();
     251    cc.configureQuery(dc, query, true);
     252    dc.close();
    251253    cc.setQuery(query);
    252254    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+quota";
     
    263265    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    264266    final ItemQuery<Quota> query = Quota.getQuery();
    265     cc.configureQuery(query, true);
     267    dc = sc.newDbControl();
     268    cc.configureQuery(dc, query, true);
     269    dc.close();
    266270    cc.setQuery(query);
    267271    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+quota";
     
    278282    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    279283    final ItemQuery<Quota> query = Quota.getQuery();
    280     cc.configureQuery(query, true);
     284    dc = sc.newDbControl();
     285    cc.configureQuery(dc, query, true);
     286    dc.close();
    281287    cc.setQuery(query);
    282288    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  
    8080{
    8181  final QuotaType total = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL));
    82   final ItemQuery<Quota> query = Base.getConfiguredQuery(cc, true, Quota.getQuery(), mode);
    8382
    8483  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
    8584  try
    8685  {
     86    final ItemQuery<Quota> query = Base.getConfiguredQuery(dc, cc, true, Quota.getQuery(), mode);
    8787    quota = query.iterate(dc);
    8888  }
  • trunk/www/admin/quotatypes/index.jsp

    r5510 r5590  
    148148    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    149149    final ItemQuery<QuotaType> query = QuotaType.getQuery();
    150     cc.configureQuery(query, true);
     150    dc = sc.newDbControl();
     151    cc.configureQuery(dc, query, true);
     152    dc.close();
    151153    cc.setQuery(query);
    152154    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+quota+types";
     
    163165    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    164166    final ItemQuery<QuotaType> query = QuotaType.getQuery();
    165     cc.configureQuery(query, true);
     167    dc = sc.newDbControl();
     168    cc.configureQuery(dc, query, true);
     169    dc.close();
    166170    cc.setQuery(query);
    167171    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  
    7878{
    7979  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    80   final ItemQuery<QuotaType> query = Base.getConfiguredQuery(cc, true, QuotaType.getQuery(), mode);
    8180
    8281  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
    8382  try
    8483  {
     84    final ItemQuery<QuotaType> query = Base.getConfiguredQuery(dc, cc, true, QuotaType.getQuery(), mode);
    8585    quotaTypes = query.iterate(dc);
    8686  }
  • trunk/www/admin/reportertypes/index.jsp

    r5510 r5590  
    214214    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    215215    final ItemQuery<ReporterType> query = ReporterType.getQuery();
    216     cc.configureQuery(query, true);
     216    dc = sc.newDbControl();
     217    cc.configureQuery(dc, query, true);
     218    dc.close();
    217219    cc.setQuery(query);
    218220    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+reporter+types";
     
    229231    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    230232    final ItemQuery<ReporterType> query = ReporterType.getQuery();
    231     cc.configureQuery(query, true);
     233    dc = sc.newDbControl();
     234    cc.configureQuery(dc, query, true);
     235    dc.close();
    232236    cc.setQuery(query);
    233237    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+reporter+types";
     
    244248    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    245249    final ItemQuery<ReporterType> query = ReporterType.getQuery();
    246     cc.configureQuery(query, true);
     250    dc = sc.newDbControl();
     251    cc.configureQuery(dc, query, true);
     252    dc.close();
    247253    cc.setQuery(query);
    248254    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  
    8080{
    8181  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    82   final ItemQuery<ReporterType> query = Base.getConfiguredQuery(cc, true, ReporterType.getQuery(), mode);
    8382
    8483  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
    8584  try
    8685  {
     86    final ItemQuery<ReporterType> query = Base.getConfiguredQuery(dc, cc, true, ReporterType.getQuery(), mode);
    8787    reporterTypes = query.iterate(dc);
    8888  }
  • trunk/www/admin/roles/index.jsp

    r5506 r5590  
    265265    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    266266    final ItemQuery<Role> query = Role.getQuery();
    267     cc.configureQuery(query, true);
     267    dc = sc.newDbControl();
     268    cc.configureQuery(dc, query, true);
     269    dc.close();
    268270    cc.setQuery(query);
    269271    registerExportUtils(cc);
     
    282284    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    283285    final ItemQuery<Role> query = Role.getQuery();
    284     cc.configureQuery(query, true);
     286    dc = sc.newDbControl();
     287    cc.configureQuery(dc, query, true);
     288    dc.close();
    285289    cc.setQuery(query);
    286290    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+roles";
     
    297301    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    298302    final ItemQuery<Role> query = Role.getQuery();
    299     cc.configureQuery(query, true);
     303    dc = sc.newDbControl();
     304    cc.configureQuery(dc, query, true);
     305    dc.close();
    300306    cc.setQuery(query);
    301307    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  
    9494  try
    9595  {
    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);
    9797    roles = query.iterate(dc);
    9898  }
  • trunk/www/admin/software/index.jsp

    r5506 r5590  
    270270    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    271271    final ItemQuery<Software> query = Software.getQuery();
    272     cc.configureQuery(query, true);
     272    dc = sc.newDbControl();
     273    cc.configureQuery(dc, query, true);
     274    dc.close();
    273275    cc.setQuery(query);
    274276    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays";
     
    285287    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    286288    final ItemQuery<Software> query = Software.getQuery();
    287     cc.configureQuery(query, true);
     289    dc = sc.newDbControl();
     290    cc.configureQuery(dc, query, true);
     291    dc.close();
    288292    cc.setQuery(query);
    289293    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays";
     
    300304    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    301305    final ItemQuery<Software> query = Software.getQuery();
    302     cc.configureQuery(query, true);
     306    dc = sc.newDbControl();
     307    cc.configureQuery(dc, query, true);
     308    dc.close();
    303309    cc.setQuery(query);
    304310    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  
    8282{
    8383  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    84   final ItemQuery<Software> query = Base.getConfiguredQuery(cc, true, Software.getQuery(), mode);
    8584
    8685  final ItemQuery<SoftwareType> typeQuery = SoftwareType.getQuery();
     
    9190  try
    9291  {
     92    final ItemQuery<Software> query = Base.getConfiguredQuery(dc, cc, true, Software.getQuery(), mode);
    9393    software = query.iterate(dc);
    9494  }
  • trunk/www/admin/softwaretypes/index.jsp

    r5510 r5590  
    170170    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    171171    final ItemQuery<SoftwareType> query = SoftwareType.getQuery();
    172     cc.configureQuery(query, true);
     172    dc = sc.newDbControl();
     173    cc.configureQuery(dc, query, true);
     174    dc.close();
    173175    cc.setQuery(query);
    174176    registerExportUtils(cc);
     
    187189    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    188190    final ItemQuery<SoftwareType> query = SoftwareType.getQuery();
    189     cc.configureQuery(query, true);
     191    dc = sc.newDbControl();
     192    cc.configureQuery(dc, query, true);
     193    dc.close();
    190194    cc.setQuery(query);
    191195    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  
    9393  try
    9494  {
    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);
    9696    softwareTypes = query.iterate(dc);
    9797  }
  • trunk/www/admin/users/index.jsp

    r5506 r5590  
    379379    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    380380    final ItemQuery<User> query = User.getQuery();
    381     cc.configureQuery(query, true);
     381    dc = sc.newDbControl();
     382    cc.configureQuery(dc, query, true);
     383    dc.close();
    382384    cc.setQuery(query);
    383385    registerExportUtils(cc);
     
    396398    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    397399    final ItemQuery<User> query = User.getQuery();
    398     cc.configureQuery(query, true);
     400    dc = sc.newDbControl();
     401    cc.configureQuery(dc, query, true);
     402    dc.close();
    399403    cc.setQuery(query);
    400404    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+users";
     
    411415    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    412416    final ItemQuery<User> query = User.getQuery();
    413     cc.configureQuery(query, true);
     417    dc = sc.newDbControl();
     418    cc.configureQuery(dc, query, true);
     419    dc.close();
    414420    cc.setQuery(query);
    415421    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  
    108108  try
    109109  {
    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);
    111111    users = query.iterate(dc);
    112112  }
  • trunk/www/biomaterials/bioplateeventtypes/index.jsp

    r5525 r5590  
    220220    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    221221    final ItemQuery<BioPlateEventType> query = BioPlateEventType.getQuery();
    222     cc.configureQuery(query, true);
     222    dc = sc.newDbControl();
     223    cc.configureQuery(dc, query, true);
     224    dc.close();
    223225    cc.setQuery(query);
    224226    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bio+plate+event+types";
     
    235237    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    236238    final ItemQuery<BioPlateEventType> query = BioPlateEventType.getQuery();
    237     cc.configureQuery(query, true);
     239    dc = sc.newDbControl();
     240    cc.configureQuery(dc, query, true);
     241    dc.close();
    238242    cc.setQuery(query);
    239243    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+bio+plate+event+types";
     
    250254    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    251255    final ItemQuery<BioPlateEventType> query = BioPlateEventType.getQuery();
    252     cc.configureQuery(query, true);
     256    dc = sc.newDbControl();
     257    cc.configureQuery(dc, query, true);
     258    dc.close();
    253259    cc.setQuery(query);
    254260    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  
    8383  try
    8484  {
    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);
    8686    bioPlateEventTypes = query.iterate(dc);
    8787  }
  • trunk/www/biomaterials/bioplates/events/index.jsp

    r5525 r5590  
    270270    dc = sc.newDbControl();
    271271    final BioPlate bioplate = BioPlate.getById(dc, bioplateId);
    272     dc.close();
    273272    final ItemQuery<BioPlateEvent> query = bioplate.getEvents();
    274     cc.configureQuery(query, true);
     273    cc.configureQuery(dc, query, true);
     274    dc.close();
    275275    cc.setQuery(query);
    276276    redirect = "../../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bioplate+events";
     
    288288    dc = sc.newDbControl();
    289289    final BioPlate bioplate = BioPlate.getById(dc, bioplateId);
    290     dc.close();
    291290    final ItemQuery<BioPlateEvent> query = bioplate.getEvents();
    292     cc.configureQuery(query, true);
     291    cc.configureQuery(dc, query, true);
     292    dc.close();
    293293    cc.setQuery(query);
    294294    redirect = "../../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+bioplate+events";
     
    306306    dc = sc.newDbControl();
    307307    final BioPlate bioplate = BioPlate.getById(dc, bioplateId);
    308     dc.close();
    309308    final ItemQuery<BioPlateEvent> query = bioplate.getEvents();
    310     cc.configureQuery(query, true);
     309    cc.configureQuery(dc, query, true);
     310    dc.close();
    311311    cc.setQuery(query);
    312312    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  
    275275    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    276276    final ItemQuery<BioPlate> query = BioPlate.getQuery();
    277     cc.configureQuery(query, true);
     277    dc = sc.newDbControl();
     278    cc.configureQuery(dc, query, true);
     279    dc.close();
    278280    cc.setQuery(query);
    279281    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bioplates";
     
    290292    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    291293    final ItemQuery<BioPlate> query = BioPlate.getQuery();
    292     cc.configureQuery(query, true);
     294    dc = sc.newDbControl();
     295    cc.configureQuery(dc, query, true);
     296    dc.close();
    293297    cc.setQuery(query);
    294298    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+plates";
     
    305309    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    306310    final ItemQuery<BioPlate> query = BioPlate.getQuery();
    307     cc.configureQuery(query, true);
     311    dc = sc.newDbControl();
     312    cc.configureQuery(dc, query, true);
     313    dc.close();
    308314    cc.setQuery(query);
    309315    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  
    183183    dc = sc.newDbControl();
    184184    final BioPlate bioplate = BioPlate.getById(dc, bioplateId);
    185     dc.close();
    186185    final ItemQuery<BioWell> query = bioplate.getBioWells();
    187     cc.configureQuery(query, true);
     186    cc.configureQuery(dc, query, true);
    188187    if (!"row".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("row")));
    189188    if (!"column".equals(cc.getSortProperty())) query.order(Orders.asc(Hql.property("column")));
     189    dc.close();
    190190    cc.setQuery(query);
    191191    registerExportFormatters(cc);
     
    205205    dc = sc.newDbControl();
    206206    final BioPlate bioplate = BioPlate.getById(dc, bioplateId);
     207    final ItemQuery<BioWell> query = bioplate.getBioWells();
     208    cc.configureQuery(dc, query, true);
    207209    dc.close();
    208     final ItemQuery<BioWell> query = bioplate.getBioWells();
    209     cc.configureQuery(query, true);
    210210    cc.setQuery(query);
    211211    redirect = root + "/common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+biowells";
     
    223223    dc = sc.newDbControl();
    224224    final BioPlate bioplate = BioPlate.getById(dc, bioplateId);
     225    final ItemQuery<BioWell> query = bioplate.getBioWells();
     226    cc.configureQuery(dc, query, true);
    225227    dc.close();
    226     final ItemQuery<BioWell> query = bioplate.getBioWells();
    227     cc.configureQuery(query, true);
    228228    cc.setQuery(query);
    229229    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  
    227227    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    228228    final ItemQuery<BioPlateType> query = BioPlateType.getQuery();
    229     cc.configureQuery(query, true);
     229    dc = sc.newDbControl();
     230    cc.configureQuery(dc, query, true);
     231    dc.close();
    230232    cc.setQuery(query);
    231233    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+bio+plate+types";
     
    242244    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    243245    final ItemQuery<BioPlateType> query = BioPlateType.getQuery();
    244     cc.configureQuery(query, true);
     246    dc = sc.newDbControl();
     247    cc.configureQuery(dc, query, true);
     248    dc.close();
    245249    cc.setQuery(query);
    246250    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+bio+plate+types";
     
    257261    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    258262    final ItemQuery<BioPlateType> query = BioPlateType.getQuery();
    259     cc.configureQuery(query, true);
     263    dc = sc.newDbControl();
     264    cc.configureQuery(dc, query, true);
     265    dc.close();
    260266    cc.setQuery(query);
    261267    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  
    102102  try
    103103  {
    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);
    105105    bioPlateTypes = query.iterate(dc);
    106106  }
  • trunk/www/biomaterials/biosources/index.jsp

    r5492 r5590  
    287287    registerExportUtils(cc);
    288288    final ItemQuery<BioSource> query = BioSource.getQuery();
    289     cc.configureQuery(query, true);
     289    dc = sc.newDbControl();
     290    cc.configureQuery(dc, query, true);
     291    dc.close();
    290292    cc.setQuery(query);
    291293    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+biosources";
     
    303305    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    304306    final ItemQuery<BioSource> query = BioSource.getQuery();
    305     cc.configureQuery(query, true);
     307    dc = sc.newDbControl();
     308    cc.configureQuery(dc, query, true);
     309    dc.close();
    306310    cc.setQuery(query);
    307311    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+biosources";
     
    318322    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    319323    final ItemQuery<BioSource> query = BioSource.getQuery();
    320     cc.configureQuery(query, true);
     324    dc = sc.newDbControl();
     325    cc.configureQuery(dc, query, true);
     326    dc.close();
    321327    cc.setQuery(query);
    322328    redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin";
     
    332338    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    333339    final ItemQuery<BioSource> query = BioSource.getQuery();
    334     cc.configureQuery(query, true);
     340    dc = sc.newDbControl();
     341    cc.configureQuery(dc, query, true);
     342    dc.close();
    335343    cc.setQuery(query);
    336344    redirect = "../lists/index.jsp?ID="+ID+"&cmd=NewItem&addBioMaterials=1&formId=biosources&fromContext=BIOSOURCE";
  • trunk/www/biomaterials/events/index.jsp

    r5492 r5590  
    203203    MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId);
    204204    final ItemQuery<BioMaterialEvent> query = BioMaterialEvent.getQuery(bioMaterial);
    205     cc.configureQuery(query, true);
     205    cc.configureQuery(dc, query, true);
     206    dc.close();
    206207    cc.setQuery(query);
    207208    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+events";
     
    220221    MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId);
    221222    final ItemQuery<BioMaterialEvent> query = BioMaterialEvent.getQuery(bioMaterial);
    222     cc.configureQuery(query, true);
     223    cc.configureQuery(dc, query, true);
     224    dc.close();
    223225    cc.setQuery(query);
    224226    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+events";
     
    237239    MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId);
    238240    final ItemQuery<BioMaterialEvent> query = BioMaterialEvent.getQuery(bioMaterial);
    239     cc.configureQuery(query, true);
     241    cc.configureQuery(dc, query, true);
     242    dc.close();
    240243    cc.setQuery(query);
    241244    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  
    392392    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    393393    final ItemQuery<Extract> query = Extract.getQuery();
    394     cc.configureQuery(query, true);
     394    dc = sc.newDbControl();
     395    cc.configureQuery(dc, query, true);
     396    dc.close();
    395397    registerExportFormatters(cc);
    396398    cc.setQuery(query);
     
    409411    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    410412    final ItemQuery<Extract> query = Extract.getQuery();
    411     cc.configureQuery(query, true);
     413    dc = sc.newDbControl();
     414    cc.configureQuery(dc, query, true);
     415    dc.close();
    412416    cc.setQuery(query);
    413417    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+extracts";
     
    424428    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    425429    final ItemQuery<Extract> query = Extract.getQuery();
    426     cc.configureQuery(query, true);
     430    dc = sc.newDbControl();
     431    cc.configureQuery(dc, query, true);
     432    dc.close();
    427433    cc.setQuery(query);
    428434    redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin";
     
    438444    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    439445    final ItemQuery<Extract> query = Extract.getQuery();
    440     cc.configureQuery(query, true);
     446    dc = sc.newDbControl();
     447    cc.configureQuery(dc, query, true);
     448    dc.close();
    441449    cc.setQuery(query);
    442450    redirect = "../lists/index.jsp?ID="+ID+"&cmd=NewItem&addBioMaterials=1&formId=extracts&fromContext=EXTRACT";
     
    446454    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    447455    final ItemQuery<Extract> query = Extract.getQuery();
    448     cc.configureQuery(query, true);
     456    dc = sc.newDbControl();
     457    cc.configureQuery(dc, query, true);
     458    dc.close();
    449459    cc.filterOnSelectedItems(query);
    450460    sc.getCurrentContext(Item.BIOPLATEEVENT, BioPlateEventType.PLACE_ON_PLATE).setQuery(query);
  • trunk/www/biomaterials/labeledextracts/index.jsp

    r5567 r5590  
    396396    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    397397    final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery();
    398     cc.configureQuery(query, true);
     398    dc = sc.newDbControl();
     399    cc.configureQuery(dc, query, true);
     400    dc.close();
    399401    registerExportUtils(cc);
    400402    cc.setQuery(query);
     
    413415    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    414416    final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery();
    415     cc.configureQuery(query, true);
     417    dc = sc.newDbControl();
     418    cc.configureQuery(dc, query, true);
     419    dc.close();
    416420    cc.setQuery(query);
    417421    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+labeled+extracts";
     
    428432    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    429433    final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery();
    430     cc.configureQuery(query, true);
     434    dc = sc.newDbControl();
     435    cc.configureQuery(dc, query, true);
     436    dc.close();
    431437    cc.setQuery(query);
    432438    redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin";
     
    442448    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    443449    final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery();
    444     cc.configureQuery(query, true);
     450    dc = sc.newDbControl();
     451    cc.configureQuery(dc, query, true);
     452    dc.close();
    445453    cc.setQuery(query);
    446454    redirect = "../lists/index.jsp?ID="+ID+"&cmd=NewItem&addBioMaterials=1&formId=labeledextracts&fromContext=LABELEDEXTRACT";
     
    450458    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    451459    final ItemQuery<LabeledExtract> query = LabeledExtract.getQuery();
    452     cc.configureQuery(query, true);
     460    dc = sc.newDbControl();
     461    cc.configureQuery(dc, query, true);
     462    dc.close();
    453463    cc.filterOnSelectedItems(query);
    454464    sc.getCurrentContext(Item.BIOPLATEEVENT, BioPlateEventType.PLACE_ON_PLATE).setQuery(query);
  • trunk/www/biomaterials/labels/index.jsp

    r5492 r5590  
    261261    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    262262    final ItemQuery<Label> query = Label.getQuery();
    263     cc.configureQuery(query, true);
     263    dc = sc.newDbControl();
     264    cc.configureQuery(dc, query, true);
     265    dc.close();
    264266    cc.setQuery(query);
    265267    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+labels";
     
    276278    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    277279    final ItemQuery<Label> query = Label.getQuery();
    278     cc.configureQuery(query, true);
     280    dc = sc.newDbControl();
     281    cc.configureQuery(dc, query, true);
     282    dc.close();
    279283    cc.setQuery(query);
    280284    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+labels";
     
    291295    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    292296    final ItemQuery<Label> query = Label.getQuery();
    293     cc.configureQuery(query, true);
     297    dc = sc.newDbControl();
     298    cc.configureQuery(dc, query, true);
     299    dc.close();
    294300    cc.setQuery(query);
    295301    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  
    7878try
    7979{
    80   final ItemQuery<Label> query = Base.getConfiguredQuery(cc, true, Label.getQuery(), mode);
    8180  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    8281
     
    8483  try
    8584  {
     85    final ItemQuery<Label> query = Base.getConfiguredQuery(dc, cc, true, Label.getQuery(), mode);
    8686    labels = query.iterate(dc);
    8787  }
  • trunk/www/biomaterials/lists/index.jsp

    r5492 r5590  
    342342    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    343343    final ItemQuery<BioMaterialList> query = BioMaterialList.getQuery();
    344     cc.configureQuery(query, true);
     344    dc = sc.newDbControl();
     345    cc.configureQuery(dc, query, true);
     346    dc.close();
    345347    cc.setQuery(query);
    346348    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+biomaterial+lists";
     
    357359    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    358360    final ItemQuery<BioMaterialList> query = BioMaterialList.getQuery();