KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: PropertyMapping.java,v 1.2 2005/03/23 15:40:54 steveebersole Exp $
2
package org.hibernate.persister.entity;
3
4 import org.hibernate.QueryException;
5 import org.hibernate.type.Type;
6
7 /**
8  * Abstraction of all mappings that define properties:
9  * entities, collection elements.
10  *
11  * @author Gavin King
12  */

13 public interface PropertyMapping {
14     // TODO: It would be really, really nice to use this to also model components!
15
/**
16      * Given a component path expression, get the type of the property
17      */

18     public Type toType(String JavaDoc propertyName) throws QueryException;
19     /**
20      * Given a query alias and a property path, return the qualified
21      * column name
22      */

23     public String JavaDoc[] toColumns(String JavaDoc alias, String JavaDoc propertyName) throws QueryException;
24     /**
25      * Given a property path, return the corresponding column name(s).
26      */

27     public String JavaDoc[] toColumns(String JavaDoc propertyName) throws QueryException, UnsupportedOperationException JavaDoc;
28     /**
29      * Get the type of the thing containing the properties
30      */

31     public Type getType();
32 }
33
Popular Tags