Class AbstractCRUDAction
java.lang.Object
org.apache.struts2.ActionSupport
org.apache.struts2.showcase.action.AbstractCRUDAction
- All Implemented Interfaces:
Serializable,Action,ValidationAware,LocaleProvider,TextProvider,Validateable
- Direct Known Subclasses:
EmployeeAction,SkillAction
AbstractCRUDAction.
- See Also:
-
Field Summary
Fields inherited from class org.apache.struts2.ActionSupport
container -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondelete()protected IdEntityfetch(Serializable tryId, IdEntity tryObject) Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle.protected abstract DaogetDao()String[]list()voidsetToDelete(String[] toDelete) Methods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
-
Constructor Details
-
AbstractCRUDAction
public AbstractCRUDAction()
-
-
Method Details
-
getDao
-
getAvailableItems
-
getToDelete
-
setToDelete
-
list
- Throws:
Exception
-
delete
- Throws:
Exception
-
fetch
Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle.- Parameters:
tryId- The id to try to get persistent object fortryObject- The object, induced by first params invocation, possibly containing id to try to get persistent object for- Returns:
- The persistent object, if found. null otherwise.
-