title: "Inconsistent datatypes: expected DATE got NUMBER" with DepartmentsImpl class
body: <p>I generate this class in the entity object departments and I create log table called departments_log(department_id number, entry_user number,
  entry_date date) when the method try to enter the deleted record into this table this error appears:</p>
  
  <blockquote>
    <p>(inconsistent datatypes: expected DATE got NUMBER)</p>
  </blockquote>
  
  <p>This is the do_dml method code :</p>
  
  <pre><code>if (operation == DML_DELETE) {
          FacesContext context = FacesContext.getCurrentInstance();
          UserInfo user =
              (UserInfo)context.getExternalContext().getSessionMap().get("userInfo");
          Number deptID = new Number(getDepartmentId());
          Date entryDate = new Date(Date.getCurrentDate());
          Number entryUser = new Number(user.getEmployeeId());
          String sql =
              "insert into departments_log (DEPARTMENT_ID,entry_user,entry_date) values (" +
              deptID + "," + entryUser + "," +
              entryDate + ")";
          PreparedStatement stm =
              getDBTransaction().createPreparedStatement(sql, 1);
          try {
              stm.executeUpdate(sql);
          } catch (SQLException f) {
              System.out.println("delete errore"+f.getMessage()+Date.getCurrentDate());
          }
      }
  </code></pre>