Subversion Repositories SmartDukaan

Rev

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

Rev 24 Rev 34
Line 5... Line 5...
5
 
5
 
6
import in.shop2020.metamodel.core.Entity;
6
import in.shop2020.metamodel.core.Entity;
7
import in.shop2020.metamodel.util.CN;
7
import in.shop2020.metamodel.util.CN;
8
import in.shop2020.metamodel.util.DBUtils;
8
import in.shop2020.metamodel.util.DBUtils;
9
import in.shop2020.metamodel.util.ExpandedEntity;
9
import in.shop2020.metamodel.util.ExpandedEntity;
-
 
10
import in.shop2020.util.Utils;
10
 
11
 
11
import java.io.Serializable;
12
import java.io.Serializable;
12
import java.util.ArrayList;
13
import java.util.ArrayList;
13
import java.util.List;
14
import java.util.List;
14
import java.util.Map;
15
import java.util.Map;
Line 64... Line 65...
64
	
65
	
65
	/**
66
	/**
66
	 * @return the entitiesbycategory
67
	 * @return the entitiesbycategory
67
	 * @throws Exception 
68
	 * @throws Exception 
68
	 */
69
	 */
69
	public Map<Long, List<Entity>> getEntitiesbycategory() throws Exception {
70
	public Map<Long, List<Entity>> getEntitiesbyCategory() throws Exception {
70
		if(this.entities == null) {
71
		if(this.entities == null) {
71
			this.getEntities();
72
			this.getEntities();
72
		}
73
		}
73
		
74
		
74
		return this.entitiesbycategory;
75
		return this.entitiesbycategory;
Line 96... Line 97...
96
	 */
97
	 */
97
	public List<Entity> getEntities(long categoryID) throws Exception {
98
	public List<Entity> getEntities(long categoryID) throws Exception {
98
		if(this.entities == null) {
99
		if(this.entities == null) {
99
			this.getEntities();
100
			this.getEntities();
100
		}
101
		}
-
 
102
		Utils.logger.info("this.entitiesbycategory=" + this.entitiesbycategory);
101
		
103
		
102
		return this.entitiesbycategory.get(new Long(categoryID));
104
		return this.entitiesbycategory.get(new Long(categoryID));
103
	}
105
	}
104
	
106
	
105
	/**
107
	/**
Line 121... Line 123...
121
		if(catentities == null) {
123
		if(catentities == null) {
122
			catentities = new ArrayList<Entity>();
124
			catentities = new ArrayList<Entity>();
123
		}
125
		}
124
		
126
		
125
		catentities.add(newEntity);
127
		catentities.add(newEntity);
126
		this.entitiesbycategory.put(newEntity.getCategoryID(), catentities);
128
		this.entitiesbycategory.put(new Long(newEntity.getCategoryID()), 
-
 
129
				catentities);
127
	}
130
	}
128
	
131
	
129
	/**
132
	/**
130
	 * 
133
	 * 
131
	 * @param entityID
134
	 * @param entityID