Revision: 3702
Author: [email protected]
Date: Fri Jul  9 08:12:39 2010
Log: Changed the CSV format to export the data type name instead of the java type number.
http://code.google.com/p/power-architect/source/detail?r=3702

Modified:
/trunk/src/main/java/ca/sqlpower/architect/profile/output/ProfileCSVFormat.java

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/profile/output/ProfileCSVFormat.java Mon Dec 21 08:27:43 2009 +++ /trunk/src/main/java/ca/sqlpower/architect/profile/output/ProfileCSVFormat.java Fri Jul 9 08:12:39 2010
@@ -26,6 +26,7 @@
 import java.util.List;

 import au.com.bytecode.opencsv.CSVWriter;
+import ca.sqlpower.architect.ddl.GenericDDLGenerator;
 import ca.sqlpower.architect.profile.ColumnProfileResult;
 import ca.sqlpower.architect.profile.ProfileResult;
 import ca.sqlpower.architect.profile.TableProfileResult;
@@ -53,6 +54,8 @@
         CSVWriter csvWriter = new CSVWriter(out);
         csvWriter.writeNext(columnNames);

+        GenericDDLGenerator gddl = new GenericDDLGenerator();
+
         Format dateFormat = new DateTableCellRenderer().getFormat();
         Format decFormat =  new DecimalTableCellRenderer().getFormat();
         Format pctFormat =  new PercentTableCellRenderer().getFormat();
@@ -92,7 +95,7 @@
                     commonData.add(Integer.toString(tpr.getRowCount()));
                     break;
                 case DATA_TYPE:
-                    commonData.add(Integer.toString(c.getType()));
+                    commonData.add(gddl.columnType(c));
                     break;
                 case NULL_COUNT:
commonData.add(Integer.toString(((ColumnProfileResult) result).getNullCount()));

Reply via email to