Mantis - Resin
Viewing Issue Advanced Details
2749 minor always 06-23-08 12:03 07-02-08 15:58
ferg  
ferg  
normal  
closed 3.2.0  
fixed  
none    
none 3.2.0  
0002749: Amber @Basic Set
(rep by Martin Aschoff)

package manning.utils;
import java.util.HashSet;
/*
* The Portfolio class represents a single portfolio
of one of the users.
*
*/
@Entity
public class Portfolio {

 private String name;

 @ManyToOne ( targetEntity =
manning.utils.User.class, optional=false )
 private User owner;

 @Id @GeneratedValue
 private Long id;

 @org.hibernate.annotations.CollectionOfElements
 @JoinTable (name="portfolio_image",
joinColumns=@JoinColumn(name="portfolio_id"))
 private Set<String> pics = new HashSet<String>();

 public Set getPics() {
     return pics;
 }
 public void setPics(Set pics) {
     this.pics = pics;
 }

 public void addPic ( String pic ){
     pics.add( pic );
 }
 public Long getId() {
     return id;
 }
 private void setId(Long id) {
     this.id = id;
 }

 public User getOwner() {
     return owner;
 }

 public void setOwner(User owner) {
     this.owner = owner;
 }

 public String getName() {
     return name;
 }

 public void setName(String name) {
     this.name = name;
 }
}

Notes
(0003237)
ferg   
07-02-08 15:58   
jpa/1a0[0-5]