1 package com.srv4pos.server.api.keyboard;
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 KeyboardInfo implements SyncEntityInfo {
23
24
25
26
27
28 public static enum Fields { IDENTIFIER, NAME, WIDTH, HEIGHT, DEVICE_FORM_FACTOR }
29
30
31
32
33
34 @NotNull
35 private boolean deleted = Boolean.FALSE;
36
37
38
39
40
41 @NotNull(groups = IdentifierValidationGroup.class)
42 @Size(max = 50, min = 1)
43 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
44 private String identifier;
45
46
47
48
49 @NotNull
50 @Size(max = 32, min = 1)
51 private String name;
52
53
54
55
56 @NotNull
57 private int width;
58
59
60
61
62 @NotNull
63 private int height;
64
65
66
67
68 @NotNull
69 private DeviceFormFactor deviceFormFactor;
70
71 @Size(max = 65535)
72 private String custom;
73
74 private Integer version;
75
76 @JournalDate
77 private Date modified;
78
79 private Integer index;
80 }