Inheritance concept in jpa
- by megala
I created one table using Inheritance concept to sore data into google app engine datastore.
It contained following coding but it shows error.How to user Inheritance concept.What error in my program
Program 1:
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class calender {
@Id
private String EmailId;
@Basic
private String CalName;
@Basic
public void setEmailId(String emailId) {
EmailId = emailId;
}
public String getEmailId() {
return EmailId;
}
public void setCalName(String calName) {
CalName = calName;
}
public String getCalName() {
return CalName;
}
public calender(String EmailId,String CalName)
{
this.EmailId=EmailId;
this.CalName=CalName;
}
}
program 2:
@Entity
public class method {
@Id
private String method;
public void setMethod(String method) {
this.method = method;
}
public String getMethod() {
return method;
}
public method(String method)
{
this.method=method;
}
}
My constraint is I want ouput like this
Calendertable coantain
Emailid
calenername
and method table contain
Emailid
method
How to achive this?
thanks inadvance.