Hi Thomas,

Thanks for your help.
I thought about this solution, but honestly, it is not very beautiful.
They are no other ways ?
Is it possible to hope that OJB will do this easily in a future release ?

Thanks,

Regards

Eric

-----Message d'origine-----
De : Thomas Dudziak [mailto:[EMAIL PROTECTED]
Envoye : vendredi 21 novembre 2003 18:15
A : OJB Users List
Objet : RE: Collection of string




On Fri, 21 Nov 2003, eric barbe wrote:

> Hi,
>
> Yes, I need to use this table on reporting applications that do not use
OJB.
> This fields must be readable.
>

The string class itself won't work as an existing string object cannot be
changed anymore (upon loading OJB creates the object using the no-argument
constructor and the sets the fields). So I suggest that you use a wrapper
class in your collection such as:

class Value
{
  private Integer id;
  private String  value;

  ...

  public Value()
  {}

  public void setValue(String value)
  {
    this.value = value;
  }

  public String getValue()
  {
    return value;
  }

  ...
}

(You don't really need the id here, an anonymous primarykey field would
also work).
Then you simply define a class descriptor for this class in
your repository descriptor.

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to