gvsig-projects-pool / org.gvsig.vcsgis / trunk / org.gvsig.vcsgis / org.gvsig.vcsgis.lib / org.gvsig.vcsgis.lib.impl / src / main / java / org / gvsig / vcsgis / lib / requests / RowCreateRequestHelper.java @ 2724
History | View | Annotate | Download (3.57 KB)
1 |
/*
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2020 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
18 |
*
|
19 |
* For any additional information, do not hesitate to contact us
|
20 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
21 |
*/
|
22 |
|
23 |
package org.gvsig.vcsgis.lib.requests; |
24 |
|
25 |
import java.sql.Timestamp; |
26 |
import org.gvsig.tools.dataTypes.DataTypeUtils; |
27 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepository; |
28 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowCreateRequest; |
29 |
|
30 |
|
31 |
/**
|
32 |
*
|
33 |
* @author gvSIG Team
|
34 |
*/
|
35 |
public class RowCreateRequestHelper extends AbstractRequestHelper implements VCSGisRowCreateRequest { |
36 |
|
37 |
private static final String REQUEST_NAME = "RowCreate"; |
38 |
|
39 |
// In
|
40 |
private String localRevisionCode; |
41 |
private String entityName; |
42 |
private Timestamp efectiveDate; |
43 |
private String comment; |
44 |
private String data; |
45 |
|
46 |
// out
|
47 |
public String relatedFeatureCode; |
48 |
public String entityRevision; |
49 |
public String entityCode; |
50 |
|
51 |
public RowCreateRequestHelper(VCSGisRepository repository, String entityName, String localRevisionCode) { |
52 |
super(repository, REQUEST_NAME);
|
53 |
this.entityName = entityName;
|
54 |
this.localRevisionCode = localRevisionCode;
|
55 |
this.efectiveDate = null; |
56 |
this.comment = null; |
57 |
this.data = null; |
58 |
|
59 |
this.entityCode = null; |
60 |
this.entityRevision = null; |
61 |
this.relatedFeatureCode = null; |
62 |
} |
63 |
|
64 |
@Override
|
65 |
public void dispose() { |
66 |
super.dispose();
|
67 |
this.comment = null; |
68 |
this.data = null; |
69 |
this.efectiveDate = null; |
70 |
this.entityName = null; |
71 |
this.relatedFeatureCode = null; |
72 |
this.localRevisionCode = null; |
73 |
this.entityCode = null; |
74 |
this.entityRevision = null; |
75 |
} |
76 |
|
77 |
@Override
|
78 |
public String getEntityName() { |
79 |
return this.entityName; |
80 |
} |
81 |
|
82 |
@Override
|
83 |
public String getLocalRevisionCode() { |
84 |
return this.localRevisionCode; |
85 |
} |
86 |
|
87 |
@Override
|
88 |
public Timestamp getEfectiveDate() { |
89 |
return this.efectiveDate; |
90 |
} |
91 |
|
92 |
@Override
|
93 |
public void setEfectiveDate(Timestamp efectiveDate) { |
94 |
this.efectiveDate = efectiveDate;
|
95 |
} |
96 |
|
97 |
@Override
|
98 |
public String getComment() { |
99 |
return this.comment; |
100 |
} |
101 |
|
102 |
@Override
|
103 |
public void setComment(String comment) { |
104 |
this.comment = comment;
|
105 |
} |
106 |
|
107 |
@Override
|
108 |
public String getData() { |
109 |
return this.data; |
110 |
} |
111 |
|
112 |
@Override
|
113 |
public void setData(String data) { |
114 |
this.data = data;
|
115 |
} |
116 |
|
117 |
@Override
|
118 |
public String getRelatedFeatureCode() { |
119 |
return this.relatedFeatureCode; |
120 |
} |
121 |
|
122 |
@Override
|
123 |
public void setEfectiveDate(String efectiveDate) { |
124 |
Timestamp tms = (Timestamp) DataTypeUtils.toTimestamp(efectiveDate, null); |
125 |
this.efectiveDate = tms;
|
126 |
} |
127 |
|
128 |
@Override
|
129 |
public String getEntityCode() { |
130 |
return this.entityCode; |
131 |
} |
132 |
|
133 |
@Override
|
134 |
public String getEntityRevisionCode() { |
135 |
return this.entityRevision; |
136 |
} |
137 |
|
138 |
} |