• R/O
  • SSH
  • HTTPS

dbdiffreport: コミット


コミットメタ情報

リビジョン367 (tree)
日時2022-07-16 10:24:48
作者t0145jp

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- trunk/mybatisPlugins/generatorConfig.xml (revision 366)
+++ trunk/mybatisPlugins/generatorConfig.xml (revision 367)
@@ -14,14 +14,14 @@
1414 connectionURL="jdbc:postgresql://localhost/dvdrental"
1515 userId="postgres" password="postgres" />
1616 <javaModelGenerator targetPackage="test.postgres"
17- targetProject="xxxMyBatis/mybatisgenerator">
17+ targetProject="mybatisPlugins/src">
1818 <property name="trimStrings" value="true" />
1919 <property name="constructorBased" value="true" />
2020 </javaModelGenerator>
2121 <sqlMapGenerator targetPackage="test.postgres"
22- targetProject="xxxMyBatis/mybatisgenerator" />
22+ targetProject="mybatisPlugins/src" />
2323 <javaClientGenerator targetPackage="test.postgres"
24- targetProject="xxxMyBatis/mybatisgenerator" type="XMLMAPPER" />
24+ targetProject="mybatisPlugins/src" type="XMLMAPPER" />
2525
2626 <table schema="public" tableName="AC%">
2727 <property name="ignoreQualifiersAtRuntime" value="true" />
--- trunk/mybatisPlugins/plugins/AddSuffixEntityPlugin.java (nonexistent)
+++ trunk/mybatisPlugins/plugins/AddSuffixEntityPlugin.java (revision 367)
@@ -0,0 +1,22 @@
1+import java.util.List;
2+
3+import org.mybatis.generator.api.IntrospectedTable;
4+import org.mybatis.generator.api.PluginAdapter;
5+
6+/**
7+ * Rename Entity Class name
8+ */
9+public class AddSuffixEntityPlugin extends PluginAdapter {
10+
11+ @Override
12+ public boolean validate(List<String> warnings) {
13+ return true;
14+ }
15+
16+ @Override
17+ public void initialized(IntrospectedTable table) {
18+ super.initialized(table);
19+ String name = table.getBaseRecordType();
20+ table.setBaseRecordType(name + "Entity");
21+ }
22+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/plugins/WithoutLockPlugin.java (nonexistent)
+++ trunk/mybatisPlugins/plugins/WithoutLockPlugin.java (revision 367)
@@ -0,0 +1,53 @@
1+
2+
3+import java.util.List;
4+
5+import org.mybatis.generator.api.IntrospectedTable;
6+import org.mybatis.generator.api.PluginAdapter;
7+import org.mybatis.generator.api.dom.xml.TextElement;
8+import org.mybatis.generator.api.dom.xml.XmlElement;
9+
10+public class WithoutLockPlugin extends PluginAdapter {
11+
12+ private final TextElement WITHOUT_LOCK = new TextElement("WITHOUT LOCK NOWAIT");
13+
14+ @Override
15+ public boolean validate(List<String> warnings) {
16+ return true;
17+ }
18+
19+ @Override
20+ public boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element,
21+ IntrospectedTable introspectedTable) {
22+ element.addElement(WITHOUT_LOCK);
23+ return true;
24+ }
25+
26+ @Override
27+ public boolean sqlMapSelectAllElementGenerated(XmlElement element,
28+ IntrospectedTable introspectedTable) {
29+ element.addElement(WITHOUT_LOCK);
30+ return true;
31+ }
32+
33+ @Override
34+ public boolean sqlMapCountByExampleElementGenerated(XmlElement element,
35+ IntrospectedTable introspectedTable) {
36+ element.addElement(WITHOUT_LOCK);
37+ return true;
38+ }
39+
40+ @Override
41+ public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element,
42+ IntrospectedTable introspectedTable) {
43+ element.addElement(WITHOUT_LOCK);
44+ return true;
45+ }
46+
47+ @Override
48+ public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element,
49+ IntrospectedTable introspectedTable) {
50+ element.addElement(WITHOUT_LOCK);
51+ return true;
52+ }
53+}
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/WithoutLockPlugin.java (revision 366)
+++ trunk/mybatisPlugins/src/WithoutLockPlugin.java (nonexistent)
@@ -1,53 +0,0 @@
1-
2-
3-import java.util.List;
4-
5-import org.mybatis.generator.api.IntrospectedTable;
6-import org.mybatis.generator.api.PluginAdapter;
7-import org.mybatis.generator.api.dom.xml.TextElement;
8-import org.mybatis.generator.api.dom.xml.XmlElement;
9-
10-public class WithoutLockPlugin extends PluginAdapter {
11-
12- private final TextElement WITHOUT_LOCK = new TextElement("WITHOUT LOCK NOWAIT");
13-
14- @Override
15- public boolean validate(List<String> warnings) {
16- return true;
17- }
18-
19- @Override
20- public boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element,
21- IntrospectedTable introspectedTable) {
22- element.addElement(WITHOUT_LOCK);
23- return true;
24- }
25-
26- @Override
27- public boolean sqlMapSelectAllElementGenerated(XmlElement element,
28- IntrospectedTable introspectedTable) {
29- element.addElement(WITHOUT_LOCK);
30- return true;
31- }
32-
33- @Override
34- public boolean sqlMapCountByExampleElementGenerated(XmlElement element,
35- IntrospectedTable introspectedTable) {
36- element.addElement(WITHOUT_LOCK);
37- return true;
38- }
39-
40- @Override
41- public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element,
42- IntrospectedTable introspectedTable) {
43- element.addElement(WITHOUT_LOCK);
44- return true;
45- }
46-
47- @Override
48- public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element,
49- IntrospectedTable introspectedTable) {
50- element.addElement(WITHOUT_LOCK);
51- return true;
52- }
53-}
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/AddSuffixEntityPlugin.java (revision 366)
+++ trunk/mybatisPlugins/src/AddSuffixEntityPlugin.java (nonexistent)
@@ -1,22 +0,0 @@
1-import java.util.List;
2-
3-import org.mybatis.generator.api.IntrospectedTable;
4-import org.mybatis.generator.api.PluginAdapter;
5-
6-/**
7- * Rename Entity Class name
8- */
9-public class AddSuffixEntityPlugin extends PluginAdapter {
10-
11- @Override
12- public boolean validate(List<String> warnings) {
13- return true;
14- }
15-
16- @Override
17- public void initialized(IntrospectedTable table) {
18- super.initialized(table);
19- String name = table.getBaseRecordType();
20- table.setBaseRecordType(name + "Entity");
21- }
22-}
\ No newline at end of file
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorEntity.java (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorEntity.java (revision 367)
@@ -0,0 +1,74 @@
1+package test.postgres;
2+
3+import java.io.Serializable;
4+import java.util.Date;
5+
6+public class ActorEntity implements Serializable {
7+ private Integer actorId;
8+
9+ private String firstName;
10+
11+ private String lastName;
12+
13+ private Date lastUpdate;
14+
15+ private static final long serialVersionUID = 1L;
16+
17+ public ActorEntity(Integer actorId, String firstName, String lastName, Date lastUpdate) {
18+ this.actorId = actorId;
19+ this.firstName = firstName;
20+ this.lastName = lastName;
21+ this.lastUpdate = lastUpdate;
22+ }
23+
24+ public ActorEntity() {
25+ super();
26+ }
27+
28+ public Integer getActorId() {
29+ return actorId;
30+ }
31+
32+ public void setActorId(Integer actorId) {
33+ this.actorId = actorId;
34+ }
35+
36+ public String getFirstName() {
37+ return firstName;
38+ }
39+
40+ public void setFirstName(String firstName) {
41+ this.firstName = firstName == null ? null : firstName.trim();
42+ }
43+
44+ public String getLastName() {
45+ return lastName;
46+ }
47+
48+ public void setLastName(String lastName) {
49+ this.lastName = lastName == null ? null : lastName.trim();
50+ }
51+
52+ public Date getLastUpdate() {
53+ return lastUpdate;
54+ }
55+
56+ public void setLastUpdate(Date lastUpdate) {
57+ this.lastUpdate = lastUpdate;
58+ }
59+
60+ @Override
61+ public String toString() {
62+ StringBuilder sb = new StringBuilder();
63+ sb.append(getClass().getSimpleName());
64+ sb.append(" [");
65+ sb.append("Hash = ").append(hashCode());
66+ sb.append(", actorId=").append(actorId);
67+ sb.append(", firstName=").append(firstName);
68+ sb.append(", lastName=").append(lastName);
69+ sb.append(", lastUpdate=").append(lastUpdate);
70+ sb.append(", serialVersionUID=").append(serialVersionUID);
71+ sb.append("]");
72+ return sb.toString();
73+ }
74+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorExample.java (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorExample.java (revision 367)
@@ -0,0 +1,460 @@
1+package test.postgres;
2+
3+import java.util.ArrayList;
4+import java.util.Date;
5+import java.util.List;
6+
7+public class ActorExample {
8+ protected String orderByClause;
9+
10+ protected boolean distinct;
11+
12+ protected List<Criteria> oredCriteria;
13+
14+ public ActorExample() {
15+ oredCriteria = new ArrayList<>();
16+ }
17+
18+ public void setOrderByClause(String orderByClause) {
19+ this.orderByClause = orderByClause;
20+ }
21+
22+ public String getOrderByClause() {
23+ return orderByClause;
24+ }
25+
26+ public void setDistinct(boolean distinct) {
27+ this.distinct = distinct;
28+ }
29+
30+ public boolean isDistinct() {
31+ return distinct;
32+ }
33+
34+ public List<Criteria> getOredCriteria() {
35+ return oredCriteria;
36+ }
37+
38+ public void or(Criteria criteria) {
39+ oredCriteria.add(criteria);
40+ }
41+
42+ public Criteria or() {
43+ Criteria criteria = createCriteriaInternal();
44+ oredCriteria.add(criteria);
45+ return criteria;
46+ }
47+
48+ public Criteria createCriteria() {
49+ Criteria criteria = createCriteriaInternal();
50+ if (oredCriteria.size() == 0) {
51+ oredCriteria.add(criteria);
52+ }
53+ return criteria;
54+ }
55+
56+ protected Criteria createCriteriaInternal() {
57+ Criteria criteria = new Criteria();
58+ return criteria;
59+ }
60+
61+ public void clear() {
62+ oredCriteria.clear();
63+ orderByClause = null;
64+ distinct = false;
65+ }
66+
67+ protected abstract static class GeneratedCriteria {
68+ protected List<Criterion> criteria;
69+
70+ protected GeneratedCriteria() {
71+ super();
72+ criteria = new ArrayList<>();
73+ }
74+
75+ public boolean isValid() {
76+ return criteria.size() > 0;
77+ }
78+
79+ public List<Criterion> getAllCriteria() {
80+ return criteria;
81+ }
82+
83+ public List<Criterion> getCriteria() {
84+ return criteria;
85+ }
86+
87+ protected void addCriterion(String condition) {
88+ if (condition == null) {
89+ throw new RuntimeException("Value for condition cannot be null");
90+ }
91+ criteria.add(new Criterion(condition));
92+ }
93+
94+ protected void addCriterion(String condition, Object value, String property) {
95+ if (value == null) {
96+ throw new RuntimeException("Value for " + property + " cannot be null");
97+ }
98+ criteria.add(new Criterion(condition, value));
99+ }
100+
101+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
102+ if (value1 == null || value2 == null) {
103+ throw new RuntimeException("Between values for " + property + " cannot be null");
104+ }
105+ criteria.add(new Criterion(condition, value1, value2));
106+ }
107+
108+ public Criteria andActorIdIsNull() {
109+ addCriterion("actor_id is null");
110+ return (Criteria) this;
111+ }
112+
113+ public Criteria andActorIdIsNotNull() {
114+ addCriterion("actor_id is not null");
115+ return (Criteria) this;
116+ }
117+
118+ public Criteria andActorIdEqualTo(Integer value) {
119+ addCriterion("actor_id =", value, "actorId");
120+ return (Criteria) this;
121+ }
122+
123+ public Criteria andActorIdNotEqualTo(Integer value) {
124+ addCriterion("actor_id <>", value, "actorId");
125+ return (Criteria) this;
126+ }
127+
128+ public Criteria andActorIdGreaterThan(Integer value) {
129+ addCriterion("actor_id >", value, "actorId");
130+ return (Criteria) this;
131+ }
132+
133+ public Criteria andActorIdGreaterThanOrEqualTo(Integer value) {
134+ addCriterion("actor_id >=", value, "actorId");
135+ return (Criteria) this;
136+ }
137+
138+ public Criteria andActorIdLessThan(Integer value) {
139+ addCriterion("actor_id <", value, "actorId");
140+ return (Criteria) this;
141+ }
142+
143+ public Criteria andActorIdLessThanOrEqualTo(Integer value) {
144+ addCriterion("actor_id <=", value, "actorId");
145+ return (Criteria) this;
146+ }
147+
148+ public Criteria andActorIdIn(List<Integer> values) {
149+ addCriterion("actor_id in", values, "actorId");
150+ return (Criteria) this;
151+ }
152+
153+ public Criteria andActorIdNotIn(List<Integer> values) {
154+ addCriterion("actor_id not in", values, "actorId");
155+ return (Criteria) this;
156+ }
157+
158+ public Criteria andActorIdBetween(Integer value1, Integer value2) {
159+ addCriterion("actor_id between", value1, value2, "actorId");
160+ return (Criteria) this;
161+ }
162+
163+ public Criteria andActorIdNotBetween(Integer value1, Integer value2) {
164+ addCriterion("actor_id not between", value1, value2, "actorId");
165+ return (Criteria) this;
166+ }
167+
168+ public Criteria andFirstNameIsNull() {
169+ addCriterion("first_name is null");
170+ return (Criteria) this;
171+ }
172+
173+ public Criteria andFirstNameIsNotNull() {
174+ addCriterion("first_name is not null");
175+ return (Criteria) this;
176+ }
177+
178+ public Criteria andFirstNameEqualTo(String value) {
179+ addCriterion("first_name =", value, "firstName");
180+ return (Criteria) this;
181+ }
182+
183+ public Criteria andFirstNameNotEqualTo(String value) {
184+ addCriterion("first_name <>", value, "firstName");
185+ return (Criteria) this;
186+ }
187+
188+ public Criteria andFirstNameGreaterThan(String value) {
189+ addCriterion("first_name >", value, "firstName");
190+ return (Criteria) this;
191+ }
192+
193+ public Criteria andFirstNameGreaterThanOrEqualTo(String value) {
194+ addCriterion("first_name >=", value, "firstName");
195+ return (Criteria) this;
196+ }
197+
198+ public Criteria andFirstNameLessThan(String value) {
199+ addCriterion("first_name <", value, "firstName");
200+ return (Criteria) this;
201+ }
202+
203+ public Criteria andFirstNameLessThanOrEqualTo(String value) {
204+ addCriterion("first_name <=", value, "firstName");
205+ return (Criteria) this;
206+ }
207+
208+ public Criteria andFirstNameLike(String value) {
209+ addCriterion("first_name like", value, "firstName");
210+ return (Criteria) this;
211+ }
212+
213+ public Criteria andFirstNameNotLike(String value) {
214+ addCriterion("first_name not like", value, "firstName");
215+ return (Criteria) this;
216+ }
217+
218+ public Criteria andFirstNameIn(List<String> values) {
219+ addCriterion("first_name in", values, "firstName");
220+ return (Criteria) this;
221+ }
222+
223+ public Criteria andFirstNameNotIn(List<String> values) {
224+ addCriterion("first_name not in", values, "firstName");
225+ return (Criteria) this;
226+ }
227+
228+ public Criteria andFirstNameBetween(String value1, String value2) {
229+ addCriterion("first_name between", value1, value2, "firstName");
230+ return (Criteria) this;
231+ }
232+
233+ public Criteria andFirstNameNotBetween(String value1, String value2) {
234+ addCriterion("first_name not between", value1, value2, "firstName");
235+ return (Criteria) this;
236+ }
237+
238+ public Criteria andLastNameIsNull() {
239+ addCriterion("last_name is null");
240+ return (Criteria) this;
241+ }
242+
243+ public Criteria andLastNameIsNotNull() {
244+ addCriterion("last_name is not null");
245+ return (Criteria) this;
246+ }
247+
248+ public Criteria andLastNameEqualTo(String value) {
249+ addCriterion("last_name =", value, "lastName");
250+ return (Criteria) this;
251+ }
252+
253+ public Criteria andLastNameNotEqualTo(String value) {
254+ addCriterion("last_name <>", value, "lastName");
255+ return (Criteria) this;
256+ }
257+
258+ public Criteria andLastNameGreaterThan(String value) {
259+ addCriterion("last_name >", value, "lastName");
260+ return (Criteria) this;
261+ }
262+
263+ public Criteria andLastNameGreaterThanOrEqualTo(String value) {
264+ addCriterion("last_name >=", value, "lastName");
265+ return (Criteria) this;
266+ }
267+
268+ public Criteria andLastNameLessThan(String value) {
269+ addCriterion("last_name <", value, "lastName");
270+ return (Criteria) this;
271+ }
272+
273+ public Criteria andLastNameLessThanOrEqualTo(String value) {
274+ addCriterion("last_name <=", value, "lastName");
275+ return (Criteria) this;
276+ }
277+
278+ public Criteria andLastNameLike(String value) {
279+ addCriterion("last_name like", value, "lastName");
280+ return (Criteria) this;
281+ }
282+
283+ public Criteria andLastNameNotLike(String value) {
284+ addCriterion("last_name not like", value, "lastName");
285+ return (Criteria) this;
286+ }
287+
288+ public Criteria andLastNameIn(List<String> values) {
289+ addCriterion("last_name in", values, "lastName");
290+ return (Criteria) this;
291+ }
292+
293+ public Criteria andLastNameNotIn(List<String> values) {
294+ addCriterion("last_name not in", values, "lastName");
295+ return (Criteria) this;
296+ }
297+
298+ public Criteria andLastNameBetween(String value1, String value2) {
299+ addCriterion("last_name between", value1, value2, "lastName");
300+ return (Criteria) this;
301+ }
302+
303+ public Criteria andLastNameNotBetween(String value1, String value2) {
304+ addCriterion("last_name not between", value1, value2, "lastName");
305+ return (Criteria) this;
306+ }
307+
308+ public Criteria andLastUpdateIsNull() {
309+ addCriterion("last_update is null");
310+ return (Criteria) this;
311+ }
312+
313+ public Criteria andLastUpdateIsNotNull() {
314+ addCriterion("last_update is not null");
315+ return (Criteria) this;
316+ }
317+
318+ public Criteria andLastUpdateEqualTo(Date value) {
319+ addCriterion("last_update =", value, "lastUpdate");
320+ return (Criteria) this;
321+ }
322+
323+ public Criteria andLastUpdateNotEqualTo(Date value) {
324+ addCriterion("last_update <>", value, "lastUpdate");
325+ return (Criteria) this;
326+ }
327+
328+ public Criteria andLastUpdateGreaterThan(Date value) {
329+ addCriterion("last_update >", value, "lastUpdate");
330+ return (Criteria) this;
331+ }
332+
333+ public Criteria andLastUpdateGreaterThanOrEqualTo(Date value) {
334+ addCriterion("last_update >=", value, "lastUpdate");
335+ return (Criteria) this;
336+ }
337+
338+ public Criteria andLastUpdateLessThan(Date value) {
339+ addCriterion("last_update <", value, "lastUpdate");
340+ return (Criteria) this;
341+ }
342+
343+ public Criteria andLastUpdateLessThanOrEqualTo(Date value) {
344+ addCriterion("last_update <=", value, "lastUpdate");
345+ return (Criteria) this;
346+ }
347+
348+ public Criteria andLastUpdateIn(List<Date> values) {
349+ addCriterion("last_update in", values, "lastUpdate");
350+ return (Criteria) this;
351+ }
352+
353+ public Criteria andLastUpdateNotIn(List<Date> values) {
354+ addCriterion("last_update not in", values, "lastUpdate");
355+ return (Criteria) this;
356+ }
357+
358+ public Criteria andLastUpdateBetween(Date value1, Date value2) {
359+ addCriterion("last_update between", value1, value2, "lastUpdate");
360+ return (Criteria) this;
361+ }
362+
363+ public Criteria andLastUpdateNotBetween(Date value1, Date value2) {
364+ addCriterion("last_update not between", value1, value2, "lastUpdate");
365+ return (Criteria) this;
366+ }
367+ }
368+
369+ public static class Criteria extends GeneratedCriteria {
370+ protected Criteria() {
371+ super();
372+ }
373+ }
374+
375+ public static class Criterion {
376+ private String condition;
377+
378+ private Object value;
379+
380+ private Object secondValue;
381+
382+ private boolean noValue;
383+
384+ private boolean singleValue;
385+
386+ private boolean betweenValue;
387+
388+ private boolean listValue;
389+
390+ private String typeHandler;
391+
392+ public String getCondition() {
393+ return condition;
394+ }
395+
396+ public Object getValue() {
397+ return value;
398+ }
399+
400+ public Object getSecondValue() {
401+ return secondValue;
402+ }
403+
404+ public boolean isNoValue() {
405+ return noValue;
406+ }
407+
408+ public boolean isSingleValue() {
409+ return singleValue;
410+ }
411+
412+ public boolean isBetweenValue() {
413+ return betweenValue;
414+ }
415+
416+ public boolean isListValue() {
417+ return listValue;
418+ }
419+
420+ public String getTypeHandler() {
421+ return typeHandler;
422+ }
423+
424+ protected Criterion(String condition) {
425+ super();
426+ this.condition = condition;
427+ this.typeHandler = null;
428+ this.noValue = true;
429+ }
430+
431+ protected Criterion(String condition, Object value, String typeHandler) {
432+ super();
433+ this.condition = condition;
434+ this.value = value;
435+ this.typeHandler = typeHandler;
436+ if (value instanceof List<?>) {
437+ this.listValue = true;
438+ } else {
439+ this.singleValue = true;
440+ }
441+ }
442+
443+ protected Criterion(String condition, Object value) {
444+ this(condition, value, null);
445+ }
446+
447+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
448+ super();
449+ this.condition = condition;
450+ this.value = value;
451+ this.secondValue = secondValue;
452+ this.typeHandler = typeHandler;
453+ this.betweenValue = true;
454+ }
455+
456+ protected Criterion(String condition, Object value, Object secondValue) {
457+ this(condition, value, secondValue, null);
458+ }
459+ }
460+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorInfoEntity.java (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorInfoEntity.java (revision 367)
@@ -0,0 +1,73 @@
1+package test.postgres;
2+
3+import java.io.Serializable;
4+
5+public class ActorInfoEntity implements Serializable {
6+ private Integer actorId;
7+
8+ private String firstName;
9+
10+ private String lastName;
11+
12+ private String filmInfo;
13+
14+ private static final long serialVersionUID = 1L;
15+
16+ public ActorInfoEntity(Integer actorId, String firstName, String lastName, String filmInfo) {
17+ this.actorId = actorId;
18+ this.firstName = firstName;
19+ this.lastName = lastName;
20+ this.filmInfo = filmInfo;
21+ }
22+
23+ public ActorInfoEntity() {
24+ super();
25+ }
26+
27+ public Integer getActorId() {
28+ return actorId;
29+ }
30+
31+ public void setActorId(Integer actorId) {
32+ this.actorId = actorId;
33+ }
34+
35+ public String getFirstName() {
36+ return firstName;
37+ }
38+
39+ public void setFirstName(String firstName) {
40+ this.firstName = firstName == null ? null : firstName.trim();
41+ }
42+
43+ public String getLastName() {
44+ return lastName;
45+ }
46+
47+ public void setLastName(String lastName) {
48+ this.lastName = lastName == null ? null : lastName.trim();
49+ }
50+
51+ public String getFilmInfo() {
52+ return filmInfo;
53+ }
54+
55+ public void setFilmInfo(String filmInfo) {
56+ this.filmInfo = filmInfo == null ? null : filmInfo.trim();
57+ }
58+
59+ @Override
60+ public String toString() {
61+ StringBuilder sb = new StringBuilder();
62+ sb.append(getClass().getSimpleName());
63+ sb.append(" [");
64+ sb.append("Hash = ").append(hashCode());
65+ sb.append(", actorId=").append(actorId);
66+ sb.append(", firstName=").append(firstName);
67+ sb.append(", lastName=").append(lastName);
68+ sb.append(", filmInfo=").append(filmInfo);
69+ sb.append(", serialVersionUID=").append(serialVersionUID);
70+ sb.append("]");
71+ return sb.toString();
72+ }
73+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorInfoExample.java (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorInfoExample.java (revision 367)
@@ -0,0 +1,469 @@
1+package test.postgres;
2+
3+import java.util.ArrayList;
4+import java.util.List;
5+
6+public class ActorInfoExample {
7+ protected String orderByClause;
8+
9+ protected boolean distinct;
10+
11+ protected List<Criteria> oredCriteria;
12+
13+ public ActorInfoExample() {
14+ oredCriteria = new ArrayList<>();
15+ }
16+
17+ public void setOrderByClause(String orderByClause) {
18+ this.orderByClause = orderByClause;
19+ }
20+
21+ public String getOrderByClause() {
22+ return orderByClause;
23+ }
24+
25+ public void setDistinct(boolean distinct) {
26+ this.distinct = distinct;
27+ }
28+
29+ public boolean isDistinct() {
30+ return distinct;
31+ }
32+
33+ public List<Criteria> getOredCriteria() {
34+ return oredCriteria;
35+ }
36+
37+ public void or(Criteria criteria) {
38+ oredCriteria.add(criteria);
39+ }
40+
41+ public Criteria or() {
42+ Criteria criteria = createCriteriaInternal();
43+ oredCriteria.add(criteria);
44+ return criteria;
45+ }
46+
47+ public Criteria createCriteria() {
48+ Criteria criteria = createCriteriaInternal();
49+ if (oredCriteria.size() == 0) {
50+ oredCriteria.add(criteria);
51+ }
52+ return criteria;
53+ }
54+
55+ protected Criteria createCriteriaInternal() {
56+ Criteria criteria = new Criteria();
57+ return criteria;
58+ }
59+
60+ public void clear() {
61+ oredCriteria.clear();
62+ orderByClause = null;
63+ distinct = false;
64+ }
65+
66+ protected abstract static class GeneratedCriteria {
67+ protected List<Criterion> criteria;
68+
69+ protected GeneratedCriteria() {
70+ super();
71+ criteria = new ArrayList<>();
72+ }
73+
74+ public boolean isValid() {
75+ return criteria.size() > 0;
76+ }
77+
78+ public List<Criterion> getAllCriteria() {
79+ return criteria;
80+ }
81+
82+ public List<Criterion> getCriteria() {
83+ return criteria;
84+ }
85+
86+ protected void addCriterion(String condition) {
87+ if (condition == null) {
88+ throw new RuntimeException("Value for condition cannot be null");
89+ }
90+ criteria.add(new Criterion(condition));
91+ }
92+
93+ protected void addCriterion(String condition, Object value, String property) {
94+ if (value == null) {
95+ throw new RuntimeException("Value for " + property + " cannot be null");
96+ }
97+ criteria.add(new Criterion(condition, value));
98+ }
99+
100+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
101+ if (value1 == null || value2 == null) {
102+ throw new RuntimeException("Between values for " + property + " cannot be null");
103+ }
104+ criteria.add(new Criterion(condition, value1, value2));
105+ }
106+
107+ public Criteria andActorIdIsNull() {
108+ addCriterion("actor_id is null");
109+ return (Criteria) this;
110+ }
111+
112+ public Criteria andActorIdIsNotNull() {
113+ addCriterion("actor_id is not null");
114+ return (Criteria) this;
115+ }
116+
117+ public Criteria andActorIdEqualTo(Integer value) {
118+ addCriterion("actor_id =", value, "actorId");
119+ return (Criteria) this;
120+ }
121+
122+ public Criteria andActorIdNotEqualTo(Integer value) {
123+ addCriterion("actor_id <>", value, "actorId");
124+ return (Criteria) this;
125+ }
126+
127+ public Criteria andActorIdGreaterThan(Integer value) {
128+ addCriterion("actor_id >", value, "actorId");
129+ return (Criteria) this;
130+ }
131+
132+ public Criteria andActorIdGreaterThanOrEqualTo(Integer value) {
133+ addCriterion("actor_id >=", value, "actorId");
134+ return (Criteria) this;
135+ }
136+
137+ public Criteria andActorIdLessThan(Integer value) {
138+ addCriterion("actor_id <", value, "actorId");
139+ return (Criteria) this;
140+ }
141+
142+ public Criteria andActorIdLessThanOrEqualTo(Integer value) {
143+ addCriterion("actor_id <=", value, "actorId");
144+ return (Criteria) this;
145+ }
146+
147+ public Criteria andActorIdIn(List<Integer> values) {
148+ addCriterion("actor_id in", values, "actorId");
149+ return (Criteria) this;
150+ }
151+
152+ public Criteria andActorIdNotIn(List<Integer> values) {
153+ addCriterion("actor_id not in", values, "actorId");
154+ return (Criteria) this;
155+ }
156+
157+ public Criteria andActorIdBetween(Integer value1, Integer value2) {
158+ addCriterion("actor_id between", value1, value2, "actorId");
159+ return (Criteria) this;
160+ }
161+
162+ public Criteria andActorIdNotBetween(Integer value1, Integer value2) {
163+ addCriterion("actor_id not between", value1, value2, "actorId");
164+ return (Criteria) this;
165+ }
166+
167+ public Criteria andFirstNameIsNull() {
168+ addCriterion("first_name is null");
169+ return (Criteria) this;
170+ }
171+
172+ public Criteria andFirstNameIsNotNull() {
173+ addCriterion("first_name is not null");
174+ return (Criteria) this;
175+ }
176+
177+ public Criteria andFirstNameEqualTo(String value) {
178+ addCriterion("first_name =", value, "firstName");
179+ return (Criteria) this;
180+ }
181+
182+ public Criteria andFirstNameNotEqualTo(String value) {
183+ addCriterion("first_name <>", value, "firstName");
184+ return (Criteria) this;
185+ }
186+
187+ public Criteria andFirstNameGreaterThan(String value) {
188+ addCriterion("first_name >", value, "firstName");
189+ return (Criteria) this;
190+ }
191+
192+ public Criteria andFirstNameGreaterThanOrEqualTo(String value) {
193+ addCriterion("first_name >=", value, "firstName");
194+ return (Criteria) this;
195+ }
196+
197+ public Criteria andFirstNameLessThan(String value) {
198+ addCriterion("first_name <", value, "firstName");
199+ return (Criteria) this;
200+ }
201+
202+ public Criteria andFirstNameLessThanOrEqualTo(String value) {
203+ addCriterion("first_name <=", value, "firstName");
204+ return (Criteria) this;
205+ }
206+
207+ public Criteria andFirstNameLike(String value) {
208+ addCriterion("first_name like", value, "firstName");
209+ return (Criteria) this;
210+ }
211+
212+ public Criteria andFirstNameNotLike(String value) {
213+ addCriterion("first_name not like", value, "firstName");
214+ return (Criteria) this;
215+ }
216+
217+ public Criteria andFirstNameIn(List<String> values) {
218+ addCriterion("first_name in", values, "firstName");
219+ return (Criteria) this;
220+ }
221+
222+ public Criteria andFirstNameNotIn(List<String> values) {
223+ addCriterion("first_name not in", values, "firstName");
224+ return (Criteria) this;
225+ }
226+
227+ public Criteria andFirstNameBetween(String value1, String value2) {
228+ addCriterion("first_name between", value1, value2, "firstName");
229+ return (Criteria) this;
230+ }
231+
232+ public Criteria andFirstNameNotBetween(String value1, String value2) {
233+ addCriterion("first_name not between", value1, value2, "firstName");
234+ return (Criteria) this;
235+ }
236+
237+ public Criteria andLastNameIsNull() {
238+ addCriterion("last_name is null");
239+ return (Criteria) this;
240+ }
241+
242+ public Criteria andLastNameIsNotNull() {
243+ addCriterion("last_name is not null");
244+ return (Criteria) this;
245+ }
246+
247+ public Criteria andLastNameEqualTo(String value) {
248+ addCriterion("last_name =", value, "lastName");
249+ return (Criteria) this;
250+ }
251+
252+ public Criteria andLastNameNotEqualTo(String value) {
253+ addCriterion("last_name <>", value, "lastName");
254+ return (Criteria) this;
255+ }
256+
257+ public Criteria andLastNameGreaterThan(String value) {
258+ addCriterion("last_name >", value, "lastName");
259+ return (Criteria) this;
260+ }
261+
262+ public Criteria andLastNameGreaterThanOrEqualTo(String value) {
263+ addCriterion("last_name >=", value, "lastName");
264+ return (Criteria) this;
265+ }
266+
267+ public Criteria andLastNameLessThan(String value) {
268+ addCriterion("last_name <", value, "lastName");
269+ return (Criteria) this;
270+ }
271+
272+ public Criteria andLastNameLessThanOrEqualTo(String value) {
273+ addCriterion("last_name <=", value, "lastName");
274+ return (Criteria) this;
275+ }
276+
277+ public Criteria andLastNameLike(String value) {
278+ addCriterion("last_name like", value, "lastName");
279+ return (Criteria) this;
280+ }
281+
282+ public Criteria andLastNameNotLike(String value) {
283+ addCriterion("last_name not like", value, "lastName");
284+ return (Criteria) this;
285+ }
286+
287+ public Criteria andLastNameIn(List<String> values) {
288+ addCriterion("last_name in", values, "lastName");
289+ return (Criteria) this;
290+ }
291+
292+ public Criteria andLastNameNotIn(List<String> values) {
293+ addCriterion("last_name not in", values, "lastName");
294+ return (Criteria) this;
295+ }
296+
297+ public Criteria andLastNameBetween(String value1, String value2) {
298+ addCriterion("last_name between", value1, value2, "lastName");
299+ return (Criteria) this;
300+ }
301+
302+ public Criteria andLastNameNotBetween(String value1, String value2) {
303+ addCriterion("last_name not between", value1, value2, "lastName");
304+ return (Criteria) this;
305+ }
306+
307+ public Criteria andFilmInfoIsNull() {
308+ addCriterion("film_info is null");
309+ return (Criteria) this;
310+ }
311+
312+ public Criteria andFilmInfoIsNotNull() {
313+ addCriterion("film_info is not null");
314+ return (Criteria) this;
315+ }
316+
317+ public Criteria andFilmInfoEqualTo(String value) {
318+ addCriterion("film_info =", value, "filmInfo");
319+ return (Criteria) this;
320+ }
321+
322+ public Criteria andFilmInfoNotEqualTo(String value) {
323+ addCriterion("film_info <>", value, "filmInfo");
324+ return (Criteria) this;
325+ }
326+
327+ public Criteria andFilmInfoGreaterThan(String value) {
328+ addCriterion("film_info >", value, "filmInfo");
329+ return (Criteria) this;
330+ }
331+
332+ public Criteria andFilmInfoGreaterThanOrEqualTo(String value) {
333+ addCriterion("film_info >=", value, "filmInfo");
334+ return (Criteria) this;
335+ }
336+
337+ public Criteria andFilmInfoLessThan(String value) {
338+ addCriterion("film_info <", value, "filmInfo");
339+ return (Criteria) this;
340+ }
341+
342+ public Criteria andFilmInfoLessThanOrEqualTo(String value) {
343+ addCriterion("film_info <=", value, "filmInfo");
344+ return (Criteria) this;
345+ }
346+
347+ public Criteria andFilmInfoLike(String value) {
348+ addCriterion("film_info like", value, "filmInfo");
349+ return (Criteria) this;
350+ }
351+
352+ public Criteria andFilmInfoNotLike(String value) {
353+ addCriterion("film_info not like", value, "filmInfo");
354+ return (Criteria) this;
355+ }
356+
357+ public Criteria andFilmInfoIn(List<String> values) {
358+ addCriterion("film_info in", values, "filmInfo");
359+ return (Criteria) this;
360+ }
361+
362+ public Criteria andFilmInfoNotIn(List<String> values) {
363+ addCriterion("film_info not in", values, "filmInfo");
364+ return (Criteria) this;
365+ }
366+
367+ public Criteria andFilmInfoBetween(String value1, String value2) {
368+ addCriterion("film_info between", value1, value2, "filmInfo");
369+ return (Criteria) this;
370+ }
371+
372+ public Criteria andFilmInfoNotBetween(String value1, String value2) {
373+ addCriterion("film_info not between", value1, value2, "filmInfo");
374+ return (Criteria) this;
375+ }
376+ }
377+
378+ public static class Criteria extends GeneratedCriteria {
379+ protected Criteria() {
380+ super();
381+ }
382+ }
383+
384+ public static class Criterion {
385+ private String condition;
386+
387+ private Object value;
388+
389+ private Object secondValue;
390+
391+ private boolean noValue;
392+
393+ private boolean singleValue;
394+
395+ private boolean betweenValue;
396+
397+ private boolean listValue;
398+
399+ private String typeHandler;
400+
401+ public String getCondition() {
402+ return condition;
403+ }
404+
405+ public Object getValue() {
406+ return value;
407+ }
408+
409+ public Object getSecondValue() {
410+ return secondValue;
411+ }
412+
413+ public boolean isNoValue() {
414+ return noValue;
415+ }
416+
417+ public boolean isSingleValue() {
418+ return singleValue;
419+ }
420+
421+ public boolean isBetweenValue() {
422+ return betweenValue;
423+ }
424+
425+ public boolean isListValue() {
426+ return listValue;
427+ }
428+
429+ public String getTypeHandler() {
430+ return typeHandler;
431+ }
432+
433+ protected Criterion(String condition) {
434+ super();
435+ this.condition = condition;
436+ this.typeHandler = null;
437+ this.noValue = true;
438+ }
439+
440+ protected Criterion(String condition, Object value, String typeHandler) {
441+ super();
442+ this.condition = condition;
443+ this.value = value;
444+ this.typeHandler = typeHandler;
445+ if (value instanceof List<?>) {
446+ this.listValue = true;
447+ } else {
448+ this.singleValue = true;
449+ }
450+ }
451+
452+ protected Criterion(String condition, Object value) {
453+ this(condition, value, null);
454+ }
455+
456+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
457+ super();
458+ this.condition = condition;
459+ this.value = value;
460+ this.secondValue = secondValue;
461+ this.typeHandler = typeHandler;
462+ this.betweenValue = true;
463+ }
464+
465+ protected Criterion(String condition, Object value, Object secondValue) {
466+ this(condition, value, secondValue, null);
467+ }
468+ }
469+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorInfoMapper.java (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorInfoMapper.java (revision 367)
@@ -0,0 +1,22 @@
1+package test.postgres;
2+
3+import java.util.List;
4+import org.apache.ibatis.annotations.Param;
5+import test.postgres.ActorInfoEntity;
6+import test.postgres.ActorInfoExample;
7+
8+public interface ActorInfoMapper {
9+ long countByExample(ActorInfoExample example);
10+
11+ int deleteByExample(ActorInfoExample example);
12+
13+ int insert(ActorInfoEntity row);
14+
15+ int insertSelective(ActorInfoEntity row);
16+
17+ List<ActorInfoEntity> selectByExample(ActorInfoExample example);
18+
19+ int updateByExampleSelective(@Param("row") ActorInfoEntity row, @Param("example") ActorInfoExample example);
20+
21+ int updateByExample(@Param("row") ActorInfoEntity row, @Param("example") ActorInfoExample example);
22+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorInfoMapper.xml (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorInfoMapper.xml (revision 367)
@@ -0,0 +1,168 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3+<mapper namespace="test.postgres.ActorInfoMapper">
4+ <resultMap id="BaseResultMap" type="test.postgres.ActorInfoEntity">
5+ <constructor>
6+ <arg column="actor_id" javaType="java.lang.Integer" jdbcType="INTEGER" />
7+ <arg column="first_name" javaType="java.lang.String" jdbcType="VARCHAR" />
8+ <arg column="last_name" javaType="java.lang.String" jdbcType="VARCHAR" />
9+ <arg column="film_info" javaType="java.lang.String" jdbcType="VARCHAR" />
10+ </constructor>
11+ </resultMap>
12+ <sql id="Example_Where_Clause">
13+ <where>
14+ <foreach collection="oredCriteria" item="criteria" separator="or">
15+ <if test="criteria.valid">
16+ <trim prefix="(" prefixOverrides="and" suffix=")">
17+ <foreach collection="criteria.criteria" item="criterion">
18+ <choose>
19+ <when test="criterion.noValue">
20+ and ${criterion.condition}
21+ </when>
22+ <when test="criterion.singleValue">
23+ and ${criterion.condition} #{criterion.value}
24+ </when>
25+ <when test="criterion.betweenValue">
26+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27+ </when>
28+ <when test="criterion.listValue">
29+ and ${criterion.condition}
30+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
31+ #{listItem}
32+ </foreach>
33+ </when>
34+ </choose>
35+ </foreach>
36+ </trim>
37+ </if>
38+ </foreach>
39+ </where>
40+ </sql>
41+ <sql id="Update_By_Example_Where_Clause">
42+ <where>
43+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
44+ <if test="criteria.valid">
45+ <trim prefix="(" prefixOverrides="and" suffix=")">
46+ <foreach collection="criteria.criteria" item="criterion">
47+ <choose>
48+ <when test="criterion.noValue">
49+ and ${criterion.condition}
50+ </when>
51+ <when test="criterion.singleValue">
52+ and ${criterion.condition} #{criterion.value}
53+ </when>
54+ <when test="criterion.betweenValue">
55+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
56+ </when>
57+ <when test="criterion.listValue">
58+ and ${criterion.condition}
59+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
60+ #{listItem}
61+ </foreach>
62+ </when>
63+ </choose>
64+ </foreach>
65+ </trim>
66+ </if>
67+ </foreach>
68+ </where>
69+ </sql>
70+ <sql id="Base_Column_List">
71+ actor_id, first_name, last_name, film_info
72+ </sql>
73+ <select id="selectByExample" parameterType="test.postgres.ActorInfoExample" resultMap="BaseResultMap">
74+ select
75+ <if test="distinct">
76+ distinct
77+ </if>
78+ <include refid="Base_Column_List" />
79+ from actor_info
80+ <if test="_parameter != null">
81+ <include refid="Example_Where_Clause" />
82+ </if>
83+ <if test="orderByClause != null">
84+ order by ${orderByClause}
85+ </if>
86+ WITHOUT LOCK NOWAIT
87+ </select>
88+ <delete id="deleteByExample" parameterType="test.postgres.ActorInfoExample">
89+ delete from actor_info
90+ <if test="_parameter != null">
91+ <include refid="Example_Where_Clause" />
92+ </if>
93+ </delete>
94+ <insert id="insert" parameterType="test.postgres.ActorInfoEntity">
95+ insert into actor_info (actor_id, first_name, last_name,
96+ film_info)
97+ values (#{actorId,jdbcType=INTEGER}, #{firstName,jdbcType=VARCHAR}, #{lastName,jdbcType=VARCHAR},
98+ #{filmInfo,jdbcType=VARCHAR})
99+ </insert>
100+ <insert id="insertSelective" parameterType="test.postgres.ActorInfoEntity">
101+ insert into actor_info
102+ <trim prefix="(" suffix=")" suffixOverrides=",">
103+ <if test="actorId != null">
104+ actor_id,
105+ </if>
106+ <if test="firstName != null">
107+ first_name,
108+ </if>
109+ <if test="lastName != null">
110+ last_name,
111+ </if>
112+ <if test="filmInfo != null">
113+ film_info,
114+ </if>
115+ </trim>
116+ <trim prefix="values (" suffix=")" suffixOverrides=",">
117+ <if test="actorId != null">
118+ #{actorId,jdbcType=INTEGER},
119+ </if>
120+ <if test="firstName != null">
121+ #{firstName,jdbcType=VARCHAR},
122+ </if>
123+ <if test="lastName != null">
124+ #{lastName,jdbcType=VARCHAR},
125+ </if>
126+ <if test="filmInfo != null">
127+ #{filmInfo,jdbcType=VARCHAR},
128+ </if>
129+ </trim>
130+ </insert>
131+ <select id="countByExample" parameterType="test.postgres.ActorInfoExample" resultType="java.lang.Long">
132+ select count(*) from actor_info
133+ <if test="_parameter != null">
134+ <include refid="Example_Where_Clause" />
135+ </if>
136+ WITHOUT LOCK NOWAIT
137+ </select>
138+ <update id="updateByExampleSelective" parameterType="map">
139+ update actor_info
140+ <set>
141+ <if test="row.actorId != null">
142+ actor_id = #{row.actorId,jdbcType=INTEGER},
143+ </if>
144+ <if test="row.firstName != null">
145+ first_name = #{row.firstName,jdbcType=VARCHAR},
146+ </if>
147+ <if test="row.lastName != null">
148+ last_name = #{row.lastName,jdbcType=VARCHAR},
149+ </if>
150+ <if test="row.filmInfo != null">
151+ film_info = #{row.filmInfo,jdbcType=VARCHAR},
152+ </if>
153+ </set>
154+ <if test="example != null">
155+ <include refid="Update_By_Example_Where_Clause" />
156+ </if>
157+ </update>
158+ <update id="updateByExample" parameterType="map">
159+ update actor_info
160+ set actor_id = #{row.actorId,jdbcType=INTEGER},
161+ first_name = #{row.firstName,jdbcType=VARCHAR},
162+ last_name = #{row.lastName,jdbcType=VARCHAR},
163+ film_info = #{row.filmInfo,jdbcType=VARCHAR}
164+ <if test="example != null">
165+ <include refid="Update_By_Example_Where_Clause" />
166+ </if>
167+ </update>
168+</mapper>
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorMapper.java (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorMapper.java (revision 367)
@@ -0,0 +1,30 @@
1+package test.postgres;
2+
3+import java.util.List;
4+import org.apache.ibatis.annotations.Param;
5+import test.postgres.ActorEntity;
6+import test.postgres.ActorExample;
7+
8+public interface ActorMapper {
9+ long countByExample(ActorExample example);
10+
11+ int deleteByExample(ActorExample example);
12+
13+ int deleteByPrimaryKey(Integer actorId);
14+
15+ int insert(ActorEntity row);
16+
17+ int insertSelective(ActorEntity row);
18+
19+ List<ActorEntity> selectByExample(ActorExample example);
20+
21+ ActorEntity selectByPrimaryKey(Integer actorId);
22+
23+ int updateByExampleSelective(@Param("row") ActorEntity row, @Param("example") ActorExample example);
24+
25+ int updateByExample(@Param("row") ActorEntity row, @Param("example") ActorExample example);
26+
27+ int updateByPrimaryKeySelective(ActorEntity row);
28+
29+ int updateByPrimaryKey(ActorEntity row);
30+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- trunk/mybatisPlugins/src/test/postgres/ActorMapper.xml (nonexistent)
+++ trunk/mybatisPlugins/src/test/postgres/ActorMapper.xml (revision 367)
@@ -0,0 +1,201 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3+<mapper namespace="test.postgres.ActorMapper">
4+ <resultMap id="BaseResultMap" type="test.postgres.ActorEntity">
5+ <constructor>
6+ <idArg column="actor_id" javaType="java.lang.Integer" jdbcType="INTEGER" />
7+ <arg column="first_name" javaType="java.lang.String" jdbcType="VARCHAR" />
8+ <arg column="last_name" javaType="java.lang.String" jdbcType="VARCHAR" />
9+ <arg column="last_update" javaType="java.util.Date" jdbcType="TIMESTAMP" />
10+ </constructor>
11+ </resultMap>
12+ <sql id="Example_Where_Clause">
13+ <where>
14+ <foreach collection="oredCriteria" item="criteria" separator="or">
15+ <if test="criteria.valid">
16+ <trim prefix="(" prefixOverrides="and" suffix=")">
17+ <foreach collection="criteria.criteria" item="criterion">
18+ <choose>
19+ <when test="criterion.noValue">
20+ and ${criterion.condition}
21+ </when>
22+ <when test="criterion.singleValue">
23+ and ${criterion.condition} #{criterion.value}
24+ </when>
25+ <when test="criterion.betweenValue">
26+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27+ </when>
28+ <when test="criterion.listValue">
29+ and ${criterion.condition}
30+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
31+ #{listItem}
32+ </foreach>
33+ </when>
34+ </choose>
35+ </foreach>
36+ </trim>
37+ </if>
38+ </foreach>
39+ </where>
40+ </sql>
41+ <sql id="Update_By_Example_Where_Clause">
42+ <where>
43+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
44+ <if test="criteria.valid">
45+ <trim prefix="(" prefixOverrides="and" suffix=")">
46+ <foreach collection="criteria.criteria" item="criterion">
47+ <choose>
48+ <when test="criterion.noValue">
49+ and ${criterion.condition}
50+ </when>
51+ <when test="criterion.singleValue">
52+ and ${criterion.condition} #{criterion.value}
53+ </when>
54+ <when test="criterion.betweenValue">
55+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
56+ </when>
57+ <when test="criterion.listValue">
58+ and ${criterion.condition}
59+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
60+ #{listItem}
61+ </foreach>
62+ </when>
63+ </choose>
64+ </foreach>
65+ </trim>
66+ </if>
67+ </foreach>
68+ </where>
69+ </sql>
70+ <sql id="Base_Column_List">
71+ actor_id, first_name, last_name, last_update
72+ </sql>
73+ <select id="selectByExample" parameterType="test.postgres.ActorExample" resultMap="BaseResultMap">
74+ select
75+ <if test="distinct">
76+ distinct
77+ </if>
78+ <include refid="Base_Column_List" />
79+ from actor
80+ <if test="_parameter != null">
81+ <include refid="Example_Where_Clause" />
82+ </if>
83+ <if test="orderByClause != null">
84+ order by ${orderByClause}
85+ </if>
86+ WITHOUT LOCK NOWAIT
87+ </select>
88+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
89+ select
90+ <include refid="Base_Column_List" />
91+ from actor
92+ where actor_id = #{actorId,jdbcType=INTEGER}
93+ WITHOUT LOCK NOWAIT
94+ </select>
95+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
96+ delete from actor
97+ where actor_id = #{actorId,jdbcType=INTEGER}
98+ </delete>
99+ <delete id="deleteByExample" parameterType="test.postgres.ActorExample">
100+ delete from actor
101+ <if test="_parameter != null">
102+ <include refid="Example_Where_Clause" />
103+ </if>
104+ </delete>
105+ <insert id="insert" parameterType="test.postgres.ActorEntity">
106+ insert into actor (actor_id, first_name, last_name,
107+ last_update)
108+ values (#{actorId,jdbcType=INTEGER}, #{firstName,jdbcType=VARCHAR}, #{lastName,jdbcType=VARCHAR},
109+ #{lastUpdate,jdbcType=TIMESTAMP})
110+ </insert>
111+ <insert id="insertSelective" parameterType="test.postgres.ActorEntity">
112+ insert into actor
113+ <trim prefix="(" suffix=")" suffixOverrides=",">
114+ <if test="actorId != null">
115+ actor_id,
116+ </if>
117+ <if test="firstName != null">
118+ first_name,
119+ </if>
120+ <if test="lastName != null">
121+ last_name,
122+ </if>
123+ <if test="lastUpdate != null">
124+ last_update,
125+ </if>
126+ </trim>
127+ <trim prefix="values (" suffix=")" suffixOverrides=",">
128+ <if test="actorId != null">
129+ #{actorId,jdbcType=INTEGER},
130+ </if>
131+ <if test="firstName != null">
132+ #{firstName,jdbcType=VARCHAR},
133+ </if>
134+ <if test="lastName != null">
135+ #{lastName,jdbcType=VARCHAR},
136+ </if>
137+ <if test="lastUpdate != null">
138+ #{lastUpdate,jdbcType=TIMESTAMP},
139+ </if>
140+ </trim>
141+ </insert>
142+ <select id="countByExample" parameterType="test.postgres.ActorExample" resultType="java.lang.Long">
143+ select count(*) from actor
144+ <if test="_parameter != null">
145+ <include refid="Example_Where_Clause" />
146+ </if>
147+ WITHOUT LOCK NOWAIT
148+ </select>
149+ <update id="updateByExampleSelective" parameterType="map">
150+ update actor
151+ <set>
152+ <if test="row.actorId != null">
153+ actor_id = #{row.actorId,jdbcType=INTEGER},
154+ </if>
155+ <if test="row.firstName != null">
156+ first_name = #{row.firstName,jdbcType=VARCHAR},
157+ </if>
158+ <if test="row.lastName != null">
159+ last_name = #{row.lastName,jdbcType=VARCHAR},
160+ </if>
161+ <if test="row.lastUpdate != null">
162+ last_update = #{row.lastUpdate,jdbcType=TIMESTAMP},
163+ </if>
164+ </set>
165+ <if test="example != null">
166+ <include refid="Update_By_Example_Where_Clause" />
167+ </if>
168+ </update>
169+ <update id="updateByExample" parameterType="map">
170+ update actor
171+ set actor_id = #{row.actorId,jdbcType=INTEGER},
172+ first_name = #{row.firstName,jdbcType=VARCHAR},
173+ last_name = #{row.lastName,jdbcType=VARCHAR},
174+ last_update = #{row.lastUpdate,jdbcType=TIMESTAMP}
175+ <if test="example != null">
176+ <include refid="Update_By_Example_Where_Clause" />
177+ </if>
178+ </update>
179+ <update id="updateByPrimaryKeySelective" parameterType="test.postgres.ActorEntity">
180+ update actor
181+ <set>
182+ <if test="firstName != null">
183+ first_name = #{firstName,jdbcType=VARCHAR},
184+ </if>
185+ <if test="lastName != null">
186+ last_name = #{lastName,jdbcType=VARCHAR},
187+ </if>
188+ <if test="lastUpdate != null">
189+ last_update = #{lastUpdate,jdbcType=TIMESTAMP},
190+ </if>
191+ </set>
192+ where actor_id = #{actorId,jdbcType=INTEGER}
193+ </update>
194+ <update id="updateByPrimaryKey" parameterType="test.postgres.ActorEntity">
195+ update actor
196+ set first_name = #{firstName,jdbcType=VARCHAR},
197+ last_name = #{lastName,jdbcType=VARCHAR},
198+ last_update = #{lastUpdate,jdbcType=TIMESTAMP}
199+ where actor_id = #{actorId,jdbcType=INTEGER}
200+ </update>
201+</mapper>
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
旧リポジトリブラウザで表示