KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > persister > entity > Joinable


1 //$Id: Joinable.java,v 1.3 2005/05/19 07:28:59 steveebersole Exp $
2
package org.hibernate.persister.entity;
3
4 import org.hibernate.MappingException;
5
6 import java.util.Map JavaDoc;
7
8 /**
9  * Anything that can be loaded by outer join - namely
10  * persisters for classes or collections.
11  *
12  * @author Gavin King
13  */

14 public interface Joinable {
15     //should this interface extend PropertyMapping?
16

17     /**
18      * An identifying name; a class name or collection role name.
19      */

20     public String JavaDoc getName();
21     /**
22      * The table to join to.
23      */

24     public String JavaDoc getTableName();
25
26     /**
27      * All columns to select, when loading.
28      */

29     public String JavaDoc selectFragment(Joinable rhs, String JavaDoc rhsAlias, String JavaDoc lhsAlias, String JavaDoc currentEntitySuffix, String JavaDoc currentCollectionSuffix, boolean includeCollectionColumns);
30
31     /**
32      * Get the where clause part of any joins
33      * (optional operation)
34      */

35     public String JavaDoc whereJoinFragment(String JavaDoc alias, boolean innerJoin, boolean includeSubclasses);
36     /**
37      * Get the from clause part of any joins
38      * (optional operation)
39      */

40     public String JavaDoc fromJoinFragment(String JavaDoc alias, boolean innerJoin, boolean includeSubclasses);
41     /**
42      * The columns to join on
43      */

44     public String JavaDoc[] getKeyColumnNames();
45     /**
46      * Get the where clause filter, given a query alias and considering enabled session filters
47      */

48     public String JavaDoc filterFragment(String JavaDoc alias, Map JavaDoc enabledFilters) throws MappingException;
49
50     public String JavaDoc oneToManyFilterFragment(String JavaDoc alias) throws MappingException;
51     /**
52      * Is this instance actually a CollectionPersister?
53      */

54     public boolean isCollection();
55
56     /**
57      * Very, very, very ugly...
58      *
59      * @return Does this persister "consume" entity column aliases in the result
60      * set?
61      */

62     public boolean consumesEntityAlias();
63
64     /**
65      * Very, very, very ugly...
66      *
67      * @return Does this persister "consume" collection column aliases in the result
68      * set?
69      */

70     public boolean consumesCollectionAlias();
71 }
72
Popular Tags