KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Loadable.java,v 1.5 2005/07/12 20:12:57 oneovthafew Exp $
2
package org.hibernate.persister.entity;
3
4 import java.io.Serializable JavaDoc;
5 import java.sql.ResultSet JavaDoc;
6 import java.sql.SQLException JavaDoc;
7
8 import org.hibernate.HibernateException;
9 import org.hibernate.engine.SessionImplementor;
10 import org.hibernate.type.Type;
11
12 /**
13  * Implemented by a <tt>EntityPersister</tt> that may be loaded
14  * using <tt>Loader</tt>.
15  *
16  * @see org.hibernate.loader.Loader
17  * @author Gavin King
18  */

19 public interface Loadable extends EntityPersister {
20     
21     public static final String JavaDoc ROWID_ALIAS = "rowid_";
22
23     /**
24      * Does this persistent class have subclasses?
25      */

26     public boolean hasSubclasses();
27
28     /**
29      * Get the discriminator type
30      */

31     public Type getDiscriminatorType();
32
33     /**
34      * Get the concrete subclass corresponding to the given discriminator
35      * value
36      */

37     public String JavaDoc getSubclassForDiscriminatorValue(Object JavaDoc value);
38
39     /**
40      * Get the names of columns used to persist the identifier
41      */

42     public String JavaDoc[] getIdentifierColumnNames();
43
44     /**
45      * Get the result set aliases used for the identifier columns, given a suffix
46      */

47     public String JavaDoc[] getIdentifierAliases(String JavaDoc suffix);
48     /**
49      * Get the result set aliases used for the property columns, given a suffix (properties of this class, only).
50      */

51     public String JavaDoc[] getPropertyAliases(String JavaDoc suffix, int i);
52     
53     /**
54      * Get the result set column names mapped for this property (properties of this class, only).
55      */

56     public String JavaDoc[] getPropertyColumnNames(int i);
57     
58     /**
59      * Get the result set aliases used for the identifier columns, given a suffix
60      */

61     public String JavaDoc getDiscriminatorAlias(String JavaDoc suffix);
62     
63     /**
64      * @return the column name for the discriminator as specified in the mapping.
65      */

66     public String JavaDoc getDiscriminatorColumnName();
67     
68     /**
69      * Does the result set contain rowids?
70      */

71     public boolean hasRowId();
72     
73     /**
74      * Retrieve property values from one row of a result set
75      */

76     public Object JavaDoc[] hydrate(
77             ResultSet JavaDoc rs,
78             Serializable JavaDoc id,
79             Object JavaDoc object,
80             Loadable rootLoadable,
81             String JavaDoc[][] suffixedPropertyColumns,
82             boolean allProperties,
83             SessionImplementor session)
84     throws SQLException JavaDoc, HibernateException;
85
86     public boolean isAbstract();
87
88 }
89
Popular Tags