- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIObjectStore.cs
More file actions
Latest commit
61 lines (49 loc) · 2.45 KB
/
Copy pathIObjectStore.cs
File metadata and controls
61 lines (49 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Data;
namespaceSharpQuant.ObjectStore
{
publicinterfaceIObjectStore
{
//Access to the serializer
IObjectSerializerSerializer{get;}
// Gets a single catalogue
ICatalogueGetCatalogue(stringcode);
// Creates a new catalogue (think table in a DB)
boolCreateCatalogue(ICataloguecatalogue,booldropifexists=false);
// Careful! Deletes entire catalogue!
boolDeleteCatalogue(stringcode);
// Updates catalogue information
boolUpdateCatalogue(ICataloguecatalogue);
//gets all the catalogues
IList<ICatalogue>GetCatalogues();
// Deletes all versions of an object! Returns how many records where deleted.
intDeleteObject(stringcatalogue,stringID);
// Deletes a specific version of an object! Returns how many records where deleted.
intDeleteObject(stringcatalogue,stringID,DateTimeversion);
//check whether a particular version exists
boolExist(stringcatalogue,stringDBID,DateTimeversion);
//last version of an ID
DateTimeLastVersion(stringcatalogue,stringID);
//last version before 'version'
DateTimeLastVersion(stringcatalogue,stringID,DateTimeversion);
//Create or update a serialized object
//tags will be overwritten if updateinfo = true
boolCreateOrUpdate<T>(IObjectInfo<T>info,boolupdateInfo=true);
boolCreateOrUpdate(IObjectInfoinfo,boolupdateInfo=true);
//get last version
IObjectInfo<T>GetObject<T>(stringcatalogue,stringID);
//get last version before 'version'
IObjectInfo<T>GetObject<T>(stringcatalogue,stringID,DateTimeversion);
//get last version
IObjectInfoGetObjectInfo(stringcatalogue,stringID);
//get last version before 'version'
IObjectInfoGetObjectInfo(stringcatalogue,stringID,DateTimeversion);
//Gets all infos without deserializing the objects of the entire catalogue
IList<IObjectInfo>GetAllInfos(stringcatalogue,stringtype="%",boolread_data=false);
//Gets all infos without deserializing the objects for an ID
IList<IObjectInfo>GetAllInfosForID(stringcatalogue,stringID,boolread_data=false);
//Transaction support
IDbTransactionBeginTransaction(IsolationLevelil=IsolationLevel.Unspecified);
}
}