• R/O
  • SSH
  • HTTPS

clearfybusiness: Commit


Commit MetaInfo

Révision220 (tree)
l'heure2019-07-18 14:58:17
Auteurdaianji

Message de Log

H2db conpact command implemented

Change Summary

Modification

--- org.clearfy/clients/org.clearfy.timecard.client/src/main/java/org/clearfy/timcard/client/data/EmployeeAtClient.java (revision 219)
+++ org.clearfy/clients/org.clearfy.timecard.client/src/main/java/org/clearfy/timcard/client/data/EmployeeAtClient.java (revision 220)
@@ -5,6 +5,9 @@
55 */
66 package org.clearfy.timcard.client.data;
77
8+import java.util.logging.Level;
9+import java.util.logging.Logger;
10+import org.clearfy.datawrapper.ClearfyDatabaseException;
811 import org.clearfy.datawrapper.Column;
912 import org.clearfy.datawrapper.CurrentTimestamp;
1013 import org.clearfy.datawrapper.ShortFlagZero;
@@ -29,17 +32,21 @@
2932
3033 @Override
3134 public void defineColumns() {
32- Employee employee = new Employee();
35+ try {
36+ Employee employee = new Employee();
37+
38+ this.ScardId
39+ .setAllowNull(false)
40+ .setLength(employee.ScardId.getLength())
41+ .setPrimaryKey(true)
42+ .addRelationWith(TimeRecordAtClient.class);
43+
44+ this.EmployeeName
45+ .setLength(employee.EmployeeName.getLength());
46+ } catch (ClearfyDatabaseException ex) {
47+ Logger.getLogger(EmployeeAtClient.class.getName()).log(Level.SEVERE, null, ex);
48+ }
3349
34- this.ScardId
35- .setAllowNull(false)
36- .setLength(employee.ScardId.getLength())
37- .setPrimaryKey(true)
38- .addRelationWith(TimeRecordAtClient.class);
39-
40- this.EmployeeName
41- .setLength(employee.EmployeeName.getLength());
42-
4350 }
4451
4552 }
--- org.clearfy/clients/org.clearfy.timecard.client/src/main/java/org/clearfy/timcard/client/data/TimeRecordAtClient.java (revision 219)
+++ org.clearfy/clients/org.clearfy.timecard.client/src/main/java/org/clearfy/timcard/client/data/TimeRecordAtClient.java (revision 220)
@@ -5,6 +5,9 @@
55 */
66 package org.clearfy.timcard.client.data;
77
8+import java.util.logging.Level;
9+import java.util.logging.Logger;
10+import org.clearfy.datawrapper.ClearfyDatabaseException;
811 import org.clearfy.datawrapper.Column;
912 import org.clearfy.datawrapper.CurrentTimestamp;
1013 import org.clearfy.datawrapper.IncrementalKey;
@@ -49,38 +52,42 @@
4952 @Override
5053 public void defineColumns() {
5154
52- Employee employee = new Employee();
53-
54- this.ScardId
55- .addRelationWith(EmployeeAtClient.class)
56- .setAllowNull(false)
57- .setLength(employee.ScardId.getLength());
58-
59- this.AuthorCardId
60- .setLength(employee.ScardId.getLength());
61-
62- this.OrganizationId
63- .setAllowNull(false)
64- .setDefault("-1");
65-
66- this.CheckDateTime
67- .setAllowNull(false)
68- .setInculdeMd5(true);
69-
70- this.CheckType
71- .setAllowNull(false)
72- .setDefault(
73- String.valueOf(TimeRecordAtClient.CHECKTYPE_OVERNIGHT)
74- );
75-
76- this.Status
77- .setAllowNull(false)
78- .setDefault(
79- String.valueOf(TimeRecordAtClient.STATUS_UNSYNCED)
80- );
81-
82- this.MessageKey
83- .setAllowNull(false);
55+ try {
56+ Employee employee = new Employee();
57+
58+ this.ScardId
59+ .addRelationWith(EmployeeAtClient.class)
60+ .setAllowNull(false)
61+ .setLength(employee.ScardId.getLength());
62+
63+ this.AuthorCardId
64+ .setLength(employee.ScardId.getLength());
65+
66+ this.OrganizationId
67+ .setAllowNull(false)
68+ .setDefault("-1");
69+
70+ this.CheckDateTime
71+ .setAllowNull(false)
72+ .setInculdeMd5(true);
73+
74+ this.CheckType
75+ .setAllowNull(false)
76+ .setDefault(
77+ String.valueOf(TimeRecordAtClient.CHECKTYPE_OVERNIGHT)
78+ );
79+
80+ this.Status
81+ .setAllowNull(false)
82+ .setDefault(
83+ String.valueOf(TimeRecordAtClient.STATUS_UNSYNCED)
84+ );
85+
86+ this.MessageKey
87+ .setAllowNull(false);
88+ } catch (ClearfyDatabaseException ex) {
89+ Logger.getLogger(TimeRecordAtClient.class.getName()).log(Level.SEVERE, null, ex);
90+ }
8491 }
8592
8693 }
Afficher sur ancien navigateur de dépôt.