/ Getters
> > >
> > > public Pet getPet()
> > > {
> > > return pet;
> > > }
> > >
> > > public int getAge()
> > > {
> > > return age;
> > > }
> > >
> > > public
Title: RE: [castor-dev] NotConstructable Exception and FieldHandler
Hi Keith,
I think I got your point now. Chris is using the Handler for object creation only. That's why he still needs the other mapping.
Well, in that case, maybe the code really needs a fix...
Thanks for the explan
o need to change anything in the current
> Unmarshaller code. Just make a hint in the current FieldHandler and
> XML-mapping docs.
>
> Matthias.
>
> -Original Message-
> From: Keith Visco [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 9:19 AM
> To:
Title: RE: [castor-dev] NotConstructable Exception and FieldHandler
Hi Keith,
I think it's up to the developer to delete a mapping for a class that is mapped in a field by a FieldHandler. The mapping is not needed anymore if I have a FieldHandler for that class. Or why would I implemen
ng name)
> > {
> > this.name = name;
> > }
> >
> > }
> >
> > / Handler.java
> > import org.exolab.castor.mapping.*;
> >
> > public class Handler implements
}
>
> public Object getValue(Object object) throws IllegalStateException {
> return ((Person)object).getPet();
> }
>
> public void setValue(Object object, Object value)
> throws IllegalStateException,
bject object) throws
IllegalStateException, IllegalArgumentException {
}
public void checkValidity(Object object)throws ValidityException,
IllegalStateException {
}
}
- Original Message -
From: "Keith Visco" <[EMAIL PROTECTED]>
To: &l
Change you mapping to the following:
Default mapping for Coordinates
Note that I changed the "type" to "string" instead of
"com.CoordinateFormatEnum". When using a handler you need to specify the
type that the handler is expecting
, 2002 12:14 PM
Subject: Re: [castor-dev] NotConstructable Exception and FieldHandler
>
> You can also create a "valueOf" method that takes a string value and
> returns the proper enumeration instance, which is how Castor deals with
> unmarshalling type-safe enumerations:
>
&g
Subject: Re: [castor-dev] NotConstructable Exception and FieldHandler
Date: Mon, 16 Dec 2002 11:55:54 -0800
From: "Chris Bedford" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]>
Hi, Matthias: I'
thanks
Chris
- Original Message -
From:
Matthias
David
To: [EMAIL PROTECTED]
Sent: Monday, December 16, 2002 1:39
AM
Subject: [castor-dev] NotConstructable
Exception and FieldHandler
Hi,
I have written a FieldHandler for a class
(CoordinateFormatEnum) that has no
Title: NotConstructable Exception and FieldHandler
Hi,
I have written a FieldHandler for a class (CoordinateFormatEnum) that has no public constructor. When Unmarshalling I get the following exception:
Nested error: org.exolab.castor.mapping.MappingException: The Java class CoordinateFormat
12 matches
Mail list logo