/***
 * Excerpted from "Domain-Driven Design Using Naked Objects",
 * published by The Pragmatic Bookshelf.
 * Copyrights apply to this code. It may not be used to create training material, 
 * courses, books, articles, and the like. Contact us if you are in doubt.
 * We make no guarantees that this code is fit for any purpose. 
 * Visit http://www.pragmaticprogrammer.com/titles/dhnako for more book information.
***/
package com.pragprog.dhnako.carserv.dom.employee;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import org.nakedobjects.applib.annotation.Disabled;
import org.nakedobjects.applib.annotation.MemberOrder;

import com.pragprog.dhnako.carserv.dom.person.PersonRole;

@NamedQueries({
	@NamedQuery(
			name="findEmployeeByUserId", 
			query="from Employee where userId=:userId")
})
@Entity
@DiscriminatorValue("EMP")
public class Employee extends PersonRole {


	// {{ UserId
	private String userId;

	@Disabled
	@MemberOrder(sequence = "1.1.7")
	public String getUserId() {
		return userId;
	}

	public void setUserId(final String userId) {
		this.userId = userId;
	}
	// }}


	// {{ HourlyChargeRate
	private Integer hourlyChargeRate;

	@MemberOrder(sequence = "1.2")
	public Integer getHourlyChargeRate() {
		return hourlyChargeRate;
	}

	public void setHourlyChargeRate(final Integer hourlyChargeRate) {
		this.hourlyChargeRate = hourlyChargeRate;
	}
	// }}

}
