All,
I have two classes 1. FinancialAccountId and FinancialAccount.
The FinancialAccountId has a composite key:accountnumber,fundname,taxid
I keep getting 'could not find getter for texid in FinancialAccount.
Why is this:
Code:
package mybeans;
// Generated May 23, 2008 3:57:58 PM by Hibernate Tools 3.2.1.GA
/**
* FinancialAccountId generated by hbm2java
*/
public class FinancialAccountId implements java.io.Serializable {
private String accountnumber;
private String fundname;
private String taxid;
public FinancialAccountId() {
}
public FinancialAccountId(String accountnumber, String fundname,
String taxid) {
this.accountnumber = accountnumber;
this.fundname = fundname;
this.taxid = taxid;
}
public String getAccountnumber() {
return this.accountnumber;
}
public void setAccountnumber(String accountnumber) {
this.accountnumber = accountnumber;
}
public String getFundname() {
return this.fundname;
}
public void setFundname(String fundname) {
this.fundname = fundname;
}
public String getTaxid() {
return this.taxid;
}
public void setTaxid(String taxid) {
this.taxid = taxid;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof FinancialAccountId))
return false;
FinancialAccountId castOther = (FinancialAccountId) other;
return ((this.getAccountnumber() == castOther.getAccountnumber()) || (this
.getAccountnumber() != null
&& castOther.getAccountnumber() != null && this
.getAccountnumber().equals(castOther.getAccountnumber())))
&& ((this.getFundname() == castOther.getFundname()) || (this
.getFundname() != null
&& castOther.getFundname() != null && this
.getFundname().equals(castOther.getFundname())))
&& ((this.getTaxid() == castOther.getTaxid()) || (this
.getTaxid() != null
&& castOther.getTaxid() != null && this.getTaxid()
.equals(castOther.getTaxid())));
}
public int hashCode() {
int result = 17;
result = 37
* result
+ (getAccountnumber() == null ? 0 : this.getAccountnumber()
.hashCode());
result = 37 * result
+ (getFundname() == null ? 0 : this.getFundname().hashCode());
result = 37 * result
+ (getTaxid() == null ? 0 : this.getTaxid().hashCode());
return result;
}
}
Code:
package mybeans;
// Generated May 23, 2008 3:57:58 PM by Hibernate Tools 3.2.1.GA
import java.math.BigDecimal;
/**
* FinancialAccount generated by hbm2java
*/
public class FinancialAccount implements java.io.Serializable {
private FinancialAccountId id;
private String dealernumber;
private String accountname;
private String branchnumber;
private String establisheddate;
private String lastmaintenancedate;
private String accounttype;
private String address;
private String state;
private String zipcode;
private String swp;
private String nav;
private String interestedparty;
private String repid;
private BigDecimal balance;
private String subaccount;
private String cusip;
public FinancialAccount() {
}
public FinancialAccount(FinancialAccountId id) {
this.id = id;
}
public FinancialAccount(FinancialAccountId id, String dealernumber,
String accountname, String branchnumber, String establisheddate,
String lastmaintenancedate, String accounttype, String address,
String state, String zipcode, String swp, String nav,
String interestedparty, String repid, BigDecimal balance,
String subaccount, String cusip) {
this.id = id;
this.dealernumber = dealernumber;
this.accountname = accountname;
this.branchnumber = branchnumber;
this.establisheddate = establisheddate;
this.lastmaintenancedate = lastmaintenancedate;
this.accounttype = accounttype;
this.address = address;
this.state = state;
this.zipcode = zipcode;
this.swp = swp;
this.nav = nav;
this.interestedparty = interestedparty;
this.repid = repid;
this.balance = balance;
this.subaccount = subaccount;
this.cusip = cusip;
}
public FinancialAccountId getId() {
return this.id;
}
public void setId(FinancialAccountId id) {
this.id = id;
}
public String getDealernumber() {
return this.dealernumber;
}
public void setDealernumber(String dealernumber) {
this.dealernumber = dealernumber;
}
public String getAccountname() {
return this.accountname;
}
public void setAccountname(String accountname) {
this.accountname = accountname;
}
public String getBranchnumber() {
return this.branchnumber;
}
public void setBranchnumber(String branchnumber) {
this.branchnumber = branchnumber;
}
public String getEstablisheddate() {
return this.establisheddate;
}
public void setEstablisheddate(String establisheddate) {
this.establisheddate = establisheddate;
}
public String getLastmaintenancedate() {
return this.lastmaintenancedate;
}
public void setLastmaintenancedate(String lastmaintenancedate) {
this.lastmaintenancedate = lastmaintenancedate;
}
public String getAccounttype() {
return this.accounttype;
}
public void setAccounttype(String accounttype) {
this.accounttype = accounttype;
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getState() {
return this.state;
}
public void setState(String state) {
this.state = state;
}
public String getZipcode() {
return this.zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getSwp() {
return this.swp;
}
public void setSwp(String swp) {
this.swp = swp;
}
public String getNav() {
return this.nav;
}
public void setNav(String nav) {
this.nav = nav;
}
public String getInterestedparty() {
return this.interestedparty;
}
public void setInterestedparty(String interestedparty) {
this.interestedparty = interestedparty;
}
public String getRepid() {
return this.repid;
}
public void setRepid(String repid) {
this.repid = repid;
}
public BigDecimal getBalance() {
return this.balance;
}
public void setBalance(BigDecimal balance) {
this.balance = balance;
}
public String getSubaccount() {
return this.subaccount;
}
public void setSubaccount(String subaccount) {
this.subaccount = subaccount;
}
public String getCusip() {
return this.cusip;
}
public void setCusip(String cusip) {
this.cusip = cusip;
}
}
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated May 23, 2008 3:57:58 PM by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
<class name="mybeans.FinancialAccount" table="FinancialAccount" catalog="brokerage">
<composite-id name="id" class="mybeans.FinancialAccountId">
<key-property name="accountnumber" type="string">
<column name="accountnumber" length="20" />
</key-property>
<key-property name="fundname" type="string">
<column name="fundname" length="25" />
</key-property>
<key-property name="taxid" type="string">
<column name="taxid" length="9" />
</key-property>
</composite-id>
<property name="dealernumber" type="string">
<column name="dealernumber" length="9" />
</property>
<property name="accountname" type="string">
<column name="accountname" length="20" />
</property>
<property name="branchnumber" type="string">
<column name="branchnumber" length="9" />
</property>
<property name="establisheddate" type="string">
<column name="establisheddate" length="8" />
</property>
<property name="lastmaintenancedate" type="string">
<column name="lastmaintenancedate" length="8" />
</property>
<property name="accounttype" type="string">
<column name="accounttype" length="1" />
</property>
<property name="address" type="string">
<column name="address" />
</property>
<property name="state" type="string">
<column name="state" length="7" />
</property>
<property name="zipcode" type="string">
<column name="zipcode" length="10" />
</property>
<property name="swp" type="string">
<column name="swp" length="1" />
</property>
<property name="nav" type="string">
<column name="nav" length="1" />
</property>
<property name="interestedparty" type="string">
<column name="interestedparty" length="1" />
</property>
<property name="repid" type="string">
<column name="repid" length="9" />
</property>
<property name="balance" type="big_decimal">
<column name="balance" precision="16" />
</property>
<property name="subaccount" type="string">
<column name="subaccount" length="5" />
</property>
<property name="cusip" type="string">
<column name="cusip" length="9" />
</property>
</class>
</hibernate-mapping>