Project

General

Profile

« Previous | Next » 

Revision 5006e483

Added by Andreas Müller almost 10 years ago

preliminary FK test

View differences:

.gitattributes
84 84
app-import/src/main/java/eu/etaxonomy/cdm/app/tcs/TcsXmlTestActivator.java -text
85 85
app-import/src/main/java/eu/etaxonomy/cdm/app/util/TestDatabase.java -text
86 86
app-import/src/main/java/eu/etaxonomy/cdm/app/util/TestTransaction.java -text
87
app-import/src/main/java/eu/etaxonomy/cdm/app/validate/ValidateKeys.java -text
87 88
app-import/src/main/java/eu/etaxonomy/cdm/app/vibrant/DwcaScratchpadImportActivator.java -text
88 89
app-import/src/main/java/eu/etaxonomy/cdm/app/vibrant/EuroMedActivator.java -text
89 90
app-import/src/main/java/eu/etaxonomy/cdm/app/vibrant/IopiActivator.java -text
app-import/src/main/java/eu/etaxonomy/cdm/app/validate/ValidateKeys.java
1
package eu.etaxonomy.cdm.app.validate;
2

  
3
import java.util.List;
4

  
5
import eu.etaxonomy.cdm.app.common.CdmDestinations;
6
import eu.etaxonomy.cdm.database.ICdmDataSource;
7
import eu.etaxonomy.cdm.database.update.test.ValidateForeignKeys;
8
import eu.etaxonomy.cdm.database.update.test.ValidateForeignKeys.FkTestResult;
9

  
10
public class ValidateKeys {
11

  
12
	
13
	/**
14
	 * @param args
15
	 */
16
	public static void main(String[] args) {
17
		ICdmDataSource source = CdmDestinations.cdm_cichorieae_preview();
18
//		String server = "160.45.63.";
19
//		String database = "";
20
//		int port = 3306;
21
//		String username = "edit";
22
//		String pwd = "";
23
//		DataSource source = CdmDataSource.NewInstance(DatabaseTypeEnum.MySQL, server, database, port, username, pwd);
24
		ValidateForeignKeys m = new ValidateForeignKeys(source);
25
		List<FkTestResult> list = m.invoke();
26
		for (FkTestResult re : list){
27
			String format = "Table %s, field %s, foreignTable %s, id %d";
28
			System.out.println(String.format(format, re.table, re.field, re.foreignTable, re.id));
29
		}
30
	}
31
}

Also available in: Unified diff