Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv21213/cirrus/hibernate
Modified Files:
Query.java
Added Files:
PropertyNotFoundException.java
Log Message:
added support for <joined-subclass> to CodeGenerator
added Query.getNamedParameters(), Query.setProperties()
fixed a bug in Query.getReturnTypes()
--- NEW FILE: PropertyNotFoundException.java ---
//$Id: PropertyNotFoundException.java,v 1.1 2002/12/28 02:25:48 oneovthafew Exp $
package cirrus.hibernate;
/**
* Indicates that an expected getter or setter method could not be
* found on a class.
*/
public class PropertyNotFoundException extends MappingException {
public PropertyNotFoundException(String msg, Throwable root) {
super(msg, root);
}
public PropertyNotFoundException(Throwable root) {
super(root);
}
public PropertyNotFoundException(String s) {
super(s);
}
}
Index: Query.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/Query.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Query.java 27 Dec 2002 11:54:48 -0000 1.17
--- Query.java 28 Dec 2002 02:25:48 -0000 1.18
***************
*** 53,61 ****
public interface Query {
/**
! * The Hibernate types of the query result set.
* @return an array of types
*/
public Type[] getReturnTypes() throws HibernateException;
/**
* Return the query results as an <tt>Iterator</tt>. If the query
* contains multiple results pre row, the results are returned in
--- 53,66 ----
public interface Query {
/**
! * Return the Hibernate types of the query result set.
* @return an array of types
*/
public Type[] getReturnTypes() throws HibernateException;
/**
+ * Return the names of all named parameters of the query.
+ * @return the parameter names, in no particular order
+ */
+ public String[] getNamedParameters() throws HibernateException;
+ /**
* Return the query results as an <tt>Iterator</tt>. If the query
* contains multiple results pre row, the results are returned in
***************
*** 167,170 ****
--- 172,183 ----
*/
public void setParameterList(String name, Collection vals) throws HibernateException;
+
+ /**
+ * Bind the property values of the given bean to named parameters of the query,
+ * matching property names with parameter names and mapping property types to
+ * Hibernate types using hueristics.
+ * @param bean any JavaBean or POJO
+ */
+ public void setProperties(Object bean) throws HibernateException;
public void setString(int position, String val);
|