-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Annotations x DTO
PostPosted: Thu Jun 08, 2006 4:01 pm 
Newbie

Joined: Thu Feb 24, 2005 8:37 am
Posts: 8
Aloha let's direct to the problem:

@Entity(name="UsuarioEntity")
@Table(name="usuario")
public class UsuarioEntity implements TransferObject {

private Integer cod_usuario;
private String nome_usuario;
private UsuarioGrupoEntity usuarioGrupoEntity;
...gets and setters...

@ManyToOne
@JoinColumn(name="cod_usuario_grupo")
public UsuarioGrupoEntity getUsuarioGrupoEntity() {
return usuarioGrupoEntity;
}

public void setUsuarioGrupoEntity(UsuarioGrupoEntity usuarioGrupoEntity) {
this.usuarioGrupoEntity = usuarioGrupoEntity;
}

And My TO:

public class UsuarioTO implements TransferObject {

private Integer cod_usuario;
private String nome_usuario;
private UsuarioGrupoTO usuarioGrupoTO;
....gets and setters....

How can I transfer the data into My TO to my mapped Entity Class? Thanks for attention.

_________________
---
-------------------------------------------------------------------------
Volenti Nihil Dificille


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.