Add a Field class and implement some loading of it in Document.
[online-glom:gwt-glom.git] / src / main / java / org / glom / web / shared / libglom / Field.java
1 package org.glom.web.shared.libglom;
2
3 public class Field extends Translatable {
4         
5         public enum glom_field_type {
6                 TYPE_INVALID,
7                 TYPE_NUMERIC,
8                 TYPE_TEXT,
9                 TYPE_DATE,
10                 TYPE_TIME,
11                 TYPE_BOOLEAN,
12                 TYPE_IMAGE
13         };
14         
15         private glom_field_type glom_field_type; //TODO: = glom_field_type.TYPE_INVALID;
16         private boolean primaryKey = false;
17
18         /**
19          * @return
20          */
21         public boolean get_primary_key() {
22                 return primaryKey;
23         };
24         
25         public void set_primary_key(boolean primaryKey) {
26                 this.primaryKey = primaryKey;
27         }
28
29         /**
30          * @return
31          */
32         public glom_field_type get_glom_type() {
33                 return glom_field_type;
34         }
35         
36         void set_glom_field_type(glom_field_type fieldType) {
37                 this.glom_field_type = fieldType;
38         }
39         
40         
41 }