 
 import Foundation
 
-// TODO 
-// HEADER = H
-// OBJECT = O
-
-class ObjectStore<O: ObjectCoding, H> : DataStore<O,H> {
+class ObjectStore<O: PersistentObject, H: DataStoreHeader> : DataStore<O.DataType,H> {
     
     //var objectType : Class!
     

    func deleteObject(aObj: O) {
        
        if aObj.uid {
            self.delete(aObj.uid!)
            aObj.uid = nil;
        }
    }

        super.init(url: url)
    }
    
    func registerObject() -> UID {
        var pos = self.register()
        return self.calculateID(pos)
    }
    
    func createObject() -> O {
        
        var result = O()
        
        self.addObject(result)
        
