diff options
author | James Moger <james.moger@gmail.com> | 2011-09-02 17:44:53 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2011-09-02 17:44:53 -0400 |
commit | 999af1bf78e0e45cb445f0adcf34588023b4ff76 (patch) | |
tree | b5d1107df22422d299e25ed9a488c810885f4675 /src/com/iciql | |
parent | ba323f66e1727097ac91b1743c85ea563ee565cd (diff) | |
download | iciql-999af1bf78e0e45cb445f0adcf34588023b4ff76.tar.gz iciql-999af1bf78e0e45cb445f0adcf34588023b4ff76.zip |
Generated models are now serializable.
Diffstat (limited to 'src/com/iciql')
-rw-r--r-- | src/com/iciql/Constants.java | 4 | ||||
-rw-r--r-- | src/com/iciql/TableInspector.java | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/com/iciql/Constants.java b/src/com/iciql/Constants.java index 247c39a..5d63393 100644 --- a/src/com/iciql/Constants.java +++ b/src/com/iciql/Constants.java @@ -25,11 +25,11 @@ public class Constants { // The build script extracts this exact line so be careful editing it
// and only use A-Z a-z 0-9 .-_ in the string.
- public static final String VERSION = "0.7.1";
+ public static final String VERSION = "0.7.2-SNAPSHOT";
// The build script extracts this exact line so be careful editing it
// and only use A-Z a-z 0-9 .-_ in the string.
- public static final String VERSION_DATE = "2011-08-31";
+ public static final String VERSION_DATE = "PENDING";
// The build script extracts this exact line so be careful editing it
// and only use A-Z a-z 0-9 .-_ in the string.
diff --git a/src/com/iciql/TableInspector.java b/src/com/iciql/TableInspector.java index 9b67ac3..71eb16d 100644 --- a/src/com/iciql/TableInspector.java +++ b/src/com/iciql/TableInspector.java @@ -24,6 +24,7 @@ import static com.iciql.util.JdbcUtils.closeSilently; import static com.iciql.util.StringUtils.isNullOrEmpty; import static java.text.MessageFormat.format; +import java.io.Serializable; import java.lang.reflect.Modifier; import java.sql.DatabaseMetaData; import java.sql.ResultSet; @@ -190,6 +191,7 @@ public class TableInspector { // import statements Set<String> imports = Utils.newHashSet(); + imports.add(Serializable.class.getCanonicalName()); imports.add(IQSchema.class.getCanonicalName()); imports.add(IQTable.class.getCanonicalName()); imports.add(IQIndexes.class.getCanonicalName()); @@ -256,7 +258,9 @@ public class TableInspector { // class declaration String clazzName = ModelUtils.convertTableToClassName(table); - model.append(format("public class {0} '{'", clazzName)).append(eol); + model.append(format("public class {0} implements Serializable '{'", clazzName)).append(eol); + model.append(eol); + model.append("\tprivate static final long serialVersionUID = 1L;").append(eol); model.append(eol); // field declarations |