1
2
3
4
5
6
7
8 package it.imolinfo.jbi4cics.messageformat.jdbc;
9
10 import it.imolinfo.jbi4cics.exception.FormatException;
11 import it.imolinfo.jbi4cics.jbi.Messages;
12 import it.imolinfo.jbi4cics.messageformat.FieldDescriptor;
13 import it.imolinfo.jbi4cics.messageformat.MappingDescriptor;
14
15 import java.util.Map;
16
17 import org.apache.commons.collections.map.ListOrderedMap;
18
19 public class ResultSetMappingDescriptor implements MappingDescriptor{
20
21
22
23
24 private static final Messages MESSAGES
25 = Messages.getMessages(ResultSetMappingDescriptor.class);
26
27 private Map<String, String> columnNamePropertyNameMap=new ListOrderedMap();
28 private Class beanClass;
29
30 public ResultSetMappingDescriptor() {
31 super();
32
33 }
34
35
36
37
38 public Map<String, String> getColumnNamePropertyNameMap() {
39 return columnNamePropertyNameMap;
40 }
41
42
43
44
45
46
47
48
49 public void addFieldMapping(String propertyName, String fieldName, FieldDescriptor fieldDescriptor) throws FormatException {
50 columnNamePropertyNameMap.put(fieldName,propertyName);
51 }
52
53
54
55
56
57
58
59
60 public void addFieldMapping(String propertyName, Integer fieldIndex, FieldDescriptor fieldDescriptor) throws FormatException {
61 throw new FormatException(MESSAGES.getString("CIC001800_Not_implemented"));
62 }
63
64
65
66
67
68 public Map<String, FieldDescriptor> getFieldMap() throws FormatException {
69
70 throw new FormatException(MESSAGES.getString("CIC001800_Not_implemented"));
71 }
72
73
74
75
76 public Class getBeanClass() {
77 return beanClass;
78 }
79
80
81
82
83 public void setBeanClass(Class beanClass) {
84 this.beanClass = beanClass;
85 }
86
87
88
89
90 public void setCodePage(String codePage) {
91
92
93 }
94
95 }