| Line 1... |
Line 1... |
| 1 |
package in.shop2020.util;
|
1 |
package in.shop2020.util;
|
| 2 |
|
2 |
|
| 3 |
import in.shop2020.metamodel.core.Bullet;
|
3 |
import in.shop2020.metamodel.core.Bullet;
|
| - |
|
4 |
import in.shop2020.metamodel.core.Entity;
|
| 4 |
import in.shop2020.metamodel.core.Feature;
|
5 |
import in.shop2020.metamodel.core.Feature;
|
| 5 |
import in.shop2020.metamodel.core.PrimitiveDataObject;
|
6 |
import in.shop2020.metamodel.core.PrimitiveDataObject;
|
| 6 |
import in.shop2020.metamodel.core.Slide;
|
7 |
import in.shop2020.metamodel.core.Slide;
|
| 7 |
import in.shop2020.metamodel.definitions.Category;
|
8 |
import in.shop2020.metamodel.definitions.Category;
|
| 8 |
import in.shop2020.metamodel.util.CreationUtils;
|
9 |
import in.shop2020.metamodel.util.CreationUtils;
|
| Line 73... |
Line 74... |
| 73 |
StringBuffer sbProds = new StringBuffer();
|
74 |
StringBuffer sbProds = new StringBuffer();
|
| 74 |
comparisonStats = CreationUtils.getComparisonStats();
|
75 |
comparisonStats = CreationUtils.getComparisonStats();
|
| 75 |
if(comparisonStats != null){
|
76 |
if(comparisonStats != null){
|
| 76 |
for(Map.Entry<Long, Map<Long, Long>> entry : comparisonStats.entrySet()){
|
77 |
for(Map.Entry<Long, Map<Long, Long>> entry : comparisonStats.entrySet()){
|
| 77 |
Long entityId = entry.getKey();
|
78 |
Long entityId = entry.getKey();
|
| - |
|
79 |
Entity entity = CreationUtils.getEntity(entityId);
|
| - |
|
80 |
if(entity == null) {
|
| - |
|
81 |
continue;
|
| - |
|
82 |
}
|
| 78 |
ExpandedEntity expandedEntity = new ExpandedEntity(CreationUtils.getEntity(entityId));
|
83 |
ExpandedEntity expandedEntity = new ExpandedEntity(entity);
|
| 79 |
Category category = expandedEntity.getCategory();
|
84 |
Category category = expandedEntity.getCategory();
|
| 80 |
if(category == null){
|
85 |
if(category == null){
|
| 81 |
continue;
|
86 |
continue;
|
| 82 |
}
|
87 |
}
|
| 83 |
if(this.validEntityIds.contains(entityId) && category.getParentCategory().getID()==Utils.MOBILE_PHONES_CATAGORY) {
|
88 |
if(this.validEntityIds.contains(entityId) && category.getParentCategory().getID()==Utils.MOBILE_PHONES_CATAGORY) {
|
| Line 120... |
Line 125... |
| 120 |
StringBuffer sbProds2 = new StringBuffer();
|
125 |
StringBuffer sbProds2 = new StringBuffer();
|
| 121 |
for (Long anotherEntityId : entry.getValue().keySet()) {
|
126 |
for (Long anotherEntityId : entry.getValue().keySet()) {
|
| 122 |
if(entityId.equals(anotherEntityId)){
|
127 |
if(entityId.equals(anotherEntityId)){
|
| 123 |
continue;
|
128 |
continue;
|
| 124 |
}
|
129 |
}
|
| - |
|
130 |
Entity anotherEntity = CreationUtils.getEntity(entityId);
|
| - |
|
131 |
if(anotherEntity == null) {
|
| - |
|
132 |
continue;
|
| - |
|
133 |
}
|
| 125 |
ExpandedEntity anotherExpandedEntity = new ExpandedEntity(CreationUtils.getEntity(anotherEntityId));
|
134 |
ExpandedEntity anotherExpandedEntity = new ExpandedEntity(anotherEntity);
|
| 126 |
Category anotherCategory = anotherExpandedEntity.getCategory();
|
135 |
Category anotherCategory = anotherExpandedEntity.getCategory();
|
| 127 |
if(anotherCategory == null){
|
136 |
if(anotherCategory == null){
|
| 128 |
continue;
|
137 |
continue;
|
| 129 |
}
|
138 |
}
|
| 130 |
|
139 |
|