Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map
In directory sc8-pr-cvs1:/tmp/cvs-serv22505/cirrus/hibernate/map
Modified Files:
PersistentClass.java RootClass.java Subclass.java
Log Message:
added polymorphism attribute to <class> element
Index: PersistentClass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/PersistentClass.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** PersistentClass.java 6 Nov 2002 00:58:02 -0000 1.40
--- PersistentClass.java 19 Nov 2002 10:42:17 -0000 1.41
***************
*** 166,169 ****
--- 166,170 ----
public abstract CacheConcurrencyStrategy getCache();
public abstract PersistentClass getSuperclass();
+ public abstract boolean isExplicitPolymorphism();
public abstract Iterator getPropertyClosureIterator();
Index: RootClass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/RootClass.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** RootClass.java 6 Nov 2002 00:58:02 -0000 1.50
--- RootClass.java 19 Nov 2002 10:42:17 -0000 1.51
***************
*** 32,35 ****
--- 32,36 ----
private final boolean mutable;
private boolean embeddedIdentifier = false; // may be final
+ private final boolean explicitPolymorphism;
private Class persister;
***************
*** 80,83 ****
--- 81,88 ----
setPolymorphic(true);
}
+
+ public boolean isExplicitPolymorphism() {
+ return explicitPolymorphism;
+ }
public RootClass(Node node, Root root) throws MappingException {
***************
*** 127,130 ****
--- 132,139 ----
Node mutableNode = atts.getNamedItem("mutable");
mutable = (mutableNode==null) || mutableNode.getNodeValue().toLowerCase().equals("true");
+
+ //POLYMORPHISM
+ Node polyNode = atts.getNamedItem("polymorphism");
+ explicitPolymorphism = (polyNode!=null) && polyNode.getNodeValue().toLowerCase().equals("explicit");
NodeList list = node.getChildNodes();
Index: Subclass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Subclass.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Subclass.java 5 Nov 2002 13:40:53 -0000 1.19
--- Subclass.java 19 Nov 2002 10:42:17 -0000 1.20
***************
*** 174,176 ****
--- 174,180 ----
}
+ public boolean isExplicitPolymorphism() {
+ return getSuperclass().isExplicitPolymorphism();
+ }
+
}
|