Changeset 246
- Timestamp:
- 03/01/06 23:04:29
- Files:
-
- trunk/calendar3/calCore/resources/hbms/Event.hbm.xml (modified) (3 diffs)
- trunk/calendar3/calCore/resources/hbms/EventAnnotation.hbm.xml (modified) (3 diffs)
- trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/rules/EntityFieldRule.java (modified) (2 diffs)
- trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/rules/EventFieldRule.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/calCore/resources/hbms/Event.hbm.xml
r235 r246 40 40 not-null="true" /> 41 41 <property name="tzid" column="start_tzid" type="string" /> 42 <property name="dtval" column="start_dtval" type="string" 42 <property name="dtval" column="start_dtval" type="string" length="16" 43 43 not-null="true" /> 44 <property name="date" column="start_date" type="string" 44 <property name="date" column="start_date" type="string" length="16" 45 45 not-null="true" 46 46 index="idx_event_start" /> … … 53 53 <property name="dateType" column="end_date_type" type="true_false" /> 54 54 <property name="tzid" column="end_tzid" type="string" /> 55 <property name="dtval" column="end_dtval" type="string" />56 <property name="date" column="end_date" type="string" 55 <property name="dtval" column="end_dtval" type="string" length="16" /> 56 <property name="date" column="end_date" type="string" length="16" 57 57 index="idx_event_end" /> 58 58 </component> … … 96 96 97 97 <property name="lastmod" type="string" > 98 <column name="lastmod" not-null="true" />98 <column name="lastmod" length="16" not-null="true" /> 99 99 </property> 100 100 101 101 <property name="created" type="string"> 102 <column name="created" not-null="true" />102 <column name="created" length="16" not-null="true" /> 103 103 </property> 104 104 trunk/calendar3/calCore/resources/hbms/EventAnnotation.hbm.xml
r235 r246 46 46 /> 47 47 <property name="tzid" column="start_tzid" type="string" /> 48 <property name="dtval" column="start_dtval" type="string" 48 <property name="dtval" column="start_dtval" type="string" length="16" 49 49 /> 50 <property name="date" column="start_date" type="string" 50 <property name="date" column="start_date" type="string" length="16" 51 51 index="idx_eventann_start" /> 52 52 </component> … … 58 58 <property name="dateType" column="end_date_type" type="true_false" /> 59 59 <property name="tzid" column="end_tzid" type="string" /> 60 <property name="dtval" column="end_dtval" type="string" />61 <property name="date" column="end_date" type="string" 60 <property name="dtval" column="end_dtval" type="string" length="16" /> 61 <property name="date" column="end_date" type="string" length="16" 62 62 index="idx_eventann_end" /> 63 63 </component> … … 97 97 98 98 <property name="lastmod" type="string" > 99 <column name="lastmod" />99 <column name="lastmod" length="16" /> 100 100 </property> 101 101 102 102 <property name="created" type="string"> 103 <column name="created" />103 <column name="created" length="16" /> 104 104 </property> 105 105 trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/rules/EntityFieldRule.java
r59 r246 250 250 field(name); 251 251 } 252 253 protected String fixedDateTimeFld() throws Exception { 254 String dtVal = stringFld(); 255 if ((dtVal.length() == 8) || 256 ((dtVal.charAt(13) == '0') && (dtVal.charAt(14) == '0'))) { 257 return dtVal; 258 } 259 260 String prefix = dtVal.substring(0, 13); 261 262 if (dtVal.length() == 16) { 263 return prefix + "00Z"; 264 } 265 266 return prefix + "00"; 267 } 252 268 253 269 /** prehib to hib */ … … 300 316 301 317 String tmval = "T" + fldval.substring(0, 2) + fldval.substring(3, 5) + 302 fldval.substring(6, 8); 318 //fldval.substring(6, 8); 319 "00"; // seconds always 0 303 320 304 321 /* XXX We need to handle timezones here as well */ trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/rules/EventFieldRule.java
r59 r246 133 133 tzid = stringFld(); 134 134 } else if (name.equals("start-dtval")) { 135 dtVal = stringFld();135 dtVal = fixedDateTimeFld(); 136 136 } else if (name.equals("start-date")) { 137 137 // Could compare given UTC time … … 145 145 tzid = stringFld(); 146 146 } else if (name.equals("end-dtval")) { 147 dtVal = stringFld();147 dtVal = fixedDateTimeFld(); 148 148 } else if (name.equals("end-date")) { 149 149 // Could compare given UTC time
