Class JKWebControllerWithOrmSupport<T>

Type Parameters:
T - the generic type
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JKRolesWebControllers, JKUserWebControllers

public abstract class JKWebControllerWithOrmSupport<T> extends JKWebControllerWithSqlDataAccess
The Class JKManagedBeanWithOrmSupport.
See Also:
  • Field Details

  • Constructor Details

    • JKWebControllerWithOrmSupport

      public JKWebControllerWithOrmSupport()
      Instantiates a new JK managed bean with orm support.
  • Method Details

    • addToDatabase

      public String addToDatabase()
      Adds the.
      Returns:
      the string
    • edit

      public String edit()
      Edits the.
      Returns:
      the string
    • saveToDatabase

      public String saveToDatabase()
      Save.
      Returns:
      the string
    • beforeInsert

      protected void beforeInsert()
      Before insert.
    • afterInsert

      protected void afterInsert()
      After insert.
    • beforeUpdate

      protected void beforeUpdate()
      Before update.
    • afterUpdate

      protected void afterUpdate()
      After update.
    • beforeDelete

      protected void beforeDelete()
      Before delete.
    • find

      public String find(int id)
      Find.
      Parameters:
      id - the id
      Returns:
      the string
    • getModelClass

      protected Class<T> getModelClass()
      Gets the model class.
      Returns:
      the model class
    • getModelList

      public List<T> getModelList()
      Gets the model list.
      Returns:
      the model list
    • deleteFromDatabase

      public String deleteFromDatabase()
      Delete.
      Returns:
      the string
    • afterDelete

      protected void afterDelete()
      After delete.
    • getIdValue

      public Integer getIdValue()
      Gets the id value.
      Returns:
      the id value
    • getIdValue

      protected Integer getIdValue(T model)
      Gets the id value.
      Parameters:
      model - the model
      Returns:
      the id value
    • getModel

      public T getModel()
      Gets the model.
      Returns:
      the model
    • createEmptyModel

      protected T createEmptyModel()
      Creates the empty model.
      Returns:
      the t
    • setModel

      public void setModel(T model)
      Sets the model.
      Parameters:
      model - the new model
    • getDataAccess

      protected JKObjectDataAccess getDataAccess()
      Gets the data access.
      Returns:
      the data access
    • reset

      public String reset()
      Reset.
      Returns:
      the string
    • resetWorkFlow

      protected void resetWorkFlow()
      Reset work flow.
    • isAlwaysRefreshList

      public boolean isAlwaysRefreshList()
      Checks if is always refresh list.
      Returns:
      true, if is always refresh list
    • setAlwaysRefreshList

      public void setAlwaysRefreshList(boolean alwaysRefreshList)
      Sets the always refresh list.
      Parameters:
      alwaysRefreshList - the new always refresh list
    • setIdValue

      public void setIdValue(Object value)
      Sets the id value.
      Parameters:
      value - the new id value
    • duplicate

      public String duplicate()
      Duplicate.
      Returns:
      the string
    • getEmptyModel

      public T getEmptyModel()
      Gets the empty model.
      Returns:
      the empty model
    • fill

      public String fill()
      Fill.
      Returns:
      the string
    • isAllowAdd

      public boolean isAllowAdd()
      Checks if is allow add.
      Returns:
      true, if is allow add
    • isAllowEdit

      public boolean isAllowEdit()
      Checks if is allow edit.
      Returns:
      true, if is allow edit
    • isAllowSave

      public boolean isAllowSave()
      Checks if is allow save.
      Returns:
      true, if is allow save
    • isAllowDelete

      public boolean isAllowDelete()
      Checks if is allow delete.
      Returns:
      true, if is allow delete
    • isAllowReset

      public boolean isAllowReset()
      Checks if is allow reset.
      Returns:
      true, if is allow reset
    • isAllowFill

      public boolean isAllowFill()
      Checks if is allow fill.
      Returns:
      true, if is allow fill
    • isEditMode

      public boolean isEditMode()
      Checks if is edits the mode.
      Returns:
      true, if is edits the mode
    • cancelEdit

      public void cancelEdit()
      Cancel edit.
    • isReadOnlyMode

      public boolean isReadOnlyMode()
      Checks if is read only mode.
      Returns:
      true, if is read only mode
    • getFilterList

      public List<T> getFilterList()
      Gets the filter list.
      Returns:
      the filter list
    • setFilterList2

      public void setFilterList2(List filterList2)
      Sets the filter list 2.
      Parameters:
      filterList2 - the new filter list 2
    • setFilterList

      public void setFilterList(List<T> filterList)
      Sets the filter list.
      Parameters:
      filterList - the new filter list
    • getFilterList2

      public List getFilterList2()
      Gets the filter list 2.
      Returns:
      the filter list 2
    • isConfirmReeset

      public boolean isConfirmReeset()
      Checks if is confirm reeset.
      Returns:
      true, if is confirm reeset
    • setConfirmReeset

      public void setConfirmReeset(boolean confirmReeset)
      Sets the confirm reeset.
      Parameters:
      confirmReeset - the new confirm reeset
    • getMode

      public ControllerMode getMode()
      Gets the mode.
      Returns:
      the mode
    • isEditTabular

      public boolean isEditTabular()
      Checks if is edits the tabular.
      Returns:
      true, if is edits the tabular
    • setEditTabular

      public void setEditTabular(boolean editTabular)
      Sets the edits the tabular.
      Parameters:
      editTabular - the new edits the tabular
    • saveAllToDatabase

      public void saveAllToDatabase()
      Save all.
    • add

      public String add()
      Adds the.
      Returns:
      the string
    • save

      public String save()
      Save.
      Returns:
      the string
    • saveAll

      public String saveAll()
      Save all.
      Returns:
      the string
    • delete

      public String delete()
      Delete.
      Returns:
      the string
    • getPayloads

      public List<PayloadModel> getPayloads()
      Gets the payloads.
      Returns:
      the payloads
    • setPayloads

      public void setPayloads(List<PayloadModel> payloads)
      Sets the payloads.
      Parameters:
      payloads - the new payloads
    • getWorkflowEntityName

      protected String getWorkflowEntityName()
      Gets the workflow entity name.
      Returns:
      the workflow entity name
    • isWorkflowAvialable

      public boolean isWorkflowAvialable()
      Checks if is workflow avialable.
      Returns:
      true, if is workflow avialable
    • getPayload

      public PayloadModel getPayload()
      Gets the payload.
      Returns:
      the payload
    • setPayload

      public void setPayload(PayloadModel payload)
      Sets the payload.
      Parameters:
      payload - the new payload
    • approvePayload

      public String approvePayload(int id)
      Approve payload.
      Parameters:
      id - the id
      Returns:
      the string
    • findPayload

      public PayloadModel findPayload(int id)
      Find payload.
      Parameters:
      id - the id
      Returns:
      the payload model
    • rejectPayload

      public String rejectPayload(int id)
      Reject payload.
      Parameters:
      id - the id
      Returns:
      the string
    • viewPayload

      public String viewPayload(int id)
      View payload.
      Parameters:
      id - the id
      Returns:
      the string
    • isInputDisabled

      public boolean isInputDisabled()
      Checks if is input disabled.
      Returns:
      true, if is input disabled
    • getOriginal

      public T getOriginal()
      Gets the original.
      Returns:
      the original
    • setOriginal

      public void setOriginal(T original)
      Sets the original.
      Parameters:
      original - the new original
    • isFieldModified

      public boolean isFieldModified(String name)
      Checks if is field modified.
      Parameters:
      name - the name
      Returns:
      true, if is field modified