-->
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: Map A CompositeUserType relationship with a many-to-one
PostPosted: Tue May 27, 2008 10:13 pm 
Newbie

Joined: Fri Feb 15, 2008 4:35 pm
Posts: 6
how Map A CompositeUserType relationship with a many-to-one
this is my Composite class

Quote:
public class CategoriaItems
{
private Item item;
private Categoria categoria;
private String descripcion;

public Categoria getCategoria() {
return categoria;
}
public void setCategoria(Categoria categoria) {
this.categoria = categoria;
}
public Item getItem() {
return item;
}
public void setItem(Item item) {
this.item = item;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((categoria == null) ? 0 : categoria.hashCode());
result = prime * result
+ ((descripcion == null) ? 0 : descripcion.hashCode());
result = prime * result + ((item == null) ? 0 : item.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final CategoriaItems other = (CategoriaItems) obj;
if (categoria == null) {
if (other.categoria != null)
return false;
} else if (!categoria.equals(other.categoria))
return false;
if (descripcion == null) {
if (other.descripcion != null)
return false;
} else if (!descripcion.equals(other.descripcion))
return false;
if (item == null) {
if (other.item != null)
return false;
} else if (!item.equals(other.item))
return false;
return true;
}



}


please need urgent help
any ideas will be welcome


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.