Hi all,
First post which I hope will have a simple solution. I have renamed packages
and names for simplicity:
I have generated castor classes from an XSD and a number of fields are
defined as xs:restriction types as follows:
Its configured to use Java 5 enums in the castorbuilder.properties as
follows:
org.exolab.castor.builder.javaVersion=5.0
org.exolab.castor.builder.forceJava4Enums=false
This results in the java class that contains an enum of 'Male' & 'Female'
with a private constructor.
public enum Gender implements java.io.Serializable { ...
As a result, in order to construct this object, you have use the fromValue
method and not the constructor which is private.
In the JDO mapping I have tried a mapping similar to the following:
>From my java code I call
oql = db.getOQLQuery("CALL GetICFTradeBulkMessageData() AS
com.blah.blah.blah.myApp");
results = oql.execute();
but I get
org.exolab.castor.mapping.MappingException: The return type for method
public com.blah.blah.blah.types.Gender1
com.blah.blah.blah.myApp.getGenderType() does not match the declared field
type java.lang.String
Is this to do with the fact this is an enum object and doesn't have a
default constructor?
What am I missing/doing wrong.
Any help appriciated ;-)
--
View this message in context:
http://www.nabble.com/Castor-JDO%2C-stored-procedures-and-using-xs%3Arestriction-types-tp18279611p18279611.html
Sent from the Castor - User mailing list archive at Nabble.com.