Package org.entities

Examples of org.entities.Post


            PostsModel model = new PostsModel();


            if (request.getMethod().equals("POST")) {

                model.insertarPost(new Post(request.getParameter("texto")));


            }

            request.setAttribute("posts", model.obtenerPosts());
View Full Code Here


            Statement stm = this.db.getConnection().createStatement();
            String query = "SELECT * FROM posts";
            ResultSet rs = stm.executeQuery(query);

            while (rs.next()) {
                posts.add(new Post(rs.getInt("id"), rs.getString("texto")));
            }

        } catch (SQLException ex) {
            System.out.println("error SQL");
        }
View Full Code Here

TOP

Related Classes of org.entities.Post

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.