1
2
3
4
5
6
7
8
9
10
11 package it.imolinfo.jbi4cics.messageformat.jdbc;
12
13 import it.imolinfo.jbi4cics.exception.FormatException;
14 import it.imolinfo.jbi4cics.jbi.Messages;
15 import it.imolinfo.jbi4cics.messageformat.FieldDescriptor;
16 import it.imolinfo.jbi4cics.messageformat.MappingDescriptor;
17
18 import java.util.Map;
19
20
21
22
23
24 public class JdbcBeanMappingDescriptor implements MappingDescriptor{
25
26
27
28
29 private static final Messages MESSAGES
30 = Messages.getMessages(JdbcBeanMappingDescriptor.class);
31
32 private JdbcStatementDescriptor jdbcStatementDescriptor;
33 private ResultSetMappingDescriptor resultSetMappingDescriptor;
34 private String resultSetPropertyName;
35 private Class beanClass;
36
37
38
39
40 public JdbcBeanMappingDescriptor() {
41 }
42
43
44
45
46 public String getResultSetPropertyName() {
47 return resultSetPropertyName;
48 }
49
50
51
52
53 public void setResultSetPropertyName(String resultSetPropertyName) {
54 this.resultSetPropertyName = resultSetPropertyName;
55 }
56
57
58
59
60
61
62 public JdbcStatementDescriptor getJdbcStatementDescriptor() {
63 return jdbcStatementDescriptor;
64 }
65
66
67
68
69 public void setJdbcStatementDescriptor(JdbcStatementDescriptor jdbcStatementDescriptor) {
70 this.jdbcStatementDescriptor = jdbcStatementDescriptor;
71 }
72
73
74
75
76
77
78
79
80 public void addFieldMapping(String propertyName, String fieldName, FieldDescriptor fieldDescriptor) throws FormatException {
81 throw new FormatException(MESSAGES.getString("CIC001800_Not_implemented"));
82 }
83
84
85
86
87
88
89
90
91 public void addFieldMapping(String propertyName, Integer fieldIndex, FieldDescriptor fieldDescriptor) throws FormatException {
92 throw new FormatException(MESSAGES.getString("CIC001800_Not_implemented"));
93 }
94
95
96
97
98 public ResultSetMappingDescriptor getResultSetMappingDescriptor() {
99 return resultSetMappingDescriptor;
100 }
101
102
103
104
105 public void setResultSetMappingDescriptor(ResultSetMappingDescriptor resultSetMappingDescriptor) {
106 this.resultSetMappingDescriptor = resultSetMappingDescriptor;
107 }
108
109
110
111
112
113 public Map<String, FieldDescriptor> getFieldMap() throws FormatException{
114
115 throw new FormatException(MESSAGES.getString("CIC001800_Not_implemented"));
116 }
117
118
119
120
121 public Class getBeanClass() {
122 return beanClass;
123 }
124
125
126
127
128 public void setBeanClass(Class beanClass) {
129 this.beanClass = beanClass;
130 }
131
132
133
134
135 public void setCodePage(String codePage) {
136 jdbcStatementDescriptor.setCodePage(codePage);
137 resultSetMappingDescriptor.setCodePage(codePage);
138
139 }
140
141
142
143 }