1 | if (c == null) {↵ | | 1 | if (c == null) {↵
|
2 | // the other obj is null, so see if this non-null obj contains↵ | | 2 | // the other obj is null, so see if this non-null obj contains↵
|
3 | // a null value, which is equivilent.↵ | | 3 | // a null value, which is equivilent.↵
|
4 | // Assume that if we have read some of the data and we still have↵ | | 4 | // Assume that if we have read some of the data and we still have↵
|
5 | // _data == null, then the value in the DB is actually null.↵ | | 5 | // _data == null, then the value in the DB is actually null.↵
|
6 | if (_blobRead == true && _data == null)↵ | | 6 | if (_clobRead == true && _data == null)↵
|
7 | return true;↵ | | 7 | return true;↵
|
8 | else↵ | | 8 | else↵
|
9 | return false;↵ | | 9 | return false;↵
|
10 | }↵ | | 10 | }↵
|
11 | ↵ | | |
|
12 | if (c.getBlobRead() == false) {↵ | | 11 | if (c.getClobRead() == false) {↵
|
13 | // the other obj has not read the data yet.↵ | | 12 | // the other obj has not read the data yet.↵
|
14 | if (_blobRead == true)↵ | | 13 | if (_clobRead == true)↵
|
15 | return false; // we have read data, so that is not the same state↵ | | 14 | return false; // we have read data, so that is not the same state↵
|
16 | else return true; // odd-ball case: assume if neither has read data that they are equal↵ | | 15 | else return true; // odd-ball case: assume if neither has read data that they are equal↵
|
17 | }↵ | | 16 | }↵
|
18 | ↵ | | |
|
19 | // the other object has real data↵ | | 17 | // the other object has real data↵
|
20 | if (_blobRead == false)↵ | | 18 | if (_clobRead == false)↵
|
21 | return false; // this one does not, so they are not equal↵ | | 19 | return false; // this one does not, so they are not equal↵
|
22 | ↵ | | |
|
23 | // both have actual data, so compare the strings↵ | | 20 | // both have actual data, so compare the strings↵
|
24 | // Note that if one has read all of the data and the other has read only part↵ | | 21 | // Note that if one has read all of the data and the other has read only part↵
|
25 | // of the data that we will say that they are NOT equal.↵ | | 22 | // of the data that we will say that they are NOT equal.↵
|
26 | return Arrays.equals(c.getData(), _data); | | 23 | return c.getData().equals(_data);
|