public void setReadOnly(boolean readOnly){
this.readOnly = readOnly;
log.debug("setting readOnly to "+readOnly);
}
public long getRequestId(){
return requestId;
}
public void setRequestId(long requestId){
this.requestId = requestId;
}
public void setDb(DB db){
this.db = db;
}
public boolean isReadOnly(){
return readOnly;
}
public abstract Object getModel();
}
public class MemberAction extends BaseAction implements ModelDriven,Preparable {
private Member model;
public Member getModel(){
return model;
}
public void prepare() throws Exception{
if(getRequestId() == 0){
model = new Member();
}else{
model = (Member) db.get(getRequestId);
}
}
}