Subversion Repositories SmartDukaan

Rev

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

Rev 8865 Rev 8870
Line 92... Line 92...
92
     * @return Collection<Entity>
92
     * @return Collection<Entity>
93
     */
93
     */
94
    public Collection<Entity> getEntitisByCategory(long categoryId){
94
    public Collection<Entity> getEntitisByCategory(long categoryId){
95
    	List <Entity> list = new ArrayList<Entity>();
95
    	List <Entity> list = new ArrayList<Entity>();
96
    	DBObject dbo = new BasicDBObject();
96
    	DBObject dbo = new BasicDBObject();
97
    	dbo.put("categoryId", categoryId);
97
    	dbo.put("categoryID", categoryId);
98
    	Iterator<DBObject> it = views.entity.find(dbo).iterator();
98
    	Iterator<DBObject> it = views.entity.find(dbo).iterator();
99
    	while (it.hasNext()) {
99
    	while (it.hasNext()) {
100
    		list.add((Entity)toObject(it.next(),Entity.class));
100
    		list.add((Entity)toObject(it.next(),Entity.class));
101
    	}
101
    	}
102
    	return list;
102
    	return list;