1 | if ( !collection.wasInitialized() && ce.getLoadedPersister() == collectionPersister ) {↵ | | |
|
| | | 1 | EntityKey key = (EntityKey) iter.next();↵
|
| | | 2 | if ( key.getEntityName().equals( persister.getEntityName() ) ) { //TODO: this needn't exclude subclasses...↵
|
2 | if ( checkForEnd && i == end ) {↵ | | 3 | if ( checkForEnd && i == end ) {↵
|
3 | return keys; //the first key found after the given key↵ | | 4 | //the first id found after the given id↵
|
4 | }↵ | | 5 | ↵
|
|
5 | //if ( end == -1 && count > batchSize*10 ) return keys; //try out ten batches, max↵ | | |
|
|
6 | final boolean isEqual = collectionP↵ | | 6 | return ids;↵
|
| | | 7 | }↵
|
7 | ersister.getKeyType().isEqual(↵ | | 8 | if ( persister.getIdentifierType().isEqual(↵
|
8 | id,↵ | | |
|
9 | ce.getLoadedKey(),↵ | | |
|
10 | entityMode,↵ | | |
|
11 | collectionPersister.getFactory()↵ | | |
|
12 | );↵ | | |
|
|
13 | if ( isEqual ) {↵ | | 9 | id, key.getIdentifier(), entityMode ) ) {↵
|
14 | end = i;↵ | | 10 | end = i;↵
|
15 | //checkForEnd = fa↵ | | 11 | }↵
|
16 | lse;↵ | | 12 | else {↵
|
17 | }↵ | | 13 | ↵
|
18 | else if ( !isCached( ce.getLoadedKey(), collectionPersister, entityMode ) ) {↵ | | 14 | if ( !isCached( key, persister, entityMode ) ) {↵
|
19 | keys[i++] = ce.getLoadedKey();↵ | | 15 | ids[i++] = key.get↵
|
20 | //count++;↵ | | 16 | Identifier();↵
|
| | | 17 | }↵
|
21 | }↵ | | 18 | }↵
|
|
22 | if ( i == batchSize ) {↵ | | 19 | if ( i == batchSize ) {↵
|
23 | i = 1; //end of array, start filling again from start↵ | | 20 | i = 1; //end of array, start filling again from start↵
|
24 | if ( end != -1 ) {↵ | | 21 | if (end!=-1) ↵
|
25 | checkForEnd = true;↵ | | 22 | checkForEnd = true;↵
|
26 | | | 23 |
|