| 457 |
rajveer |
1 |
package in.shop2020.util;
|
|
|
2 |
|
|
|
3 |
import in.shop2020.metamodel.definitions.Catalog;
|
|
|
4 |
import in.shop2020.metamodel.definitions.DefinitionsContainer;
|
|
|
5 |
import in.shop2020.metamodel.definitions.EntityContainer;
|
|
|
6 |
|
|
|
7 |
/*
|
|
|
8 |
* @author rajveer
|
|
|
9 |
*
|
|
|
10 |
*
|
|
|
11 |
*/
|
|
|
12 |
|
|
|
13 |
public class ContentMigrator {
|
|
|
14 |
private String sourceDbPath;
|
|
|
15 |
private String destinationDbPath;
|
|
|
16 |
|
|
|
17 |
public static void main(String[] args) throws Exception {
|
|
|
18 |
String usage = "Usage: ContentMigrator {source db path}{destination db path}";
|
|
|
19 |
|
|
|
20 |
String sourceDbPath = null, destinationDbPath = null;
|
|
|
21 |
if(args.length < 2) {
|
|
|
22 |
System.out.println(usage);
|
|
|
23 |
System.exit(-1);
|
|
|
24 |
}else{
|
|
|
25 |
sourceDbPath = args[0];
|
|
|
26 |
destinationDbPath = args[1];
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
ContentMigrator contentmigrator = new ContentMigrator(sourceDbPath, destinationDbPath);
|
|
|
30 |
boolean result = contentmigrator.migrate();
|
|
|
31 |
System.out.println("Content migration status: "+ result);
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
public ContentMigrator(String sourceDbPath, String destinationDbPath) {
|
|
|
35 |
this.sourceDbPath = sourceDbPath;
|
|
|
36 |
this.destinationDbPath = destinationDbPath;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
public boolean migrate(){
|
|
|
40 |
DefinitionsContainer defs = Catalog.getInstance().getDefinitionsContainer();
|
|
|
41 |
EntityContainer ents = Catalog.getInstance().getEntityContainer();
|
|
|
42 |
return true;
|
|
|
43 |
}
|
|
|
44 |
}
|