Subversion Repositories SmartDukaan

Rev

Rev 1061 | Rev 2275 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1061 Rev 1153
Line 1... Line 1...
1
package in.shop2020.storage.bdb;
1
package in.shop2020.storage.bdb;
2
 
2
 
3
import in.shop2020.metamodel.core.Entity;
3
import in.shop2020.metamodel.core.Entity;
4
import in.shop2020.metamodel.core.EntityState;
4
import in.shop2020.metamodel.core.EntityState;
5
import in.shop2020.metamodel.core.Media;
-
 
6
 
5
 
7
import com.sleepycat.bind.EntryBinding;
6
import com.sleepycat.bind.EntryBinding;
8
import com.sleepycat.bind.serial.ClassCatalog;
7
import com.sleepycat.bind.serial.ClassCatalog;
9
import com.sleepycat.bind.serial.SerialBinding;
8
import com.sleepycat.bind.serial.SerialBinding;
10
import com.sleepycat.collections.StoredEntrySet;
9
import com.sleepycat.collections.StoredEntrySet;
11
import com.sleepycat.collections.StoredMap;
10
import com.sleepycat.collections.StoredMap;
12
import com.sleepycat.persist.model.EntityMetadata;
-
 
13
 
11
 
14
public class ContentViews {
12
public class ContentViews {
15
 
13
 
16
    private StoredMap entityMap;
14
    private StoredMap entityMap;
17
    private StoredMap entityMetadataMap;
15
    private StoredMap entityMetadataMap;
Line 67... Line 65...
67
    // obtained directly from the Map.entrySet() method, but convenience
65
    // obtained directly from the Map.entrySet() method, but convenience
68
    // methods are provided here to return them in order to avoid down-casting
66
    // methods are provided here to return them in order to avoid down-casting
69
    // elsewhere.
67
    // elsewhere.
70
 
68
 
71
    /**
69
    /**
72
     * Return a map view of the part storage container.
70
     * Return a map view of the entity storage container.
73
     */
71
     */
74
    public final StoredMap getEntityMap() {
72
    public final StoredMap getEntityMap() {
75
 
73
 
76
        return entityMap;
74
        return entityMap;
77
    }
75
    }
78
 
76
 
-
 
77
    /**
-
 
78
     * 
-
 
79
     * @return a map view of the entities by category storage container.
-
 
80
     */
79
    public final StoredMap getEntityByCategoryMap() {
81
    public final StoredMap getEntityByCategoryMap() {
80
 
82
 
81
        return entityByCategoryMap;
83
        return entityByCategoryMap;
82
    }
84
    }
83
    
85
    
84
    
86
    
85
    /**
87
    /**
86
     * Return a map view of the part storage container.
88
     * Return a map view of the entity metadata storage container.
87
     */
89
     */
88
    public final StoredMap getEntityMetadataMap() {
90
    public final StoredMap getEntityMetadataMap() {
89
 
91
 
90
        return entityMetadataMap;
92
        return entityMetadataMap;
91
    }
93
    }
92
 
94
 
93
    /**
95
    /**
94
     * Return a map view of the part storage container.
96
     * Return a map view of the definition storage container.
95
     */
97
     */
96
    public final StoredMap getDefinitionMap() {
98
    public final StoredMap getDefinitionMap() {
97
 
99
 
98
        return definitionMap;
100
        return definitionMap;
99
    }
101
    }
100
 
102
 
101
    /**
103
    /**
102
     * Return a map view of the supplier storage container.
104
     * Return a map view of the object storage container.
103
     */
105
     */
104
    public final StoredMap getDataObjectMap() {
106
    public final StoredMap getDataObjectMap() {
105
 
107
 
106
        return dataObjectMap;
108
        return dataObjectMap;
107
    }
109
    }
108
 
110
 
109
    /**
111
    /**
110
     * Return an entry set view of the part storage container.
112
     * Return an entry set view of the entity storage container.
111
     */
113
     */
112
    public final StoredEntrySet getEntityEntrySet() {
114
    public final StoredEntrySet getEntityEntrySet() {
113
 
115
 
114
        return (StoredEntrySet) entityMap.entrySet();
116
        return (StoredEntrySet) entityMap.entrySet();
115
    }
117
    }
116
    
118
    
117
    /**
119
    /**
118
     * Return an entry set view of the part storage container.
120
     * Return an entry set view of the entity metadata storage container.
119
     */
121
     */
120
    public final StoredEntrySet getEntityMetaDataEntrySet() {
122
    public final StoredEntrySet getEntityMetaDataEntrySet() {
121
 
123
 
122
        return (StoredEntrySet) entityMetadataMap.entrySet();
124
        return (StoredEntrySet) entityMetadataMap.entrySet();
123
    }
125
    }
124
 
126
 
125
    /**
127
    /**
126
     * Return an entry set view of the part storage container.
128
     * Return an entry set view of the definitions storage container.
127
     */
129
     */
128
    public final StoredEntrySet getDefinitionEntrySet() {
130
    public final StoredEntrySet getDefinitionEntrySet() {
129
    	
131
    	
130
        return (StoredEntrySet) definitionMap.entrySet();
132
        return (StoredEntrySet) definitionMap.entrySet();
131
    }
133
    }
132
    
134
    
133
 
135
 
134
    /**
136
    /**
135
     * Return an entry set view of the supplier storage container.
137
     * Return an entry set view of the object storage container.
136
     */
138
     */
137
    public final StoredEntrySet getDataObjectEntrySet() {
139
    public final StoredEntrySet getDataObjectEntrySet() {
138
 
-
 
139
        return (StoredEntrySet) dataObjectMap.entrySet();
140
        return (StoredEntrySet) dataObjectMap.entrySet();
140
    }
141
    }
141
 
142
 
142
}
143
}