Here is the ClientTransmittalVO class:

@Entity
  | 
  | @NamedQueries
  | ( {
  |             @NamedQuery(name = "findClientTransmittalByOfficeId", 
  |                             query = "select clientTransmittal from 
ClientTransmittalVO clientTransmittal " +
  |                             "join fetch clientTransmittal.office office " +
  |                             "where (office.id = :officeid and 
clientTransmittal.transdate=:filterDate) ")
  |                             
  |                             
  | })
  | @Table(name = "FBCLIENTTRANS")
  | @Name("clientTransmittal")
  | public class ClientTransmittalVO {
  | 
  |     private int id;
  |     private Date transdate;
  |     private String countycode;
  |     private Integer agentno;
  |     private String clientfirstname;
  |     private String clientlastname;
  |     private String receiptnumber;
  |     private Integer clientid;
  |     private ClientVO client;        
  |     private FBOffice office;
  |     
  |     private Set<ClientTransmittalLineItemVO> clientTransmittalLineItemVOs = 
new HashSet<ClientTransmittalLineItemVO>(
  |                     0);
  | 
  |     public ClientTransmittalVO() {
  |     }
  | 
  |     public ClientTransmittalVO(int id, String countycode) {
  |             this.id = id;
  |             this.countycode = countycode;
  |     }
  |     public ClientTransmittalVO(int id, Date transdate, String countycode,
  |                     Integer agentno, String clientfirstname, String 
clientlastname,
  |                     String receiptnumber, Integer clientid,
  |                     Set<ClientTransmittalLineItemVO> 
clientTransmittalLineItemVOs) {
  |             this.id = id;
  |             this.transdate = transdate;
  |             this.countycode = countycode;
  |             this.agentno = agentno;
  |             this.clientfirstname = clientfirstname;
  |             this.clientlastname = clientlastname;
  |             this.receiptnumber = receiptnumber;
  |             this.clientid = clientid;
  |             this.clientTransmittalLineItemVOs = 
clientTransmittalLineItemVOs;
  |     }
  | 
  |     @Id
  |     @Column(name = "ID", unique = true, nullable = false)
  |     @NotNull @GeneratedValue
  |     public int getId() {
  |             return this.id;
  |     }
  | 
  |     @Temporal(TemporalType.DATE)
  |     @Basic @Column(name = "TRANSDATE")
  |     @NotNull
  |     public Date getTransdate() {
  |             return this.transdate;
  |     }
  | 
  |     @Column(name = "COUNTYCODE", nullable = false, length = 5)
  |     @NotNull
  |     @Length(max = 5)
  |     public String getCountycode() {
  |             return this.countycode;
  |     }
  | 
  |     @Column(name = "AGENTNO")
  |     public Integer getAgentno() {
  |             return this.agentno;
  |     }
  | 
  |     @Column(name = "CLIENTFIRSTNAME", length = 50)
  |     @Length(max = 50)
  |     public String getClientfirstname() {
  |             return this.clientfirstname;
  |     }
  | 
  |     @Column(name = "CLIENTLASTNAME", length = 50)
  |     @Length(max = 50)
  |     public String getClientlastname() {
  |             return this.clientlastname;
  |     }
  | 
  |     @Column(name = "RECEIPTNUMBER", length = 10)
  |     @Length(max = 10)
  |     public String getReceiptnumber() {
  |             return this.receiptnumber;
  |     }
  | 
  |     @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy 
= "clientTransmittal")
  |     @OrderBy(value="lineitemid")
  |     @Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN) 
//hibernate annotation, not jpa
  |     public Set<ClientTransmittalLineItemVO> getClientTransmittalLineItems() 
{
  |             return this.clientTransmittalLineItemVOs;
  |     }
  | 
  |     @ManyToOne(cascade = {CascadeType.MERGE})
  |     @JoinColumn(name = "CLIENTID", nullable = false)
  |     @NotNull
  |     public ClientVO getClient() {
  |             return client;
  |     }
  | 
  |     @ManyToOne(fetch=FetchType.EAGER)
  |     @JoinColumn(name="OFFICEID")
  |     public FBOffice getOffice() {
  |             return office;
  |     }
  | 
  |     public void setId(int id) {
  |             this.id = id;
  |     }
  | 
  |     public void setTransdate(Date transdate) {
  |             this.transdate = transdate;
  |     }
  | 
  | 
  | 
  |     public void setCountycode(String countycode) {
  |             this.countycode = countycode;
  |     }
  | 
  | 
  |     public void setAgentno(Integer agentno) {
  |             this.agentno = agentno;
  |     }
  | 
  | 
  |     public void setClientfirstname(String clientfirstname) {
  |             this.clientfirstname = clientfirstname;
  |     }
  | 
  |     public void setClientlastname(String clientlastname) {
  |             this.clientlastname = clientlastname;
  |     }
  | 
  |     public void setReceiptnumber(String receiptnumber) {
  |             this.receiptnumber = receiptnumber;
  |     }
  | 
  | 
  |     public void setClientTransmittalLineItems(
  |                     Set<ClientTransmittalLineItemVO> 
clientTransmittalLineItemVOs) {
  |             this.clientTransmittalLineItemVOs = 
clientTransmittalLineItemVOs;
  |     }
  | 
  |     @Transient
  |     public List<ClientTransmittalLineItemVO> getLineItemsList()
  |     {
  |             List<ClientTransmittalLineItemVO> list = new 
ArrayList<ClientTransmittalLineItemVO>(getClientTransmittalLineItems());
  |             return list;
  |     
  |     }       
  | 
  |     public void setClient(ClientVO client) {
  |             this.client = client;
  |     }
  |     
  |     @Transient
  |     public void addLineItem(ClientTransmittalLineItemVO lineItem)
  |     {
  |             clientTransmittalLineItemVOs.add(lineItem);
  |             lineItem.setClientTransmittal(this);
  |     }
  | 
  |     @Transient
  |     public void removeLineItem(ClientTransmittalLineItemVO lineItem)
  |     {
  |             //clientTransmittalLineItemVOs.add(lineItem);
  |             clientTransmittalLineItemVOs.remove(lineItem);
  |             //lineItem.setClientTransmittal(this);
  |     }
  | 
  |     public void setOffice(FBOffice office) {
  |             this.office = office;
  |     }
  | 
  |     @Override
  |     public int hashCode() {
  |             final int PRIME = 31;
  |             int result = 1;
  |             result = PRIME * result + id;
  |             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 ClientTransmittalVO other = (ClientTransmittalVO) obj;
  |             if (id != other.id)
  |                     return false;
  |             return true;
  |     }
  | }

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

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

Reply via email to