• R/O
  • SSH
  • HTTPS

clearfybusiness: Commit


Commit MetaInfo

Révision222 (tree)
l'heure2019-07-18 14:59:16
Auteurdaianji

Message de Log

H2db conpact command implemented

Change Summary

Modification

--- org.clearfy/org.clearfy.plugin.timecard/src/main/java/org/clearfy/plugin/timecard/data/EventCheck.java (revision 221)
+++ org.clearfy/org.clearfy.plugin.timecard/src/main/java/org/clearfy/plugin/timecard/data/EventCheck.java (revision 222)
@@ -25,6 +25,9 @@
2525
2626 import java.sql.Date;
2727 import java.sql.Timestamp;
28+import java.util.logging.Level;
29+import java.util.logging.Logger;
30+import org.clearfy.datawrapper.ClearfyDatabaseException;
2831 import org.clearfy.datawrapper.Column;
2932 import org.clearfy.datawrapper.Table;
3033 import org.clearfy.plugin.employee.data.Employee;
@@ -51,40 +54,44 @@
5154
5255 @Override
5356 public void defineColumns() {
54- this.EventCheckId.setAllowNull(false)
55- .setPrimaryKey(true)
56- .setAutoIncrement(true);
57-
58- this.EmployeeId.setAllowNull(false)
59- .addRelationWith(Employee.class, this.EmployeeId);
60-
61- this.OrganizationId.setAllowNull(false);
62-
63- this.Stamp.setAllowNull(false)
64- .setDefault(Column.DEFAULT_TIMESTAMP);
65-
66- this.Mdate.setAllowNull(false)
67- .setDefault(Column.DEFAULT_TIMESTAMP);
68-
69- this.Disable.setAllowNull(false)
70- .setDefault("0");
71-
72- this.CheckDate.setAllowNull(false)
73- .setDefault("'1900-01-01'");
74-
75- this.CheckType.setAllowNull(false)
76- .setDefault("0");
77-
78- this.RecordDateTime.setAllowNull(false)
79- .setDefault(Column.DEFAULT_TIMESTAMP);
80-
81- this.Modified.setAllowNull(false)
82- .setDefault("0");
83-
84- this.ModifierId.setAllowNull(true);
85-
86- this.Status.setAllowNull(false)
87- .setDefault("0");
57+ try {
58+ this.EventCheckId.setAllowNull(false)
59+ .setPrimaryKey(true)
60+ .setAutoIncrement(true);
61+
62+ this.EmployeeId.setAllowNull(false)
63+ .addRelationWith(Employee.class, this.EmployeeId);
64+
65+ this.OrganizationId.setAllowNull(false);
66+
67+ this.Stamp.setAllowNull(false)
68+ .setDefault(Column.DEFAULT_TIMESTAMP);
69+
70+ this.Mdate.setAllowNull(false)
71+ .setDefault(Column.DEFAULT_TIMESTAMP);
72+
73+ this.Disable.setAllowNull(false)
74+ .setDefault("0");
75+
76+ this.CheckDate.setAllowNull(false)
77+ .setDefault("'1900-01-01'");
78+
79+ this.CheckType.setAllowNull(false)
80+ .setDefault("0");
81+
82+ this.RecordDateTime.setAllowNull(false)
83+ .setDefault(Column.DEFAULT_TIMESTAMP);
84+
85+ this.Modified.setAllowNull(false)
86+ .setDefault("0");
87+
88+ this.ModifierId.setAllowNull(true);
89+
90+ this.Status.setAllowNull(false)
91+ .setDefault("0");
92+ } catch (ClearfyDatabaseException ex) {
93+ Logger.getLogger(EventCheck.class.getName()).log(Level.SEVERE, null, ex);
94+ }
8895 }
8996
9097 }
--- org.clearfy/org.clearfy.plugin.timecard/src/main/java/org/clearfy/plugin/timecard/data/TimeRecord.java (revision 221)
+++ org.clearfy/org.clearfy.plugin.timecard/src/main/java/org/clearfy/plugin/timecard/data/TimeRecord.java (revision 222)
@@ -26,8 +26,11 @@
2626 import java.math.BigDecimal;
2727 import java.sql.Date;
2828 import java.sql.Timestamp;
29+import java.util.logging.Level;
30+import java.util.logging.Logger;
2931 import org.clearfy.admin.organization.data.Organization;
3032 import org.clearfy.annotations.LogicalName;
33+import org.clearfy.datawrapper.ClearfyDatabaseException;
3134 import org.clearfy.datawrapper.Column;
3235 import org.clearfy.datawrapper.CurrentTimestamp;
3336 import org.clearfy.datawrapper.IncrementalKey;
@@ -95,36 +98,40 @@
9598 @Override
9699 public void defineColumns() {
97100
98- this.EmployeeId.setAllowNull(false)
99- .addRelationWith(Employee.class);
100-
101- this.OrganizationId.setAllowNull(false)
102- .addRelationWith(Organization.class);
103-
104- this.CheckDate.setAllowNull(false)
105- .setDefault("1900-01-01");
106-
107- this.CheckType.setAllowNull(false)
108- .setDefault("-1");
109-
110- this.RecordDatetime.setAllowNull(false);
111-
112- this.ModifierId.setAllowNull(true)
113- .setLength(Column.SIZE_32);
114-
115- this.Status.setAllowNull(false)
116- .setDefault("-1");
117-
118- this.MessageKey.setAllowNull(true); //既存データとの兼ね合いがあるので、nullOK
119-
120- this.Latitude.setLength(18, 9)
121- .setDefault("-1.0"); //既存データとの兼ね合いがあるので、nullOK
122-
123- this.Longitude.setLength(18, 9)
124- .setDefault("-1.0"); //既存データとの兼ね合いがあるので、nullOK
125-
126- this.Accuracy.setLength(18, 9)
127- .setDefault("-1.0"); //既存データとの兼ね合いがあるので、nullOK
101+ try {
102+ this.EmployeeId.setAllowNull(false)
103+ .addRelationWith(Employee.class);
104+
105+ this.OrganizationId.setAllowNull(false)
106+ .addRelationWith(Organization.class);
107+
108+ this.CheckDate.setAllowNull(false)
109+ .setDefault("1900-01-01");
110+
111+ this.CheckType.setAllowNull(false)
112+ .setDefault("-1");
113+
114+ this.RecordDatetime.setAllowNull(false);
115+
116+ this.ModifierId.setAllowNull(true)
117+ .setLength(Column.SIZE_32);
118+
119+ this.Status.setAllowNull(false)
120+ .setDefault("-1");
121+
122+ this.MessageKey.setAllowNull(true); //既存データとの兼ね合いがあるので、nullOK
123+
124+ this.Latitude.setLength(18, 9)
125+ .setDefault("-1.0"); //既存データとの兼ね合いがあるので、nullOK
126+
127+ this.Longitude.setLength(18, 9)
128+ .setDefault("-1.0"); //既存データとの兼ね合いがあるので、nullOK
129+
130+ this.Accuracy.setLength(18, 9)
131+ .setDefault("-1.0"); //既存データとの兼ね合いがあるので、nullOK
132+ } catch (ClearfyDatabaseException ex) {
133+ Logger.getLogger(TimeRecord.class.getName()).log(Level.SEVERE, null, ex);
134+ }
128135 }
129136
130137 }
Afficher sur ancien navigateur de dépôt.