source: trunk/src/core/common-queries.xml @ 4006

Last change on this file since 4006 was 4006, checked in by Nicklas Nordborg, 15 years ago

Fixes #844: File.isUsed() doesn't check if a file has been used in a FileSet?.
References #721

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 73.4 KB
Line 
1<?xml version="1.0" ?>
2<!DOCTYPE predefined-queries SYSTEM "predefined-queries.dtd" >
3<!--
4  $Id: common-queries.xml 4006 2007-11-27 08:00:56Z nicklas $
5
6  Copyright (C) 2005 Samuel Andersson, Johan Enell, Nicklas Nordborg
7  Copyright (C) 2006 Jari Hakkinen, Nicklas Nordborg, Martin Svensson
8  Copyright (C) 2007 Johan Enell, Nicklas Nordborg, Martin Svensson
9
10  This file is part of BASE - BioArray Software Environment.
11  Available at http://base.thep.lu.se/
12
13  BASE is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 2
16  of the License, or (at your option) any later version.
17
18  BASE is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software
25  Foundation, Inc., 59 Temple Place - Suite 330,
26  Boston, MA  02111-1307, USA.
27-->
28<!--
29  This XML file contains HQL and SQL queries that are common
30  to all databases. If one of them happens to fail on your
31  particular database, do not modify this file. Instead, you
32  should add an entry into the file that is specific for your
33  particular database that overrides the query in this file.
34  For example, for MySQL modify the mysql-queries.xml.
35-->
36<predefined-queries>
37
38  <query id="LOAD_SYSTEM_ITEMS" type="HQL">
39    <sql>
40      SELECT item.id, item.systemId
41      FROM net.sf.basedb.core.data.SystemData item
42      WHERE NOT item.systemId IS NULL
43    </sql>
44    <description>
45      Load the ID and systemID, in that order, of all SystemData
46      items.
47    </description>
48  </query>
49
50  <query id="LOAD_ROLE_KEY_IDS" type="HQL">
51    <sql>
52      SELECT rk.id, rk.itemType
53      FROM RoleKeyData rk
54    </sql>
55    <description>
56      Load the ID and itemType, in that order, of all RoleKeyData
57      items.
58    </description>
59  </query>
60
61  <query id="GET_USER_FOR_LOGIN" type="HQL">
62    <sql>
63      SELECT usr
64      FROM UserData usr
65      WHERE usr.login = :login
66    </sql>
67    <description>
68      Load a user when you know the login.
69    </description>
70  </query>
71 
72  <query id="GET_USER_FOR_EXTERNAL_ID" type="HQL">
73    <sql>
74      SELECT usr
75      FROM UserData usr
76      WHERE usr.externalId = :externalId
77    </sql>
78    <description>
79      Load a user when you know the external id.
80    </description>
81  </query>
82
83  <query id="GET_CLIENT_FOR_EXTERNAL_ID" type="HQL">
84    <sql>
85      SELECT cli
86      FROM ClientData cli
87      WHERE cli.externalId = :externalId
88    </sql>
89    <description>
90      Load a client when you know the external ID.
91    </description>
92  </query>
93 
94  <query id="GET_ROLE_IDS_FOR_USER" type="HQL">
95    <sql>
96      SELECT ur.roleId
97      FROM UserRoles ur
98      WHERE ur.userId = :userId
99    </sql>
100    <description>
101      Load the ID of all roles where the given user is a member.
102    </description>
103  </query>
104
105  <query id="GET_GROUP_IDS_FOR_USER" type="HQL">
106    <sql>
107      SELECT ug.groupId
108      FROM UserGroups ug
109      WHERE ug.userId = :userId
110    </sql>
111    <description>
112      Load the ID of all groups where the given user is a direct member.
113    </description>
114  </query>
115 
116  <query id="GET_QUOTA_GROUP_ID_FOR_USER" type="HQL">
117    <sql>
118      SELECT usr.quotaGroup.id
119      FROM UserData usr
120      WHERE usr.id = :userId
121    </sql>
122    <description>
123      Load the ID of a user's quota group.
124    </description>
125  </query>
126
127  <query id="GET_PARENTGROUPS_IDS_FOR_GROUPS" type="HQL">
128    <sql>
129      SELECT DISTINCT gg.parentId
130      FROM GroupGroups gg
131      WHERE gg.childId IN (:groups)
132      AND gg.parentId NOT IN (:groups)
133    </sql>
134    <description>
135      Load the ID of all groups that are parents to at least one of
136      the given groups, excluding the given groups.
137    </description>
138  </query>
139 
140  <query id="GET_CHILDGROUPS_IDS_FOR_GROUPS" type="HQL">
141    <sql>
142      SELECT DISTINCT gg.childId
143      FROM GroupGroups gg
144      WHERE gg.parentId IN (:groups)
145      AND gg.childId NOT IN (:groups)
146    </sql>
147    <description>
148      Load the ID of all groups that are children to at least one of
149      the given groups, excluding the given groups.
150    </description>
151  </query>
152
153  <query id="GET_PROJECT_IDS_FOR_OWNER" type="HQL">
154    <sql>
155      SELECT p.id
156      FROM ProjectData p
157      WHERE p.owner = :userId
158    </sql>
159    <description>
160      Load the ID of all projects where the given user is the owner.
161    </description>
162  </query>
163
164  <query id="GET_PROJECTINFO_FOR_USER" type="HQL">
165    <sql>
166      SELECT up
167      FROM UserProjects up
168      WHERE up.userId = :userId
169    </sql>
170    <description>
171      Load the UserProjects of all projects where the given user is a member.
172    </description>
173  </query>
174
175  <query id="GET_PROJECTINFO_FOR_GROUPS" type="HQL">
176    <sql>
177      SELECT DISTINCT gp
178      FROM GroupProjects gp
179      WHERE gp.groupId IN (:groups)
180    </sql>
181    <description>
182      Load the GroupProjects of all projects where at least one of the given groups
183      is a member.
184    </description>
185  </query>
186
187  <query id="GET_USER_IDS_FOR_GROUPS" type="HQL">
188    <sql>
189      SELECT ug.userId
190      FROM UserGroups ug
191      WHERE ug.groupId IN (:groups)
192    </sql>
193    <description>
194      Load the ID of all users which is a member of at least one of the given groups.
195    </description>
196  </query>
197
198  <query id="GET_USER_IDS_FOR_QUOTAGROUPS" type="HQL">
199    <sql>
200      SELECT usr.id
201      FROM UserData usr
202      WHERE usr.quotaGroup.id IN (:groups)
203    </sql>
204    <description>
205      Load the ID of all users which has a quota group from one of the given groups.
206    </description>
207  </query>
208
209  <query id="GET_USER_IDS_FOR_PROJECT" type="HQL">
210    <sql>
211      SELECT up.userId
212      FROM UserProjects up
213      WHERE up.projectId = :projectId
214    </sql>
215    <description>
216      Load the ID of all users which are direct member of the given project
217    </description>
218  </query>
219
220  <query id="GET_GROUP_IDS_FOR_PROJECT" type="HQL">
221    <sql>
222      SELECT gp.groupId
223      FROM GroupProjects gp
224      WHERE gp.projectId = :projectId
225    </sql>
226    <description>
227      Load the ID of all groups which are direct member of the given project
228    </description>
229  </query>
230
231  <query id="GET_USERKEYS_FOR_USER" type="HQL">
232    <sql>
233      SELECT uk
234      FROM UserKeys uk
235      WHERE uk.userId = :userId
236    </sql>
237    <description>
238      Load the UserKeys for the given user.
239    </description>
240  </query>
241
242  <query id="GET_GROUPKEYS_FOR_GROUPS" type="HQL">
243    <sql>
244      SELECT gk
245      FROM GroupKeys gk
246      WHERE gk.groupId IN (:groups)
247    </sql>
248    <description>
249      Load the GroupKeys for the given groups.
250    </description>
251  </query>
252
253  <query id="GET_ROLEKEYS_FOR_USER" type="HQL">
254    <sql>
255      SELECT rk
256      FROM RoleKeys rk, UserRoles ur
257      WHERE rk.roleId = ur.roleId AND ur.userId = :userId
258      ORDER BY rk.keyId
259    </sql>
260    <description>
261      Load the RoleKeys for the roles where the given user is a member.
262    </description>
263  </query>
264
265  <query id="GET_PROJECTKEYS_FOR_PROJECT" type="HQL">
266    <sql>
267      SELECT pk
268      FROM ProjectKeys pk
269      WHERE pk.projectId = :projectId
270      ORDER BY pk.keyId
271    </sql>
272    <description>
273      Load the ProjectKeys for the given project. Sort by
274      keyId for fast lookup in array (Keyring class).
275    </description>
276  </query>
277 
278  <query id="GET_PROJECTKEYIDS_FOR_PROJECT" type="HQL">
279    <sql>
280      SELECT pk.keyId
281      FROM ProjectKeys pk
282      WHERE pk.projectId = :projectId
283    </sql>
284    <description>
285      Load the ID of ProjectKeys for the given project.
286    </description>
287  </query>
288
289  <query id="GET_PERMISSION_FOR_USER_IN_PROJECT" type="HQL">
290    <sql>
291      SELECT up.permission
292      FROM UserProjects up
293      WHERE up.userId = :userId
294      AND up.projectId = :projectId
295    </sql>
296    <description>
297      Load the permission for the given user in the given project.
298    </description>
299  </query>
300
301  <query id="GET_PERMISSIONS_FOR_GROUPS_IN_PROJECT" type="HQL">
302    <sql>
303      SELECT gp.permission
304      FROM GroupProjects gp
305      WHERE gp.groupId IN (:groups)
306      AND gp.projectId = :projectId
307    </sql>
308    <description>
309      Load the permissions for the given groups in the given project.
310    </description>
311  </query>
312
313  <query id="GET_PROJECTKEY_IDS_FOR_COUNT" type="HQL">
314    <sql>
315      SELECT pk.keyId FROM ProjectKeys pk
316      GROUP BY pk.keyId
317      HAVING count(pk.projectId) = :numPermissions
318    </sql>
319    <description>
320      Load the ID of all project keys which have permissions for the
321      specified number of projects.
322    </description>
323  </query>
324
325  <query id="FIND_USED_PROJECTKEY_IDS" type="HQL">
326    <sql>
327      SELECT DISTINCT sd.projectKey.id
328      FROM net.sf.basedb.core.data.ShareableData sd
329      WHERE NOT sd.projectKey IS NULL
330    </sql>
331    <description>
332      Load the ID of all project keys which are used by at least one
333      shareable item.
334    </description>
335  </query>
336 
337  <query id="SELECT_UNUSED_PROJECTKEYS" type="HQL">
338    <sql>
339      SELECT pk FROM ProjectKeyData pk
340      WHERE pk.id NOT IN (:used)
341    </sql>
342    <description>
343      Load all unused project keys given a list of the ID:s of all used
344      keys.
345    </description>
346  </query>
347
348  <query id="GET_ITEMKEY_IDS_FOR_USERCOUNT" type="HQL">
349    <sql>
350      SELECT ik.id FROM ItemKeyData ik
351      LEFT JOIN ik.users u
352      GROUP BY ik.id
353      HAVING COUNT(u.index) = :numPermissions
354    </sql>
355    <description>
356      Load the ID of all item keys which have permissions for the
357      specified number of users.
358    </description>
359  </query>
360
361  <query id="GET_ITEMKEY_IDS_FOR_GROUPCOUNT" type="HQL">
362    <sql>
363      SELECT ik.id FROM ItemKeyData ik
364      LEFT JOIN ik.groups g
365      WHERE ik.id IN (:candidates)
366      GROUP BY ik.id
367      HAVING count(g.index) = :numPermissions
368    </sql>
369    <description>
370      Load the ID of all item keys which have permissions for the
371      specified number of groups and are among the list of candidates.
372    </description>
373  </query>
374 
375  <query id="FIND_USED_ITEMKEY_IDS" type="HQL">
376    <sql>
377      SELECT DISTINCT sd.itemKey.id
378      FROM net.sf.basedb.core.data.ShareableData sd
379      WHERE NOT sd.itemKey IS NULL
380    </sql>
381    <description>
382      Load the ID of all item keys which are used by at least one
383      shareable item.
384    </description>
385  </query>
386 
387  <query id="SELECT_UNUSED_ITEMKEYS" type="HQL">
388    <sql>
389      SELECT ik FROM ItemKeyData ik
390      WHERE ik.id NOT IN (:used)
391    </sql>
392    <description>
393      Load all unused item keys given a list of the ID:s of all used
394      keys.
395    </description>
396  </query>
397
398  <query id="GET_USERS_FOR_QUOTAGROUP" type="HQL">
399    <sql>
400      SELECT {1}
401      FROM UserData usr
402      WHERE usr.quotaGroup = :theGroup
403    </sql>
404    <description>
405      Get users having the specified group as
406      their quota group.
407    </description>
408  </query>
409 
410  <query id="GET_USERS_FOR_QUOTA" type="HQL">
411    <sql>
412      SELECT {1}
413      FROM UserData u
414      WHERE u.quota = :quota
415    </sql>
416    <description>
417      A Hibernate query that gets users
418      that has been assigned a given quota.
419    </description>
420  </query>
421 
422  <query id="GET_GROUPS_FOR_QUOTA" type="HQL">
423    <sql>
424      SELECT {1}
425      FROM GroupData g
426      WHERE g.quota = :quota
427    </sql>
428    <description>
429      A Hibernate query that gets groups
430      that has been assigned a given quota.
431    </description>
432  </query>
433
434  <query id="GET_SHAREABLE_ITEMS_FOR_ITEMKEY" type="HQL">
435    <sql>
436      SELECT s
437      FROM net.sf.basedb.core.data.ShareableData s
438      WHERE s.itemKey = :itemKey
439    </sql>
440    <description>
441      Get all items beeing shared to the specified item key.
442    </description>
443  </query>
444
445  <query id="GET_SHAREABLE_ITEMS_FOR_PROJECTKEY" type="HQL">
446    <sql>
447      SELECT s
448      FROM net.sf.basedb.core.data.ShareableData s
449      WHERE s.projectKey = :projectKey
450    </sql>
451    <description>
452      Get all items beeing shared to the specified project key.
453    </description>
454  </query>
455 
456  <query id="GET_SHARED_ITEMS" type="HQL">
457    <sql>
458      SELECT s
459      FROM net.sf.basedb.core.data.ShareableData s
460    </sql>
461    <description>
462      Get all shared items.
463    </description>
464  </query>
465
466  <query id="GET_OWNABLE_ITEMS_FOR_USER" type="HQL">
467    <sql>
468      SELECT o
469      FROM net.sf.basedb.core.data.OwnableData o
470      WHERE o.owner = :user
471    </sql>
472    <description>
473      Get all items that are owned by the specified user.
474    </description>
475  </query>
476 
477  <query id="GET_DISKCONSUMABLE_ITEMS_FOR_USER" type="HQL">
478    <sql>
479      SELECT o
480      FROM net.sf.basedb.core.data.DiskConsumableData o
481      WHERE o.owner = :user
482    </sql>
483    <description>
484      Get all diskconsumable items that are owned by the specified user.
485    </description>
486  </query>
487
488 
489  <query id="LOAD_USER_CLIENT_SETTINGS" type="HQL">
490    <sql>
491      SELECT s
492      FROM UserClientSettingData s
493      WHERE s.user = :user AND s.client = :client
494    </sql>
495    <description>
496      Load all settings for the specified user and client application.
497    </description>
498  </query>
499 
500  <query id="LOAD_USER_DEFAULT_SETTINGS" type="HQL">
501    <sql>
502      SELECT s
503      FROM UserDefaultSettingData s
504      WHERE s.user = :user
505    </sql>
506    <description>
507      Load all default settings for the specified user.
508    </description>
509  </query>
510
511  <query id="LOAD_CLIENT_DEFAULT_SETTINGS" type="HQL">
512    <sql>
513      SELECT s
514      FROM ClientDefaultSettingData s
515      WHERE s.client = :client
516    </sql>
517    <description>
518      Load all default settings for the specified client application.
519    </description>
520  </query>
521 
522  <query id="GET_MIME_TYPE_FROM_EXTENSION" type="HQL">
523    <sql>
524      SELECT s
525      FROM net.sf.basedb.core.data.MimeTypeData s
526      WHERE s.extension = :extension
527    </sql>
528    <description>
529      A Hibernate query that returns a MimeType given an extension.
530    </description>
531  </query>
532 
533  <query id="GET_TOTAL_DISKUSAGE_FOR_USER" type="HQL">
534    <sql>
535      SELECT sum(du.bytes)
536      FROM DiskUsageData du
537      WHERE du.user = :user
538      AND du.location = :location
539    </sql>
540    <description>
541      A Hibernate query that returns the total used quota
542      for the specified user at the specified location.
543    </description>
544  </query>
545 
546  <query id="GET_SPECIFIC_DISKUSAGE_FOR_USER" type="HQL">
547    <sql>
548      SELECT sum(du.bytes)
549      FROM DiskUsageData du
550      WHERE du.user = :user
551      AND du.location = :location
552      AND du.quotaType = :quotaType
553    </sql>
554    <description>
555      A Hibernate query that returns the used quota for the
556      specific quota type for the specified user at the
557      specified location.
558    </description>
559  </query>
560
561  <query id="GET_TOTAL_DISKUSAGE_FOR_GROUP" type="HQL">
562    <sql>
563      SELECT sum(du.bytes)
564      FROM DiskUsageData du
565      WHERE du.group = :group
566      AND du.location = :location
567    </sql>
568    <description>
569      A Hibernate query that returns the total used quota
570      for the specified group at the specified location.
571    </description>
572  </query>
573
574  <query id="GET_SPECIFIC_DISKUSAGE_FOR_GROUP" type="HQL">
575    <sql>
576      SELECT sum(du.bytes)
577      FROM DiskUsageData du
578      WHERE du.group = :group
579      AND du.location = :location
580      AND du.quotaType = :quotaType
581    </sql>
582    <description>
583      A Hibernate query that returns the used quota for the
584      specific quota type for the specified group at the
585      specified location.
586    </description>
587  </query>
588
589  <query id="GET_TOTAL_DISKUSAGE_SUMMARY" type="HQL">
590    <sql>
591      SELECT SUM(du.bytes), du.location, du.quotaType.systemId
592      FROM DiskUsageData du
593      GROUP BY du.location, du.quotaType.systemId
594    </sql>
595    <description>
596      A Hibernate query that returns the total disk usage grouped
597      by location and quota type system id.
598    </description>
599  </query>
600
601  <query id="GET_DISKUSAGE_SUMMARY_FOR_USER" type="HQL">
602    <sql>
603      SELECT SUM(du.bytes), du.location, du.quotaType.systemId
604      FROM DiskUsageData du
605      WHERE du.user = :user
606      GROUP BY du.location, du.quotaType.systemId
607    </sql>
608    <description>
609      A Hibernate query that returns the disk usage for a user grouped
610      by location and quota type system id.
611    </description>
612  </query>
613
614  <query id="GET_DISKUSAGE_SUMMARY_FOR_GROUP" type="HQL">
615    <sql>
616      SELECT SUM(du.bytes), du.location, du.quotaType.systemId
617      FROM DiskUsageData du
618      WHERE du.group = :group
619      GROUP BY du.location, du.quotaType.systemId
620    </sql>
621    <description>
622      A Hibernate query that returns the disk usage for a group grouped
623      by location and quota type system id.
624    </description>
625  </query>
626 
627  <query id="GET_FILES_IN_DIRECTORY" type="HQL">
628    <sql>
629      SELECT {1}
630      FROM FileData f
631      WHERE f.directory = :directory
632    </sql>
633    <description>
634      A Hibernate query that gets the files
635      in a given directory.
636    </description>
637  </query>
638 
639  <query id="GET_FILES_FOR_FILETYPE" type="HQL">
640    <sql>
641      SELECT {1}
642      FROM FileData f
643      WHERE f.fileType = :filetype
644    </sql>
645    <description>
646      A Hibernate query that gets the files
647      with a given filetype.
648    </description>
649  </query>
650
651  <query id="GET_SUBDIRECTORIES_IN_DIRECTORY" type="HQL">
652    <sql>
653      SELECT {1}
654      FROM DirectoryData d
655      WHERE d.parent = :directory
656    </sql>
657    <description>
658      A Hibernate query that gets the subdirectories
659      in a given directory.
660    </description>
661  </query>
662 
663  <query id="GET_HOME_DIRECTORIES" type="HQL">
664    <sql>
665      SELECT {1}
666      FROM UserData usr
667      WHERE usr.homeDirectory = :directory
668    </sql>
669    <description>
670      A Hibernate query that gets the users having
671      the specified directory as home directory.
672    </description>
673  </query>
674 
675  <query id="GET_EXPERIMENT_DIRECTORIES" type="HQL">
676    <sql>
677      SELECT {1}
678      FROM ExperimentData xpr
679      WHERE xpr.directory = :directory
680    </sql>
681    <description>
682      A Hibernate query that gets the experiments having
683      the specified directory as the plugin directory.
684    </description>
685  </query>
686
687  <query id="GET_SUBDIRECTORIES" type="HQL">
688    <sql>
689      SELECT dir
690      FROM DirectoryData dir
691      WHERE dir.parent = :parent
692    </sql>
693    <description>
694      A Hibernate query that returns all subdirectories in a directory.
695    </description>
696  </query>
697 
698  <query id="GET_SUBDIRECTORY_WITH_NAME" type="HQL">
699    <sql>
700      SELECT dir
701      FROM DirectoryData dir
702      WHERE dir.name = :name
703      AND dir.parent = :parent
704    </sql>
705    <description>
706      A Hibernate query that returns the a subdirectory with the
707      specified name in a given directory.
708    </description>
709  </query>
710
711  <query id="GET_FILE_TYPE_WITH_NAME" type="HQL">
712    <sql>
713      SELECT ft
714      FROM FileTypeData ft
715      WHERE ft.name = :name
716    </sql>
717    <description>
718      A Hibernate query that returns the file type with the specified
719      name.
720    </description>
721  </query>
722 
723  <query id="GET_QUOTA_TYPE_WITH_NAME" type="HQL">
724    <sql>
725      SELECT qt
726      FROM QuotaTypeData qt
727      WHERE qt.name = :name
728    </sql>
729    <description>
730      A Hibernate query that returns the quota type with the specified
731      name.
732    </description>
733  </query>
734 
735  <query id="GET_QUOTA_WITH_NAME" type="HQL">
736    <sql>
737      SELECT q
738      FROM QuotaData q
739      WHERE q.name = :name
740    </sql>
741    <description>
742      A Hibernate query that returns the quota with the specified
743      name.
744    </description>
745  </query>
746 
747  <query id="GET_GROUP_WITH_NAME" type="HQL">
748    <sql>
749      SELECT grp
750      FROM GroupData grp
751      WHERE grp.name = :name
752    </sql>
753    <description>
754      A Hibernate query that returns the group with the specified
755      name.
756    </description>
757  </query>
758 
759  <query id="GET_ROLE_WITH_NAME" type="HQL">
760    <sql>
761      SELECT rle
762      FROM RoleData rle
763      WHERE rle.name = :name
764    </sql>
765    <description>
766      A Hibernate query that returns the role with the specified
767      name.
768    </description>
769  </query>
770 
771  <query id="GET_PROTOCOL_TYPE_WITH_NAME" type="HQL">
772    <sql>
773      SELECT pt
774      FROM ProtocolTypeData pt
775      WHERE pt.name = :name
776    </sql>
777    <description>
778      A Hibernate query that returns the protocol type with the specified
779      name.
780    </description>
781  </query>
782 
783  <query id="GET_SOFTWARE_TYPE_WITH_NAME" type="HQL">
784    <sql>
785      SELECT st
786      FROM SoftwareTypeData st
787      WHERE st.name = :name
788    </sql>
789    <description>
790      A Hibernate query that returns the software type with the specified
791      name.
792    </description>
793  </query>
794 
795  <query id="GET_SOFTWARE_WITH_NAME" type="HQL">
796    <sql>
797      SELECT sw
798      FROM SoftwareData sw
799      WHERE sw.name = :name
800    </sql>
801    <description>
802      A Hibernate query that returns the software with the specified
803      name.
804    </description>
805  </query>
806 
807  <query id="GET_HARDWARE_TYPE_WITH_NAME" type="HQL">
808    <sql>
809      SELECT ht
810      FROM HardwareTypeData ht
811      WHERE ht.name = :name
812    </sql>
813    <description>
814      A Hibernate query that returns the hardware type with the specified
815      name.
816    </description>
817  </query>
818 
819  <query id="GET_HARDWARE_WITH_NAME" type="HQL">
820    <sql>
821      SELECT hw
822      FROM HardwareData hw
823      WHERE hw.name = :name
824    </sql>
825    <description>
826      A Hibernate query that returns the hardware with the specified
827      name.
828    </description>
829  </query>
830 
831  <query id="GET_PLATE_GEOMETRY_WITH_NAME" type="HQL">
832    <sql>
833      SELECT pg
834      FROM PlateGeometryData pg
835      WHERE pg.name = :name
836    </sql>
837    <description>
838      A Hibernate query that returns the plate geometry with the specified
839      name.
840    </description>
841  </query>
842
843  <query id="GET_PLATE_MAPPING_WITH_NAME" type="HQL">
844    <sql>
845      SELECT pm
846      FROM PlateMappingData pm
847      WHERE pm.name = :name
848    </sql>
849    <description>
850      A Hibernate query that returns the plate mapping with the specified
851      name.
852    </description>
853  </query>
854 
855  <query id="GET_LABEL_WITH_NAME" type="HQL">
856    <sql>
857      SELECT lbl
858      FROM LabelData lbl
859      WHERE lbl.name = :name
860    </sql>
861    <description>
862      A Hibernate query that returns the label with the specified
863      name.
864    </description>
865  </query>
866 
867  <query id="GET_ANNOTATION_TYPE_WITH_NAME" type="HQL">
868    <sql>
869      SELECT at
870      FROM AnnotationTypeData at
871      WHERE at.name = :name
872    </sql>
873    <description>
874      A Hibernate query that returns the annotation type with the specified
875      name.
876    </description>
877  </query>
878 
879  <query id="GET_NEWS_WITH_NAME" type="HQL">
880    <sql>
881      SELECT nws
882      FROM NewsData nws
883      WHERE nws.name = :name
884    </sql>
885    <description>
886      A Hibernate query that returns the news with the specified
887      name.
888    </description>
889  </query>
890
891  <query id="GET_FILE_IN_DIRECTORY" type="HQL">
892    <sql>
893      SELECT f
894      FROM FileData f
895      WHERE f.directory = :directory
896      AND f.name = :name
897    </sql>
898    <description>
899      A Hibernate query that returns the file with the specified
900      name in a given directory.
901    </description>
902  </query>
903
904  <query id="GET_PROTOCOLS_FOR_PROTOCOLTYPE" type="HQL">
905    <sql>
906      SELECT {1}
907      FROM ProtocolData p
908      WHERE p.protocolType = :protocolType
909    </sql>
910    <description>
911      Get the protocols the uses a protocol type.
912    </description>
913  </query>
914
915  <query id="GET_PLATEEVENTTYPES_FOR_PROTOCOLTYPE" type="HQL">
916    <sql>
917      SELECT {1}
918      FROM PlateEventTypeData pet
919      WHERE pet.protocolType = :protocolType
920    </sql>
921    <description>
922      Get the plate events types that uses a protocol type.
923    </description>
924  </query>
925 
926  <query id="GET_BIOMATERIALEVENTS_FOR_PROTOCOL" type="HQL">
927    <sql>
928      SELECT {1}
929      FROM BioMaterialEventData bme
930      WHERE bme.protocol = :protocol
931    </sql>
932    <description>
933      A Hibernate query that gets biomaterial
934      events using a protocol.
935    </description>
936  </query>
937
938  <query id="GET_PLATEEVENTS_FOR_PROTOCOL" type="HQL">
939    <sql>
940      SELECT {1}
941      FROM PlateEventData pe
942      WHERE pe.protocol = :protocol
943    </sql>
944    <description>
945      A Hibernate query thatgets plate events
946      using a protocol.
947    </description>
948  </query>
949
950  <query id="GET_ARRAYBATCHES_FOR_PROTOCOL" type="HQL">
951    <sql>
952      SELECT {1}
953      FROM ArrayBatchData ab
954      WHERE ab.protocol = :protocol
955    </sql>
956    <description>
957      A Hibernate query that gets array batches
958      using a protocol.
959    </description>
960  </query>
961
962  <query id="GET_SCANS_FOR_PROTOCOL" type="HQL">
963    <sql>
964      SELECT {1}
965      FROM ScanData sc
966      WHERE sc.protocol = :protocol
967    </sql>
968    <description>
969      A Hibernate query that gets scans
970      using a protocol.
971    </description>
972  </query>
973
974  <query id="GET_RAWBIOASSAYS_FOR_PROTOCOL" type="HQL">
975    <sql>
976      SELECT {1}
977      FROM RawBioAssayData rba
978      WHERE rba.protocol = :protocol
979    </sql>
980    <description>
981      A Hibernate query that gets raw bioassays
982      using a protocol.
983    </description>
984  </query>
985
986  <query id="FIND_USED_FILES" type="HQL">
987    <sql>
988      SELECT fad
989      FROM net.sf.basedb.core.data.FileAttachableData fad
990      WHERE fad.file = :file
991    </sql>
992    <description>
993      Load the files that is used by any FileAttachableData.
994    </description>
995  </query>
996
997  <query id="GET_SPOTIMAGES_FOR_FILE" type="HQL">
998    <sql>
999      SELECT {1}
1000      FROM SpotImagesData spi
1001      WHERE spi.redImageFile = :file
1002      OR spi.greenImageFile = :file
1003      OR spi.blueImageFile = :file
1004      OR spi.spotImagesFile = :file
1005    </sql>
1006    <description>
1007      A Hibernate query that gets spot images where a given
1008      file is used as one of the color components or holds the generated spot images.
1009    </description>
1010  </query>
1011 
1012  <query id="GET_FILESETMEMBERS_FOR_FILE" type="HQL">
1013    <sql>
1014      SELECT {1}
1015      FROM FileSetMemberData fsm
1016      WHERE fsm.file = :file
1017    </sql>
1018    <description>
1019      A Hibernate query that gets file set membership
1020      for a given file
1021    </description>
1022  </query>
1023 
1024  <query id="GET_HARDWARE_FOR_TYPE" type="HQL">
1025    <sql>
1026      SELECT {1}
1027      FROM HardwareData hw
1028      WHERE hw.hardwareType = :hardwaretype
1029    </sql>
1030    <description>
1031      A Hibernate query that gets hardware items
1032      of the given hardware type.
1033    </description>
1034  </query>
1035
1036  <query id="GET_SCANS_FOR_SCANNER" type="HQL">
1037    <sql>
1038      SELECT {1}
1039      FROM ScanData scn
1040      WHERE scn.scanner = :scanner
1041    </sql>
1042    <description>
1043      A Hibernate query that gets scans which
1044      uses a given scanner (hardware).
1045    </description>
1046  </query>
1047 
1048  <query id="GET_ARRAYBATCHES_FOR_PRINTROBOT" type="HQL">
1049    <sql>
1050      SELECT {1}
1051      FROM ArrayBatchData ab
1052      WHERE ab.printRobot = :printrobot
1053    </sql>
1054    <description>
1055      A Hibernate query that gets array batches which
1056      uses a given print robot (hardware).
1057    </description>
1058  </query>
1059 
1060  <query id="GET_BIOMATERIALEVENTS_FOR_HARDWARE" type="HQL">
1061    <sql>
1062      SELECT {1}
1063      FROM BioMaterialEventData bme
1064      WHERE bme.hardware = :hardware
1065    </sql>
1066    <description>
1067      A Hibernate query that gets biomaterial events which
1068      uses a given hardware.
1069    </description>
1070  </query>
1071 
1072  <query id="GET_PLATEEVENTS_FOR_HARDWARE" type="HQL">
1073    <sql>
1074      SELECT {1}
1075      FROM PlateEventData ple
1076      WHERE ple.hardware = :hardware
1077    </sql>
1078    <description>
1079      A Hibernate query that gets plates events which
1080      uses a given hardware.
1081    </description>
1082  </query>
1083
1084  <query id="GET_REPORTERS_FOR_REPORTERTYPE" type="HQL">
1085    <sql>
1086      SELECT {1}
1087      FROM ReporterData rpt
1088      WHERE rpt.reporterType = :reporterType
1089    </sql>
1090    <description>
1091      A Hibernate query that gets reporter items
1092      of the given reporter type.
1093    </description>
1094  </query>
1095
1096  <query id="GET_REPORTER_FOR_EXTERNAL_ID" type="HQL">
1097    <sql>
1098      SELECT rpt
1099      FROM ReporterData rpt
1100      WHERE rpt.externalId = :externalId
1101    </sql>
1102    <description>
1103      A Hibernate query that finds the reporter with a given external id.
1104    </description>
1105  </query>
1106 
1107  <query id="GET_SOFTWARE_FOR_SOFTWARETYPE" type="HQL">
1108    <sql>
1109      SELECT {1}
1110      FROM SoftwareData sw
1111      WHERE sw.softwareType = :softwaretype
1112    </sql>
1113    <description>
1114      A Hibernate query that gets software items
1115      of the given software type.
1116    </description>
1117  </query>
1118
1119  <query id="GET_RAWBIOASSAYS_FOR_SOFTWARE" type="HQL">
1120    <sql>
1121      SELECT {1}
1122      FROM RawBioAssayData rba
1123      WHERE rba.software = :software
1124    </sql>
1125    <description>
1126      A Hibernate query that gets the raw bioassays
1127      produced from a given software.
1128    </description>
1129  </query>
1130
1131  <query id="GET_ANNOTATIONS_FOR_ANNOTATIONTYPE" type="HQL">
1132    <sql>
1133      SELECT {1}
1134      FROM AnnotationData a
1135      WHERE a.annotationType = :annotationType
1136    </sql>
1137    <description>
1138      A Hibernate query that gets annotations
1139      of the given annotation type.
1140    </description>
1141  </query>
1142 
1143  <query id="GET_EXPERIMENTS_FOR_ANNOTATIONTYPE" type="HQL">
1144    <sql>
1145      SELECT {1}
1146      FROM ExperimentData exp
1147      JOIN exp.experimentalFactors ef
1148      WHERE ef = :annotationType
1149    </sql>
1150    <description>
1151      A Hibernate query that gets experiments
1152      where the given annotation type is used as an experimental factor.
1153    </description>
1154  </query>
1155 
1156  <query id="GET_PROTOCOLS_FOR_ANNOTATIONTYPE" type="HQL">
1157    <sql>
1158      SELECT {1}
1159      FROM ProtocolData prt
1160      JOIN prt.parameters pp
1161      WHERE pp = :annotationType
1162    </sql>
1163    <description>
1164      A Hibernate query that gets protocols
1165      where the given annotation type is used as a protocol parameter.
1166    </description>
1167  </query>
1168
1169  <query id="GET_SAMPLES_FOR_BIOSOURCE" type="HQL">
1170    <sql>
1171      SELECT {1}
1172      FROM SampleData s
1173      WHERE s.parent = :biosource
1174    </sql>
1175    <description>
1176      A Hibernate query that gets samples
1177      created from a given biosource.
1178    </description>
1179  </query>
1180
1181  <query id="GET_EXTRACTS_FOR_SAMPLE" type="HQL">
1182    <sql>
1183      SELECT {1}
1184      FROM ExtractData e
1185      WHERE e.parent = :sample
1186    </sql>
1187    <description>
1188      A Hibernate query that gets extracts
1189      created from a given sample.
1190    </description>
1191  </query>
1192 
1193  <query id="GET_LABELED_EXTRACTS_FOR_EXTRACT" type="HQL">
1194    <sql>
1195      SELECT {1}
1196      FROM LabeledExtractData le
1197      WHERE le.parent = :extract
1198    </sql>
1199    <description>
1200      A Hibernate query that gets labeled extracts
1201      created from a given extract.
1202    </description>
1203  </query>
1204
1205  <query id="GET_LABELED_EXTRACTS_FOR_LABEL" type="HQL">
1206    <sql>
1207      SELECT {1}
1208      FROM LabeledExtractData le
1209      WHERE le.label = :label
1210    </sql>
1211    <description>
1212      A Hibernate query that gets labeled extracts
1213      with a given label.
1214    </description>
1215  </query>
1216
1217  <query id="GET_SOURCEEVENTS_FOR_BIOMATERIAL" type="HQL">
1218    <sql>
1219      SELECT {1}
1220      FROM BioMaterialEventData bme
1221      JOIN bme.sources src
1222      WHERE index(src) = :bioMaterial
1223    </sql>
1224    <description>
1225      A Hibernate query that gets the events where a given
1226      biomaterial has been part of as a source biomaterial, ie. the number
1227      of pooled biomaterials that have been created from it.
1228    </description>
1229  </query>
1230
1231  <query id="GET_CREATION_EVENT_FOR_BIOMATERIAL" type="HQL">
1232    <sql>
1233      SELECT evt
1234      FROM BioMaterialEventData evt
1235      WHERE evt.bioMaterial = :bioMaterial
1236      AND evt.eventType = 1
1237    </sql>
1238    <description>
1239      A Hibernate query that returns the creation event for
1240      a biomaterial.
1241    </description>
1242  </query>
1243 
1244  <query id="COUNT_UNREAD_MESSAGES_FOR_USER" type="HQL">
1245    <sql>
1246      SELECT count(*)
1247      FROM MessageData msg
1248      WHERE msg.to = :user AND msg.read = false AND msg.removed = false
1249    </sql>
1250    <description>
1251      A Hibernate query that counts the number of
1252      unread messages for a given user
1253    </description>
1254  </query>
1255 
1256  <query id="GET_PLATETYPES_FOR_PLATEGEOMETRY" type="HQL">
1257    <sql>
1258      SELECT {1}
1259      FROM PlateTypeData pt
1260      WHERE pt.plateGeometry = :plateGeometry
1261    </sql>
1262    <description>
1263      A Hibernate query that gets the
1264      plate types using a given plate geometry
1265    </description>
1266  </query>
1267 
1268  <query id="GET_PLATEMAPPINGS_FOR_PLATEGEOMETRY" type="HQL">
1269    <sql>
1270      SELECT {1}
1271      FROM PlateMappingData pm
1272      WHERE pm.sourceGeometry = :plateGeometry
1273      OR pm.destinationGeometry = :plateGeometry
1274    </sql>
1275    <description>
1276      A Hibernate query that gets the
1277      plate mappings using a given plate geometry as source or destination
1278    </description>
1279  </query>
1280
1281  <query id="GET_PLATES_FOR_PLATETYPE" type="HQL">
1282    <sql>
1283      SELECT {1}
1284      FROM PlateData p
1285      WHERE p.plateType = :plateType
1286    </sql>
1287    <description>
1288      A Hibernate query that gets
1289      plates of a specific plate type.
1290    </description>
1291  </query>
1292
1293  <query id="GET_PLATEEVENTS_FOR_PLATEEVENTTYPE" type="HQL">
1294    <sql>
1295      SELECT {1}
1296      FROM PlateEventData pe
1297      WHERE pe.plateEventType = :plateEventType
1298    </sql>
1299    <description>
1300      A Hibernate query that gets
1301      plate events of the given plate event type.
1302    </description>
1303  </query>
1304
1305  <query id="GET_CHILDPLATES_FOR_PLATE" type="HQL">
1306    <sql>
1307      SELECT {1}
1308      FROM PlateData p
1309      JOIN p.parents pp
1310      WHERE pp = :plate
1311    </sql>
1312    <description>
1313      A Hibernate query that gets the
1314      child plates for a given plate.
1315    </description>
1316  </query>
1317
1318  <query id="GET_ARRAYDESIGNS_FOR_PLATE" type="HQL">
1319    <sql>
1320      SELECT {1}
1321      FROM ArrayDesignData ad
1322      JOIN ad.plates p
1323      WHERE p = :plate
1324    </sql>
1325    <description>
1326      A Hibernate query that gets the
1327      array designs that has used a given plate.
1328    </description>
1329  </query>
1330
1331  <query id="GET_PLATES_FOR_PLATEMAPPING" type="HQL">
1332    <sql>
1333      SELECT {1}
1334      FROM PlateData p
1335      WHERE p.plateMapping = :plateMapping
1336    </sql>
1337    <description>
1338      A Hibernate query that gets the
1339      plates that has been created from a given plate mapping.
1340    </description>
1341  </query>
1342 
1343  <query id="GET_FEATURES_FOR_WELL" type="HQL">
1344    <sql>
1345      SELECT {1}
1346      FROM FeatureData f
1347      WHERE f.well = :well
1348    </sql>
1349    <description>
1350      A Hibernate query that gets the
1351      features using a given well.
1352    </description>
1353  </query>
1354
1355  <query id="COUNT_FEATURES_FOR_ARRAYDESIGN" type="HQL">
1356    <sql>
1357      SELECT count(*)
1358      FROM FeatureData f
1359      WHERE f.arrayDesignBlock.arrayDesign = :arrayDesign
1360    </sql>
1361    <description>
1362      A Hibernate query that counts the number of
1363      features on a given array design
1364    </description>
1365  </query>
1366
1367
1368  <query id="GET_CHILDWELLS_FOR_WELL" type="HQL">
1369    <sql>
1370      SELECT {1}
1371      FROM Well w
1372      WHERE w.parent = :well
1373    </sql>
1374    <description>
1375      A Hibernate query that gets the
1376      child wells of a given well.
1377    </description>
1378  </query>
1379
1380  <query id="GET_PLUGINCONFIGURATIONS_FOR_PLUGINDEFINITION" type="HQL">
1381    <sql>
1382      SELECT {1}
1383      FROM PluginConfigurationData pc
1384      WHERE pc.pluginDefinition = :pluginDefinition
1385    </sql>
1386    <description>
1387      A Hibernate query that gets plugin configurations
1388      using a plugin definition.
1389    </description>
1390  </query>
1391 
1392  <query id="GET_JOBS_FOR_PLUGINCONFIGURATION" type="HQL">
1393    <sql>
1394      SELECT {1}
1395      FROM JobData j
1396      WHERE j.pluginConfiguration = :pluginConfiguration
1397    </sql>
1398    <description>
1399      A Hibernate query that gets the jobs
1400      using a specific plugin configuration.
1401    </description>
1402  </query>
1403 
1404  <query id="GET_JOBS_FOR_PLUGINDEFINITION" type="HQL">
1405    <sql>
1406      SELECT {1}
1407      FROM JobData j
1408      WHERE j.pluginDefinition = :pluginDefinition
1409    </sql>
1410    <description>
1411      A Hibernate query that gets the jobs
1412      using a specific plugin definition.
1413    </description>
1414  </query>
1415
1416  <query id="FIND_JOBS_IN_QUEUE" type="HQL">
1417    <sql>
1418      SELECT job
1419      FROM JobData job
1420      WHERE job.status = :status
1421      AND job.type = :type
1422      ORDER BY job.priority ASC, job.created ASC
1423    </sql>
1424    <description>
1425      A Hibernate query that loads plugin jobs in the job queue waiting to be
1426      executed sorted by priority and waiting type.
1427    </description>
1428  </query>
1429 
1430  <query id="FIND_INTERNAL_JOBS_IN_QUEUE" type="HQL">
1431    <sql>
1432      SELECT job
1433      FROM JobData job
1434      WHERE job.status = :status
1435      AND job.type = :type
1436      AND job.pluginDefinition.useInternalJobQueue = true
1437      ORDER BY job.priority ASC, job.created ASC
1438    </sql>
1439    <description>
1440      A Hibernate query that loads plugin jobs in the job queue waiting to be
1441      executed sorted by priority and waiting type. It should only return
1442      jobs where the plug-in setting useInternalJobQueue=true
1443    </description>
1444  </query>
1445 
1446  <query id="GET_ARRAYSLIDES_FOR_BATCH" type="HQL">
1447    <sql>
1448      SELECT {1}
1449      FROM ArraySlideData a
1450      WHERE a.arrayBatch = :arrayBatch
1451    </sql>
1452    <description>
1453      A Hibernate query that gets the array slides
1454      in an array batch.
1455    </description>
1456  </query>
1457
1458  <query id="GET_ARRAYBATCHES_FOR_ARRAYDESIGN" type="HQL">
1459    <sql>
1460      SELECT {1}
1461      FROM ArrayBatchData a
1462      WHERE a.arrayDesign = :arrayDesign
1463    </sql>
1464    <description>
1465      A Hibernate query that gets array batches
1466      that uses a specific array design.
1467    </description>
1468  </query>
1469
1470  <query id="GET_RAWBIOASSAYS_FOR_ARRAYDESIGN" type="HQL">
1471    <sql>
1472      SELECT {1}
1473      FROM RawBioAssayData rba
1474      WHERE rba.arrayDesign = :arrayDesign
1475    </sql>
1476    <description>
1477      A Hibernate query that gets raw bioassays
1478      that uses a specific array design.
1479    </description>
1480  </query>
1481
1482  <query id="GET_SCANS_FOR_HYBRIDIZATION" type="HQL">
1483    <sql>
1484      SELECT {1}
1485      FROM ScanData scn
1486      WHERE scn.hybridization = :hybridization
1487    </sql>
1488    <description>
1489      A Hibernate query that gets scans
1490      that uses a specific hybridization.
1491    </description>
1492  </query>
1493
1494  <query id="GET_RAWBIOASSAYS_FOR_SCAN" type="HQL">
1495    <sql>
1496      SELECT {1}
1497      FROM RawBioAssayData rba
1498      WHERE rba.scan = :scan
1499    </sql>
1500    <description>
1501      A Hibernate query that gets raw bioassays
1502      created from a specific scan.
1503    </description>
1504  </query>
1505
1506  <query id="GET_IMAGES_FOR_SCAN" type="HQL">
1507    <sql>
1508      SELECT {1}
1509      FROM ImageData img
1510      WHERE img.scan = :scan
1511    </sql>
1512    <description>
1513      A Hibernate query that gets images
1514      created from a specific scan.
1515    </description>
1516  </query>
1517
1518  <query id="GET_FEATURE_BY_ALL_COORDINATES" type="HQL">
1519    <sql>
1520      SELECT f
1521      FROM FeatureData f
1522      WHERE f.arrayDesignBlock.arrayDesign = :arrayDesign
1523      AND f.row = :row
1524      AND f.column = :column
1525      AND
1526      (
1527        (f.arrayDesignBlock.blockNumber = :block AND :block &lt;&gt; 0)
1528        OR
1529        (:block = 0 AND f.arrayDesignBlock.metaGridX = :metaGridX
1530        AND f.arrayDesignBlock.metaGridY = :metaGridY)
1531      )
1532    </sql>
1533    <description>
1534      A Hibernate query that finds a feature on a given array design
1535      with specified block and coordinates.
1536    </description>
1537  </query>
1538 
1539  <query id="PRELOAD_FEATURES" type="HQL">
1540    <sql>
1541      SELECT f
1542      FROM FeatureData f
1543      JOIN FETCH f.arrayDesignBlock b
1544      LEFT JOIN FETCH f.reporter
1545      WHERE b.arrayDesign = :arrayDesign
1546    </sql>
1547    <description>
1548      A Hibernate query that loads features, blocks and reporters
1549      for a single array design.
1550    </description>
1551  </query>
1552 
1553  <query id="DELETE_FEATURES_FOR_ARRAYDESIGN" type="HQL">
1554    <sql>
1555      DELETE FROM Features f, ArrayDesignBlocks adb
1556      WHERE adb.id = f.arraydesignblock_id AND adb.arraydesign_id = ?
1557    </sql>
1558    <description>
1559      A Hibernate query that deletes all features for an array design.
1560    </description>
1561  </query>
1562
1563  <query id="GET_PLUGINTYPE_FOR_INTERFACENAME" type="HQL">
1564    <sql>
1565      SELECT plt
1566      FROM PluginTypeData plt
1567      WHERE plt.interfaceName = :interfaceName
1568    </sql>
1569    <description>
1570      Load a plugin type when you know the interface name.
1571    </description>
1572  </query>
1573
1574  <query id="GET_PLUGINDEFINITION_FOR_CLASSNAME" type="HQL">
1575    <sql>
1576      SELECT pd
1577      FROM PluginDefinitionData pd
1578      WHERE pd.className = :className
1579    </sql>
1580    <description>
1581      Load a plugin definition when you know the class name.
1582    </description>
1583  </query>
1584
1585  <query id="GET_PLUGINCONFIGURATION_FOR_PLUGIN_WITH_NAME" type="HQL">
1586    <sql>
1587      SELECT pc
1588      FROM PluginConfigurationData pc
1589      WHERE pc.pluginDefinition.className = :className
1590      AND pc.name = :name
1591    </sql>
1592    <description>
1593      Load a plugin configuration for a given plug-in and with a given name
1594    </description>
1595  </query>
1596
1597
1598  <query id="GET_EXPERIMENTS_FOR_RAWBIOASSAY" type="HQL">
1599    <sql>
1600      SELECT {1}
1601      FROM ExperimentData xp
1602      JOIN xp.rawBioAssays rba
1603      WHERE rba = :rawBioAssay
1604    </sql>
1605    <description>
1606      A Hibernate query that gets the experiments
1607      using a specific raw bioassay.
1608    </description>
1609  </query>
1610 
1611  <query id="GET_TRANSFORMATIONS_FOR_RAWBIOASSAY" type="HQL">
1612    <sql>
1613      SELECT {1}
1614      FROM TransformationData trf
1615      JOIN trf.rawSources rba
1616      WHERE rba = :rawBioAssay
1617    </sql>
1618    <description>
1619      A Hibernate query that gets the transformations
1620      using a specifiec raw bioassay.
1621    </description>
1622  </query>
1623 
1624  <query id="GET_TRANSFORMATIONS_FOR_JOB" type="HQL">
1625    <sql>
1626      SELECT {1}
1627      FROM TransformationData trf
1628      WHERE trf.job = :job
1629    </sql>
1630    <description>
1631      A Hibernate query that gets transformations
1632      linked to a job.
1633    </description>
1634  </query>
1635
1636  <query id="FIND_CHILD_BIOASSAYSETS" type="HQL">
1637    <sql>
1638      SELECT bas
1639      FROM BioAssaySetData bas
1640      WHERE bas.transformation.source = :parent
1641    </sql>
1642    <description>
1643      A Hibernate query that returns all bioassaysets that are
1644      children to a specified parent bioassayset.
1645    </description>
1646  </query>
1647 
1648  <query id="FIND_DATACUBES_FOR_BIOASSAYSETS" type="HQL">
1649    <sql>
1650      SELECT DISTINCT cbe
1651      FROM BioAssaySetData bas
1652      JOIN bas.dataCubeLayer.dataCube cbe
1653      WHERE bas IN (:basList)
1654    </sql>
1655    <description>
1656      A Hibernate query that returns all data cubes that are
1657      used by the specified list of bioassaysets
1658    </description>
1659  </query>
1660 
1661  <query id="FIND_DATACUBES_USED_BY_OTHERS" type="HQL">
1662    <sql>
1663      SELECT DISTINCT cbe
1664      FROM BioAssaySetData bas
1665      JOIN bas.dataCubeLayer.dataCube cbe
1666      WHERE bas NOT IN (:basList)
1667      AND cbe IN (:possibleCubes)
1668    </sql>
1669    <description>
1670      A Hibernate query that, given a list of data cubes and bioassaysets,
1671      returns all of those data cubes that are also used by other bioassaysets.
1672    </description>
1673  </query>
1674
1675  <query id="FIND_DATACUBELAYERS_FOR_BIOASSAYSETS" type="HQL">
1676    <sql>
1677      SELECT lay
1678      FROM BioAssaySetData bas
1679      JOIN bas.dataCubeLayer lay
1680      WHERE bas IN (:basList)
1681    </sql>
1682    <description>
1683      A Hibernate query that returns all data cube layers that are
1684      used by the specified list of bioassaysets
1685    </description>
1686  </query>
1687 
1688  <query id="FIND_DATACUBELAYERS_FOR_BIOASSAYSETS_IGNORE_DELETED_DATACUBES" type="HQL">
1689    <sql>
1690      SELECT lay
1691      FROM BioAssaySetData bas
1692      JOIN bas.dataCubeLayer lay
1693      WHERE bas IN (:basList)
1694      AND lay.dataCube NOT IN (:deletedCubes)
1695    </sql>
1696    <description>
1697      A Hibernate query that returns all data cube layers that are
1698      used by the specified list of bioassaysets but not are part of the
1699      list of already deleted data cubes.
1700    </description>
1701  </query>
1702
1703  <query id="FIND_DATACUBELAYERS_USED_BY_OTHERS" type="HQL">
1704    <sql>
1705      SELECT lay
1706      FROM BioAssaySetData bas
1707      JOIN bas.dataCubeLayer lay
1708      WHERE bas NOT IN (:basList)
1709      AND lay IN (:possibleLayers)
1710    </sql>
1711    <description>
1712      A Hibernate query that, given a list of data cube layers and bioassaysets,
1713      returns all of those data cube layers that are also used by other bioassaysets.
1714    </description>
1715  </query>
1716
1717  <query id="FIND_DATACUBEFILTERS_FOR_BIOASSAYSETS" type="HQL">
1718    <sql>
1719      SELECT flt
1720      FROM BioAssaySetData bas
1721      JOIN bas.dataCubeFilter flt
1722      WHERE bas IN (:basList)
1723    </sql>
1724    <description>
1725      A Hibernate query that returns all data cube filters that are
1726      used by the specified list of bioassaysets
1727    </description>
1728  </query>
1729 
1730  <query id="FIND_DATACUBEFILTERS_FOR_BIOASSAYSETS_IGNORE_DELETED_DATACUBES" type="HQL">
1731    <sql>
1732      SELECT flt
1733      FROM BioAssaySetData bas
1734      JOIN bas.dataCubeFilter flt
1735      WHERE bas IN (:basList)
1736      AND flt.dataCube NOT IN (:deletedCubes)
1737    </sql>
1738    <description>
1739      A Hibernate query that returns all data cube filters that are
1740      used by the specified list of bioassaysets but not are part of the
1741      list of already deleted data cubes.
1742    </description>
1743  </query>
1744
1745  <query id="FIND_DATACUBEFILTERS_USED_BY_OTHERS" type="HQL">
1746    <sql>
1747      SELECT flt
1748      FROM BioAssaySetData bas
1749      JOIN bas.dataCubeFilter flt
1750      WHERE bas NOT IN (:basList)
1751      AND flt IN (:possibleFilters)
1752    </sql>
1753    <description>
1754      A Hibernate query that, given a list of data cube filters and bioassaysets,
1755      returns all of those data cube filters that are also used by other bioassaysets.
1756    </description>
1757  </query>
1758
1759  <query id="FIND_DATACUBEEXTRAVALUES_FOR_BIOASSAYSETS" type="HQL">
1760    <sql>
1761      SELECT dcev
1762      FROM BioAssaySetData bas
1763      JOIN bas.extraValues ev
1764      JOIN ev.dataCubeExtraValue dcev
1765      WHERE bas IN (:basList)
1766    </sql>
1767    <description>
1768      A Hibernate query that returns all data cube extra values that are
1769      used by the specified list of bioassaysets
1770    </description>
1771  </query>
1772 
1773  <query id="FIND_DATACUBEEXTRAVALUES_FOR_BIOASSAYSETS_IGNORE_DELETED_DATACUBES" type="HQL">
1774    <sql>
1775      SELECT dcev
1776      FROM BioAssaySetData bas
1777      JOIN bas.extraValues ev
1778      JOIN ev.dataCubeExtraValue dcev
1779      WHERE bas IN (:basList)
1780      AND dcev.dataCube NOT IN (:deletedCubes)
1781    </sql>
1782    <description>
1783      A Hibernate query that returns all data cube extra values that are
1784      used by the specified list of bioassaysets but not are part of the
1785      list of already deleted data cubes.
1786    </description>
1787  </query>
1788
1789  <query id="FIND_DATACUBEEXTRAVALUES_USED_BY_OTHERS" type="HQL">
1790    <sql>
1791      SELECT dcev
1792      FROM BioAssaySetData bas
1793      JOIN bas.extraValues ev
1794      JOIN ev.dataCubeExtraValue dcev
1795      WHERE bas NOT IN (:basList)
1796      AND dcev IN (:possibleExtraValues)
1797    </sql>
1798    <description>
1799      A Hibernate query that, given a list of data cube extra values and bioassaysets,
1800      returns all of those data cube extra values that are also used by other bioassaysets.
1801    </description>
1802  </query>
1803
1804  <query id="GET_EXTRAVALUETYPE_FOR_EXTERNAL_ID" type="HQL">
1805    <sql>
1806      SELECT evt
1807      FROM ExtraValueTypeData evt
1808      WHERE evt.externalId = :externalId
1809    </sql>
1810    <description>
1811      Load an extra value type when you know the external id.
1812    </description>
1813  </query>
1814
1815  <query id="GET_EXTRAVALUES_FOR_EXTRAVALUETYPE" type="HQL">
1816    <sql>
1817      SELECT {1}
1818      FROM ExtraValueData ev
1819      WHERE ev.extraValueType = :extraValueType
1820    </sql>
1821    <description>
1822      A Hibernate query that gets extra values
1823      of a specific type.
1824    </description>
1825  </query>
1826 
1827  <query id="LOAD_CONTEXT_NAMES" type="HQL">
1828    <sql>
1829      SELECT ctx.id, ctx.name
1830      FROM ContextData ctx
1831      WHERE ctx.client = :client AND
1832      (ctx.user = :user OR ctx.public = true)
1833      AND ctx.itemType = :itemType
1834      AND ctx.subContext = :subContext
1835      ORDER BY ctx.name
1836    </sql>
1837    <description>
1838      A Hibernate query that selects the id and name of all contexts for
1839      a user and item type. The names should be sorted in ascending order.
1840    </description>
1841  </query>
1842 
1843  <query id="LOAD_CONTEXT_BY_NAME" type="HQL">
1844    <sql>
1845      SELECT ctx
1846      FROM ContextData ctx
1847      WHERE ctx.user = :user
1848      AND ctx.client = :client
1849      AND ctx.itemType = :itemType
1850      AND ctx.subContext  = :subContext
1851      AND ctx.name = :name
1852    </sql>
1853    <description>
1854      A Hibernate query that load a context given the user, client,
1855      item type, subcontext and name of the context.
1856    </description>
1857  </query>
1858 
1859  <query id="COUNT_PLUGINS_BY_TYPE_FOR_CONTEXT" type="HQL">
1860    <sql>
1861      SELECT plg.mainType, count(DISTINCT plg.id)
1862      FROM PluginDefinitionData plg
1863      JOIN plg.guiContexts gcx
1864      LEFT JOIN plg.configurations cfg
1865      WITH true = :hasConfigPermission OR cfg.owner.id = :owner
1866        OR cfg.itemKey.id IN (:itemKeys) OR cfg.projectKey.id IN (:projectKeys)
1867      WHERE
1868        (true = :hasPluginPermission OR plg.owner.id = :owner
1869        OR plg.itemKey.id IN (:itemKeys) OR plg.projectKey.id IN (:projectKeys))
1870      AND gcx.itemType = :itemType AND gcx.contextType = :contextType
1871      AND (
1872        (plg.requiresConfiguration = false)
1873        OR
1874        (plg.requiresConfiguration = true AND NOT cfg.id IS NULL)
1875      )
1876      GROUP BY plg.mainType
1877    </sql>
1878    <description>
1879      A Hibernate query that counts the number of plugins available for a
1880      given GUI context grouped by the main type of the plugins taking
1881      the requirement of configurations and user permissions into account.
1882    </description>
1883  </query>
1884 
1885  <query id="GET_FORMULA_WITH_NAME_AND_CHANNELS" type="HQL">
1886    <sql>
1887      SELECT fml
1888      FROM FormulaData fml
1889      WHERE fml.name = :name
1890      AND fml.channels = :channels
1891    </sql>
1892    <description>
1893      A Hibernate query that loads a formula with a given name and number
1894      of channels.
1895    </description>
1896  </query>
1897
1898  <query id="GET_FORMULA_WITH_NAME_AND_TYPE" type="HQL">
1899    <sql>
1900      SELECT fml
1901      FROM FormulaData fml
1902      WHERE fml.name = :name
1903      AND fml.rawDataType = :rawDataType
1904    </sql>
1905    <description>
1906      A Hibernate query that loads a formula with a given name and raw data type.
1907    </description>
1908  </query>
1909 
1910  <query id="GET_HELP_FOR_EXTERNAL_ID" type="HQL">
1911    <sql>
1912      SELECT hlp
1913      FROM HelpData hlp
1914      WHERE hlp.externalId = :externalId AND hlp.client = :client
1915    </sql>
1916    <description>
1917      A Hibernate query that loads a help text.
1918    </description>
1919  </query>
1920 
1921  <query id="GET_SCHEMA_VERSION" type="HQL">
1922    <sql>
1923      SELECT sv
1924      FROM SchemaVersionData sv
1925    </sql>
1926    <description>
1927      A Hibernate query that loads the schema version (there should only be one record).
1928    </description>
1929  </query>
1930 
1931  <query id="SET_SCHEMA_VERSION" type="HQL">
1932    <sql>
1933      UPDATE SchemaVersionData sv
1934      SET sv.schemaVersion = :schemaVersion,
1935      sv.build = :build
1936    </sql>
1937    <description>
1938      A Hibernate query that updates the schema version and build number.
1939    </description>
1940  </query>
1941 
1942  <query id="SET_PROJECT_ID_FOR_JOBS" type="HQL">
1943    <sql>
1944      UPDATE JobData job
1945      SET job.activeProjectId = 0
1946      WHERE job.activeProjectId IS NULL
1947    </sql>
1948    <description>
1949      A Hibernate query that sets the active project ID for all
1950      jobs to 0 if they have a null value.
1951    </description>
1952  </query>
1953
1954  <query id="GET_PRIMARY_ANNOTATION" type="HQL">
1955    <sql>
1956      SELECT ad
1957      FROM AnnotationData ad
1958      WHERE ad.annotationType = :annotationType
1959      AND ad.annotationSet = :annotationSet
1960    </sql>
1961    <description>
1962      A Hibernate query that loads the primary annotation of a specific
1963      annotation type for a given annotation set.
1964    </description>
1965  </query>
1966 
1967  <query id="GET_DIRECTLY_INHERITED_ANNOTATION" type="HQL">
1968    <sql>
1969      SELECT ad
1970      FROM AnnotationData ad
1971      JOIN ad.inheritingSets ans
1972      WHERE ad.annotationType = :annotationType
1973      AND ans = :annotationSet
1974    </sql>
1975    <description>
1976      A Hibernate query that loads an directly inherited annotation of a specific
1977      annotation type for a given annotation set. A directly inhertited annotation
1978      is an annotation that is linked to the specified annotation set.
1979    </description>
1980  </query>
1981
1982  <query id="GET_INDIRECTLY_INHERITED_ANNOTATION" type="HQL">
1983    <sql>
1984      SELECT ad
1985      FROM AnnotationData ad
1986      JOIN ad.annotationSet.inheritingSets ians
1987      WHERE ad.annotationType = :annotationType
1988      AND ians = :annotationSet
1989    </sql>
1990    <description>
1991      A Hibernate query that loads an indirectly inherited annotation of a specific
1992      annotation type for a given annotation set. An indirectly inherited annotation
1993      is an annotation which belongs to an annotation set which is inherited by
1994      the given annotation set.
1995    </description>
1996  </query>
1997 
1998  <query id="UPDATE_BYTES_FOR_EXPERIMENT" type="HQL">
1999    <sql>
2000      UPDATE ExperimentData xpm
2001      SET xpm.bytes = xpm.bytes + :addedBytes
2002      WHERE xpm.id = :experiment
2003    </sql>
2004    <description>
2005      A Hibernate query that updates the number of bytes used by an experiment.
2006    </description>
2007  </query>
2008
2009  <query id="UPDATE_BYTES_FOR_DATACUBE" type="HQL">
2010    <sql>
2011      UPDATE DataCubeData dcd
2012      SET dcd.bytes = dcd.bytes + :addedBytes
2013      WHERE dcd.id = :dataCube
2014    </sql>
2015    <description>
2016      A Hibernate query that updates the number of bytes used by a data cube.
2017    </description>
2018  </query>
2019 
2020  <query id="GET_REMOVED_ITEMS" type="HQL">
2021    <sql>
2022      SELECT trash
2023      FROM net.sf.basedb.core.data.RemovableData trash
2024      WHERE trash.removed = true
2025    </sql>
2026    <description>
2027      A Hibernate query that loads all items flagged for deletion.
2028    </description>
2029  </query>
2030 
2031  <query id="UPDATE_REMAINING_QUANTITY" type="HQL">
2032    <sql>
2033      UPDATE MeasuredBioMaterialData mbm
2034      SET mbm.remainingQuantity = mbm.remainingQuantity - :used
2035      WHERE mbm = :bioMaterial
2036    </sql>
2037    <description>
2038      A Hibernate query that adds/removes the remaining quantity on a
2039      measuered biomaterial.
2040    </description>
2041  </query>
2042
2043  <query id="SET_REMAINING_QUANTITY" type="HQL">
2044    <sql>
2045      UPDATE MeasuredBioMaterialData mbm
2046      SET mbm.remainingQuantity = :remain
2047      WHERE mbm = :bioMaterial
2048    </sql>
2049    <description>
2050      A Hibernate query that sets the remaining quantity on a
2051      measuered biomaterial.
2052    </description>
2053  </query>
2054
2055
2056  <query id="GET_ANYTOANY_FOR_NAME" type="HQL">
2057    <sql>
2058      SELECT ata
2059      FROM AnyToAnyData ata
2060      WHERE ata.fromId = :fromId AND ata.fromType = :fromType AND ata.name = :name
2061    </sql>
2062    <description>
2063      A Hibernate query that loads the any-to-any link with the specified name
2064      for an item.
2065    </description>
2066  </query>
2067
2068  <query id="DELETE_ANYTOANY_FROM" type="HQL">
2069    <sql>
2070      DELETE FROM AnyToAnyData ata
2071      WHERE ata.fromId = :fromId AND ata.fromType = :fromType AND ata.name = :name
2072    </sql>
2073    <description>
2074      A Hibernate query that deletes a names any-to-any link leading out from
2075      an item.
2076    </description>
2077  </query>
2078
2079
2080  <query id="DELETE_ALL_ANYTOANY_FROM" type="HQL">
2081    <sql>
2082      DELETE FROM AnyToAnyData ata
2083      WHERE ata.fromId = :fromId AND ata.fromType = :fromType
2084    </sql>
2085    <description>
2086      A Hibernate query that deletes all any-to-any links leading out from
2087      an item.
2088    </description>
2089  </query>
2090
2091  <query id="DELETE_ALL_ANYTOANY_TO" type="HQL">
2092    <sql>
2093      DELETE FROM AnyToAnyData ata
2094      WHERE ata.toId = :toId AND ata.toType = :toType
2095    </sql>
2096    <description>
2097      A Hibernate query that deletes all any-to-any links leading in to
2098      an item.
2099    </description>
2100  </query>
2101 
2102  <query id="DELETE_UNUSED_ANYTOANY_TO" type="HQL">
2103    <sql>
2104      DELETE FROM AnyToAnyData ata
2105      WHERE ata.toId = :toId AND ata.toType = :toType AND ata.usingTo = false
2106    </sql>
2107    <description>
2108      A Hibernate query that deletes all any-to-any links leading in to
2109      an item that doesn't count as using the item.
2110    </description>
2111  </query>
2112
2113  <query id="COUNT_ANYTOANY_FROM" type="HQL">
2114    <sql>
2115      SELECT count(*)
2116      FROM AnyToAnyData ata
2117      WHERE ata.fromId = :fromId AND ata.fromType = :fromType
2118    </sql>
2119    <description>
2120      A Hibernate query that counts the number of any-to-any links
2121      from a given item.
2122    </description>
2123  </query>
2124
2125  <query id="COUNT_ANYTOANY_TO" type="HQL">
2126    <sql>
2127      SELECT count(*)
2128      FROM AnyToAnyData ana
2129      WHERE ana.toId = :toId AND ana.toType = :toType
2130    </sql>
2131    <description>
2132      A Hibernate query that counts the number of any-to-any links
2133      to a given item.
2134    </description>
2135  </query>
2136
2137  <query id="COUNT_USED_ANYTOANY_TO" type="HQL">
2138    <sql>
2139      SELECT count(*)
2140      FROM AnyToAnyData ata
2141      WHERE ata.toId = :toId AND ata.toType = :toType AND ata.usingTo = true
2142    </sql>
2143    <description>
2144      A Hibernate query that counts the number of any-to-any links
2145      to a given item that counts as using the item.
2146    </description>
2147  </query>
2148
2149  <query id="FIND_USING_ANYTOANY" type="HQL">
2150    <sql>
2151      SELECT ana.fromId, ana.fromType
2152      FROM AnyToAnyData ana
2153      WHERE ana.toId = :toId AND ana.toType = :toType AND ana.usingTo = true
2154    </sql>
2155    <description>
2156      A Hibernate query that finds the any-to-any links
2157      to a given item that counts as using the item.
2158    </description>
2159  </query>
2160
2161 
2162  <query id="UPDATE_DATACUBENO_FOR_VIRTUALDB" type="HQL">
2163    <sql>
2164      UPDATE VirtualDbData vdb
2165      SET vdb.cubes = vdb.cubes + 1
2166      WHERE vdb.id = :virtualDb
2167    </sql>
2168    <description>
2169      A Hibernate query that updates the number of data cubes
2170      for the specified virtual database.
2171    </description>
2172  </query>
2173
2174  <query id="GET_DATACUBENO_FOR_VIRTUALDB" type="HQL">
2175    <sql>
2176      SELECT vdb.cubes
2177      FROM VirtualDbData vdb
2178      WHERE vdb.id = :virtualDb
2179    </sql>
2180    <description>
2181      A Hibernate query that gets the current number of data cubes
2182      for the specified virtual database.
2183    </description>
2184  </query>
2185 
2186  <query id="UPDATE_FILTERNO_FOR_DATACUBE" type="HQL">
2187    <sql>
2188      UPDATE DataCubeData dcb
2189      SET dcb.numFilters = dcb.numFilters + 1
2190      WHERE dcb.id = :dataCube
2191    </sql>
2192    <description>
2193      A Hibernate query that updates the number of filters
2194      for the specified data cube.
2195    </description>
2196  </query>
2197
2198  <query id="GET_FILTERNO_FOR_DATACUBE" type="HQL">
2199    <sql>
2200      SELECT dcb.numFilters
2201      FROM DataCubeData dcb
2202      WHERE dcb.id = :dataCube
2203    </sql>
2204    <description>
2205      A Hibernate query that gets the current number of filters
2206      for the specified data cube.
2207    </description>
2208  </query>
2209
2210  <query id="UPDATE_EXTRAVALUENO_FOR_DATACUBE" type="HQL">
2211    <sql>
2212      UPDATE DataCubeData dcb
2213      SET dcb.numExtraValues = dcb.numExtraValues + 1
2214      WHERE dcb.id = :dataCube
2215    </sql>
2216    <description>
2217      A Hibernate query that updates the number of extra values
2218      for the specified data cube.
2219    </description>
2220  </query>
2221
2222  <query id="GET_EXTRAVALUENO_FOR_DATACUBE" type="HQL">
2223    <sql>
2224      SELECT dcb.numExtraValues
2225      FROM DataCubeData dcb
2226      WHERE dcb.id = :dataCube
2227    </sql>
2228    <description>
2229      A Hibernate query that gets the current number of extra values
2230      for the specified data cube.
2231    </description>
2232  </query>
2233
2234  <query id="UPDATE_LAYERNO_FOR_DATACUBE" type="HQL">
2235    <sql>
2236      UPDATE DataCubeData dcb
2237      SET dcb.numLayers = dcb.numLayers + 1
2238      WHERE dcb.id = :dataCube
2239    </sql>
2240    <description>
2241      A Hibernate query that updates the number of layers
2242      for the specified data cube.
2243    </description>
2244  </query>
2245
2246  <query id="GET_LAYERNO_FOR_DATACUBE" type="HQL">
2247    <sql>
2248      SELECT dcb.numLayers
2249      FROM DataCubeData dcb
2250      WHERE dcb.id = :dataCube
2251    </sql>
2252    <description>
2253      A Hibernate query that gets the current number of layers
2254      for the specified data cube.
2255    </description>
2256  </query>
2257
2258  <query id="UPDATE_COLUMNNO_FOR_DATACUBE" type="HQL">
2259    <sql>
2260      UPDATE DataCubeData dcb
2261      SET dcb.numColumns = dcb.numColumns + 1
2262      WHERE dcb.id = :dataCube
2263    </sql>
2264    <description>
2265      A Hibernate query that updates the number of columns
2266      for the specified data cube.
2267    </description>
2268  </query>
2269
2270  <query id="GET_COLUMNNO_FOR_DATACUBE" type="HQL">
2271    <sql>
2272      SELECT dcb.numColumns
2273      FROM DataCubeData dcb
2274      WHERE dcb.id = :dataCube
2275    </sql>
2276    <description>
2277      A Hibernate query that gets the current number of columns
2278      for the specified data cube.
2279    </description>
2280  </query>
2281
2282  <query id="SET_HAS_DATA_FOR_RAWBIOASSAYS" type="HQL">
2283    <sql>
2284      UPDATE RawBioAssayData rba
2285      SET rba.hasData = CASE
2286        WHEN rba.spots > 0 THEN true
2287        ELSE false
2288        END
2289      WHERE rba.hasData IS NULL
2290    </sql>
2291    <description>
2292      A Hibernate query that sets the hasData property for a
2293      raw bioassay depending on if it has spots or not.
2294    </description>
2295  </query>
2296 
2297  <query id="SET_REMOVED_FOR_HARDWARETYPES" type="HQL">
2298    <sql>
2299      UPDATE HardwareTypeData hwd
2300      SET hwd.removed = false
2301      WHERE hwd.removed IS NULL
2302    </sql>
2303    <description>
2304      A Hibernate query that sets the removed property to false for a
2305      HardwareTypeData if it has NULL value.
2306    </description>
2307  </query>
2308
2309  <query id="SET_CONFIG_FOR_PLUGINS" type="HQL">
2310    <sql>
2311      UPDATE PluginDefinitionData pd
2312      SET pd.supportsConfigurations = true, pd.requiresConfiguration = false
2313      WHERE pd.supportsConfigurations IS NULL OR pd.requiresConfiguration IS NULL
2314    </sql>
2315    <description>
2316      A Hibernate query that sets the supportsConfigurations and requiresConfiguration
2317      properties of PluginDefinitionData items if any of them is null.
2318    </description>
2319  </query>
2320
2321  <query id="GET_INCORRECT_PLATEMAPPINGS" type="HQL">
2322    <sql>
2323      SELECT pm
2324      FROM PlateMappingData pm
2325      WHERE pm.sourceCount = 4 AND pm.destinationCount = 1
2326      AND
2327      (
2328        (pm.sourceGeometry.rows = 8 AND pm.sourceGeometry.columns = 12)
2329        OR
2330        (pm.sourceGeometry.rows = 16 AND pm.sourceGeometry.columns = 24)
2331      )
2332    </sql>
2333    <description>
2334      A Hibernate query that finds incorrect plate mappings.
2335    </description>
2336  </query>
2337 
2338  <query id="GET_PLATES_WITH_MAPPING" type="HQL">
2339    <sql>
2340      SELECT p
2341      FROM PlateData p
2342      WHERE p.plateMapping = :plateMapping
2343    </sql>
2344    <description>
2345      A Hibernate query that loads all plates with a specific plate mapping.
2346    </description>
2347  </query>
2348 
2349  <query id="GET_JOBAGENT_FOR_EXTERNALID" type="HQL">
2350    <sql>
2351      SELECT jag
2352      FROM JobAgentData jag
2353      WHERE jag.externalId = :externalId
2354    </sql>
2355    <description>
2356      A Hibernate query that loads the job agent with the specified external ID.
2357    </description>
2358  </query>
2359
2360  <query id="SET_TRUSTED_FOR_PLUGINDEFINITIONS" type="HQL">
2361    <sql>
2362      UPDATE PluginDefinitionData pd
2363      SET pd.trusted = true
2364      WHERE pd.trusted IS NULL
2365    </sql>
2366    <description>
2367      A Hibernate query that sets the trusted flag for all plugins with a null value
2368      to TRUE.
2369    </description>
2370  </query>
2371 
2372  <query id="SET_USE_PERMISSION_FOR_PLUGINDEFINITIONS" type="HQL">
2373    <sql>
2374      UPDATE PluginDefinitionData pd
2375      SET pd.usePermissions = false
2376      WHERE pd.usePermissions IS NULL
2377    </sql>
2378    <description>
2379      A Hibernate query that sets the use permission flag to false
2380      for all plugins with a null value.
2381    </description>
2382  </query>
2383 
2384  <query id="GET_KEYS_FOR_PLUGIN" type="HQL">
2385    <sql>
2386      SELECT pdk
2387      FROM PluginKeys pdk
2388      WHERE pdk.pluginDefinitionId = :pluginId
2389      ORDER BY pdk.keyId
2390    </sql>
2391    <description>
2392      A Hibernate query that loads all PluginDefinitionKeys for a specified plugin ID.
2393    </description>
2394  </query>
2395 
2396  <query id="SET_SENDMESSAGE_FOR_JOBS" type="HQL">
2397    <sql>
2398      UPDATE JobData job
2399      SET job.sendMessage = true
2400      WHERE job.sendMessage IS NULL
2401    </sql>
2402    <description>
2403      A Hibernate query that sets the send message flag for all jobs with a null value.
2404    </description>
2405  </query>
2406
2407  <query id="SET_PARAMETER_VERSION_FOR_PLUGINCONFIGURATIONS" type="HQL">
2408    <sql>
2409      UPDATE PluginConfigurationData pc
2410      SET pc.parameterVersion = 1
2411      WHERE pc.parameterVersion IS NULL
2412    </sql>
2413    <description>
2414      A Hibernate query that sets the parameter version to 1 for all
2415      configurations with a null value.
2416    </description>
2417  </query>
2418
2419  <query id="SET_PARAMETER_VERSION_FOR_JOBS" type="HQL">
2420    <sql>
2421      UPDATE JobData job
2422      SET job.parameterVersion = 1
2423      WHERE job.parameterVersion IS NULL
2424    </sql>
2425    <description>
2426      A Hibernate query that sets the parameter version to 1 for all
2427      jobs with a null value.
2428    </description>
2429  </query>
2430
2431  <query id="COPY_PLUGINCONFIGURATION_PARAMETERS" type="SQL">
2432    <sql>
2433      INSERT INTO "VersionedPluginConfigurationValues"
2434      ("pluginconfiguration_id", "name", "parameter_version", "value_id")
2435      SELECT "pluginconfiguration_id", "name", 1, "value_id"
2436      FROM "PluginConfigurationValues"
2437    </sql>
2438    <description>
2439      An SQL query that creates versioned parameters from unversioned.
2440    </description>
2441  </query>
2442 
2443  <query id="DELETE_UNVERSIONED_PLUGINCONFIGURATION_PARAMETERS" type="SQL">
2444    <sql>
2445      DELETE FROM "PluginConfigurationValues"
2446    </sql>
2447    <description>
2448      An SQL query that deletes unversioned plugin configuration parameters.
2449    </description>
2450  </query>
2451
2452  <query id="SET_COLORING_FOR_FORMULAS" type="HQL">
2453    <sql>
2454        UPDATE FormulaData frm
2455        SET
2456          frm.coloring.usingColors = false,
2457          frm.coloring.logarithmic = false
2458        WHERE frm.coloring.usingColors IS NULL
2459    </sql>
2460    <description>
2461      A HQL query that sets the usingColors and logarithmic to false
2462      for all formulas with null values.
2463    </description>
2464  </query>
2465 
2466  <query id="SET_COLORING_FOR_EXTRAVALUETYPES" type="HQL">
2467    <sql>
2468      UPDATE ExtraValueTypeData evt
2469      SET
2470        evt.coloring.usingColors = false,
2471        evt.coloring.logarithmic = false
2472        WHERE evt.coloring.usingColors IS NULL
2473    </sql>
2474    <description>
2475      A HQL query that sets the usingColors and logarithmic to false
2476      for all extra value types with null values.
2477    </description>
2478  </query>
2479 
2480  <query id="SET_IMMEDIATE_EXECUTION_FOR_PLUGINS" type="HQL">
2481    <sql>
2482      UPDATE PluginDefinitionData plg
2483      SET plg.allowImmediateExecution = false
2484      WHERE plg.allowImmediateExecution IS NULL
2485    </sql>
2486    <description>
2487      A HQL query that sets the allowImmediateExecution to false
2488      for all plugins which has a null value.
2489    </description>
2490  </query>
2491 
2492  <query id="SET_PROTOCOL_PARAMETER_FOR_ANNOTATION_TYPES" type="HQL">
2493    <sql>
2494      UPDATE AnnotationTypeData at
2495      SET at.protocolParameter = false
2496      WHERE at.protocolParameter IS NULL
2497    </sql>
2498    <description>
2499      A HQL query that sets the protocolParameter flag to false
2500      for all annotation types with a null value.
2501    </description>
2502  </query>
2503
2504  <query id="CHANGE_FILE_DISCRIMINATOR" type="SQL">
2505    <sql>
2506      UPDATE "ParameterValues"
2507      SET "discriminator" = 10
2508      WHERE "discriminator" = 9
2509    </sql>
2510    <description>
2511      An SQL query that changes the discriminator for file
2512      parameters
2513    </description>
2514  </query>
2515
2516  <query id="COPY_FILE_PARAMETERS" type="SQL">
2517    <sql>
2518      INSERT INTO "ItemValues" ("id", "data_class", "data_class_id")
2519      SELECT "id", 'net.sf.basedb.core.data.FileData', "value"
2520      FROM "FileValues"
2521    </sql>
2522    <description>
2523      An SQL query that copies file parameter values into
2524      the item parameter values table.
2525    </description>
2526  </query>
2527
2528  <query id="DELETE_FILE_PARAMETERS" type="SQL">
2529    <sql>
2530      DELETE FROM "FileValues"
2531    </sql>
2532    <description>
2533      An SQL query that deletes old file parameter values (after they have been copied).
2534    </description>
2535  </query>
2536
2537  <query id="SET_ITEMTYPE_ON_DISKUSAGE" type="HQL">
2538    <sql>
2539      UPDATE DiskUsageData du
2540      SET du.itemType = :itemType
2541      WHERE du.id IN (:itemList)
2542      AND du.itemType IS NULL
2543    </sql>
2544    <description>
2545      A HQL query that sets the item type for disk usage items.
2546    </description>
2547  </query>
2548
2549  <query id="LOAD_DISKUSAGEID_FOR_FILES" type="HQL">
2550    <sql>
2551      SELECT f.diskUsage.id
2552      FROM FileData f
2553    </sql>
2554    <description>
2555      A HQL query that loads the disk usage ID for all files.
2556    </description>
2557  </query>
2558 
2559  <query id="LOAD_DISKUSAGEID_FOR_EXPERIMENTS" type="HQL">
2560    <sql>
2561      SELECT xp.diskUsage.id
2562      FROM ExperimentData xp
2563    </sql>
2564    <description>
2565      A HQL query that loads the disk usage ID for all experiments.
2566    </description>
2567  </query>
2568 
2569  <query id="LOAD_DISKUSAGEID_FOR_RAWBIOASSAYS" type="HQL">
2570    <sql>
2571      SELECT rba.diskUsage.id
2572      FROM RawBioAssayData rba
2573    </sql>
2574    <description>
2575      A HQL query that loads the disk usage ID for all raw bioassays.
2576    </description>
2577  </query>
2578
2579  <query id="SET_MAX_MAPPING_ON_DATACUBES" type="HQL">
2580    <sql>
2581      UPDATE DataCubeData dcd
2582      SET dcd.maxRawMappingsForSpot = -1
2583      WHERE dcd.maxRawMappingsForSpot IS NULL
2584    </sql>
2585    <description>
2586      A HQL query that sets the maxRawMappingsForSpot on all data cubes with a
2587      null value to -1. This is required so we can load them by Hibernate.
2588    </description>
2589  </query>
2590
2591  <query id="SET_MAX_MAPPING_ON_DATACUBE" type="HQL">
2592    <sql>
2593      UPDATE DataCubeData dcd
2594      SET dcd.maxRawMappingsForSpot = :mapCount
2595      WHERE dcd.id = :dataCube
2596    </sql>
2597    <description>
2598      A HQL query that sets the maxRawMappingsForSpot on a data cube.
2599    </description>
2600  </query>
2601
2602  <query id="GET_USED_QUANTITY_EVENTS" type="HQL">
2603    <sql>
2604      SELECT evt.bioMaterial, evt.usedQuantity
2605      FROM BioMaterialEventData evt
2606    </sql>
2607    <description>
2608      A HQL query that loads the biomaterial and the used quantity
2609      for all BioMaterialEvent:s.
2610    </description>
2611  </query>
2612 
2613  <query id="GET_USED_QUANTITY_SOURCES" type="HQL">
2614    <sql>
2615      SELECT index(src), src.usedQuantity
2616      FROM BioMaterialEventData evt
2617      JOIN evt.sources src
2618    </sql>
2619    <description>
2620      A HQL query that loads the used quantity
2621      for all sources to BioMaterialEvent:s.
2622    </description>
2623  </query>
2624
2625  <query id="SET_WRITE_PROTECTED_ON_FILES" type="HQL">
2626    <sql>
2627      UPDATE FileData f
2628      SET f.writeProtected = false
2629      WHERE f.writeProtected IS NULL
2630    </sql>
2631    <description>
2632      A HQL query that sets the writeProtected on all files with a
2633      null value to false.
2634    </description>
2635  </query>
2636 
2637  <query id="SET_REMOVE_JOB_ON_JOBS" type="HQL">
2638    <sql>
2639      UPDATE JobData j
2640      SET j.removeJobWhenFinished = false
2641      WHERE j.removeJobWhenFinished IS NULL
2642    </sql>
2643    <description>
2644      A HQL query that sets the deleteJobWhenFinished to false
2645      on all jobs with a null value.
2646    </description>
2647  </query> 
2648 
2649  <query id="GET_INTERNAL_FILES_WITH_NO_LAST_UPDATE" type="HQL">
2650    <sql>
2651      SELECT f
2652      FROM FileData f
2653      WHERE f.lastUpdate IS NULL AND NOT f.internalName IS NULL
2654    </sql>
2655    <description>
2656      A HQL query that sets the writeProtected on all files with a
2657      null value to false.
2658    </description>
2659  </query>
2660 
2661  <query id="LOAD_DEFAULT_GROUPS" type="HQL">
2662    <sql>
2663      SELECT grp
2664      FROM GroupData grp
2665      WHERE grp.default = true
2666    </sql>
2667    <description>
2668      A HQL query that loads all groups which are marked as default
2669      groups.
2670    </description>
2671  </query>
2672 
2673  <query id="LOAD_DEFAULT_ROLES" type="HQL">
2674    <sql>
2675      SELECT rle
2676      FROM RoleData rle
2677      WHERE rle.default = true
2678    </sql>
2679    <description>
2680      A HQL query that loads all roles which are marked as default
2681      roles.
2682    </description>
2683  </query>
2684 
2685  <query id="SET_DEFAULT_ON_GROUPS" type="HQL">
2686    <sql>
2687      UPDATE GroupData grp
2688      SET grp.default = false
2689      WHERE grp.default IS NULL
2690    </sql>
2691    <description>
2692      A HQL query that sets the isDefault flag to false for all
2693      groups with a null value.
2694    </description>
2695  </query>
2696 
2697  <query id="SET_DEFAULT_ON_ROLES" type="HQL">
2698    <sql>
2699      UPDATE RoleData rle
2700      SET rle.default = false
2701      WHERE rle.default IS NULL
2702    </sql>
2703    <description>
2704      A HQL query that sets the isDefault flag to false for all
2705      roles with a null value.
2706    </description>
2707  </query>
2708 
2709  <query id="SET_ITEM_ID_ON_CONTEXTS" type="HQL">
2710    <sql>
2711      UPDATE ContextData ctx
2712      SET ctx.itemId = 0
2713      WHERE ctx.itemId IS NULL
2714    </sql>
2715    <description>
2716      A HQL query that sets the itemId to 0 for all
2717      contexts with a null value.
2718    </description>
2719  </query>
2720 
2721  <query id="SET_AVERAGE_METHOD_ON_FORMULAS" type="HQL">
2722    <sql>
2723      UPDATE FormulaData f
2724      SET f.averageMethod = 2
2725      WHERE f.averageMethod IS NULL
2726    </sql>
2727    <description>
2728      A HQL query that sets the averageMethod to arithmetic mean for all
2729      formulas with a null value.
2730    </description>
2731  </query>
2732 
2733  <query id="SET_AVERAGE_METHOD_ON_EXTRAVALUETYPES" type="HQL">
2734    <sql>
2735      UPDATE ExtraValueTypeData evt
2736      SET evt.averageMethod = 2
2737      WHERE evt.averageMethod IS NULL
2738    </sql>
2739    <description>
2740      A HQL query that sets the averageMethod to arithmetic mean for all
2741      extra value types with a null value.
2742    </description>
2743  </query>
2744 
2745  <query id="UPDATE_PROPERTY_FILTER" type="SQL">
2746    <sql>
2747      UPDATE [PropertyFilters]
2748      SET [property] = :newProperty
2749      WHERE [property] = :oldProperty
2750      AND [context_id] NOT IN
2751      (
2752         SELECT [context_id]
2753         FROM [PropertyFilters]
2754         WHERE [property] = :newProperty
2755      )
2756    </sql>
2757    <description>
2758      An SQL query that changes the property for all PropertyFilters
2759      which filters on a given property. It must ignore any filter that 
2760      causes a duplicate key violation if a filter with the new
2761      property already exists for any context.
2762    </description>
2763  </query>
2764 
2765  <query id="UPDATE_PROPERTY_FILTER_VALUE" type="SQL">
2766    <sql>
2767      UPDATE [PropertyFilters]
2768      SET [value] = :newValue
2769      WHERE [property] = :property AND [value] = :oldValue
2770    </sql>
2771    <description>
2772      An SQL query that changes the property for all PropertyFilters
2773      with a given value.
2774    </description>
2775  </query>
2776 
2777  <query id="SET_AUTOCOMPRESS_ON_MIMETYPES" type="HQL">
2778    <sql>
2779      UPDATE MimeTypeData mt
2780      SET mt.autoCompress = false
2781      WHERE mt.autoCompress IS NULL
2782    </sql>
2783    <description>
2784      A HQL query that sets the autoCompress property to false for all
2785      MIME types with a null value.
2786    </description>
2787  </query>
2788 
2789  <query id="SET_AUTOCOMPRESS_ON_DIRECTORIES" type="HQL">
2790    <sql>
2791      UPDATE DirectoryData dir
2792      SET dir.autoCompress = false
2793      WHERE dir.autoCompress IS NULL
2794    </sql>
2795    <description>
2796      A HQL query that sets the autoCompress property to false for all
2797      directories with a null value.
2798    </description>
2799  </query>
2800
2801  <query id="SET_COMPRESSED_ON_FILES" type="HQL">
2802    <sql>
2803      UPDATE FileData f
2804      SET
2805        f.compressed = false,
2806        f.compressedSize = f.size
2807      WHERE f.compressed IS NULL
2808    </sql>
2809    <description>
2810      A HQL query that sets the compressed property to false and the
2811      compressedSize to size for all files with a null value.
2812    </description>
2813  </query>
2814 
2815  <query id="SET_NUMFEATURES_ON_ARRAYDESIGNS" type="HQL">
2816    <sql>
2817      UPDATE ArrayDesignData ad
2818      SET ad.numDbFeatures = 0, ad.numFileFeatures = 0
2819      WHERE ad.numDbFeatures IS NULL OR ad.numFileFeatures IS NULL
2820    </sql>
2821    <description>
2822      A HQL query that sets the number of file and db features to 0
2823      on all array designs with a null value.
2824    </description>
2825  </query>
2826 
2827  <query id="SET_NUMFILESPOTS_ON_RAWBIOASSAY" type="HQL">
2828    <sql>
2829      UPDATE RawBioAssayData rbd
2830      SET rbd.numFileSpots = 0
2831      WHERE rbd.numFileSpots IS NULL
2832    </sql>
2833    <description>
2834      A HQL query that sets the number of file aspots to 0
2835      on all raw bioassays with a null value.
2836    </description>
2837  </query>
2838
2839  <query id="GET_RAWBIOASSAYS_FOR_PLATFORM" type="HQL">
2840    <sql>
2841      SELECT {1}
2842      FROM RawBioAssayData rba
2843      WHERE rba.platform = :platform
2844    </sql>
2845    <description>
2846      A Hibernate query that gets raw bioassays
2847      with a given platform.
2848    </description>
2849  </query>
2850
2851  <query id="GET_ARRAYDESIGNS_FOR_PLATFORM" type="HQL">
2852    <sql>
2853      SELECT {1}
2854      FROM ArrayDesignData ad
2855      WHERE ad.platform = :platform
2856    </sql>
2857    <description>
2858      A Hibernate query that gets array designs
2859      with a given platform.
2860    </description>
2861  </query>
2862 
2863  <query id="GET_RAWBIOASSAYS_FOR_VARIANT" type="HQL">
2864    <sql>
2865      SELECT {1}
2866      FROM RawBioAssayData rba
2867      WHERE rba.variant = :variant
2868    </sql>
2869    <description>
2870      A Hibernate query that gets raw bioassays
2871      with a given platform variant.
2872    </description>
2873  </query>
2874
2875  <query id="GET_ARRAYDESIGNS_FOR_VARIANT" type="HQL">
2876    <sql>
2877      SELECT {1}
2878      FROM ArrayDesignData ad
2879      WHERE ad.variant = :variant
2880    </sql>
2881    <description>
2882      A Hibernate query that gets array designs
2883      with a given platform variant.
2884    </description>
2885  </query>
2886 
2887  <query id="GET_PLATFORM_FOR_EXTERNAL_ID" type="HQL">
2888    <sql>
2889      SELECT plf
2890      FROM PlatformData plf
2891      WHERE plf.externalId = :externalId
2892    </sql>
2893    <description>
2894      A Hibernate query that loads a platform by external ID.
2895    </description>
2896  </query>
2897 
2898  <query id="GET_PLATFORMVARIANT_FOR_EXTERNAL_ID" type="HQL">
2899    <sql>
2900      SELECT plv
2901      FROM PlatformVariantData plv
2902      WHERE plv.externalId = :externalId
2903    </sql>
2904    <description>
2905      A Hibernate query that loads a platform variant by external ID.
2906    </description>
2907  </query>
2908 
2909  <query id="GET_DATAFILETYPE_FOR_EXTERNAL_ID" type="HQL">
2910    <sql>
2911      SELECT dft
2912      FROM DataFileTypeData dft
2913      WHERE dft.externalId = :externalId
2914    </sql>
2915    <description>
2916      A Hibernate query that loads a data file type by external ID.
2917    </description>
2918  </query>
2919
2920  <query id="GET_FILESETMEMBERS_FOR_DATAFILETYPE" type="HQL">
2921    <sql>
2922      SELECT {1}
2923      FROM FileSetMemberData mbr
2924      WHERE mbr.dataFileType = :dataFileType
2925    </sql>
2926    <description>
2927      A Hibernate query that gets file set members of a specific
2928      data file type.
2929    </description>
2930  </query>
2931
2932  <query id="GET_PLATFORMFILETYPE_FOR_DATAFILETYPE" type="HQL">
2933    <sql>
2934      SELECT {1}
2935      FROM PlatformFileTypeData pft
2936      WHERE pft.dataFileType = :dataFileType
2937    </sql>
2938    <description>
2939      A Hibernate query that gets platform file types of a specific
2940      data file type.
2941    </description>
2942  </query>
2943 
2944  <query id="GET_FILESETMEMBER_FOR_DATAFILETYPE" type="HQL">
2945    <sql>
2946      SELECT mbr
2947      FROM FileSetMemberData mbr
2948      WHERE mbr.dataFileType.externalId = :externalId
2949      AND mbr.fileSet = :fileSet
2950    </sql>
2951    <description>
2952      A Hibernate query that loads a member in a given file set
2953      if we know the external ID of the data file type.
2954    </description>
2955  </query>
2956
2957 
2958  <query id="DELETE_PROPERTY_FILTER" type="SQL">
2959    <sql>
2960      DELETE FROM [PropertyFilters]
2961      WHERE [property] = :property
2962    </sql>
2963    <description>
2964      An SQL query that delete all PropertyFilters
2965      which filter on a given property.
2966    </description>
2967  </query>
2968 
2969  <query id="GET_PLUGINS_WITH_KEYS" type="HQL">
2970    <sql>
2971      SELECT DISTINCT pk.pluginDefinitionId
2972      FROM PluginKeys pk WHERE pk.keyId IN (:keys)
2973    </sql>
2974    <description>
2975      A HQL query that has been granted a specific permission. Used by
2976      update scripts when new item types are added to make sure existing
2977      plug-ins can continue to work.
2978    </description>
2979  </query>
2980
2981  <query id="CHANGE_EXPERIMENT_RAWDATATYPE" type="HQL">
2982    <sql>
2983      UPDATE ExperimentData
2984      SET rawDataType = :newRawDataType
2985      WHERE rawDataType = :oldRawDataType
2986    </sql>
2987    <description>
2988      A HQL query that changes all raw data type for experiments from
2989      an old value to a new value.
2990    </description>
2991  </query>
2992
2993  <query id="GET_PROJECTS_WITH_DEFAULT" type="HQL">
2994    <sql>
2995      SELECT prj
2996      FROM ProjectData prj
2997      WHERE prj.projectDefaults[:name] = :value
2998    </sql>
2999    <description>
3000      A HQL query that loads all projects which has a given default value
3001      for a setting.
3002    </description>
3003  </query>
3004
3005  <query id="SET_USEJOBQUEUE_ON_PLUGINS" type="HQL">
3006    <sql>
3007      UPDATE PluginDefinitionData pld
3008      SET pld.useInternalJobQueue = true
3009      WHERE pld.useInternalJobQueue IS NULL
3010    </sql>
3011    <description>
3012      A HQL query that set the useInternalJobQueue property to true
3013      for all plug-ins.
3014    </description>
3015  </query>
3016
3017</predefined-queries>
Note: See TracBrowser for help on using the repository browser.