Methods Summary |
---|
public java.lang.String | delete()
if (toDelete != null) {
int count=0;
for (int i = 0, j=toDelete.length; i < j; i++) {
count = count + getDao().delete(toDelete[i]);
}
if (log.isDebugEnabled()) {
log.debug("AbstractCRUDAction - [delete]: " + count + " items deleted.");
}
}
return SUCCESS;
|
protected org.apache.struts2.showcase.model.IdEntity | fetch(java.io.Serializable tryId, org.apache.struts2.showcase.model.IdEntity tryObject)Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle.
IdEntity result = null;
if (tryId != null) {
result = getDao().get(tryId);
} else if (tryObject != null) {
result = getDao().get(tryObject.getId());
}
return result;
|
public java.util.Collection | getAvailableItems()
return availableItems;
|
protected abstract org.apache.struts2.showcase.dao.Dao | getDao()
|
public java.lang.String[] | getToDelete()
return toDelete;
|
public java.lang.String | list()
this.availableItems = getDao().findAll();
if (log.isDebugEnabled()) {
log.debug("AbstractCRUDAction - [list]: " + (availableItems !=null?""+availableItems.size():"no") + " items found");
}
return execute();
|
public void | setToDelete(java.lang.String[] toDelete)
this.toDelete = toDelete;
|