[prev in list] [next in list] [prev in thread] [next in thread] 

List:       castor-dev
Subject:    Re: [castor-dev] Suggestion for castor or openejb
From:       David Blevins <david.blevins () visi ! com>
Date:       2003-06-27 14:41:31
[Download RAW message or body]

On Fri, Jun 27, 2003 at 11:20:05AM +0100, Paulo Lopes wrote:
> 
> public class SampleBean implements EntityBean
> {
>    public int id;
>    private String name;
[...]
>    public int getId() {
>        return id;
>    }
> 
>    public String getName() {
>        return name;
>    }
> 
>    public void setId(int i) {
>        id = i;
>    }
> 
>    public void setName(String n) {
>        name = n;
>    }
> }
[...]
> When i try to use the bean it can only work IF the id field on the class 
> is public! since there are get's and set's for it why does one have to 
> declare it public?

It's a spec thing. The CMP fields of the entity bean have to be public.

I had thought we were not strictly enforcing this so people could use the 
Castor get/set functionality.  Can you send me any related stack trace 
offline?

Thanks,
David

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
minimalist@exolab.org with a subject of:
        unsubscribe castor-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic