Changeset 4075
- Timestamp:
- Jan 10, 2008, 4:44:11 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/Install.java
r4074 r4075 107 107 method. 108 108 */ 109 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(4 7).intValue();109 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(48).intValue(); 110 110 111 111 public static synchronized void createTables(boolean update, final ProgressReporter progress) -
trunk/src/core/net/sf/basedb/core/ReporterBatcher.java
r3775 r4075 148 148 149 149 /** 150 Set the last update date to today's date. 150 Set the last update date to today's date and 151 change the last source of update. 151 152 */ 152 153 void onBeforeCommit(ReporterData data, Transactional.Action action) … … 154 155 { 155 156 setPropertyValue(data, "lastUpdate", new Date()); 157 setPropertyValue(data, "lastSource", updateSource != null ? updateSource : "n/a"); 156 158 } 157 159 // ------------------------------------------- … … 162 164 private org.hibernate.Query findReporter; 163 165 166 /** 167 A string to hold the name of the source, 168 used to update the reporters. 169 */ 170 private String updateSource = null; 164 171 /** 165 172 Check if a reporter with a given external id exists in the database or … … 248 255 return r; 249 256 } 257 258 /** 259 Set the source that was used when updating the reporters. 260 This must be set before committing this batcher. 261 @param source The source to be set. The format of the source string 262 should be like: "[item_type]:[item_name]" 263 */ 264 public void setUpdateSource(String source) 265 { 266 this.updateSource = source; 267 } 250 268 } -
trunk/src/core/net/sf/basedb/core/Update.java
r4074 r4075 789 789 if (progress != null) progress.display((int)(46*progress_factor), "--Updating schema version: " + schemaVersion + " -> 47..."); 790 790 schemaVersion = setSchemaVersionInTransaction(session, 47); 791 } 792 793 if (schemaVersion < 48) 794 { 795 if (progress != null) progress.display((int)(47*progress_factor), "Updating schema version: " + schemaVersion + " -> 48..."); 796 schemaVersion = setSchemaVersionInTransaction(session, 48); 791 797 } 792 798 -
trunk/src/core/net/sf/basedb/core/data/ReporterData.java
r3948 r4075 118 118 } 119 119 120 /** 121 The source of the last update 122 */ 123 private String lastSource; 124 /** 125 Get the source that was used when this reporter 126 was last updated. 127 @return A <code>String</code> object 128 @hibernate.property column="`last_source`" type="string" not-null="false" 129 */ 130 public String getLastSource() 131 { 132 return lastSource; 133 } 134 void setLastSource(String source) 135 { 136 this.lastSource = source; 137 } 138 120 139 /* 121 140 From the NameableData interface
Note: See TracChangeset
for help on using the changeset viewer.