This is the code for the bean that #currentItem refers to:

package halvor.pojo;
  | 
  | // Generated Dec 11, 2006 11:02:45 AM by Hibernate Tools 3.2.0.beta8
  | 
  | import java.util.HashSet;
  | import java.util.Set;
  | 
  | import javax.persistence.CascadeType;
  | import javax.persistence.Column;
  | import javax.persistence.Entity;
  | import javax.persistence.FetchType;
  | import javax.persistence.GeneratedValue;
  | import javax.persistence.Id;
  | import javax.persistence.JoinColumn;
  | import javax.persistence.ManyToOne;
  | import javax.persistence.NamedNativeQueries;
  | import javax.persistence.NamedNativeQuery;
  | import javax.persistence.OneToMany;
  | import javax.persistence.Table;
  | import org.hibernate.annotations.GenericGenerator;
  | import org.jboss.seam.annotations.Name;
  | 
  | /**
  |  * Item generated by hbm2java
  |  */
  | @Entity
  | @Table(name = "item", catalog = "nrg2", uniqueConstraints = {})
  | @Name("item")
  | @NamedNativeQueries({
  |             @NamedNativeQuery(
  |                     name="itemSearch",
  |                     query="select distinct i.*, s.itemCode from item i left 
join itemSearch s on i.itemId = s.itemId where description like :searchPattern 
or i.itemId like :searchPattern or s.itemCode = :searchTerm",
  |                     resultClass=Item.class
  |             )
  | })
  | public class Item implements java.io.Serializable {
  | 
  |     // Fields    
  | 
  |     private String itemId;
  | 
  |     private Catalogue catalogue;
  | 
  |     private String description;
  | 
  |     private String stock;
  | 
  |     private int lead;
  | 
  |     private String note;
  | 
  |     private Set<Line> lines = new HashSet<Line>(0);
  | 
  |     private Set<ItemSearch> itemSearchs = new HashSet<ItemSearch>(0);
  | 
  |     private Set<Price> prices = new HashSet<Price>(0);
  | 
  |     // Constructors
  | 
  |     /** default constructor */
  |     public Item() {
  |     }
  | 
  |     /** minimal constructor */
  |     public Item(Catalogue catalogue, String description, String stock, int 
lead) {
  |             this.catalogue = catalogue;
  |             this.description = description;
  |             this.stock = stock;
  |             this.lead = lead;
  |     }
  | 
  |     /** full constructor */
  |     public Item(Catalogue catalogue, String description, String stock,
  |                     int lead, String note, Set<Line> lines,
  |                     Set<ItemSearch> itemSearchs, Set<Price> prices) {
  |             this.catalogue = catalogue;
  |             this.description = description;
  |             this.stock = stock;
  |             this.lead = lead;
  |             this.note = note;
  |             this.lines = lines;
  |             this.itemSearchs = itemSearchs;
  |             this.prices = prices;
  |     }
  | 
  |     // Property accessors
  |     @GenericGenerator(name = "generator", strategy = "increment", 
parameters = {})
  |     @Id
  |     @GeneratedValue(generator = "generator")
  |     @Column(name = "itemId", unique = true, nullable = false, insertable = 
true, updatable = true, length = 30)
  |     public String getItemId() {
  |             return this.itemId;
  |     }
  | 
  |     public void setItemId(String itemId) {
  |             this.itemId = itemId;
  |     }
  | 
  |     @ManyToOne(cascade = {}, fetch = FetchType.LAZY)
  |     @JoinColumn(name = "catalogueId", unique = false, nullable = false, 
insertable = true, updatable = true)
  |     public Catalogue getCatalogue() {
  |             return this.catalogue;
  |     }
  | 
  |     public void setCatalogue(Catalogue catalogue) {
  |             this.catalogue = catalogue;
  |     }
  | 
  |     @Column(name = "description", unique = false, nullable = false, 
insertable = true, updatable = true)
  |     public String getDescription() {
  |             return this.description;
  |     }
  | 
  |     public void setDescription(String description) {
  |             this.description = description;
  |     }
  | 
  |     @Column(name = "stock", unique = false, nullable = false, insertable = 
true, updatable = true, length = 5)
  |     public String getStock() {
  |             return this.stock;
  |     }
  | 
  |     public void setStock(String stock) {
  |             this.stock = stock;
  |     }
  | 
  |     @Column(name = "lead", unique = false, nullable = false, insertable = 
true, updatable = true)
  |     public int getLead() {
  |             return this.lead;
  |     }
  | 
  |     public void setLead(int lead) {
  |             this.lead = lead;
  |     }
  | 
  |     @Column(name = "note", unique = false, nullable = true, insertable = 
true, updatable = true)
  |     public String getNote() {
  |             return this.note;
  |     }
  | 
  |     public void setNote(String note) {
  |             this.note = note;
  |     }
  | 
  |     @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, 
mappedBy = "item")
  |     public Set<Line> getLines() {
  |             return this.lines;
  |     }
  | 
  |     public void setLines(Set<Line> lines) {
  |             this.lines = lines;
  |     }
  | 
  |     @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, 
mappedBy = "item")
  |     public Set<ItemSearch> getItemSearchs() {
  |             return this.itemSearchs;
  |     }
  | 
  |     public void setItemSearchs(Set<ItemSearch> itemSearchs) {
  |             this.itemSearchs = itemSearchs;
  |     }
  | 
  |     @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, 
mappedBy = "item")
  |     public Set<Price> getPrices() {
  |             return this.prices;
  |     }
  | 
  |     public void setPrices(Set<Price> prices) {
  |             this.prices = prices;
  |     }
  | 
  | 
  | }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993321#3993321

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993321
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to