Monotone-Parent: e347244635dd06d86b291dac5a5f75e1f9d61eb9
Monotone-Revision: 9c0b64b5164d0b1f7b8b0a271122eb860a1f14df Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-05-30T21:17:26 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
5ccb4ffa2f
commit
b050971d38
|
@ -1,3 +1,9 @@
|
||||||
|
2011-05-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* GCSFolder.m (-lastModificationDate): new method that returns the
|
||||||
|
last modification date based on the higher value of the
|
||||||
|
"c_lastmodified" column.
|
||||||
|
|
||||||
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* EOQualifier+GCS.m (_appendNotQualifier:toString:): new method
|
* EOQualifier+GCS.m (_appendNotQualifier:toString:): new method
|
||||||
|
|
|
@ -140,6 +140,8 @@
|
||||||
|
|
||||||
- (unsigned int) recordsCountByExcludingDeleted: (BOOL) includeDeleted;
|
- (unsigned int) recordsCountByExcludingDeleted: (BOOL) includeDeleted;
|
||||||
|
|
||||||
|
- (NSCalendarDate *) lastModificationDate;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* __GDLContentStore_GCSFolder_H__ */
|
#endif /* __GDLContentStore_GCSFolder_H__ */
|
||||||
|
|
|
@ -1368,6 +1368,36 @@ static NSArray *contentFieldNames = nil;
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSCalendarDate *) lastModificationDate
|
||||||
|
{
|
||||||
|
NSArray *records;
|
||||||
|
EOFetchSpecification *lmSpec;
|
||||||
|
EOSortOrdering *ordering;
|
||||||
|
NSNumber *lastModified;
|
||||||
|
NSCalendarDate *lastModificationDate = nil;
|
||||||
|
|
||||||
|
ordering = [EOSortOrdering sortOrderingWithKey: @"c_lastmodified"
|
||||||
|
selector: EOCompareDescending];
|
||||||
|
lmSpec = [EOFetchSpecification
|
||||||
|
fetchSpecificationWithEntityName: [self folderName]
|
||||||
|
qualifier: nil
|
||||||
|
sortOrderings: [NSArray arrayWithObject: ordering]];
|
||||||
|
|
||||||
|
records = [self fetchFields: [NSArray arrayWithObject: @"c_lastmodified"]
|
||||||
|
fetchSpecification: lmSpec
|
||||||
|
ignoreDeleted: NO];
|
||||||
|
if ([records count])
|
||||||
|
{
|
||||||
|
lastModified
|
||||||
|
= [[records objectAtIndex: 0] objectForKey: @"c_lastmodified"];
|
||||||
|
lastModificationDate
|
||||||
|
= [NSCalendarDate dateWithTimeIntervalSince1970:
|
||||||
|
(NSTimeInterval) [lastModified intValue]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return lastModificationDate;
|
||||||
|
}
|
||||||
|
|
||||||
/* description */
|
/* description */
|
||||||
|
|
||||||
- (NSString *)description {
|
- (NSString *)description {
|
||||||
|
|
Loading…
Reference in New Issue