KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > portlets > structure > model > Field


1 package com.dotmarketing.portlets.structure.model;
2
3 import java.util.HashMap JavaDoc;
4 import java.util.Map JavaDoc;
5
6 import com.dotmarketing.beans.Inode;
7 import com.dotmarketing.portlets.structure.factories.FieldFactory;
8
9
10
11 public class Field extends Inode
12 {
13     
14     private static final long serialVersionUID = 1L;
15     
16     private long structureInode;
17     private String JavaDoc fieldName;
18     private String JavaDoc fieldType;
19     private String JavaDoc fieldRelationType;
20     private String JavaDoc fieldContentlet;
21     private boolean required;
22     private String JavaDoc velocityVarName;
23     private int sortOrder;
24     private String JavaDoc values;
25     private String JavaDoc regexCheck;
26     private String JavaDoc hint;
27     private String JavaDoc defaultValue;
28     private boolean indexed;
29     private boolean listed;
30     
31     
32     public Field(){
33         super.setType("field");
34     }
35     
36     
37     public String JavaDoc getFieldContentlet() {
38         return fieldContentlet;
39     }
40     public void setFieldContentlet(String JavaDoc fieldContentlet) {
41         this.fieldContentlet = fieldContentlet;
42     }
43     public String JavaDoc getFieldName() {
44         return fieldName;
45     }
46     public void setFieldName(String JavaDoc fieldName) {
47         this.fieldName = fieldName;
48     }
49     public String JavaDoc getFieldRelationType() {
50         return fieldRelationType;
51     }
52     public void setFieldRelationType(String JavaDoc fieldRelationType) {
53         this.fieldRelationType = fieldRelationType;
54     }
55     public String JavaDoc getFieldType() {
56         return fieldType;
57     }
58     public void setFieldType(String JavaDoc fieldType) {
59         this.fieldType = fieldType;
60     }
61     public boolean isRequired() {
62         return required;
63     }
64     public void setRequired(boolean required) {
65         this.required = required;
66     }
67     public int getSortOrder() {
68         return sortOrder;
69     }
70     public void setSortOrder(int sortOrder) {
71         this.sortOrder = sortOrder;
72     }
73     public long getStructureInode() {
74         return structureInode;
75     }
76     public void setStructureInode(long structureInode) {
77         this.structureInode = structureInode;
78     }
79     public String JavaDoc getValues() {
80         return values;
81     }
82     public void setValues(String JavaDoc values) {
83         this.values = values;
84     }
85     public String JavaDoc getVelocityVarName() {
86         return velocityVarName;
87     }
88     public void setVelocityVarName(String JavaDoc velocityVarName) {
89         this.velocityVarName = velocityVarName;
90     }
91     public String JavaDoc getRegexCheck() {
92         return regexCheck;
93     }
94     public void setRegexCheck(String JavaDoc regexCheck) {
95         this.regexCheck = regexCheck;
96     }
97     
98     /**
99      * @return Returns the defaultValue.
100      */

101     public String JavaDoc getDefaultValue() {
102         return defaultValue;
103     }
104     /**
105      * @param defaultValue The defaultValue to set.
106      */

107     public void setDefaultValue(String JavaDoc defaultValue) {
108         this.defaultValue = defaultValue;
109     }
110     /**
111      * @return Returns the hint.
112      */

113     public String JavaDoc getHint() {
114         return hint;
115     }
116     /**
117      * @param hint The hint to set.
118      */

119     public void setHint(String JavaDoc hint) {
120         this.hint = hint;
121     }
122     public void delete()
123     {
124         FieldFactory.deleteField(this);
125     }
126     public boolean isIndexed() {
127         return indexed;
128     }
129     public void setIndexed(boolean indexed) {
130         this.indexed = indexed;
131     }
132         
133     public boolean isListed() {
134         return listed;
135     }
136     public void setListed(boolean listed) {
137         this.listed = listed;
138     }
139     
140     public Map JavaDoc getMap () {
141         Map JavaDoc oMap = new HashMap JavaDoc ();
142         oMap.put("defaultValue", this.getDefaultValue());
143         oMap.put("fieldContentlet", this.getFieldContentlet());
144         oMap.put("fieldName", this.getFieldName());
145         oMap.put("fieldRelationType", this.getFieldRelationType());
146         oMap.put("fieldFieldType", this.getFieldType());
147         oMap.put("fieldHint", this.getHint());
148         oMap.put("fieldRegexCheck", this.getRegexCheck());
149         oMap.put("fieldValues", this.getValues());
150         oMap.put("fieldVelocityVarName", this.getVelocityVarName());
151         oMap.put("fieldSortOrder", this.getSortOrder());
152         oMap.put("fieldStructureInode", this.getStructureInode());
153         oMap.put("inode", this.getInode());
154         return oMap;
155     }
156 }
157
Popular Tags