1 package org.opensync.importexport;
2
3 import org.opensync.tools.*;
4
5 public class Column extends Element {
6
7 private String primaryKey,keyWord ;
8 private String type,length,visibleList,visibleSearch,visibleUpdate;
9
10 private String operateur, searchValue, orderBy, prefix, suffix;
11 /***
12 * Constructor
13 */
14 public Column(Element e) {
15
16 this.label = e.getLabel();
17 this.file = e.getFile();
18 this.field = e.getField();
19 this.parentFile = e.getParentFile();
20 this.keyParent = e.getKeyParent();
21 this.primaryKey = e.getPrimaryKey();
22 this.type = e.getType();
23 this.length = e.getLength();
24 this.formatDateSql = e.getFormatDateSql();
25 this.separatorDateSql = e.getSeparatorDateSql();
26 this.formatTimeSql = e.getFormatTimeSql();
27 this.separatorTimeSql = e.getSeparatorTimeSql();
28 }
29
30 public void initLabels(String lang) {
31 label = DicoReader.getLabelDicoByKey(lang,keyWord);
32 }
33
34
35
36 public void setKeyWord(String s) {
37 this.keyWord = s;
38 }
39 public void setVisibleList(String s) {
40 this.visibleList = s;
41 }
42 public void setVisibleSearch(String s) {
43 this.visibleSearch = s;
44 }
45
46 public void setVisibleUpdate(String s) {
47 this.visibleUpdate = s;
48 }
49 public void setOperateur(String s) {
50 this.operateur = s;
51 }
52 public void setSearchValue(String s) {
53 this.searchValue = s;
54 }
55 public void setOrderBy(String s) {
56 this.orderBy = s;
57 }
58 public void setPrefix(String s) {
59 this.prefix = s;
60 }
61 public void setSuffix(String s) {
62 this.suffix = s;
63 }
64
65
66 public String getPrimaryKey() {
67 return(primaryKey);
68 }
69 public String getKeyWord() {
70 return(keyWord);
71 }
72 public String getType() {
73 return(type);
74 }
75 public String getLength() {
76 return(length);
77 }
78 public String getVisibleList() {
79 return(visibleList);
80 }
81 public String getVisibleSearch() {
82 return(visibleSearch);
83 }
84 public String getVisibleUpdate() {
85 return(visibleUpdate);
86 }
87 public String getOperateur() {
88 return(operateur);
89 }
90 public String getSearchValue() {
91 return(searchValue);
92 }
93 public String getOrderBy() {
94 return(orderBy);
95 }
96 public String getSuffix() {
97 return(suffix);
98 }
99 public String getPrefix() {
100 return(prefix);
101 }
102
103 public boolean equalsByKeyWord(String k) {
104 if (this.keyWord.equals(k)) return true;
105 else return false;
106 }
107 public boolean equalsByField(String k) {
108 if (this.field.equals(k)) return true;
109 else return false;
110 }
111
112 }
113