92 }
93
94 /**
95 * Returns an <code>Object</code> representing the SQL structured type
96 * to which this <code>SerialRef</code> object refers. The attributes
97 * of the structured type are mapped according to the given type map.
98 *
99 * @param map a <code>java.util.Map</code> object containing zero or
100 * more entries, with each entry consisting of 1) a <code>String</code>
101 * giving the fully qualified name of a UDT and 2) the
102 * <code>Class</code> object for the <code>SQLData</code> implementation
103 * that defines how the UDT is to be mapped
104 * @return an object instance resolved from the Ref reference and mapped
105 * according to the supplied type map
106 * @throws SerialException if an error is encountered in the reference
107 * resolution
108 */
109 public Object getObject(java.util.Map<String,Class<?>> map)
110 throws SerialException
111 {
112 map = new Hashtable(map);
113 if (object != null) {
114 return map.get(object);
115 } else {
116 throw new SerialException("The object is not set");
117 }
118 }
119
120 /**
121 * Returns an <code>Object</code> representing the SQL structured type
122 * to which this <code>SerialRef</code> object refers.
123 *
124 * @return an object instance resolved from the Ref reference
125 * @throws SerialException if an error is encountered in the reference
126 * resolution
127 */
128 public Object getObject() throws SerialException {
129
130 if (reference != null) {
131 try {
132 return reference.getObject();
|
92 }
93
94 /**
95 * Returns an <code>Object</code> representing the SQL structured type
96 * to which this <code>SerialRef</code> object refers. The attributes
97 * of the structured type are mapped according to the given type map.
98 *
99 * @param map a <code>java.util.Map</code> object containing zero or
100 * more entries, with each entry consisting of 1) a <code>String</code>
101 * giving the fully qualified name of a UDT and 2) the
102 * <code>Class</code> object for the <code>SQLData</code> implementation
103 * that defines how the UDT is to be mapped
104 * @return an object instance resolved from the Ref reference and mapped
105 * according to the supplied type map
106 * @throws SerialException if an error is encountered in the reference
107 * resolution
108 */
109 public Object getObject(java.util.Map<String,Class<?>> map)
110 throws SerialException
111 {
112 map = new Hashtable<String,Class<?>>(map);
113 if (object != null) {
114 return map.get(object);
115 } else {
116 throw new SerialException("The object is not set");
117 }
118 }
119
120 /**
121 * Returns an <code>Object</code> representing the SQL structured type
122 * to which this <code>SerialRef</code> object refers.
123 *
124 * @return an object instance resolved from the Ref reference
125 * @throws SerialException if an error is encountered in the reference
126 * resolution
127 */
128 public Object getObject() throws SerialException {
129
130 if (reference != null) {
131 try {
132 return reference.getObject();
|