Subversion Repositories SmartDukaan

Rev

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

Rev 245 Rev 249
Line 985... Line 985...
985
	 * 
985
	 * 
986
	 * @throws Exception
986
	 * @throws Exception
987
	 */
987
	 */
988
	private void storeEntities() throws Exception {	
988
	private void storeEntities() throws Exception {	
989
		EntityContainer entContainer = this.getEntityContainer();
989
		EntityContainer entContainer = this.getEntityContainer();
990
	
-
 
991
		String entityDBFile = Utils.ENTITIES_DB_PATH + "entities.ser";
-
 
992
		
-
 
993
		// Remove existing
-
 
994
		DBUtils.delete(entityDBFile);
-
 
995
		
990
		
996
		log.info("getEntities().size():" + entContainer.getEntities().size());
991
		Map<Long, Entity> entities = entContainer.getEntities();
997
		DBUtils.store(entContainer.getEntities(), entityDBFile);
992
		log.info("entities.size():" + entities.size());
998
		
993
		
999
		String entitiesbycategoryDBFile = Utils.ENTITIES_DB_PATH + 
-
 
1000
			"entitiesbycategory.ser";
-
 
1001
	
-
 
1002
		// Remove existing
-
 
1003
		DBUtils.delete(entitiesbycategoryDBFile);
994
		Map<Long, List<Entity>> entitiesByCategory = 
1004
 
-
 
1005
		log.info("entgetEntitiesbyCategory().size():" + 
995
			entContainer.getEntitiesbyCategory();
1006
				entContainer.getEntitiesbyCategory().size());
996
		log.info("entitiesByCategory.size():" + entitiesByCategory.size());
1007
		
997
		
1008
		DBUtils.store(entContainer.getEntitiesbyCategory(), 
998
		CreationUtils.rewriteEntityDB(entities, entitiesByCategory);
1009
				entitiesbycategoryDBFile);
-
 
1010
	}
999
	}
1011
	
1000
	
1012
	/**
1001
	/**
1013
	 * @param exception the exception to set
1002
	 * @param exception the exception to set
1014
	 */
1003
	 */