Class ApplicationSearchViewLogic
- java.lang.Object
-
- com.group21.jobTracker.ui.applicationSearch.ApplicationSearchViewLogic
-
- All Implemented Interfaces:
Serializable
public class ApplicationSearchViewLogic extends Object implements Serializable
This class provides an interface for the logical operations between the CRUD view, its parts like the job editor form and the backend data, including fetching and saving jobs.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApplicationSearchViewLogic(ApplicationSearchView simpleCrudView)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelProduct()Method to cancel editing a jobvoideditJob(Jobs job)Method to edit a job from the Application Search page.voidenter(String jobId)Opens the form and clears its fields to make it ready for entering a new job if job id is null, otherwise loads the form with the data of the given job id.voidnewJob()Method to create a new job object for the form.voidrowSelected(Jobs job)Method for when a row is selected in the ApplicationSearch grid.voidsaveProduct(Jobs job)Method to save a job object from the Application Search page.
-
-
-
Constructor Detail
-
ApplicationSearchViewLogic
public ApplicationSearchViewLogic(ApplicationSearchView simpleCrudView)
Constructor- Parameters:
simpleCrudView- UI for the logic
-
-
Method Detail
-
cancelProduct
public void cancelProduct()
Method to cancel editing a job
-
enter
public void enter(String jobId)
Opens the form and clears its fields to make it ready for entering a new job if job id is null, otherwise loads the form with the data of the given job id.- Parameters:
jobId- id of the job to show in form
-
saveProduct
public void saveProduct(Jobs job)
Method to save a job object from the Application Search page.- Parameters:
job- object to save
-
editJob
public void editJob(Jobs job)
Method to edit a job from the Application Search page.- Parameters:
job- object to edit
-
newJob
public void newJob()
Method to create a new job object for the form.
-
rowSelected
public void rowSelected(Jobs job)
Method for when a row is selected in the ApplicationSearch grid.- Parameters:
job- object to edit when selected in the row
-
-