خرید بک لینک

سلام

دو کلاس دارم که *** کلاس Subscriber را توسعه میده. primary key که برای این دو جدول به کار میره به صورت composite است. وقتی که فایل hbm را می سازم، در زمانی که session ساخته میشه خطا میده.


public class Subscriber implements java.io.Serializable {
private SubscriberId id;
private SubscriberType subscriberType;
private *** ***;
private String code;
private String account;
private String mnemonic;
private String region;
private String userAddress;
private String name;
...
}

public class *** extends Subscriber implements java.io.Serializable {

private SubscriberId id;
private Subscriber subscriber;
private long firstSsi;
private long lastSsi;
...
}

public class SubscriberId implements java.io.Serializable {
private long ssi;
private String ccnc;

public SubscriberId() {
}

public SubscriberId(long ssi, String ccnc) {
this.ssi = ssi;
this.ccnc = ccnc;
}

...

public boolean equals(Object other) {
if ((this == other))
retu true;
if ((other == null))
retu false;
if (!(other instanceof SubscriberId))
retu false;
SubscriberId castOther = (SubscriberId) other;

retu (this.getSsi() == castOther.getSsi())
&& ((this.getCcnc() == castOther.getCcnc()) || (this.getCcnc() != null
&& castOther.getCcnc() != null && this.getCcnc()
.equals(castOther.getCcnc())));
}

public int hashCode() {
int result = 17;

result = 37 * result + (int) this.getSsi();
result = 37 * result
+ (getCcnc() == null ? 0 : this.getCcnc().hashCode());
retu result;
}

ممنون میشم بفرماید فایل HBM برای کلاس *** را چطور ایجاد کنم.
با تشکر

برچسب: نویسنده: محمد رضا جوادیان تاريخ: يکشنبه 12 ارديبهشت 1395 ساعت: 14:00

صفحه بندی