• R/O
  • SSH
  • HTTPS

clearfybusiness: Commit


Commit MetaInfo

Révision221 (tree)
l'heure2019-07-18 14:58:48
Auteurdaianji

Message de Log

H2db conpact command implemented

Change Summary

Modification

--- org.clearfy/org.clearfy.plugin.matching/src/main/java/org/clearfy/plugin/matching/data/AdItem.java (revision 220)
+++ org.clearfy/org.clearfy.plugin.matching/src/main/java/org/clearfy/plugin/matching/data/AdItem.java (revision 221)
@@ -24,8 +24,11 @@
2424 package org.clearfy.plugin.matching.data;
2525
2626 import java.math.BigDecimal;
27+import java.util.logging.Level;
28+import java.util.logging.Logger;
2729 import org.clearfy.admin.users.data.User;
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;
@@ -87,30 +90,34 @@
8790
8891 @Override
8992 public void defineColumns() {
90- this.AdOwner.setAllowNull(false)
91- .addRelationWith(User.class, (new User()).UserId);
93+ try {
94+ this.AdOwner.setAllowNull(false)
95+ .addRelationWith(User.class, (new User()).UserId);
96+
97+ this.Title.setLength(Column.SIZE_256)
98+ .setAllowNull(false);
99+
100+ this.Description.setLength(Column.SIZE_2048)
101+ .setAllowNull(false);
102+
103+ this.Price.setLength(18, 9)
104+ .setDefault("-1.0");
105+
106+ this.MinAmountItem.setDefault("1")
107+ .setAllowNull(false);
108+
109+ this.ItemUnit.setLength(Column.SIZE_16)
110+ .setAllowNull(false)
111+ .setDefault("'item(s)'");
112+
113+ this.PriceDescription.setLength(Column.SIZE_1024);
114+
115+ this.Vector.setAllowNull(false)
116+ .setDefault(String.format("%d", AdItem.VECTOR_SALE));
117+ } catch (ClearfyDatabaseException ex) {
118+ Logger.getLogger(AdItem.class.getName()).log(Level.SEVERE, null, ex);
119+ }
92120
93- this.Title.setLength(Column.SIZE_256)
94- .setAllowNull(false);
95-
96- this.Description.setLength(Column.SIZE_2048)
97- .setAllowNull(false);
98-
99- this.Price.setLength(18, 9)
100- .setDefault("-1.0");
101-
102- this.MinAmountItem.setDefault("1")
103- .setAllowNull(false);
104-
105- this.ItemUnit.setLength(Column.SIZE_16)
106- .setAllowNull(false)
107- .setDefault("'item(s)'");
108-
109- this.PriceDescription.setLength(Column.SIZE_1024);
110-
111- this.Vector.setAllowNull(false)
112- .setDefault(String.format("%d", AdItem.VECTOR_SALE));
113-
114121 }
115122
116123 }
--- org.clearfy/org.clearfy.plugin.matching/src/main/java/org/clearfy/plugin/matching/data/MatchingUserProfile.java (revision 220)
+++ org.clearfy/org.clearfy.plugin.matching/src/main/java/org/clearfy/plugin/matching/data/MatchingUserProfile.java (revision 221)
@@ -23,8 +23,11 @@
2323 */
2424 package org.clearfy.plugin.matching.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;
@@ -65,12 +68,16 @@
6568
6669 @Override
6770 public void defineColumns() {
68- this.UserId.setPrimaryKey(true)
69- .setAllowNull(false)
70- .addRelationWith(User.class);
71-
72- this.CompanyName.setLength(Column.SIZE_128)
73- .setAllowNull(false);
71+ try {
72+ this.UserId.setPrimaryKey(true)
73+ .setAllowNull(false)
74+ .addRelationWith(User.class);
75+
76+ this.CompanyName.setLength(Column.SIZE_128)
77+ .setAllowNull(false);
78+ } catch (ClearfyDatabaseException ex) {
79+ Logger.getLogger(MatchingUserProfile.class.getName()).log(Level.SEVERE, null, ex);
80+ }
7481 }
7582
7683 }
Afficher sur ancien navigateur de dépôt.