Changeset 5056
- Timestamp:
- Aug 18, 2009, 2:09:01 PM (13 years ago)
- Location:
- trunk/src/core/net/sf/basedb/core
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/Annotation.java
r4889 r5056 32 32 33 33 import java.util.ArrayList; 34 import java.util.Date; 34 35 import java.util.List; 35 36 import java.util.Collections; … … 437 438 } 438 439 getData().getValues().setSingleValue(Values.getDataValue(value)); 440 getData().setLastUpdate(new Date()); 439 441 } 440 442 … … 495 497 } 496 498 getData().getValues().replaceValues(Values.getDataValues(convertedValues)); 499 getData().setLastUpdate(new Date()); 497 500 } 498 501 -
trunk/src/core/net/sf/basedb/core/AnnotationSet.java
r5014 r5056 24 24 25 25 import java.util.Collections; 26 import java.util.Date; 26 27 import java.util.LinkedList; 27 28 import java.util.List; … … 744 745 AnnotationData from = entry.getValue(); 745 746 to.getValues().replaceValues(from.getValues().getValues()); 747 to.setLastUpdate(new Date()); 746 748 } 747 749 } -
trunk/src/core/net/sf/basedb/core/Install.java
r5043 r5056 114 114 method. 115 115 */ 116 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(7 3).intValue();116 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(74).intValue(); 117 117 118 118 public static synchronized void createTables(boolean update, final ProgressReporter progress) -
trunk/src/core/net/sf/basedb/core/Update.java
r5038 r5056 35 35 import org.hibernate.mapping.Table; 36 36 37 import net.sf.basedb.core.data.AnnotationData; 37 38 import net.sf.basedb.core.data.ArrayDesignData; 38 39 import net.sf.basedb.core.data.ChangeHistoryData; … … 823 824 </td> 824 825 </tr> 826 <tr> 827 <td>74</td> 828 <td> 829 Added {@link AnnotationData#getLastUpdate()}. 830 No special update is needed. Only increase the schema version. 831 </td> 832 </tr> 825 833 </table> 826 834 … … 1105 1113 } 1106 1114 1107 // Schemaversion 61-7 3only updates the version number1108 if (schemaVersion < 7 3)1109 { 1110 if (progress != null) progress.display((int)(7 2*progress_factor), "--Updating schema version: " + schemaVersion + " -> 73...");1111 schemaVersion = setSchemaVersionInTransaction(session, 7 3);1115 // Schemaversion 61-74 only updates the version number 1116 if (schemaVersion < 74) 1117 { 1118 if (progress != null) progress.display((int)(73*progress_factor), "--Updating schema version: " + schemaVersion + " -> 74..."); 1119 schemaVersion = setSchemaVersionInTransaction(session, 74); 1112 1120 } 1113 1121 -
trunk/src/core/net/sf/basedb/core/data/AnnotationData.java
r5054 r5056 23 23 package net.sf.basedb.core.data; 24 24 25 import java.util.Date; 25 26 import java.util.Set; 26 27 … … 106 107 } 107 108 109 private Date lastUpdate; 110 /** 111 Get the date and time the values in this annotation was last updated. 112 @return A <code>Date</code> object, or null if not known 113 @hibernate.property column="`last_update`" type="timestamp" not-null="false" 114 */ 115 public Date getLastUpdate() 116 { 117 return lastUpdate; 118 } 119 public void setLastUpdate(Date lastUpdate) 120 { 121 this.lastUpdate = lastUpdate; 122 } 123 108 124 private Set<AnnotationSetData> inheritingSets; 109 125 /** -
trunk/src/core/net/sf/basedb/core/data/ParameterValueData.java
r4889 r5056 95 95 /** 96 96 Set values of this parameter. 97 <p> 98 NOTE! Used by Hibernate to initialize the object. Do not 99 call {@link AnnotationData#setLastUpdate(java.util.Date)}! 97 100 @param values Collection of values. 98 101 */ … … 103 106 values in the specified list. It is expected that 104 107 the list contains only objects of the correct type. 108 <p> 109 NOTE! When this method is called to set annotation values 110 for an {@link AnnotationData}, don't forget to also update 111 the last update timestamp: {@link AnnotationData#setLastUpdate(java.util.Date)}. 105 112 */ 106 113 @SuppressWarnings("unchecked") … … 115 122 Replace the current list with a single new value. 116 123 It is expected that the value is of the correct type. 124 <p> 125 NOTE! When this method is called to set annotation values 126 for an {@link AnnotationData}, don't forget to also update 127 the last update timestamp: {@link AnnotationData#setLastUpdate(java.util.Date)}. 117 128 */ 118 129 @SuppressWarnings("unchecked")
Note: See TracChangeset
for help on using the changeset viewer.