|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.Update
public final class Update
This class contains static methods used to update items already in the database.
Schema version | Description |
---|---|
1 | The original schema as released in RC1. |
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | |
19 | The update sets the parameter version for existing jobs and configurations to 1 and copies data from the old table (PluginConfigurationValues) to the new table (VersionedPluginConfigurationValues) |
20 | The update sets all color information to false and null for existing items. The install may later add coloring to some of the formulas. |
21 | The update sets the value to false for all existing plugins with a null value. The installation may later change the value to true for some plugins (ie. export plugins). |
22 |
The update sets the isProtocolParameter value to false for all existing
annotation types with a null value.
|
23 |
|
24 |
|
25 |
|
26 | |
27 | |
28 | The update must query the dynamic database and set this value for all existing data cubes. |
29 | No changes at all except increasing the schema version number. The veryfication of remaining quantity is moved to next update of schema version. |
30 |
No schema change as such, but we need to verify and possibly update the
MeasuredBioMaterialData.getRemainingQuantity()
since a bug may have caused it to have an incorrect value.
|
31 |
isWriteProtected value to false for all existing
files with a null value and lastUpdate to the date and time
the internal file last was modified for existing files.
|
32 |
isDefault value to false for all existing
groups and roles with a null value.
|
33 |
The update sets the removeJobWhenFinished value to false for all existing jobs.
|
34 |
itemId value to 0 for all existing contexts.
|
35 | Check and update the size of File items, since they may be incorrect due to a bug in the File class. The MD5 value in that case also incorrect and is set to null. See ticket http://base.thep.lu.se/ticket/575 |
36 |
The update sets the averageMethod to Formula.AverageMethod.ARITHMETIC_MEAN .
See ticket http://base.thep.lu.se/ticket/648
|
37 |
|
38 |
|
39 | Remove AnyToAny links created by older versions of the Base1PluginExecuter plug-in. |
40 | Used to "Change invalid property filter on 'guiContexts.itemType' to '$ctx.itemType'", but since the source problem never was fixed this is now done in 43. |
41 |
|
42 | No longer used. |
43 | Change invalid property filter on 'guiContexts.itemType' to '$ctx.itemType'". Was originally fixed by 40, but since the source problem never was fixed it must be done again. |
44 |
|
45 | The update sets all values on existing items to true (if no job agent has been configured for the plug-in) or false (if a job agent is configured). |
46 |
|
47 | No special database update is needed. Only increase the schema version. |
48 |
|
49 | The update sets the identification method to COORDINATES for all existing array designs, and deletes the unique index on row, column, block on the Features table. |
50 | No special database update is needed. Only increase the schema version. |
51 |
External plug-in paths should be relative to the plugins.dir setting
in base.config. The update loads all PluginDefinitions with a JAR path
and convert the path with PluginDefinition.convertToRelative(String) .
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
Permission.SELECT_JOBAGENT to the
administrators, power users and job agent roles.
|
58 |
|
59 | Added: The update sets the spot/reporter/value count to 0 for all existing bioassay sets and extra values. |
60 | Not a schema change as such. We need to update incorrect quota values for experiments. See http://base.thep.lu.se/ticket/1056 |
61 | Added: No special database update is needed. Only increase the schema version. |
62 | Added: No special database update is needed. Only increase the schema version. |
63 | Added: The update will set the value for all existing jobs to false. |
64 | Added: No special database update is needed. Only increase the schema version. |
65 | Added: No special database update is needed. Only increase the schema version. |
66 | Added: No special database update is needed. Only increase the schema version. |
67 | Added: No special database update is needed. Only increase the schema version. |
68 | Added: The update sets the value for all existing project to 31 (=read, use, write, delete). |
69 | Added: No special database update is needed. Only increase the schema version. |
70 | Added: The update sets the values for all existing bioassay sets to 0 (=no transform). |
71 | Deprecated: No special database update is needed. Only increase the schema version. |
72 |
Made Protocol an Annotatable item.
No special database update is needed. Only increase the schema version.
|
73 |
Added ChangeHistoryData and ChangeHistoryDetailData .
No special update is needed. Only increase the schema version.
|
74 |
Added AnnotationData.getLastUpdate() .
No special update is needed. Only increase the schema version.
|
75 |
Added GroupData.getHiddenMembers() .
The update sets the value for all existing groups to false.
|
76 |
Added AnnotationSetData.getItemId() .
The update sets the value for all existing annotation
sets.
|
77 |
Added FormulaData.getValueType() . The update will set
the value for all existing formulas were it is possible to determine
the correct type.
|
78 |
Added ProtocolData.getExternalId() .
No special update is needed. Only increase the schema version.
|
79 | Set database column Contexts.sort_property to null if it contains a literal 'null' string. Fix for #1463. |
80 |
Added BioPlateTypeData , BioWellData.getOriginalBioMaterial() .
All existing bio plates are assigned "Storage plate" as their
plate type.
|
81 |
Added FileData.getUrl() and FileServer .
No special update is needed. Only increase the schema version.
|
82 |
Added PermissionTemplateData and ProjectData.getPermissionTemplate() .
No special update is needed. Only increase the schema version.
|
83 |
Added JobData.getExecuteCommand() . No special update is needed.
Only increase the schema version.
|
84 |
Added JobData.getScheduled() . The update will set the scheduled
date to the creation date for all existing jobs that is in WAITING status
or higher.
|
85 |
Added TimestampParameterValueData . The update will change the
DateParameterValueData to a date-only column type.
|
86 | Fixes a bug in the "recently used settings" handling. The update will remove all settings ending with '.recent' that contains at least one colon (:). See http://base.thep.lu.se/ticket/1517 for more information. |
87 |
Adds UserData.getSendMessagesAsEmail() . The update will set
the value to FALSE for all existing users.
|
88 |
Adds BioPlateData.isDestroyed() . The update will set
the value to FALSE for all existing bioplates.
|
89 |
Adds BioPlateEventData , BioPlateEventTypeData ,
BioPlateEventParticipantData and
BioMaterialEventData.getBioPlateEventParticipant() .
No special update is needed. Only increase the schema version.
|
90 |
Adds BioPlateData.getFreeWells() . The update will
count the number of free wells on existing bio plates.
|
Field Summary | |
---|---|
private static Logger |
log
Log core events. |
Constructor Summary | |
---|---|
Update()
|
Method Summary | |
---|---|
private static void |
addPluginPermission(org.hibernate.Session session,
int pluginId,
Item itemType,
int granted,
int denied)
|
static void |
adjustExistingItems(boolean update,
ProgressReporter progress,
String rootLogin,
String rootPassword)
Adjust the existing items in the database to be compatible with the latest mappings. |
private static int |
getSchemaVersion(org.hibernate.Session session)
Get the current schema version number as it is stored in the database. |
private static void |
setSchemaVersion(org.hibernate.Session session,
int schemaVersion)
Update the database with a new schema version number. |
private static int |
setSchemaVersionInTransaction(org.hibernate.Session session,
int schemaVersion)
Update the schema version version number using a new transaction. |
static void |
updateDatabase(ProgressReporter progress,
String rootLogin,
String rootPassword)
Update the database by modifying existing items to follow new requirements. |
private static int |
updateToSchemaVersion10(SessionControl sc)
Load all plugins and call PluginDefinition.loadPluginInformation(String, String, boolean)
for each one so that the PluginDefinition.supportsConfigurations() and
PluginDefinition.requiresConfiguration() return correct values. |
private static int |
updateToSchemaVersion19(org.hibernate.Session session)
Set JobData.getParameterVersion and PluginConfigurationData.getParameterVersion to 1 if they have null values. |
private static int |
updateToSchemaVersion2(org.hibernate.Session session)
Set Jobs.project_id to 0 for all old jobs with a null value in this column. |
private static int |
updateToSchemaVersion24(org.hibernate.Session session)
Move FileValues to ItemValues. |
private static int |
updateToSchemaVersion25(org.hibernate.Session session)
Set the itemType property on all DiskUsageData items. |
private static int |
updateToSchemaVersion28(SessionControl sc)
Find the number of raw mappings for the spot with the maximum number for each data cube |
private static int |
updateToSchemaVersion30(org.hibernate.Session session)
Vefify and update the remaining quantity of all biomaterials. |
private static int |
updateToSchemaVersion31(org.hibernate.Session session)
Set the writeProtected flag on all files with a null value to false. |
private static int |
updateToSchemaVersion35(org.hibernate.Session session)
Check and update the file size and MD5 on existing file items since they may be incorrect |
private static int |
updateToSchemaVersion38(org.hibernate.Session session)
Set the experiment for jobs that belong to a single transformation. |
private static int |
updateToSchemaVersion39(org.hibernate.Session session)
Remove AnyToAny links created by older versions of Base1PluginExecuter |
private static int |
updateToSchemaVersion4(org.hibernate.Session session)
Find the unique index on HelpTextData.externalId and remove it. |
private static int |
updateToSchemaVersion42(org.hibernate.Session session)
Has been replaced with updateToSchemaVersion44(SessionControl) |
private static int |
updateToSchemaVersion43(org.hibernate.Session session)
Update property filter on 'guiContexts.itemType' to '$ctx.itemType' |
private static int |
updateToSchemaVersion44(SessionControl sc)
Set a platform for array designs and raw bioassays Change experiment raw data type if it is "affymetrix" to "platform.affymetrix" Change project default raw data type if it is "affymetrix" to "platform.affymetrix" Move CEL and CDF files into FileSet:s Remove filters on ArrayDesign.isAffyChip property Add READ permission to PLATFORM and DATAFILETYPE for all plug-ins working with ARRAYDESIGN or RAWBIOASSAY |
private static int |
updateToSchemaVersion45(org.hibernate.Session session)
Update useInternalJobQueue for plug-ins. |
private static int |
updateToSchemaVersion49(org.hibernate.Session session)
Find the unique index on Feature (row, column and block) and remove it. |
private static int |
updateToSchemaVersion51(org.hibernate.Session session)
Change all plug-ins with an absolute JAR path to relative paths. |
private static int |
updateToSchemaVersion56(org.hibernate.Session session)
Count the number of reporters in existing reporter lists. |
private static int |
updateToSchemaVersion57(org.hibernate.Session session)
Grant Permission.SELECT_JOBAGENT permission to
administrators, power users and job agent roles. |
private static int |
updateToSchemaVersion60(org.hibernate.Session session)
Update incorrect quota values for experiments. |
private static int |
updateToSchemaVersion7(org.hibernate.Session session)
Set RawBioAssays.has_data to true or false depending on the number of spots. |
private static int |
updateToSchemaVersion76(org.hibernate.Session session,
ProgressReporter progress)
Sets the AnnotationSetData.getItemId() for
all annotation sets with a null value. |
private static int |
updateToSchemaVersion77(org.hibernate.Session session)
Try to set the value type for as many formulas as possible. |
private static int |
updateToSchemaVersion79(org.hibernate.Session session)
Set sort_property in Contexts table to null if it contains a literal string 'null'. |
private static int |
updateToSchemaVersion80(org.hibernate.Session session)
Set the plate type for all existing bio plates to "Storage plate". |
private static int |
updateToSchemaVersion84(org.hibernate.Session session)
Set the scheduled data for existing jobs. |
private static int |
updateToSchemaVersion85(org.hibernate.Session session)
Change the date type for the DateValues.values column,. |
private static int |
updateToSchemaVersion86(org.hibernate.Session session)
Remove all context settings with a name ending with '.recent' that has at least one colon (:) in the value. |
private static int |
updateToSchemaVersion90(org.hibernate.Session session)
Calculate the value for BioPlateData.getFreeWells() for all existing bioplates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger log
Constructor Detail |
---|
public Update()
Method Detail |
---|
public static void updateDatabase(ProgressReporter progress, String rootLogin, String rootPassword) throws BaseException
progress
- An object implementing the ProgressReporter
interfacerootLogin
- The root user loginrootPassword
- The root user password
BaseException
private static int getSchemaVersion(org.hibernate.Session session) throws BaseException
BaseException
private static void setSchemaVersion(org.hibernate.Session session, int schemaVersion) throws BaseException
schemaVersion
- The new schema version number
BaseException
private static int setSchemaVersionInTransaction(org.hibernate.Session session, int schemaVersion)
schemaVersion
- The new schema version numberprivate static int updateToSchemaVersion2(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion4(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion7(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion10(SessionControl sc) throws BaseException
PluginDefinition.loadPluginInformation(String, String, boolean)
for each one so that the PluginDefinition.supportsConfigurations()
and
PluginDefinition.requiresConfiguration()
return correct values.
BaseException
private static int updateToSchemaVersion19(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion24(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion25(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion28(SessionControl sc) throws BaseException
BaseException
private static int updateToSchemaVersion30(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion31(org.hibernate.Session session)
private static int updateToSchemaVersion35(org.hibernate.Session session)
private static int updateToSchemaVersion38(org.hibernate.Session session)
private static int updateToSchemaVersion39(org.hibernate.Session session)
private static int updateToSchemaVersion42(org.hibernate.Session session)
updateToSchemaVersion44(SessionControl)
private static int updateToSchemaVersion43(org.hibernate.Session session)
private static int updateToSchemaVersion44(SessionControl sc)
private static void addPluginPermission(org.hibernate.Session session, int pluginId, Item itemType, int granted, int denied)
private static int updateToSchemaVersion45(org.hibernate.Session session)
private static int updateToSchemaVersion49(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion51(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion56(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion57(org.hibernate.Session session) throws BaseException
Permission.SELECT_JOBAGENT
permission to
administrators, power users and job agent roles.
BaseException
private static int updateToSchemaVersion60(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion76(org.hibernate.Session session, ProgressReporter progress) throws BaseException
AnnotationSetData.getItemId()
for
all annotation sets with a null value.
BaseException
private static int updateToSchemaVersion77(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion79(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion80(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion84(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion85(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion86(org.hibernate.Session session) throws BaseException
BaseException
private static int updateToSchemaVersion90(org.hibernate.Session session) throws BaseException
BaseException
public static void adjustExistingItems(boolean update, ProgressReporter progress, String rootLogin, String rootPassword) throws BaseException
update
- FALSE if it is an installation. TRUE if it is an update.progress
- An object implementing the ProgressReporter
interfacerootLogin
- The root user loginrootPassword
- The root user password
BaseException
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |