• R/O
  • SSH
  • HTTPS

clearfybusiness: Commit


Commit MetaInfo

Révision219 (tree)
l'heure2019-07-18 14:50:44
Auteurdaianji

Message de Log

H2db conpact command implemented

Change Summary

Modification

--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/ClearfyApplication.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/ClearfyApplication.java (revision 219)
@@ -86,7 +86,7 @@
8686 /**
8787 * JDBCDriverのクラス名.
8888 */
89- protected static String JDBC_DRIVER_MANAGER = "org.h2.Driver";
89+ protected String JDBC_DRIVER_MANAGER = "org.h2.Driver";
9090
9191 /**
9292 * データベースHTTP
@@ -164,11 +164,11 @@
164164 ResultSet rs = frontPage.select(frontPage.Selected.sameValueOf(1));
165165 String clsname = "";
166166 try {
167- if(rs.next()){
167+ if (rs.next()) {
168168 clsname = frontPage.FrontPageClass.of(rs);
169169 }
170170 rs.close();
171- if(clsname.length()>0){
171+ if (clsname.length() > 0) {
172172 Class cls = Class.forName(clsname);
173173 return cls;
174174 }
@@ -293,7 +293,7 @@
293293 this.dbStatus = ClearfyApplication.DATABASE_STOPED;
294294
295295 //ドライバの読み込み.
296- Class.forName(ClearfyApplication.JDBC_DRIVER_MANAGER);
296+ Class.forName(this.JDBC_DRIVER_MANAGER);
297297
298298 //DBサーバーのhttp起動
299299 String httpPort = this.getInitParameter("httpPort");
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/ClearfySession.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/ClearfySession.java (revision 219)
@@ -264,7 +264,7 @@
264264 Jdbc rvalue = ((ClearfyApplication) this.getApplication()).getJdbc();
265265 return rvalue;
266266 }
267-
267+
268268 /**
269269 * ユーザーアカウントの取得.
270270 *
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/organization/data/OrganizationBizHours.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/organization/data/OrganizationBizHours.java (revision 219)
@@ -24,8 +24,11 @@
2424 package org.clearfy.admin.organization.data;
2525
2626 import java.sql.Time;
27+import java.util.logging.Level;
28+import java.util.logging.Logger;
2729 import org.clearfy.annotations.Comment;
2830 import org.clearfy.annotations.LogicalName;
31+import org.clearfy.datawrapper.ClearfyDatabaseException;
2932 import org.clearfy.datawrapper.Column;
3033 import org.clearfy.datawrapper.CurrentTimestamp;
3134 import org.clearfy.datawrapper.ShortFlagZero;
@@ -68,19 +71,24 @@
6871
6972 @Override
7073 public void defineColumns() {
71- this.OrganizationId.setAllowNull(false)
72- .addRelationWith(Organization.class);
73-
74- this.DayOfWeek.setAllowNull(false);
75-
76- this.EntryNum.setAllowNull(false)
77- .setDefault("1");
78-
79- this.StartTime.setAllowNull(false)
80- .setDefault("'00:00:00'");
81-
82- this.EndTime.setAllowNull(false)
83- .setDefault("'23:59:59'");
74+ try {
75+ this.OrganizationId.setAllowNull(false)
76+ .addRelationWith(Organization.class);
77+
78+ this.DayOfWeek.setAllowNull(false);
79+
80+ this.EntryNum.setAllowNull(false)
81+ .setDefault("1");
82+
83+ this.StartTime.setAllowNull(false)
84+ .setDefault("'00:00:00'");
85+
86+ this.EndTime.setAllowNull(false)
87+ .setDefault("'23:59:59'");
88+ }
89+ catch (ClearfyDatabaseException ex) {
90+ Logger.getLogger(OrganizationBizHours.class.getName()).log(Level.SEVERE, null, ex);
91+ }
8492 }
8593
8694 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/organization/data/OrganizationUserLink.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/organization/data/OrganizationUserLink.java (revision 219)
@@ -23,8 +23,11 @@
2323 */
2424 package org.clearfy.admin.organization.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.admin.users.data.User;
2729 import org.clearfy.annotations.LogicalName;
30+import org.clearfy.datawrapper.ClearfyDatabaseException;
2831 import org.clearfy.datawrapper.Column;
2932 import org.clearfy.datawrapper.CurrentTimestamp;
3033 import org.clearfy.datawrapper.ShortFlagZero;
@@ -55,13 +58,18 @@
5558
5659 @Override
5760 public void defineColumns() {
58- this.OrganizationId.setAllowNull(false)
59- .setPrimaryKey(true)
60- .addRelationWith(Organization.class);
61-
62- this.UserId.setAllowNull(false)
63- .setPrimaryKey(true)
64- .addRelationWith(User.class);
61+ try {
62+ this.OrganizationId.setAllowNull(false)
63+ .setPrimaryKey(true)
64+ .addRelationWith(Organization.class);
65+
66+ this.UserId.setAllowNull(false)
67+ .setPrimaryKey(true)
68+ .addRelationWith(User.class);
69+ }
70+ catch (ClearfyDatabaseException ex) {
71+ Logger.getLogger(OrganizationUserLink.class.getName()).log(Level.SEVERE, null, ex);
72+ }
6573 }
6674
6775 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/plugin/data/UserPermission.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/plugin/data/UserPermission.java (revision 219)
@@ -28,6 +28,7 @@
2828 import java.util.logging.Level;
2929 import java.util.logging.Logger;
3030 import org.clearfy.admin.users.data.User;
31+import org.clearfy.datawrapper.ClearfyDatabaseException;
3132 import org.clearfy.datawrapper.Column;
3233 import org.clearfy.datawrapper.CurrentTimestamp;
3334 import org.clearfy.datawrapper.ShortFlagZero;
@@ -49,15 +50,20 @@
4950
5051 @Override
5152 public void defineColumns() {
52- this.UserId.setAllowNull(false)
53- .addRelationWith(User.class);
53+ try {
54+ this.UserId.setAllowNull(false)
55+ .addRelationWith(User.class);
56+
57+ this.PluginName.setAllowNull(false)
58+ .setLength(Column.SIZE_512)
59+ .addRelationWith(Plugin.class);
60+
61+ this.AuthId.setAllowNull(false);
62+ }
63+ catch (ClearfyDatabaseException ex) {
64+ Logger.getLogger(UserPermission.class.getName()).log(Level.SEVERE, null, ex);
65+ }
5466
55- this.PluginName.setAllowNull(false)
56- .setLength(Column.SIZE_512)
57- .addRelationWith(Plugin.class);
58-
59- this.AuthId.setAllowNull(false);
60-
6167 }
6268
6369 /**
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/users/data/User.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/users/data/User.java (revision 219)
@@ -23,7 +23,10 @@
2323 */
2424 package org.clearfy.admin.users.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.LogicalName;
29+import org.clearfy.datawrapper.ClearfyDatabaseException;
2730 import org.clearfy.datawrapper.Column;
2831 import org.clearfy.datawrapper.CurrentTimestamp;
2932 import org.clearfy.datawrapper.IncrementalKey;
@@ -83,7 +86,12 @@
8386 UserApikey.setAllowNull(false)
8487 .setLength(Column.SIZE_32);
8588
86- this.UserId.addRelationWith(UserAuthLink.class, UserId);
89+ try {
90+ this.UserId.addRelationWith(UserAuthLink.class, UserId);
91+ }
92+ catch (ClearfyDatabaseException ex) {
93+ Logger.getLogger(User.class.getName()).log(Level.SEVERE, null, ex);
94+ }
8795 }
8896
8997 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/users/data/UserAuth.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/users/data/UserAuth.java (revision 219)
@@ -23,6 +23,9 @@
2323 */
2424 package org.clearfy.admin.users.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
28+import org.clearfy.datawrapper.ClearfyDatabaseException;
2629 import org.clearfy.datawrapper.Column;
2730 import org.clearfy.datawrapper.CurrentTimestamp;
2831 import org.clearfy.datawrapper.IncrementalKey;
@@ -46,9 +49,14 @@
4649 public void defineColumns() {
4750
4851 AuthType.setAllowNull(false)
49- .setLength(64);
52+ .setLength(64);
5053
51- this.AuthId.addRelationWith(UserAuthLink.class, AuthId);
54+ try {
55+ this.AuthId.addRelationWith(UserAuthLink.class, AuthId);
56+ }
57+ catch (ClearfyDatabaseException ex) {
58+ Logger.getLogger(UserAuth.class.getName()).log(Level.SEVERE, null, ex);
59+ }
5260 }
5361
5462 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/users/data/UserAuthLink.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/admin/users/data/UserAuthLink.java (revision 219)
@@ -23,6 +23,9 @@
2323 */
2424 package org.clearfy.admin.users.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
28+import org.clearfy.datawrapper.ClearfyDatabaseException;
2629 import org.clearfy.datawrapper.Column;
2730 import org.clearfy.datawrapper.ShortFlagZero;
2831 import org.clearfy.datawrapper.Table;
@@ -40,17 +43,22 @@
4043 @Override
4144 public void defineColumns() {
4245
43- UserId.setPrimaryKey(true)
44- .setAllowNull(false);
45-
46- AuthId.setPrimaryKey(true)
47- .setAllowNull(false);
48-
49- Disable.setAllowNull(false)
50- .setDefault("0");
51-
52- this.UserId.addRelationWith(User.class, UserId);
53- this.AuthId.addRelationWith(UserAuth.class, AuthId);
46+ try {
47+ UserId.setPrimaryKey(true)
48+ .setAllowNull(false);
49+
50+ AuthId.setPrimaryKey(true)
51+ .setAllowNull(false);
52+
53+ Disable.setAllowNull(false)
54+ .setDefault("0");
55+
56+ this.UserId.addRelationWith(User.class, UserId);
57+ this.AuthId.addRelationWith(UserAuth.class, AuthId);
58+ }
59+ catch (ClearfyDatabaseException ex) {
60+ Logger.getLogger(UserAuthLink.class.getName()).log(Level.SEVERE, null, ex);
61+ }
5462 }
5563
5664 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/Employee.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/Employee.java (revision 219)
@@ -23,6 +23,8 @@
2323 */
2424 package org.clearfy.plugin.employee.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.admin.users.data.User;
2729 import org.clearfy.annotations.Comment;
2830 import org.clearfy.annotations.LogicalName;
@@ -32,6 +34,7 @@
3234 import org.clearfy.datawrapper.ShortFlagZero;
3335 import org.clearfy.datawrapper.Table;
3436 import org.clearfy.admin.organization.data.Organization;
37+import org.clearfy.datawrapper.ClearfyDatabaseException;
3538
3639 /**
3740 * 従業者テーブル.
@@ -91,33 +94,38 @@
9194 @Override
9295 public void defineColumns() {
9396
94- this.OrganizationId.setAllowNull(false)
95- .addRelationWith(Organization.class, OrganizationId);
97+ try {
98+ this.OrganizationId.setAllowNull(false)
99+ .addRelationWith(Organization.class, OrganizationId);
100+
101+ this.UserId.setAllowNull(false)
102+ .addRelationWith(User.class, UserId);
103+
104+ this.EmployeeName.setAllowNull(false)
105+ .setLength(Column.SIZE_128);
106+
107+ this.EmployeeKana.setAllowNull(false)
108+ .setLength(Column.SIZE_128);
109+
110+ this.ScardId.setLength(Column.SIZE_32);
111+
112+ this.NormalizeTime.setAllowNull(false)
113+ .setDefault("30");
114+
115+ this.Zipcode.setLength(Column.SIZE_16);
116+
117+ this.Address.setLength(Column.SIZE_128);
118+
119+ this.Phone.setLength(Column.SIZE_16);
120+
121+ this.Email.setLength(Column.SIZE_128);
122+
123+ this.Memo.setLength(Column.SIZE_512);
124+ }
125+ catch (ClearfyDatabaseException ex) {
126+ Logger.getLogger(Employee.class.getName()).log(Level.SEVERE, null, ex);
127+ }
96128
97- this.UserId.setAllowNull(false)
98- .addRelationWith(User.class, UserId);
99-
100- this.EmployeeName.setAllowNull(false)
101- .setLength(Column.SIZE_128);
102-
103- this.EmployeeKana.setAllowNull(false)
104- .setLength(Column.SIZE_128);
105-
106- this.ScardId.setLength(Column.SIZE_32);
107-
108- this.NormalizeTime.setAllowNull(false)
109- .setDefault("30");
110-
111- this.Zipcode.setLength(Column.SIZE_16);
112-
113- this.Address.setLength(Column.SIZE_128);
114-
115- this.Phone.setLength(Column.SIZE_16);
116-
117- this.Email.setLength(Column.SIZE_128);
118-
119- this.Memo.setLength(Column.SIZE_512);
120-
121129 }
122130
123131 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeeJobType.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeeJobType.java (revision 219)
@@ -23,9 +23,12 @@
2323 */
2424 package org.clearfy.plugin.employee.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.admin.organization.data.Organization;
2729 import org.clearfy.annotations.Comment;
2830 import org.clearfy.annotations.LogicalName;
31+import org.clearfy.datawrapper.ClearfyDatabaseException;
2932 import org.clearfy.datawrapper.Column;
3033 import org.clearfy.datawrapper.CurrentTimestamp;
3134 import org.clearfy.datawrapper.IncrementalKey;
@@ -65,14 +68,19 @@
6568
6669 @Override
6770 public void defineColumns() {
68- this.OrganizationId.addRelationWith(Organization.class).setAllowNull(false);
71+ try {
72+ this.OrganizationId.addRelationWith(Organization.class).setAllowNull(false);
73+
74+ this.Ordinal.setAllowNull(false)
75+ .setDefault("999");
76+
77+ this.EmployeeJobTypeName.setLength(Column.SIZE_128)
78+ .setAllowNull(false);
79+ }
80+ catch (ClearfyDatabaseException ex) {
81+ Logger.getLogger(EmployeeJobType.class.getName()).log(Level.SEVERE, null, ex);
82+ }
6983
70- this.Ordinal.setAllowNull(false)
71- .setDefault("999");
72-
73- this.EmployeeJobTypeName.setLength(Column.SIZE_128)
74- .setAllowNull(false);
75-
7684 }
7785
7886 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeeJobTypeLink.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeeJobTypeLink.java (revision 219)
@@ -23,7 +23,10 @@
2323 */
2424 package org.clearfy.plugin.employee.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.LogicalName;
29+import org.clearfy.datawrapper.ClearfyDatabaseException;
2730 import org.clearfy.datawrapper.Column;
2831 import org.clearfy.datawrapper.CurrentTimestamp;
2932 import org.clearfy.datawrapper.ShortFlagZero;
@@ -54,9 +57,14 @@
5457
5558 @Override
5659 public void defineColumns() {
57- this.EmployeeId.addRelationWith(Employee.class).setAllowNull(false);
58-
59- this.EmployeeJobTypeId.addRelationWith(EmployeeJobType.class).setAllowNull(false);
60+ try {
61+ this.EmployeeId.addRelationWith(Employee.class).setAllowNull(false);
62+
63+ this.EmployeeJobTypeId.addRelationWith(EmployeeJobType.class).setAllowNull(false);
64+ }
65+ catch (ClearfyDatabaseException ex) {
66+ Logger.getLogger(EmployeeJobTypeLink.class.getName()).log(Level.SEVERE, null, ex);
67+ }
6068 }
6169
6270 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeePosition.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeePosition.java (revision 219)
@@ -23,9 +23,12 @@
2323 */
2424 package org.clearfy.plugin.employee.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.admin.organization.data.Organization;
2729 import org.clearfy.annotations.Comment;
2830 import org.clearfy.annotations.LogicalName;
31+import org.clearfy.datawrapper.ClearfyDatabaseException;
2932 import org.clearfy.datawrapper.Column;
3033 import org.clearfy.datawrapper.CurrentTimestamp;
3134 import org.clearfy.datawrapper.IncrementalKey;
@@ -65,14 +68,19 @@
6568
6669 @Override
6770 public void defineColumns() {
68- this.OrganizationId.addRelationWith(Organization.class).setAllowNull(false);
71+ try {
72+ this.OrganizationId.addRelationWith(Organization.class).setAllowNull(false);
73+
74+ this.Ordinal.setAllowNull(false)
75+ .setDefault("999");
76+
77+ this.EmployeePositionName.setLength(Column.SIZE_128)
78+ .setAllowNull(false);
79+ }
80+ catch (ClearfyDatabaseException ex) {
81+ Logger.getLogger(EmployeePosition.class.getName()).log(Level.SEVERE, null, ex);
82+ }
6983
70- this.Ordinal.setAllowNull(false)
71- .setDefault("999");
72-
73- this.EmployeePositionName.setLength(Column.SIZE_128)
74- .setAllowNull(false);
75-
7684 }
7785
7886 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeePositionLink.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/employee/data/EmployeePositionLink.java (revision 219)
@@ -23,7 +23,10 @@
2323 */
2424 package org.clearfy.plugin.employee.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.LogicalName;
29+import org.clearfy.datawrapper.ClearfyDatabaseException;
2730 import org.clearfy.datawrapper.Column;
2831 import org.clearfy.datawrapper.CurrentTimestamp;
2932 import org.clearfy.datawrapper.ShortFlagZero;
@@ -54,9 +57,14 @@
5457
5558 @Override
5659 public void defineColumns() {
57- this.EmployeeId.addRelationWith(Employee.class).setAllowNull(false);
58-
59- this.EmployeePositionId.addRelationWith(EmployeePosition.class).setAllowNull(false);
60+ try {
61+ this.EmployeeId.addRelationWith(Employee.class).setAllowNull(false);
62+
63+ this.EmployeePositionId.addRelationWith(EmployeePosition.class).setAllowNull(false);
64+ }
65+ catch (ClearfyDatabaseException ex) {
66+ Logger.getLogger(EmployeePositionLink.class.getName()).log(Level.SEVERE, null, ex);
67+ }
6068 }
6169
6270 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/MailSender.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/mail/MailSender.java (revision 219)
@@ -129,7 +129,7 @@
129129 this.properties.setProperty("mail.host", host);
130130
131131 return this;
132- } // end setMessageId()
132+ }
133133
134134 /**
135135 * DOCUMENT ME!
@@ -144,7 +144,7 @@
144144 this.properties.setProperty("mail.smtp.port", String.valueOf(port));
145145
146146 return this;
147- } // end setSMTPServer()
147+ }
148148
149149 /**
150150 * DOCUMENT ME!
@@ -162,7 +162,7 @@
162162 }
163163
164164 return this;
165- } // end setStartTls()
165+ }
166166
167167 /**
168168 * DOCUMENT ME!
@@ -181,7 +181,7 @@
181181 }
182182
183183 return this;
184- } // end setSubject()
184+ }
185185
186186 /**
187187 * DOCUMENT ME!
@@ -202,7 +202,7 @@
202202 } // end catch
203203
204204 return this;
205- } // end setText()
205+ }
206206
207207 /**
208208 * DOCUMENT ME!
@@ -218,7 +218,7 @@
218218 String.valueOf(timeout));
219219
220220 return this;
221- } // end setTimeout()
221+ }
222222
223223 /**
224224 * DOCUMENT ME!
@@ -238,7 +238,7 @@
238238 } // end catch
239239
240240 return this;
241- } // end setTo()
241+ }
242242
243243 /**
244244 * DOCUMENT ME!
@@ -253,7 +253,7 @@
253253 this.session = Session.getDefaultInstance(this.properties, auth);
254254
255255 return this;
256- } // end createSession()
256+ }
257257
258258 /**
259259 * DOCUMENT ME!
@@ -270,7 +270,7 @@
270270 Logger.getLogger(MailSender.class.getName())
271271 .log(Level.SEVERE, null, ex);
272272 } // end catch
273- } // end printMessage()
273+ }
274274
275275 /**
276276 * DOCUMENT ME!
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/Price.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/Price.java (revision 219)
@@ -25,6 +25,8 @@
2525
2626 import java.math.BigDecimal;
2727 import java.sql.Timestamp;
28+import java.util.logging.Level;
29+import java.util.logging.Logger;
2830 import org.clearfy.admin.l10n.data.CurrencyType;
2931 import org.clearfy.annotations.Comment;
3032 import org.clearfy.annotations.LogicalName;
@@ -34,6 +36,7 @@
3436 import org.clearfy.datawrapper.ShortFlagZero;
3537 import org.clearfy.datawrapper.Table;
3638 import org.clearfy.admin.organization.data.Organization;
39+import org.clearfy.datawrapper.ClearfyDatabaseException;
3740
3841 /**
3942 * 商品価格テーブル
@@ -90,29 +93,34 @@
9093 @Override
9194 public void defineColumns() {
9295
93- this.OrganizationId.setAllowNull(false)
94- .addRelationWith(Organization.class);
95-
96- this.ProductId.setAllowNull(false)
97- .addRelationWith(Product.class);
98-
99- this.PriceType.setAllowNull(false)
100- .setDefault(String.valueOf(PRICE_TYPE_PURCHASE));
101-
102- this.EntryNumber.setAllowNull(false)
103- .setDefault("0");
104-
105- this.CurrecyTypeId.setAllowNull(false)
106- .addRelationWith(CurrencyType.class);
107-
108- this.Price.setLength(18, 9).setAllowNull(false).setDefault(("0.0"));
109- this.Memo.setAllowNull(true);
110-
111- this.PriceDateFrom.setAllowNull(false)
112- .setDefault("'1900-01-01 00:00:00'");
113-
114- this.PriceDateTo.setAllowNull(false)
115- .setDefault("'9999-12-31 23:59:59'");
96+ try {
97+ this.OrganizationId.setAllowNull(false)
98+ .addRelationWith(Organization.class);
99+
100+ this.ProductId.setAllowNull(false)
101+ .addRelationWith(Product.class);
102+
103+ this.PriceType.setAllowNull(false)
104+ .setDefault(String.valueOf(PRICE_TYPE_PURCHASE));
105+
106+ this.EntryNumber.setAllowNull(false)
107+ .setDefault("0");
108+
109+ this.CurrecyTypeId.setAllowNull(false)
110+ .addRelationWith(CurrencyType.class);
111+
112+ this.Price.setLength(18, 9).setAllowNull(false).setDefault(("0.0"));
113+ this.Memo.setAllowNull(true);
114+
115+ this.PriceDateFrom.setAllowNull(false)
116+ .setDefault("'1900-01-01 00:00:00'");
117+
118+ this.PriceDateTo.setAllowNull(false)
119+ .setDefault("'9999-12-31 23:59:59'");
120+ }
121+ catch (ClearfyDatabaseException ex) {
122+ Logger.getLogger(Price.class.getName()).log(Level.SEVERE, null, ex);
123+ }
116124 }
117125
118126 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/Product.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/Product.java (revision 219)
@@ -23,8 +23,11 @@
2323 */
2424 package org.clearfy.plugin.product.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.Comment;
2729 import org.clearfy.annotations.LogicalName;
30+import org.clearfy.datawrapper.ClearfyDatabaseException;
2831 import org.clearfy.datawrapper.Column;
2932 import org.clearfy.datawrapper.CurrentTimestamp;
3033 import org.clearfy.datawrapper.IncrementalKey;
@@ -68,17 +71,22 @@
6871
6972 @Override
7073 public void defineColumns() {
71- this.ProductId
72- .addRelationWith(ProductCategoryLink.class)
73- .addRelationWith(ProductSearchKey.class)
74- .addRelationWith(ProductTaxLink.class);
75-
76- this.Stamp.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
77- this.Mdate.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
78- this.Disable.setAllowNull(false).setDefault("0");
79- this.ProductName.setAllowNull(false).setLength(Column.SIZE_256);
80- this.ProductSubName.setAllowNull(false).setLength(Column.SIZE_256)
81- .setDefault("");
74+ try {
75+ this.ProductId
76+ .addRelationWith(ProductCategoryLink.class)
77+ .addRelationWith(ProductSearchKey.class)
78+ .addRelationWith(ProductTaxLink.class);
79+
80+ this.Stamp.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
81+ this.Mdate.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
82+ this.Disable.setAllowNull(false).setDefault("0");
83+ this.ProductName.setAllowNull(false).setLength(Column.SIZE_256);
84+ this.ProductSubName.setAllowNull(false).setLength(Column.SIZE_256)
85+ .setDefault("");
86+ }
87+ catch (ClearfyDatabaseException ex) {
88+ Logger.getLogger(Product.class.getName()).log(Level.SEVERE, null, ex);
89+ }
8290 }
8391
8492 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductCategory.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductCategory.java (revision 219)
@@ -23,7 +23,10 @@
2323 */
2424 package org.clearfy.plugin.product.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.LogicalName;
29+import org.clearfy.datawrapper.ClearfyDatabaseException;
2730 import org.clearfy.datawrapper.Column;
2831 import org.clearfy.datawrapper.CurrentTimestamp;
2932 import org.clearfy.datawrapper.IncrementalKey;
@@ -59,11 +62,16 @@
5962 @Override
6063 public void defineColumns() {
6164
62- this.ProductCategoryId.setAllowNull(false)
63- .addRelationWith(ProductCategoryType.class);
64-
65- this.ProductAttributeTypeId.setAllowNull(false)
66- .addRelationWith(ProductCategoryType.class);
65+ try {
66+ this.ProductCategoryId.setAllowNull(false)
67+ .addRelationWith(ProductCategoryType.class);
68+
69+ this.ProductAttributeTypeId.setAllowNull(false)
70+ .addRelationWith(ProductCategoryType.class);
71+ }
72+ catch (ClearfyDatabaseException ex) {
73+ Logger.getLogger(ProductCategory.class.getName()).log(Level.SEVERE, null, ex);
74+ }
6775 }
6876
6977 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductCategoryLink.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductCategoryLink.java (revision 219)
@@ -23,6 +23,9 @@
2323 */
2424 package org.clearfy.plugin.product.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
28+import org.clearfy.datawrapper.ClearfyDatabaseException;
2629 import org.clearfy.datawrapper.Column;
2730 import org.clearfy.datawrapper.CurrentTimestamp;
2831 import org.clearfy.datawrapper.ShortFlagZero;
@@ -49,9 +52,14 @@
4952 @Override
5053 public void defineColumns() {
5154
52- this.ProductId.addRelationWith(Product.class);
53-
54- this.ProductAttributeTypeId.addRelationWith(ProductCategory.class);
55+ try {
56+ this.ProductId.addRelationWith(Product.class);
57+
58+ this.ProductAttributeTypeId.addRelationWith(ProductCategory.class);
59+ }
60+ catch (ClearfyDatabaseException ex) {
61+ Logger.getLogger(ProductCategoryLink.class.getName()).log(Level.SEVERE, null, ex);
62+ }
5563 }
5664
5765 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductCategoryType.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductCategoryType.java (revision 219)
@@ -23,6 +23,9 @@
2323 */
2424 package org.clearfy.plugin.product.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
28+import org.clearfy.datawrapper.ClearfyDatabaseException;
2629 import org.clearfy.datawrapper.Column;
2730 import org.clearfy.datawrapper.CurrentTimestamp;
2831 import org.clearfy.datawrapper.IncrementalKey;
@@ -48,11 +51,16 @@
4851 @Override
4952 public void defineColumns() {
5053
51- this.ProductCategoryTypeId.addRelationWith(ProductCategory.class);
54+ try {
55+ this.ProductCategoryTypeId.addRelationWith(ProductCategory.class);
56+
57+ this.ProductAttributeTypeName.setLength(Column.SIZE_128)
58+ .setAllowNull(false);
59+ }
60+ catch (ClearfyDatabaseException ex) {
61+ Logger.getLogger(ProductCategoryType.class.getName()).log(Level.SEVERE, null, ex);
62+ }
5263
53- this.ProductAttributeTypeName.setLength(Column.SIZE_128)
54- .setAllowNull(false);
55-
5664 }
5765
5866 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductSearchKey.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductSearchKey.java (revision 219)
@@ -23,7 +23,10 @@
2323 */
2424 package org.clearfy.plugin.product.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.LogicalName;
29+import org.clearfy.datawrapper.ClearfyDatabaseException;
2730 import org.clearfy.datawrapper.Column;
2831 import org.clearfy.datawrapper.CurrentTimestamp;
2932 import org.clearfy.datawrapper.ShortFlagZero;
@@ -91,17 +94,22 @@
9194 @Override
9295 public void defineColumns() {
9396
94- this.ProductId.setPrimaryKey(true)
95- .addRelationWith(Product.class);
97+ try {
98+ this.ProductId.setPrimaryKey(true)
99+ .addRelationWith(Product.class);
100+
101+ this.KeyType.setPrimaryKey(true);
102+
103+ this.EntryNum.setPrimaryKey(true)
104+ .setDefault("-1");
105+
106+ this.ProductSearchKey.setAllowNull(false)
107+ .setLength(Column.SIZE_256);
108+ }
109+ catch (ClearfyDatabaseException ex) {
110+ Logger.getLogger(ProductSearchKey.class.getName()).log(Level.SEVERE, null, ex);
111+ }
96112
97- this.KeyType.setPrimaryKey(true);
98-
99- this.EntryNum.setPrimaryKey(true)
100- .setDefault("-1");
101-
102- this.ProductSearchKey.setAllowNull(false)
103- .setLength(Column.SIZE_256);
104-
105113 }
106114
107115 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductTaxLink.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/ProductTaxLink.java (revision 219)
@@ -23,7 +23,10 @@
2323 */
2424 package org.clearfy.plugin.product.data;
2525
26+import java.util.logging.Level;
27+import java.util.logging.Logger;
2628 import org.clearfy.annotations.LogicalName;
29+import org.clearfy.datawrapper.ClearfyDatabaseException;
2730 import org.clearfy.datawrapper.Column;
2831 import org.clearfy.datawrapper.CurrentTimestamp;
2932 import org.clearfy.datawrapper.ShortFlagZero;
@@ -54,11 +57,16 @@
5457
5558 @Override
5659 public void defineColumns() {
57- this.ProductId.setAllowNull(false)
58- .addRelationWith(Product.class);
59-
60- this.TaxId.setAllowNull(false)
61- .addRelationWith(Tax.class);
60+ try {
61+ this.ProductId.setAllowNull(false)
62+ .addRelationWith(Product.class);
63+
64+ this.TaxId.setAllowNull(false)
65+ .addRelationWith(Tax.class);
66+ }
67+ catch (ClearfyDatabaseException ex) {
68+ Logger.getLogger(ProductTaxLink.class.getName()).log(Level.SEVERE, null, ex);
69+ }
6270 }
6371
6472 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/Tax.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/product/data/Tax.java (revision 219)
@@ -25,8 +25,11 @@
2525
2626 import java.math.BigDecimal;
2727 import java.sql.Timestamp;
28+import java.util.logging.Level;
29+import java.util.logging.Logger;
2830 import org.clearfy.annotations.Comment;
2931 import org.clearfy.annotations.LogicalName;
32+import org.clearfy.datawrapper.ClearfyDatabaseException;
3033 import org.clearfy.datawrapper.Column;
3134 import org.clearfy.datawrapper.Table;
3235
@@ -60,14 +63,19 @@
6063 @Override
6164 public void defineColumns() {
6265
63- this.TaxId.addRelationWith(ProductTaxLink.class);
66+ try {
67+ this.TaxId.addRelationWith(ProductTaxLink.class);
68+
69+ this.TaxName.setAllowNull(false)
70+ .setLength(Column.SIZE_256);
71+
72+ this.TaxRate.setAllowNull(false)
73+ .setDefault("0.0");
74+ }
75+ catch (ClearfyDatabaseException ex) {
76+ Logger.getLogger(Tax.class.getName()).log(Level.SEVERE, null, ex);
77+ }
6478
65- this.TaxName.setAllowNull(false)
66- .setLength(Column.SIZE_256);
67-
68- this.TaxRate.setAllowNull(false)
69- .setDefault("0.0");
70-
7179 }
7280
7381 }
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/scheduler/JobScheduler.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/scheduler/JobScheduler.java (revision 219)
@@ -52,7 +52,7 @@
5252
5353 @Override
5454 public void run() {
55- System.out.println("Job Scheduler Started.");
55+ Logger.getLogger(this.getClass().getCanonicalName()).info("Job Scheduler Started.");
5656
5757 while (keepOnLoop) {
5858 this.pickupQue();
--- org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/trade/data/OrderDetail.java (revision 218)
+++ org.clearfy/org.clearfy.web/src/main/java/org/clearfy/plugin/trade/data/OrderDetail.java (revision 219)
@@ -26,6 +26,9 @@
2626 import org.clearfy.plugin.product.data.Product;
2727 import java.math.BigDecimal;
2828 import java.sql.Timestamp;
29+import java.util.logging.Level;
30+import java.util.logging.Logger;
31+import org.clearfy.datawrapper.ClearfyDatabaseException;
2932 import org.clearfy.datawrapper.Column;
3033 import org.clearfy.datawrapper.Table;
3134
@@ -50,18 +53,23 @@
5053
5154 @Override
5255 public void defineColumns() {
53- this.OrderKey.setAllowNull(false).setLength(32)
54- .addRelationWith(Order.class, this.OrderKey);
55-
56- this.Stamp.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
57- this.Mdate.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
58- this.Disable.setAllowNull(false).setDefault("0");
59- this.ItemId.setAllowNull(false)
60- .addRelationWith(Product.class, this.ItemId);
61- this.PriceId.setAllowNull(false); //+relation
62- this.ItemCount.setAllowNull(false)
63- .setDefault("0");
64- this.SubTotal.setAllowNull(false);
56+ try {
57+ this.OrderKey.setAllowNull(false).setLength(32)
58+ .addRelationWith(Order.class, this.OrderKey);
59+
60+ this.Stamp.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
61+ this.Mdate.setAllowNull(false).setDefault(Column.DEFAULT_TIMESTAMP);
62+ this.Disable.setAllowNull(false).setDefault("0");
63+ this.ItemId.setAllowNull(false)
64+ .addRelationWith(Product.class, this.ItemId);
65+ this.PriceId.setAllowNull(false); //+relation
66+ this.ItemCount.setAllowNull(false)
67+ .setDefault("0");
68+ this.SubTotal.setAllowNull(false);
69+ }
70+ catch (ClearfyDatabaseException ex) {
71+ Logger.getLogger(OrderDetail.class.getName()).log(Level.SEVERE, null, ex);
72+ }
6573 }
6674
6775 }
Afficher sur ancien navigateur de dépôt.