Let me expand my idea (sorry if I get boring).
I have a User object. Each user has a LoginHour list. So, using JDK 5.0 could I declare

public class User {
 private String username;
 private String password;
 private List<LoginHour> loginHours;
 public void setUsername(String newUsername) {...}
 public String getUsername() {...}
 public void setPassword(String newPassword) {...}
 public Stirng getPassword() {...}
 public void setLoginHours(List<LoginHour> loginHours) {
   this.loginHours = loginHours;
 }
 public List<LoginHour> getLoginHours() {
   return this.loginHours;
 }
}

And this will work fine? There is nothing to be changed on class-descriptor, neihter in collection-descriptor?


TIA,

Edson Richter


Thomas Dudziak escreveu:

On 8/8/05, Edson Carlos Ericksson Richter
<[EMAIL PROTECTED]> wrote:
Anyone has an example about how could OJB be used with Generics? This
will not affect the class-mapping descriptor?

Since Java generics will be compiled to non-generic bytecode, it does
not really affect classloading etc. Hence it should not matter when
running OJB, you simply specify the collection-descriptor etc. as you
would for non-generic code. The only differences are that OJB does not
(yet) support enums, and that the XDoclet module might not work with
generic code (you'll at least need a CVS build of the XDoclet code to
be able to parse 1.5 code).

Tom

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





--
Edson Carlos Ericksson Richter
MGR Informática Ltda.
Fones: 3347-0446 / 9259-2993


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

Reply via email to