-
Notifications
You must be signed in to change notification settings - Fork 0
How to create a model class by yourself
Häbu edited this page Nov 13, 2017
·
8 revisions
Define a Data-Class in style of a POJO (Plain old Java-Object). The only Methods to write into this class are getters and setters of the Properties
In the Model-Controller the logic is stored and here happens the magic ;). The Model-Controller must extend the Parent-Controller, because the Parent-Controller holds the executor, which handels the interaction with the database. To interact with the database you just need to call the method 'executeQuery' with the given executor and you will get a result with Type you gave as parameter.
In a Query-Class you only define constants with Prepared-Statements.
In the DataObjectMapper you must map the results of the queries of your object to the right properties in an DataObject.