View Javadoc
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   * <p>User: Sergey, Date: 29.03.14 20:23</p>.
18   */
19  @RooJavaBean
20  @RooToString
21  @RooJson(deepSerialize = true)
22  public class KeyboardEntryInfo implements SyncEntityInfo {
23  
24  
25      /**
26       * List of fields for ordering.
27       */
28      //CHECKSTYLE:OFF Missing Javadoc comments.
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      //CHECKSTYLE:ON Missing Javadoc comments.
33  
34      /**
35       * True if entity was deleted. Only possible if return diff
36       */
37      @NotNull
38      private boolean deleted = Boolean.FALSE;
39  
40      /**
41       * This field uniqly identifies entity. There is no decision what is it,
42       * only the requirement - it must be unique trough one seller
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       * Regular field. Product identifier
51       */
52      private String product;
53  
54      /**
55       * Regular field. Keyboard identifier
56       */
57      @NotNull
58      private String keyboard;
59  
60      /**
61       * Regular field. SubKeyboard identifier.
62       */
63      private String subKeyboard;
64  
65      /**
66       * Regular field.
67       */
68      @NotNull
69      private int positionX;
70  
71      /**
72       * Regular field.
73       */
74      @NotNull
75      private int positionY;
76  
77      /**
78       * Regular field.
79       */
80      @NotNull
81      private int width;
82  
83      /**
84       * Regular field.
85       */
86      @NotNull
87      private int height;
88  
89      /**
90       * Regular field.
91       */
92      @NotNull
93      private KeyAction keyAction;
94  
95      /**
96       * Regular field.
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 }