Subversion Repositories SmartDukaan

Rev

Rev 2768 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2768 Rev 2838
Line 26... Line 26...
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
    private static final String HELPDOC_STORE = "helpdoc_store";
31
    private static final String BRAND_STORE = "brand_store";
31
    private static final String SPECIAL_PAGE_STORE = "special_page";
32
 
32
 
33
    private static final String ENTITY_CATEGORY_INDEX = "entity_category_index";
33
    private static final String ENTITY_CATEGORY_INDEX = "entity_category_index";
34
    
34
    
35
    private static final String DEFINITION_STORE = "definition_store";
35
    private static final String DEFINITION_STORE = "definition_store";
36
    
36
    
37
    private Environment env;
37
    private Environment env;
38
    private Database entityDb;
38
    private Database entityDb;
39
    private Database entityMetadataDb;
39
    private Database entityMetadataDb;
40
    private Database helpdocDb;
40
    private Database helpdocDb;
41
    private Database brandDb;
41
    private Database specialPageDb;
42
    private Database dataObjectDb;
42
    private Database dataObjectDb;
43
    private Database definitionDb;
43
    private Database definitionDb;
44
    private SecondaryDatabase entityByCategoryDb;
44
    private SecondaryDatabase entityByCategoryDb;
45
    private StoredClassCatalog javaCatalog;
45
    private StoredClassCatalog javaCatalog;
46
 
46
 
Line 77... Line 77...
77
        entityDb = env.openDatabase(null, ENTITY_STORE, dbConfig);
77
        entityDb = env.openDatabase(null, ENTITY_STORE, dbConfig);
78
 
78
 
79
        entityMetadataDb = env.openDatabase(null, ENTITY_METADATA_STORE, dbConfig);
79
        entityMetadataDb = env.openDatabase(null, ENTITY_METADATA_STORE, dbConfig);
80
        
80
        
81
        helpdocDb = env.openDatabase(null, HELPDOC_STORE, dbConfig);
81
        helpdocDb = env.openDatabase(null, HELPDOC_STORE, dbConfig);
82
        brandDb   = env.openDatabase(null, BRAND_STORE, dbConfig);
82
        specialPageDb   = env.openDatabase(null, SPECIAL_PAGE_STORE, dbConfig);
83
 
83
 
84
        dataObjectDb = env.openDatabase(null, DATA_OBJECT_STORE, dbConfig);
84
        dataObjectDb = env.openDatabase(null, DATA_OBJECT_STORE, dbConfig);
85
        
85
        
86
        definitionDb = env.openDatabase(null, DEFINITION_STORE, dbConfig);
86
        definitionDb = env.openDatabase(null, DEFINITION_STORE, dbConfig);
87
        
87
        
Line 141... Line 141...
141
    public final Database getHelpdocDatabase() {
141
    public final Database getHelpdocDatabase() {
142
        return helpdocDb;
142
        return helpdocDb;
143
    }
143
    }
144
 
144
 
145
    /**
145
    /**
146
     * @return Returns the brand storage container.
146
     * @return Returns the special page storage container.
147
     */
147
     */
148
    public final Database getBrandDatabase() {
148
    public final Database getSpecialPageDatabase() {
149
        return brandDb;
149
        return specialPageDb;
150
    }
150
    }
151
 
151
 
152
    /**
152
    /**
153
     * @return Return the entity storage container.
153
     * @return Return the entity storage container.
154
     */
154
     */
Line 194... Line 194...
194
    	entityByCategoryDb.close();
194
    	entityByCategoryDb.close();
195
    	
195
    	
196
        entityDb.close();
196
        entityDb.close();
197
        entityMetadataDb.close();
197
        entityMetadataDb.close();
198
        helpdocDb.close();
198
        helpdocDb.close();
199
        brandDb.close();
199
        specialPageDb.close();
200
        dataObjectDb.close();
200
        dataObjectDb.close();
201
        definitionDb.close();
201
        definitionDb.close();
202
        
202
        
203
        // And don't forget to close the catalog and the environment.
203
        // And don't forget to close the catalog and the environment.
204
        javaCatalog.close();
204
        javaCatalog.close();