Subversion Repositories SmartDukaan

Rev

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

Rev 1153 Rev 2275
Line 25... Line 25...
25
 
25
 
26
    private static final String CLASS_CATALOG = "java_class_catalog";
26
    private static final String CLASS_CATALOG = "java_class_catalog";
27
    private static final String ENTITY_STORE = "entity_store";
27
    private static final String ENTITY_STORE = "entity_store";
28
    private static final String DATA_OBJECT_STORE = "data_object_store";
28
    private static final String DATA_OBJECT_STORE = "data_object_store";
29
    private static final String ENTITY_METADATA_STORE = "entity_metadata_store";
29
    private static final String ENTITY_METADATA_STORE = "entity_metadata_store";
-
 
30
    private static final String HELPDOC_STORE = "helpdoc_store";
30
    
31
    
31
    private static final String ENTITY_CATEGORY_INDEX = "entity_category_index";
32
    private static final String ENTITY_CATEGORY_INDEX = "entity_category_index";
32
    
33
    
33
    private static final String DEFINITION_STORE = "definition_store";
34
    private static final String DEFINITION_STORE = "definition_store";
34
    
35
    
35
    private Environment env;
36
    private Environment env;
36
    private Database entityDb;
37
    private Database entityDb;
37
    private Database entityMetadataDb;
38
    private Database entityMetadataDb;
-
 
39
    private Database helpdocDb;
38
    private Database dataObjectDb;
40
    private Database dataObjectDb;
39
    private Database definitionDb;
41
    private Database definitionDb;
40
    private SecondaryDatabase entityByCategoryDb;
42
    private SecondaryDatabase entityByCategoryDb;
41
    private StoredClassCatalog javaCatalog;
43
    private StoredClassCatalog javaCatalog;
42
 
44
 
Line 72... Line 74...
72
        
74
        
73
        entityDb = env.openDatabase(null, ENTITY_STORE, dbConfig);
75
        entityDb = env.openDatabase(null, ENTITY_STORE, dbConfig);
74
 
76
 
75
        entityMetadataDb = env.openDatabase(null, ENTITY_METADATA_STORE, dbConfig);
77
        entityMetadataDb = env.openDatabase(null, ENTITY_METADATA_STORE, dbConfig);
76
        
78
        
-
 
79
        helpdocDb = env.openDatabase(null, HELPDOC_STORE, dbConfig);
-
 
80
        
77
        dataObjectDb = env.openDatabase(null, DATA_OBJECT_STORE, dbConfig);
81
        dataObjectDb = env.openDatabase(null, DATA_OBJECT_STORE, dbConfig);
78
        
82
        
79
        definitionDb = env.openDatabase(null, DEFINITION_STORE, dbConfig);
83
        definitionDb = env.openDatabase(null, DEFINITION_STORE, dbConfig);
80
        
84
        
81
        SecondaryConfig secConfig = new SecondaryConfig();
85
        SecondaryConfig secConfig = new SecondaryConfig();
Line 130... Line 134...
130
    }
134
    }
131
    
135
    
132
    /**
136
    /**
133
     * @return Return the entity storage container.
137
     * @return Return the entity storage container.
134
     */
138
     */
-
 
139
    public final Database getHelpdocDatabase() {
-
 
140
 
-
 
141
        return helpdocDb;
-
 
142
    }
-
 
143
    
-
 
144
    /**
-
 
145
     * @return Return the entity storage container.
-
 
146
     */
135
    public final Database getEntityDatabase() {
147
    public final Database getEntityDatabase() {
136
 
148
 
137
        return entityDb;
149
        return entityDb;
138
    }
150
    }
139
 
151
 
Line 173... Line 185...
173
 
185
 
174
    	entityByCategoryDb.close();
186
    	entityByCategoryDb.close();
175
    	
187
    	
176
        entityDb.close();
188
        entityDb.close();
177
        entityMetadataDb.close();
189
        entityMetadataDb.close();
-
 
190
        helpdocDb.close();
178
        dataObjectDb.close();
191
        dataObjectDb.close();
179
        definitionDb.close();
192
        definitionDb.close();
180
        
193
        
181
        // And don't forget to close the catalog and the environment.
194
        // And don't forget to close the catalog and the environment.
182
        javaCatalog.close();
195
        javaCatalog.close();