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

public abstract class AbstractCRUDAction extends ActionSupport
AbstractCRUDAction.
See Also:
  • Constructor Details

    • AbstractCRUDAction

      public AbstractCRUDAction()
  • Method Details

    • getDao

      protected abstract Dao getDao()
    • getAvailableItems

      public Collection getAvailableItems()
    • getToDelete

      public String[] getToDelete()
    • setToDelete

      public void setToDelete(String[] toDelete)
    • list

      public String list() throws Exception
      Throws:
      Exception
    • delete

      public String delete() throws Exception
      Throws:
      Exception
    • fetch

      protected IdEntity fetch(Serializable tryId, IdEntity tryObject)
      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 for
      tryObject - 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.