If something is read-only, just specify a get-method in the mapping
file, without specifying a set-method. If you don't specify any accesor
methods Castor will automatically try to determine them, but if you
specify just one, then Castor will not look for the other, so it's a way
to handle read-only.

--Keith


Wei Chen wrote:
> 
> Hi,
> 
> I am learning castor and wondering what is the best practice to handle
> read-only properties.
> 
> So far I made it working by writing field handlers and specifying them
> in the mapping file.
> 
> It seems I can not write field handler as an inner class (mapping loader
> complaints about the $ in class name). And I have to write one for each
> handle (there is no way to combine them). All these result in explosion
> of java files.
> 
> What is best practice for handling read-only properties?
> 
> Thanks.
> 
> - Wei Chen
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to