01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.compass.core;
18:
19: /**
20: * Holds hits returned from a search performed by compass. Can be used outside of
21: * a transaction context. In order to get detached hits, use {@link org.compass.core.CompassHits#detach()}
22: * or {@link CompassHits#detach(int, int)}.
23: *
24: * @author kimchy
25: */
26: public interface CompassDetachedHits extends CompassHitsOperations {
27:
28: /**
29: * Returns the total number of hits (not just the detached ones).
30: *
31: * @return The total number of hits.
32: */
33: int getTotalLength();
34:
35: /**
36: * Returns the total number of hits (not just the detached ones).
37: *
38: * @return The total number of hits.
39: */
40: int totalLength();
41:
42: /**
43: * Returns all the <code>Resource</code>s as an array.
44: *
45: * @return All the <code>Resource</code>s as an array
46: */
47: Resource[] getResources() throws CompassException;
48:
49: /**
50: * Returns all the <code>Object</code>s data as an array.
51: *
52: * @return An array of all the hits as objects.
53: */
54: Object[] getDatas() throws CompassException;
55:
56: /**
57: * Returns all the <code>CompassHit</code>s data as an array.
58: *
59: * @return An array of all the hits.
60: * @see CompassHit
61: */
62: CompassHit[] getHits() throws CompassException;
63:
64: }
|