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 1... Line 1...
1
 
1
 
2
package in.shop2020.storage.bdb;
2
package in.shop2020.storage.bdb;
3
 
3
 
4
import in.shop2020.metamodel.core.Entity;
4
import in.shop2020.metamodel.core.Entity;
5
import in.shop2020.metamodel.core.EntityState;
5
import in.shop2020.metamodel.core.EntityState;
-
 
6
import in.shop2020.metamodel.core.Helpdoc;
6
import in.shop2020.util.Utils;
7
import in.shop2020.util.Utils;
7
 
8
 
8
 
9
 
9
import java.util.Collection;
10
import java.util.Collection;
10
import java.util.Map;
11
import java.util.Map;
Line 92... Line 93...
92
	public Collection<Entity> getEntitisByCategory(long categoryId){
93
	public Collection<Entity> getEntitisByCategory(long categoryId){
93
    	return views.getEntityByCategoryMap().duplicates(categoryId);
94
    	return views.getEntityByCategoryMap().duplicates(categoryId);
94
    	
95
    	
95
    }
96
    }
96
    
97
    
-
 
98
    
-
 
99
    /**
-
 
100
     * get all helpdocs
-
 
101
     * @return
-
 
102
     */
-
 
103
    @SuppressWarnings("unchecked")
-
 
104
	public Map<Long, Helpdoc> getHelpdocs(){
-
 
105
    	return views.getHelpdocMap();
-
 
106
    }
-
 
107
    
-
 
108
    /**
-
 
109
     * Get helpdoc for an given id
-
 
110
     * @param helpdocId
-
 
111
     * @return
-
 
112
     */
-
 
113
    public Helpdoc getHelpdoc(long helpdocId){
-
 
114
    	return (Helpdoc) views.getHelpdocMap().get(helpdocId);
-
 
115
    }
-
 
116
 
-
 
117
    /**
-
 
118
     * update helpdpc for an given entity
-
 
119
     * @param helpdoc
-
 
120
     */
-
 
121
    @SuppressWarnings("unchecked")
-
 
122
	public void updateHelpdoc(Helpdoc helpdoc){
-
 
123
    	Map states = views.getHelpdocMap();
-
 
124
    	states.put(new Long(helpdoc.getID()), helpdoc);
-
 
125
    }
-
 
126
    
-
 
127
    
97
    /**
128
    /**
98
     * get metadata for all entities
129
     * get metadata for all entities
99
     * @return
130
     * @return
100
     */
131
     */
101
    @SuppressWarnings("unchecked")
132
    @SuppressWarnings("unchecked")