Subversion Repositories SmartDukaan

Rev

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

Rev 8913 Rev 9051
Line 117... Line 117...
117
		contentmigrator.touchEntityState(1008714l);
117
		contentmigrator.touchEntityState(1008714l);
118
		contentmigrator.touchEntityState(1008715l);
118
		contentmigrator.touchEntityState(1008715l);
119
		contentmigrator.touchEntityState(1005505l);
119
		contentmigrator.touchEntityState(1005505l);
120
		contentmigrator.touchEntityState(1006864l);*/
120
		contentmigrator.touchEntityState(1006864l);*/
121
		//contentmigrator.clearEmptyPrimitiveBullets();
121
		//contentmigrator.clearEmptyPrimitiveBullets();
122
		//contentmigrator.migrateSoftCategories();
122
		contentmigrator.migrateSoftCategories();
123
		contentmigrator.updateSummaryMediaLabel();
123
		//contentmigrator.updateSummaryMediaLabel();
124
	}
124
	}
125
	
125
	
126
	private void changeKeys() throws Exception {
126
	private void changeKeys() throws Exception {
127
		Map<Long, Entity>  e = CreationUtils.getEntities();
127
		Map<Long, Entity>  e = CreationUtils.getEntities();
128
		for (Map.Entry<Long, Entity> entry : e.entrySet()) {
128
		for (Map.Entry<Long, Entity> entry : e.entrySet()) {
Line 216... Line 216...
216
	}
216
	}
217
	private void touchEntityState(Long eId) throws Exception {
217
	private void touchEntityState(Long eId) throws Exception {
218
		EntityState es = CreationUtils.getEntityState(eId);
218
		EntityState es = CreationUtils.getEntityState(eId);
219
		es.setMerkedReadyOn(new Date());
219
		es.setMerkedReadyOn(new Date());
220
		CreationUtils.updateEntityState(es);
220
		CreationUtils.updateEntityState(es);
221
		//System.out.println("Entity touched:" + eId);
221
		System.out.println("Entity touched:" + eId);
222
	}
222
	}
223
 
223
 
224
	private void touchEntityStates() throws Exception {
224
	private void touchEntityStates() throws Exception {
225
		Map<Long, EntityState> ess = CreationUtils.getEntitiesState();
225
		Map<Long, EntityState> ess = CreationUtils.getEntitiesState();
226
		Calendar calReady = Calendar.getInstance();
226
		Calendar calReady = Calendar.getInstance();
Line 2670... Line 2670...
2670
													bulletString = defc.getEnumValue(((EnumDataObject)b.getDataObject()).getEnumValueID()).getValue();
2670
													bulletString = defc.getEnumValue(((EnumDataObject)b.getDataObject()).getEnumValueID()).getValue();
2671
												}catch (Exception e){
2671
												}catch (Exception e){
2672
													//b.	
2672
													//b.	
2673
												}
2673
												}
2674
												if (bulletString.contains("CDMA")){
2674
												if (bulletString.contains("CDMA")){
-
 
2675
													if(bulletString.contains("WCDMA")){
-
 
2676
														touchEntityState(entity.getID());
-
 
2677
													} else {
2675
													softSet.add(CDMA);
2678
														softSet.add(CDMA);
2676
													System.out.println("Added CDMA for 2G");
2679
														System.out.println("Added CDMA for 2G");
2677
													break;
2680
														break;
-
 
2681
													}
2678
												} 
2682
												} 
2679
											}
2683
											}
2680
										}
2684
										}
2681
									}
2685
									}
2682
									else if(f1.getFeatureDefinitionID()==120013l){
2686
									else if(f1.getFeatureDefinitionID()==120013l){
2683
										List <Bullet> bullets = f1.getBullets();
2687
										List <Bullet> bullets = f1.getBullets();
2684
										if(bullets != null) {
2688
										if(bullets != null) {
2685
											for(Bullet b : bullets){
2689
											for(Bullet b : bullets){
2686
												String bulletString = ((PrimitiveDataObject)b.getDataObject()).getValue();
2690
												String bulletString = ((PrimitiveDataObject)b.getDataObject()).getValue();
2687
												if (bulletString.contains("CDMA")){
2691
												if (bulletString.contains("CDMA")){
-
 
2692
													if(bulletString.contains("WCDMA")){
-
 
2693
														touchEntityState(entity.getID());
-
 
2694
													} else {
2688
													softSet.add(CDMA);
2695
														softSet.add(CDMA);
2689
													System.out.println("Added CDMA for 3G");
2696
														System.out.println("Added CDMA for 3G");
2690
													break;
2697
														break;
-
 
2698
													}
2691
												} 
2699
												} 
2692
											}
2700
											}
2693
										}
2701
										}
2694
									}
2702
									}
2695
								}
2703
								}
Line 2747... Line 2755...
2747
				if(softSet.size()>0){
2755
				if(softSet.size()>0){
2748
					Slide summarySlide = entity.getSlide(130054l);
2756
					Slide summarySlide = entity.getSlide(130054l);
2749
					Feature f = new Feature(120513l);
2757
					Feature f = new Feature(120513l);
2750
					List<Feature> features = summarySlide.getFeatures();
2758
					List<Feature> features = summarySlide.getFeatures();
2751
					List<Bullet> softBullets = new ArrayList<Bullet>();
2759
					List<Bullet> softBullets = new ArrayList<Bullet>();
-
 
2760
					for(Feature f1 : features){
-
 
2761
						if(f.getFeatureDefinitionID()==120513l){
-
 
2762
							features.remove(f1);
-
 
2763
							break;
-
 
2764
						}
-
 
2765
					}
2752
					features.add(f);
2766
					features.add(f);
2753
					for(Long enumId : softSet){
2767
					for(Long enumId : softSet){
2754
						softBullets.add(new Bullet(new EnumDataObject(enumId)));
2768
						softBullets.add(new Bullet(new EnumDataObject(enumId)));
2755
					}
2769
					}
2756
					f.setBullets(softBullets);
2770
					f.setBullets(softBullets);