Subversion Repositories SmartDukaan

Rev

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

Rev 4964 Rev 5281
Line 63... Line 63...
63
		// sourceDbPath = args[0];
63
		// sourceDbPath = args[0];
64
		// destinationDbPath = args[1];
64
		// destinationDbPath = args[1];
65
		// dryRun = args[2];
65
		// dryRun = args[2];
66
		// }
66
		// }
67
		//
67
		//
68
		ContentMigrator contentmigrator = new ContentMigrator(sourceDbPath,
68
		ContentMigrator contentmigrator = new ContentMigrator(sourceDbPath,destinationDbPath);
69
				destinationDbPath);
69
		contentmigrator.migrateNetwork();
70
		contentmigrator.renameTitles();
70
		//contentmigrator.renameTitles();
71
		// contentmigrator.migrateWarrantyType();
71
		// contentmigrator.migrateWarrantyType();
72
		// CreationUtils.storeComparisonStats(null);n
72
		// CreationUtils.storeComparisonStats(null);n
73
		// contentmigrator.migrateMedia();
73
		// contentmigrator.migrateMedia();
74
 
-
 
75
		// contentmigrator.populateHelpdocEntityIds();
74
		// contentmigrator.populateHelpdocEntityIds();
76
		// contentmigrator.migrateDataBack();
75
		// contentmigrator.migrateDataBack();
77
		// contentmigrator.migrateBrandModel(dryRun);
76
		// contentmigrator.migrateBrandModel(dryRun);
78
		// contentmigrator.migrateData();
77
		// contentmigrator.migrateData();
79
		// contentmigrator.migrateRemoveBorrowedCategoryIdFromSlide();
78
		// contentmigrator.migrateRemoveBorrowedCategoryIdFromSlide();
Line 164... Line 163...
164
			if (entity == null || entity.getSlides() == null) {
163
			if (entity == null || entity.getSlides() == null) {
165
				continue;
164
				continue;
166
			}
165
			}
167
 
166
 
168
			for (Slide slide : entity.getSlides()) {
167
			for (Slide slide : entity.getSlides()) {
169
				if (slide.getSlideDefinitionID() == 130005) {
168
				if (slide.getSlideDefinitionID() == 130095) {
-
 
169
					List<Slide> slides = slide.getChildrenSlides();
-
 
170
					for(Slide slide1  : slides){
-
 
171
						if(slide1.getSlideDefinitionID() == 130096){							
170
					List<Feature> features = slide.getFeatures();
172
							List<Feature> features = slide1.getFeatures();
171
					for (Feature f : features) {
173
							for (Feature f : features) {
172
						if (f.getFeatureDefinitionID() == 120012) {
174
								if (f.getFeatureDefinitionID() == 120175) {
173
							List<Bullet> bs = f.getBullets();
175
									List<Bullet> bs = f.getBullets();
174
							for (Bullet b : bs) {
176
									for (Bullet b : bs) {
175
								String value = ((PrimitiveDataObject) b
177
										Long enumValueId = ((EnumDataObject) b
176
										.getDataObject()).getValue();
178
												.getDataObject()).getEnumValueID();
-
 
179
										String value = Catalog.getInstance().getDefinitionsContainer().getEnumValue(enumValueId).getValue(); 
177
								if (value.trim().equals("")) {
180
										if (value.trim().equals("")) {
178
									continue;
181
											continue;
179
								}
182
										}
180
								// System.out.println(value);
183
										System.out.println(value);
181
								long enumValueID = getEnumValueForNetwork(
-
 
182
										value, entityId);
-
 
183
								/*
184
										
184
								 * if(enumValueID == 110371L){
-
 
185
								 * Logger.log("Set entity:" + entityId +
-
 
186
								 * " as proprietary software", entity); }
-
 
187
								 */
185
									}
188
								if (enumValueID != 0) {
-
 
189
									b.setDataObject(new EnumDataObject(
-
 
190
											enumValueID));
-
 
191
								}
186
								}
192
							}
187
							}
193
						}
188
						}
194
					}
189
					}
195
				}
190
				}