Class AbstractDAO

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.sql.Connection conn  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractDAO​(java.sql.Connection conn, NFEModel model)
      Creates an AbstractDAO with the specified connection and model.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void close​(java.sql.ResultSet resultSet)  
      protected void close​(java.sql.Statement statement)  
      protected void execute​(java.sql.CallableStatement statement, java.lang.String sql)  
      protected boolean execute​(java.sql.PreparedStatement statement, java.lang.String sql)  
      protected java.sql.ResultSet executeQuery​(java.sql.PreparedStatement statement, java.lang.String sql)  
      protected int executeUpdate​(java.sql.PreparedStatement statement, java.lang.String sql)  
      java.sql.Connection getConnection()
      Returns the connection.
      NFEModel getModel()
      Returns the model.
      SQLValidator getSQLValidator()
      Returns the SQLValidator
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • conn

        protected java.sql.Connection conn
    • Constructor Detail

      • AbstractDAO

        public AbstractDAO​(java.sql.Connection conn,
                           NFEModel model)
        Creates an AbstractDAO with the specified connection and model.
        Parameters:
        conn - connection
        model - model
    • Method Detail

      • getConnection

        public java.sql.Connection getConnection()
        Returns the connection.
        Returns:
        connection
      • getModel

        public NFEModel getModel()
        Returns the model.
        Returns:
        model
      • getSQLValidator

        public SQLValidator getSQLValidator()
        Returns the SQLValidator
        Returns:
        sqlValidator
      • close

        protected void close​(java.sql.Statement statement)
      • close

        protected void close​(java.sql.ResultSet resultSet)
      • executeUpdate

        protected int executeUpdate​(java.sql.PreparedStatement statement,
                                    java.lang.String sql)
                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • execute

        protected void execute​(java.sql.CallableStatement statement,
                               java.lang.String sql)
                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • execute

        protected boolean execute​(java.sql.PreparedStatement statement,
                                  java.lang.String sql)
                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • executeQuery

        protected java.sql.ResultSet executeQuery​(java.sql.PreparedStatement statement,
                                                  java.lang.String sql)
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException