KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > loader > custom > CustomQuery


1 //$Id: CustomQuery.java,v 1.5 2005/05/19 22:38:09 oneovthafew Exp $
2
package org.hibernate.loader.custom;
3
4 import java.util.Map JavaDoc;
5 import java.util.Set JavaDoc;
6
7 import org.hibernate.LockMode;
8 import org.hibernate.loader.CollectionAliases;
9 import org.hibernate.loader.EntityAliases;
10 import org.hibernate.type.Type;
11
12
13 /**
14  * Extension point allowing any SQL query with named
15  * and positional parameters to be executed by Hibernate,
16  * returning managed entities, collections and simple
17  * scalar values.
18  *
19  *
20  * @author Gavin King
21  */

22 public interface CustomQuery {
23     public String JavaDoc getSQL();
24     public Set JavaDoc getQuerySpaces();
25
26     /**
27      * Optional, may return null
28      */

29     public Map JavaDoc getNamedParameterBindPoints();
30     
31     public String JavaDoc[] getEntityNames();
32     public EntityAliases[] getEntityAliases();
33     public CollectionAliases[] getCollectionAliases();
34     public LockMode[] getLockModes();
35     /**
36      * Optional, may return null
37      */

38     public int[] getEntityOwners();
39     
40     /**
41      * Optional, may return null
42      */

43     public int[] getCollectionOwner();
44     /**
45      * Optional, may return null
46      */

47     public String JavaDoc[] getCollectionRoles();
48     
49     /**
50      * Optional, may return null
51      */

52     public Type[] getScalarTypes();
53     /**
54      * Optional, may return null
55      */

56     public String JavaDoc[] getScalarColumnAliases();
57     
58 }
59
Popular Tags