KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > persister > collection > QueryableCollection


1 //$Id: QueryableCollection.java,v 1.4 2005/07/03 19:42:43 maxcsaucdk Exp $
2
package org.hibernate.persister.collection;
3
4 import org.hibernate.FetchMode;
5 import org.hibernate.persister.entity.EntityPersister;
6 import org.hibernate.persister.entity.Joinable;
7 import org.hibernate.persister.entity.PropertyMapping;
8
9 /**
10  * A collection role that may be queried or loaded by outer join.
11  * @author Gavin King
12  */

13 public interface QueryableCollection extends PropertyMapping, Joinable, CollectionPersister {
14     /**
15      * Generate a list of collection index and element columns
16      */

17     public abstract String JavaDoc selectFragment(String JavaDoc alias, String JavaDoc columnSuffix);
18     /**
19      * Get the names of the collection index columnsm if
20      * this is an indexed collection (optional operation)
21      */

22     public abstract String JavaDoc[] getIndexColumnNames();
23     /**
24      * Get the names of the collection index columns if
25      * this is an indexed collection (optional operation),
26      * aliased by the given table alias
27      */

28     public abstract String JavaDoc[] getIndexColumnNames(String JavaDoc alias);
29     /**
30      * Get the names of the collection element columns (or the primary
31      * key columns in the case of a one-to-many association),
32      * aliased by the given table alias
33      */

34     public abstract String JavaDoc[] getElementColumnNames(String JavaDoc alias);
35     /**
36      * Get the names of the collection element columns (or the primary
37      * key columns in the case of a one-to-many association)
38      */

39     public abstract String JavaDoc[] getElementColumnNames();
40     /**
41      * Get the order by SQL
42      */

43     public abstract String JavaDoc getSQLOrderByString(String JavaDoc alias);
44     /**
45      * Does this collection role have a where clause filter?
46      */

47     public abstract boolean hasWhere();
48     /**
49      * Get the persister of the element class, if this is a
50      * collection of entities (optional operation). Note that
51      * for a one-to-many association, the returned persister
52      * must be <tt>OuterJoinLoadable</tt>.
53      */

54     public abstract EntityPersister getElementPersister();
55     /**
56      * Should we load this collection role by outerjoining?
57      */

58     public abstract FetchMode getFetchMode();
59
60 }
61
Popular Tags