Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv13407/sf/hibernate/test
Modified Files:
CustomPersister.java Glarch.hbm.xml Glarch.java
Log Message:
added mutable attribute to <property> element
Index: CustomPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/CustomPersister.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CustomPersister.java 9 Jan 2003 12:24:51 -0000 1.4
--- CustomPersister.java 24 Jan 2003 16:16:00 -0000 1.5
***************
*** 349,352 ****
--- 349,353 ----
Type[] TYPES = new Type[] { Hibernate.STRING };
String[] NAMES = new String[] { "name" };
+ boolean[] MUTABILITY = new boolean[] { true };
/**
***************
*** 434,438 ****
}
! }
--- 435,446 ----
}
! /**
! * @see net.sf.hibernate.persister.ClassPersister#getPropertyMutability()
! */
! public boolean[] getPropertyMutability() {
! return MUTABILITY;
! }
!
! }
Index: Glarch.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Glarch.hbm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Glarch.hbm.xml 19 Jan 2003 11:47:08 -0000 1.2
--- Glarch.hbm.xml 24 Jan 2003 16:16:01 -0000 1.3
***************
*** 44,47 ****
--- 44,48 ----
<one-to-many class="net.sf.hibernate.test.Glarch"/>
</set>
+ <property name="immutable" mutable="false"/>
</class>
Index: Glarch.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Glarch.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Glarch.java 19 Jan 2003 11:47:08 -0000 1.4
--- Glarch.java 24 Jan 2003 16:16:02 -0000 1.5
***************
*** 30,33 ****
--- 30,34 ----
//private Currency currency = Currency.getInstance( Locale.getDefault() );
private transient DynaBean dynaBean;
+ private String immutable;
public int getVersion() {
***************
*** 127,130 ****
--- 128,132 ----
dynaBean.set("foo", "foo");
dynaBean.set("bar", new Integer(66));
+ immutable="never changes!";
return NO_VETO;
}
***************
*** 156,159 ****
--- 158,177 ----
public void setDynaBean(DynaBean dynaBean) {
this.dynaBean = dynaBean;
+ }
+
+ /**
+ * Returns the immutable.
+ * @return String
+ */
+ public String getImmutable() {
+ return immutable;
+ }
+
+ /**
+ * Sets the immutable.
+ * @param immutable The immutable to set
+ */
+ public void setImmutable(String immutable) {
+ this.immutable = immutable;
}
|