Subversion Repositories SmartDukaan

Rev

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

Rev 5945 Rev 6359
Line 75... Line 75...
75
		// destinationDbPath = args[1];
75
		// destinationDbPath = args[1];
76
		// dryRun = args[2];
76
		// dryRun = args[2];
77
		// }
77
		// }
78
		//
78
		//
79
		ContentMigrator contentmigrator = new ContentMigrator(sourceDbPath,destinationDbPath);
79
		ContentMigrator contentmigrator = new ContentMigrator(sourceDbPath,destinationDbPath);
80
		Long catgoryId = 10020L;
-
 
81
		Long newSummarySlideDefId = 130134L;
-
 
82
		contentmigrator.renameTitles();
-
 
83
		//contentmigrator.renameTitles();
-
 
84
		// contentmigrator.migrateWarrantyType();
-
 
85
		// CreationUtils.storeComparisonStats(null);n
80
		List<Long> l = CreationUtils.getInconsistentEntities();
86
		// contentmigrator.migrateMedia();
-
 
87
		// contentmigrator.populateHelpdocEntityIds();
-
 
88
		// contentmigrator.migrateDataBack();
-
 
89
		// contentmigrator.migrateBrandModel(dryRun);
-
 
90
		// contentmigrator.migrateData();
-
 
91
		// contentmigrator.migrateRemoveBorrowedCategoryIdFromSlide();
-
 
92
		// contentmigrator.migrateModel1();
-
 
93
		// contentmigrator.changeEntityState();
81
		Iterator<Long> s = l.iterator();
94
		// contentmigrator.removeBrowserBullets();
-
 
95
		// contentmigrator.migrateModel2();
82
		while (s.hasNext()){
96
		// contentmigrator.printDataModel();
-
 
97
		// contentmigrator.makeEntitiesObject();
-
 
98
		// contentmigrator.printSlides();
83
			Long s1 = s.next();
99
		/*
-
 
100
		 * DefinitionsContainer dfc =
-
 
101
		 * Catalog.getInstance().getDefinitionsContainer(); for(Long fid:
-
 
102
		 * dfc.getCategoryFacetDefinitions().keySet()){ for(FacetDefinition
-
 
103
		 * facetDef:
84
			if (s1== 1004315) {
104
		 * dfc.getCategoryFacetDefinitions().get(fid).getFacetDefinitions()){
-
 
105
		 * System.out.println("***" + fid + " *** " + facetDef.getID() +
85
				System.out.println("Got unwanted id");
106
		 * facetDef.getTarget() ); }
86
				s.remove();
107
		 * 
-
 
108
		 * }
87
			} else {
109
		 */
-
 
110
 
-
 
111
		// System.out.println("**********" + dfc.getCategoryFacetDefinitions());
-
 
112
		// System.out.println("**********" + dfc.getSlideFacetDefinitions());
-
 
113
 
-
 
114
		/*
88
				
115
		 * for(Long defID : dfc.getSlideFacetDefinitions().keySet()){
-
 
116
		 * for(FacetDefinition facetDef:
89
				System.out.println(s1);
117
		 * dfc.getSlideFacetDefinitions().get(defID)){ System.out.println(defID
-
 
118
		 * + "****" + facetDef.getID() + facetDef.getDescription()); }
-
 
119
		 * 
-
 
120
		 * }
-
 
121
		 */
-
 
122
 
-
 
123
		/*
90
			}
124
		 * System.out.println(OldCreationUtils.getSlideSequence(1000194));
-
 
125
		 * List<Slide> slides = OldCreationUtils.getEntity(1000194).getSlides();
-
 
126
		 * for(Slide slide: slides){
-
 
127
		 * System.out.println(slide.getSlideDefinitionID()); }
91
			CreationUtils.storeInconsistentEntities(l);
128
		 */
92
		}
129
 
-
 
130
		// ContentMigrator contentmigrator = new ContentMigrator(sourceDbPath,
-
 
131
		// destinationDbPath);
-
 
132
		// boolean result = contentmigrator.migrate();
-
 
133
		// System.out.println("Content migration status:  "+ result);
-
 
134
 
93
 
135
	}
94
	}
136
 
95
 
137
	private void migrateWarrantyForCategory(Long catgoryId) throws Exception {
96
	private void migrateWarrantyForCategory(Long catgoryId) throws Exception {
138
		Collection<Entity> entities = CreationUtils.getEntities(catgoryId);
97
		Collection<Entity> entities = CreationUtils.getEntities(catgoryId);