Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate
Modified Files:
Interceptor.java hibernate-mapping-2.0.dtd
Log Message:
renamed 'mutable' to 'update'
added 'insert' attribute
removed old dtds
Index: Interceptor.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Interceptor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Interceptor.java 26 Jan 2003 01:33:34 -0000 1.5
--- Interceptor.java 28 Jan 2003 10:22:18 -0000 1.6
***************
*** 60,65 ****
* in-memory state with the database.
*/
! public void postFlush(Iterator entities);
!
/**
* Called when a transient entity is passed to <tt>saveOrUpdate()</tt>. The return value determines
--- 60,64 ----
* in-memory state with the database.
*/
! public void postFlush(Iterator entities);
/**
* Called when a transient entity is passed to <tt>saveOrUpdate()</tt>. The return value determines
***************
*** 70,76 ****
* </ul>
* @param entity a transient entity
! * @return Boolean
*/
public Boolean isUnsaved(Object entity);
}
--- 69,95 ----
* </ul>
* @param entity a transient entity
! * @return Boolean or <tt>null</tt> to shoose default behaviour
*/
public Boolean isUnsaved(Object entity);
+ /**
+ * Called from <tt>flush()</tt>. The return value determines whether the entity is updated
+ * <ul>
+ * <li>an array of property indices - the entity is dirty
+ * <li>and empty array - the entity is not dirty
+ * <li><tt>null</tt> - use Hibernate's default dirty-checking algorithm
+ * </ul>
+ * @param entity a persistent entity
+ * @return array of dirty property indices or <tt>null</tt> to choose default behaviour
+ */
+ public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types);
+ /**
+ * Instantiate the entity class. Return <tt>null</tt> to indicate that Hibernate should use
+ * the default constructor of the class.
+ *
+ * @param clazz a mapped class
+ * @param id the identifier of the new instance
+ * @return Object an instance of the class, or <tt>null</tt> to choose default behaviour
+ */
+ public Object instantiate(Class clazz, Serializable id);
}
Index: hibernate-mapping-2.0.dtd
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hibernate-mapping-2.0.dtd,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** hibernate-mapping-2.0.dtd 25 Jan 2003 00:13:55 -0000 1.12
--- hibernate-mapping-2.0.dtd 28 Jan 2003 10:22:18 -0000 1.13
***************
*** 122,126 ****
<!ATTLIST property not-null (true|false) "false">
<!ATTLIST property unique (true|false) "false">
! <!ATTLIST property mutable (true|false) "true"> <!-- only supported for properties of a class -->
<!-- Declares an association between two entities (Or from a component, component element,
--- 122,127 ----
<!ATTLIST property not-null (true|false) "false">
<!ATTLIST property unique (true|false) "false">
! <!ATTLIST property update (true|false) "true"> <!-- only supported for properties of a class (not component) -->
! <!ATTLIST property insert (true|false) "true"> <!-- only supported for properties of a class (not component) -->
<!-- Declares an association between two entities (Or from a component, component element,
***************
*** 135,138 ****
--- 136,141 ----
<!ATTLIST many-to-one cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none -->
<!ATTLIST many-to-one outer-join (true|false|auto) "auto">
+ <!ATTLIST many-to-one update (true|false) "true"> <!-- only supported for many-to-one of a class (not component) -->
+ <!ATTLIST many-to-one insert (true|false) "true"> <!-- only supported for many-to-one of a class (not component) -->
<!-- Declares a one-to-one association between two entities (Or from a component,
|