Browse Source

序列化Example类

shuzheng 9 years ago
parent
commit
c7239d816a

+ 7 - 4
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsSystemExample.java

@@ -1,15 +1,18 @@
 package com.zheng.upms.dao.model;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
-public class UpmsSystemExample {
+public class UpmsSystemExample implements Serializable {
     protected String orderByClause;
 
     protected boolean distinct;
 
     protected List<Criteria> oredCriteria;
 
+    private static final long serialVersionUID = 1L;
+
     private Integer limit;
 
     private Integer offset;
@@ -83,7 +86,7 @@ public class UpmsSystemExample {
         return offset;
     }
 
-    protected abstract static class GeneratedCriteria {
+    protected abstract static class GeneratedCriteria implements Serializable {
         protected List<Criterion> criteria;
 
         protected GeneratedCriteria() {
@@ -575,14 +578,14 @@ public class UpmsSystemExample {
         }
     }
 
-    public static class Criteria extends GeneratedCriteria {
+    public static class Criteria extends GeneratedCriteria implements Serializable {
 
         protected Criteria() {
             super();
         }
     }
 
-    public static class Criterion {
+    public static class Criterion implements Serializable {
         private String condition;
 
         private Object value;

+ 1 - 1
zheng-upms/zheng-upms-dao/src/main/resources/generatorConfig.xml

@@ -20,7 +20,7 @@
         <plugin type="org.mybatis.generator.plugins.ToStringPlugin"></plugin>
 
 		<!-- 为生成的Java模型类添加序列化接口,并生成serialVersionUID字段 -->
-		<plugin type="org.mybatis.generator.plugins.SerializablePlugin">
+		<plugin type="com.zheng.common.plugin.SerializablePlugin">
 			<property name="suppressJavaInterface" value="false"/>
 		</plugin>