/*
 * ICESOFT COMMERCIAL SOURCE CODE LICENSE V 1.1
 *
 * The contents of this file are subject to the ICEsoft Commercial Source
 * Code License Agreement V1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the
 * License at
 * http://www.icesoft.com/license/commercial-source-v1.1.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations under
 * the License.
 *
 * Copyright 2009-2015 ICEsoft Technologies Canada, Corp. All Rights Reserved.
 */
package com.icesoft.faces.application.showcase.model.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>The Person class is used in many of the examples to show simple data
 * interactions in a business context.</p>
 *
 * @since 1.0
 */
public class Employee extends Person implements Serializable {

    public static final String DEPARTMENT_NAME_COLUMN = "departmentName";
    public static final String SUB_DEPARTMENT_NAME_COLUMN = "subDepartmentName";
    public static final String ID_COLUMN = "employeeId";
    public static final String SALARY_COLUMN = "salary";
    public static final String RESUME_COLUMN = "resume";

    // department names
    private String departmentName;
    private String subDepartmentName;
    // employee id
    protected int id;
    private boolean onProbation;
    protected Double salary;
    
    protected String resume;
    
    public String getClazz(){
    	return this.getClass().getSimpleName();
    }

    public String getResume() {
      return resume;
   }

   public void setResume(String resume) {
      this.resume = resume;
   }

    public boolean isOnProbation() {
        return onProbation;
    }

    public void setOnProbation(boolean onProbation) {
        this.onProbation = onProbation;
    }

    public Employee() {

    }

    public Employee(int id, String departmentName, String subDepartmentName,
          String firstName, String lastName, String phone, Date birthDate, boolean editable, Double salary) {
      super(firstName, lastName, phone, birthDate, editable);
      this.departmentName = departmentName;
      this.subDepartmentName = subDepartmentName;
      this.id = id;
      this.salary = salary;
   }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getSubDepartmentName() {
        return subDepartmentName;
    }

    public void setSubDepartmentName(String subDepartmentName) {
        this.subDepartmentName = subDepartmentName;
    }

    public String toString() {
        return firstName + " " + lastName;
    }
}
