Reputation: 679
I created a simple project with GAE and i put in my package 'model' the PMF.java (Persistence Manager Factory Class) and a class (Employee.java) that i can show you here:
@PersistenceCapable
public class Employee {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String firstName;
@Persistent
private String lastName;
@Persistent
private Date hireDate;
public Employee(String firstName, String lastName, Date hireDate) {
this.firstName = firstName;
this.lastName = lastName;
this.hireDate = hireDate;
}
// Accessors for the fields. JDO doesn't use these, but your application does.
public Key getKey() {
return key;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Date getHireDate() {
return hireDate;
}
public void setHireDate(Date hireDate) {
this.hireDate = hireDate;
}
}
When i click on Google->Generate Cloud Enpoint Client Library, i receive the following error message:
Error in Generating API: this project does not have cloud endpoint classes
. What does it mean? Thank you so much
Upvotes: 0
Views: 528
Reputation: 8806
You have done the first part i.e. created your model.
When you try to generate the Cloud Endpoint Client Library, the tool is look for Java classes that are annotated with the @API annotation, so that it knows which classes are your endpoints.
What you should try is the following series of steps :
Employee
Employee
by simply right clicking on the class in the Project and selecting Google -> Generate Cloud Endpoint class. This will generate the Endpoint class EmployeeEndpoint along with PMF. java.Upvotes: 1