1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.healthmarketscience.jackcess.complex;
18
19 import java.io.IOException;
20 import java.io.ObjectStreamException;
21 import java.time.LocalDateTime;
22 import java.util.Date;
23 import java.util.List;
24 import java.util.Map;
25
26 import com.healthmarketscience.jackcess.Column;
27 import com.healthmarketscience.jackcess.DateTimeType;
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public abstract class ComplexValueForeignKey extends Number
45 {
46 private static final long serialVersionUID = 20130319L;
47
48 @Override
49 public byte byteValue() {
50 return (byte)get();
51 }
52
53 @Override
54 public short shortValue() {
55 return (short)get();
56 }
57
58 @Override
59 public int intValue() {
60 return get();
61 }
62
63 @Override
64 public long longValue() {
65 return get();
66 }
67
68 @Override
69 public float floatValue() {
70 return get();
71 }
72
73 @Override
74 public double doubleValue() {
75 return get();
76 }
77
78 protected final Object writeReplace() throws ObjectStreamException {
79
80
81
82 return Integer.valueOf(get());
83 }
84
85 @Override
86 public int hashCode() {
87 return get();
88 }
89
90 @Override
91 public boolean equals(Object o) {
92 return ((this == o) ||
93 ((o != null) && (getClass() == o.getClass()) &&
94 (get() == ((ComplexValueForeignKey)o).get())));
95 }
96
97 @Override
98 public String toString() {
99 return String.valueOf(get());
100 }
101
102 public abstract int get();
103
104 public abstract Column getColumn();
105
106 public abstract ComplexDataType getComplexType();
107
108 public abstract int countValues() throws IOException;
109
110 public abstract List<? extends ComplexValue> getValues() throws IOException;
111
112 public abstract List<Version> getVersions() throws IOException;
113
114 public abstract List<Attachment> getAttachments()
115 throws IOException;
116
117 public abstract List<SingleValue> getMultiValues()
118 throws IOException;
119
120 public abstract List<UnsupportedValue> getUnsupportedValues()
121 throws IOException;
122
123 public abstract void reset();
124
125 public abstract Version addVersion(String value)
126 throws IOException;
127
128
129
130
131 @Deprecated
132 public abstract Version addVersion(String value, Date modifiedDate)
133 throws IOException;
134
135 public abstract Version addVersion(String value, LocalDateTime modifiedDate)
136 throws IOException;
137
138 public abstract Attachment addAttachment(byte[] data)
139 throws IOException;
140
141
142
143
144 @Deprecated
145 public abstract Attachment addAttachment(
146 String url, String name, String type, byte[] data,
147 Date timeStamp, Integer flags)
148 throws IOException;
149
150 public abstract Attachment addAttachment(
151 String url, String name, String type, byte[] data,
152 LocalDateTime timeStamp, Integer flags)
153 throws IOException;
154
155 public abstract Attachment addEncodedAttachment(byte[] encodedData)
156 throws IOException;
157
158
159
160
161 @Deprecated
162 public abstract Attachment addEncodedAttachment(
163 String url, String name, String type, byte[] encodedData,
164 Date timeStamp, Integer flags)
165 throws IOException;
166
167 public abstract Attachment addEncodedAttachment(
168 String url, String name, String type, byte[] encodedData,
169 LocalDateTime timeStamp, Integer flags)
170 throws IOException;
171
172 public abstract Attachment/com/healthmarketscience/jackcess/complex/Attachment.html#Attachment">Attachment updateAttachment(Attachment attachment)
173 throws IOException;
174
175 public abstract Attachment/com/healthmarketscience/jackcess/complex/Attachment.html#Attachment">Attachment deleteAttachment(Attachment attachment)
176 throws IOException;
177
178 public abstract SingleValue addMultiValue(Object value)
179 throws IOException;
180
181 public abstract SingleValuecom/healthmarketscience/jackcess/complex/SingleValue.html#SingleValue">SingleValue updateMultiValue(SingleValue value)
182 throws IOException;
183
184 public abstract SingleValuecom/healthmarketscience/jackcess/complex/SingleValue.html#SingleValue">SingleValue deleteMultiValue(SingleValue value)
185 throws IOException;
186
187 public abstract UnsupportedValue addUnsupportedValue(Map<String,?> values)
188 throws IOException;
189
190 public abstract UnsupportedValuearketscience/jackcess/complex/UnsupportedValue.html#UnsupportedValue">UnsupportedValue updateUnsupportedValue(UnsupportedValue value)
191 throws IOException;
192
193 public abstract UnsupportedValuearketscience/jackcess/complex/UnsupportedValue.html#UnsupportedValue">UnsupportedValue deleteUnsupportedValue(UnsupportedValue value)
194 throws IOException;
195
196 public abstract void deleteAllValues()
197 throws IOException;
198
199 }