1 package com.srv4pos.server.api.keyboardentry;
2
3 import com.srv4pos.server.api.infrastructure.Constraints;
4 import com.srv4pos.server.api.infrastructure.SyncEntityInfo;
5 import com.srv4pos.server.api.infrastructure.journal.JournalDate;
6 import com.srv4pos.server.api.validationGroups.IdentifierValidationGroup;
7 import org.springframework.roo.addon.javabean.RooJavaBean;
8 import org.springframework.roo.addon.json.RooJson;
9 import org.springframework.roo.addon.tostring.RooToString;
10
11 import javax.validation.constraints.NotNull;
12 import javax.validation.constraints.Pattern;
13 import javax.validation.constraints.Size;
14 import java.util.Date;
15
16
17
18
19 @RooJavaBean
20 @RooToString
21 @RooJson(deepSerialize = true)
22 public class KeyboardEntryInfo implements SyncEntityInfo {
23
24
25
26
27
28
29 public static enum Fields { IDENTIFIER, PRODUCT_NAME, PRODUCT_BARCODE, PRODUCT_NETTO, PRODUCT_SALES_UNIT, PRODUCT_COUNTED_IN_PRICE,
30 KEYBOARD_NAME, SUB_KEYBOARD_NAME,
31 POSITION_X, POSITION_Y, WIDTH, HEIGHT, KEY_ACTION, LABEL }
32
33
34
35
36
37 @NotNull
38 private boolean deleted = Boolean.FALSE;
39
40
41
42
43
44 @NotNull(groups = IdentifierValidationGroup.class)
45 @Size(max = 50, min = 1)
46 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
47 private String identifier;
48
49
50
51
52 private String product;
53
54
55
56
57 @NotNull
58 private String keyboard;
59
60
61
62
63 private String subKeyboard;
64
65
66
67
68 @NotNull
69 private int positionX;
70
71
72
73
74 @NotNull
75 private int positionY;
76
77
78
79
80 @NotNull
81 private int width;
82
83
84
85
86 @NotNull
87 private int height;
88
89
90
91
92 @NotNull
93 private KeyAction keyAction;
94
95
96
97
98 @NotNull
99 @Size(max = 32, min = 1)
100 private String label;
101
102 @Size(max = 65535)
103 private String custom;
104
105 private Integer version;
106
107 @JournalDate
108 private Date modified;
109 }