Java Reference
In-Depth Information
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String name;
// Field *NOT* persisted to the datastore
@NotPersistent
private String phone;
public Contact(String name, String phone) {
this.name = name;
this.phone = phone;
}
// Accessors - used by your application but not JDO
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}
Search WWH ::




Custom Search