The name of this question is jsf_dao_interface
Hello and Thank you in advance for any assistance.
System info:
netbeans,glassfish,MySQL
The Purpose of this post is:
I am trying to learn to use an interface. I was wondering if someone was familiar with using and or had info on using DAO (data access object) classes.
The functionality of this code is:
The Model beans define the properties that must be saved into the database.
View beans extend the model beans with UI-specific code: actions, validates, etc.
JSF creates instances of the view beans as specified in the faces-config.xml file, but the persistence layer of the example application works with model beans.
Therefore, the application needs a utility method like ModelUtils.copy(), which copies the properties of the view beans instantiated by JSF into the model objects created by the persistence layer, and vice-versa.
The ModelUtils class also lets you get the model resources (such as configuration parameters, SQL statements, and error messages) from a resource bundle named ModelResources.
Finally, ModelUtils has a getLoggedInDAO() method that returns an instance of the LoginDAO interface that defines the methods for selecting, inserting, updating and deleting Subscriber objects from/into the relational database.
The data access methods are called from the action methods of the view beans.
Each action method is bound to a submit button in a
JSP page
When the user clicks the button, the Web browser sends the form data to the server.
The JSF framework validates the form data
and returns the form to the user if there are any errors.
Otherwise, the valid form data is stored into the properties of the managed bean, and JSF calls the action method that is bound to the clicked button.
My question is:
Could someone supply some examples or links to examples of the use of this structure? I only have one example and it uses Oracle and that is matters even more confusing.
The errors related to this code are:
Code description: JDBCLoginDAO.java (the code is a starting structure with many errors. Future questions related will be presented. So I can understand how to correctly write my application specific code).
Thanks again.
-ceyesumma
Note:
………………………………………………………………………………………………
Code description