| Line 1... |
Line 1... |
| 1 |
package in.shop2020.storage.bdb;
|
1 |
package in.shop2020.storage.bdb;
|
| 2 |
|
2 |
|
| - |
|
3 |
import in.shop2020.metamodel.core.Brand;
|
| 3 |
import in.shop2020.metamodel.core.Entity;
|
4 |
import in.shop2020.metamodel.core.Entity;
|
| 4 |
import in.shop2020.metamodel.core.EntityState;
|
5 |
import in.shop2020.metamodel.core.EntityState;
|
| 5 |
import in.shop2020.metamodel.core.Helpdoc;
|
6 |
import in.shop2020.metamodel.core.Helpdoc;
|
| 6 |
|
7 |
|
| 7 |
import com.sleepycat.bind.EntryBinding;
|
8 |
import com.sleepycat.bind.EntryBinding;
|
| Line 13... |
Line 14... |
| 13 |
public class ContentViews {
|
14 |
public class ContentViews {
|
| 14 |
|
15 |
|
| 15 |
private StoredMap entityMap;
|
16 |
private StoredMap entityMap;
|
| 16 |
private StoredMap entityMetadataMap;
|
17 |
private StoredMap entityMetadataMap;
|
| 17 |
private StoredMap helpdocMap;
|
18 |
private StoredMap helpdocMap;
|
| - |
|
19 |
private StoredMap<Long, Brand> brandMap;
|
| 18 |
private StoredMap dataObjectMap;
|
20 |
private StoredMap dataObjectMap;
|
| 19 |
private StoredMap definitionMap;
|
21 |
private StoredMap definitionMap;
|
| 20 |
|
22 |
|
| 21 |
private StoredMap entityByCategoryMap;
|
23 |
private StoredMap entityByCategoryMap;
|
| 22 |
|
24 |
|
| Line 37... |
Line 39... |
| 37 |
EntryBinding entityMetadataDataBinding = new SerialBinding(catalog, EntityState.class);
|
39 |
EntryBinding entityMetadataDataBinding = new SerialBinding(catalog, EntityState.class);
|
| 38 |
|
40 |
|
| 39 |
EntryBinding helpdocKeyBinding = new SerialBinding(catalog, Long.class);
|
41 |
EntryBinding helpdocKeyBinding = new SerialBinding(catalog, Long.class);
|
| 40 |
EntryBinding helpdocDataBinding = new SerialBinding(catalog, Helpdoc.class);
|
42 |
EntryBinding helpdocDataBinding = new SerialBinding(catalog, Helpdoc.class);
|
| 41 |
|
43 |
|
| - |
|
44 |
EntryBinding<Long> brandKeyBinding = new SerialBinding<Long>(catalog, Long.class);
|
| - |
|
45 |
EntryBinding<Brand> brandDataBinding = new SerialBinding<Brand>(catalog, Brand.class);
|
| - |
|
46 |
|
| 42 |
EntryBinding commonKeyBinding = new SerialBinding(catalog, String.class);
|
47 |
EntryBinding commonKeyBinding = new SerialBinding(catalog, String.class);
|
| 43 |
EntryBinding commonDataBinding = new SerialBinding(catalog, Object.class);
|
48 |
EntryBinding commonDataBinding = new SerialBinding(catalog, Object.class);
|
| 44 |
|
49 |
|
| 45 |
EntryBinding definitionKeyBinding = new SerialBinding(catalog, String.class);
|
50 |
EntryBinding definitionKeyBinding = new SerialBinding(catalog, String.class);
|
| 46 |
EntryBinding definitionDataBinding = new SerialBinding(catalog, Object.class);
|
51 |
EntryBinding definitionDataBinding = new SerialBinding(catalog, Object.class);
|
| Line 57... |
Line 62... |
| 57 |
|
62 |
|
| 58 |
entityMetadataMap = new StoredMap(db.getEntityMetadataDatabase(),entityMetadataKeyBinding, entityMetadataDataBinding, true);
|
63 |
entityMetadataMap = new StoredMap(db.getEntityMetadataDatabase(),entityMetadataKeyBinding, entityMetadataDataBinding, true);
|
| 59 |
|
64 |
|
| 60 |
helpdocMap = new StoredMap(db.getHelpdocDatabase(), helpdocKeyBinding, helpdocDataBinding, true);
|
65 |
helpdocMap = new StoredMap(db.getHelpdocDatabase(), helpdocKeyBinding, helpdocDataBinding, true);
|
| 61 |
|
66 |
|
| - |
|
67 |
brandMap = new StoredMap<Long, Brand>(db.getBrandDatabase(), brandKeyBinding, brandDataBinding, true);
|
| - |
|
68 |
|
| 62 |
dataObjectMap = new StoredMap(db.getDataObjectDatabase(), commonKeyBinding, commonDataBinding, true);
|
69 |
dataObjectMap = new StoredMap(db.getDataObjectDatabase(), commonKeyBinding, commonDataBinding, true);
|
| 63 |
|
70 |
|
| 64 |
definitionMap = new StoredMap(db.getDefinitionDatabase(), definitionKeyBinding, definitionDataBinding, true);
|
71 |
definitionMap = new StoredMap(db.getDefinitionDatabase(), definitionKeyBinding, definitionDataBinding, true);
|
| 65 |
|
72 |
|
| 66 |
entityByCategoryMap = new StoredMap(db.getCategoryByCategoryDatabase(), entityByCategoryKeyBinding, entityDataBinding, true);
|
73 |
entityByCategoryMap = new StoredMap(db.getCategoryByCategoryDatabase(), entityByCategoryKeyBinding, entityDataBinding, true);
|
| Line 104... |
Line 111... |
| 104 |
*/
|
111 |
*/
|
| 105 |
public final StoredMap getHelpdocMap() {
|
112 |
public final StoredMap getHelpdocMap() {
|
| 106 |
|
113 |
|
| 107 |
return helpdocMap;
|
114 |
return helpdocMap;
|
| 108 |
}
|
115 |
}
|
| - |
|
116 |
|
| - |
|
117 |
/**
|
| - |
|
118 |
* Return a map view of the brand storage container.
|
| - |
|
119 |
*/
|
| - |
|
120 |
public final StoredMap<Long, Brand> getBrandMap() {
|
| - |
|
121 |
return brandMap;
|
| 109 |
|
122 |
}
|
| - |
|
123 |
|
| 110 |
/**
|
124 |
/**
|
| 111 |
* Return a map view of the definition storage container.
|
125 |
* Return a map view of the definition storage container.
|
| 112 |
*/
|
126 |
*/
|
| 113 |
public final StoredMap getDefinitionMap() {
|
127 |
public final StoredMap getDefinitionMap() {
|
| 114 |
|
128 |
|