Package healthwatcher.model.employee

Examples of healthwatcher.model.employee.Employee


    try {
      if (! request.isAuthorized()) {
        throw new InvalidSessionException();
      }

      Employee employee = (Employee) request
          .get(Login.EMPLOYEE);

      String[] keywords = { "##LOGIN##", "##NAME##",
          "##SERVLET_SERVER_PATH##", "##CLOSE##" };

      String[] newWords = { employee.getLogin(), employee.getName(),
          Constants.SERVLET_SERVER_PATH,
          HTMLCode.closeAdministrator() };
      //#if relacional
        out.println(Library.getFileListReplace(keywords, newWords, Constants.FORM_PATH + "UpdateEmployee.html"));
      //#endif
View Full Code Here


        String login = request.getInput("login");
        String password = request.getInput("password");       
        boolean status=false;
        try {
          Employee employee = facade.searchEmployee(login);
         
          //#if (loginsystem=="GoogleAuthentication")
            status=GoogleLogin.authenticate(login, password);
          //#endif
          //#if (loginsystem=="Database")
View Full Code Here

  }

  public void execute() throws Exception {
    PrintWriter out = response.getWriter();
   
    Employee employee;

    try {
      if (! request.isAuthorized()) {
        throw new InvalidSessionException();
      }

      // Complaint Normal
      String name = request.getInput("name");
      String login = request.getInput("login");
      String password = request.getInput("password");

      employee = new Employee(login, password, name);

      facade.insert(employee);

      out.println(HTMLCode.htmlPageAdministrator("Operation executed",
          "Employee inserted"));
View Full Code Here

    PrintWriter out = response.getWriter();

    String name = request.getInput("name");
    // String password = request.getParameter("password");
    String newPassword = request.getInput("newPassword");
    Employee employee = null;

    try {
      if (! request.isAuthorized()) {
        throw new InvalidSessionException();
      }

      employee = (Employee) request.get(Login.EMPLOYEE);

      employee.setName(name);
      if (!newPassword.equals("")) {
        employee.setPassword(newPassword);
      }

      out.println(HTMLCode.htmlPageAdministrator("Operation executed",
          "Employee updated"));
View Full Code Here

      throw new SQLPersistenceMechanismException(e.getMessage(),sql);
    }
  }

  public Employee search(String login) throws ObjectNotFoundException, RepositoryException {
    Employee employee = null;
    String sql = null;
    try {

      sql = "select * from scbs_funcionario where login='" + login + "'";

      Statement stmt = (Statement) this.pm.getCommunicationChannel();
      resultSet = stmt.executeQuery(sql);
      if (resultSet.next()) {
        employee = new Employee(resultSet.getString("login"), resultSet.getString("senha"),
            resultSet.getString("nome"));
      } else {
        System.out.println("not found " + login);
        throw new ObjectNotFoundException(ExceptionMessages.EXC_FALHA_PROCURA);
      }
View Full Code Here

      if (subject instanceof Complaint) {
        Complaint complaint = (Complaint) subject;
        updateComplaint(complaint);
       
      } else if (subject instanceof Employee) {
        Employee employee = (Employee) subject;
        updateEmployee(employee);
       
      } else if (subject instanceof HealthUnit) {
        HealthUnit healthUnit = (HealthUnit) subject;
        updateHealthUnit(healthUnit);
View Full Code Here

    String email = null;
    String descricao = null;
    Address enderecoSolicitante = null;
    String solicitante = null;
    String observation = null;
    Employee attendant = null;
    int situacao = 1;
    long timestamp = 0;

    try{
View Full Code Here

  }


  public Employee search(String login) throws ObjectNotFoundException, RepositoryException {
    PersistenceManager pm = (PersistenceManager) mp.getCommunicationChannel();
    Employee empregado = null;
    try{
      String query = ("select from "+Employee.class.getName()+" where login == "+login+"");
      List<Employee> employee = (List<Employee>) pm.newQuery(query).execute();
      empregado = employee.get(0);
    } catch(Exception e) {
View Full Code Here

    }
  }

  public Employee search(String login) throws ObjectNotFoundException {
    synchronized (this) {
      Employee response = null;
      int i = getIndex(login);
      if (i == index) {
        throw new ObjectNotFoundException("Employee not found");
      } else {
        response = vector[i];
View Full Code Here

      complaint.setDescricao(resultSet.getString("descricao"));
      complaint.setObservacao(resultSet.getString("observacao"));
      complaint.setEmail(resultSet.getString("email"));

      String funcionario = resultSet.getString("funcionario");
      Employee employee = null;
      if (funcionario != null && !funcionario.equalsIgnoreCase("null")) {
        employee = employeeRep.search(funcionario);
      }
      complaint.setAtendente(employee);
View Full Code Here

TOP

Related Classes of healthwatcher.model.employee.Employee

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.