[jboss-user] [JBoss Seam] - Re: How to use si:selectItems with an object that has a Stri
lawrieg
do-not-reply at jboss.com
Wed Jan 31 08:04:04 EST 2007
CustomerType class:
@Entity
| @Table(name = "CUSTOMER_TYPE", catalog = "CustomerBuilder")
| public class CustomerType implements java.io.Serializable {
|
| private String id;
| private String name;
| private Set<Script> scripts = new HashSet<Script>(0);
|
| public CustomerType() {
| }
|
| public CustomerType(String id, String name) {
| this.id = id;
| this.name = name;
| }
| public CustomerType(String id, String name, Set<Script> scripts) {
| this.id = id;
| this.name = name;
| this.scripts = scripts;
| }
|
| @Id @GeneratedValue
| @Column(name = "ID", unique = true, nullable = false, length = 1)
| @NotNull
| @Length(max = 1)
| public String getId() {
| return this.id;
| }
|
| public void setId(String id) {
| this.id = id;
| }
|
| @Column(name = "NAME", nullable = false, length = 50)
| @NotNull
| @Length(max = 50)
| public String getName() {
| return this.name;
| }
|
| public void setName(String name) {
| this.name = name;
| }
| @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
| @JoinTable(name = "CUSTOMER_TYPE_SCRIPT",
| joinColumns={@JoinColumn(name = "CUSTOMER_TYPE_ID")},
| inverseJoinColumns={@JoinColumn(name = "SCRIPT_ID")})
| public Set<Script> getScripts() {
| return this.scripts;
| }
|
| public void setScripts(Set<Script> scripts) {
| this.scripts = scripts;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008763#4008763
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008763
More information about the jboss-user
mailing list