001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: Technician.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.tests.common.ejbs.entity.entitytest00;
025:
026: import javax.persistence.DiscriminatorValue;
027: import javax.persistence.Embedded;
028: import javax.persistence.Entity;
029: import javax.persistence.EnumType;
030: import javax.persistence.Enumerated;
031: import javax.persistence.SecondaryTable;
032: import javax.persistence.SecondaryTables;
033: import javax.persistence.Transient;
034:
035: /**
036: * The technician.
037: * @author Gisele Pinheiro Souza
038: * @author Eduardo Studzinski Estima de Castro
039: *
040: */
041: @Entity
042: @DiscriminatorValue("technician")
043: @SecondaryTables({@SecondaryTable(name="technicianDetails"),@SecondaryTable(name="bankingData")})
044: public class Technician extends Person {
045:
046: /**
047: * Serial version.
048: */
049: private static final long serialVersionUID = -1732670933017289750L;
050:
051: /**
052: * The type of contract.
053: * @author Gisele Pinheiro Souza
054: * @author Eduardo Studzinski Estima de Castro
055: *
056: */
057: public enum ContractType {
058: CDD, CDI, INTERNSHIP
059: }
060:
061: /**
062: * The current work place.
063: */
064: private String place;
065:
066: /**
067: * The contratc type.
068: */
069: private ContractType contract;
070:
071: /**
072: * The telephone number.
073: */
074: private Telephone phone;
075:
076: /**
077: * Returns the telephone number.
078: * @return the telephone.
079: */
080: @Embedded
081: public Telephone getPhone() {
082: return phone;
083: }
084:
085: /**
086: * Sets the telephone number.
087: * @param phone the phone number.
088: */
089: public void setPhone(final Telephone phone) {
090: this .phone = phone;
091: }
092:
093: /**
094: * Returns the contract type.
095: * @return the contract type.
096: */
097: @Enumerated(EnumType.ORDINAL)
098: public ContractType getContract() {
099: return contract;
100: }
101:
102: /**
103: * Sets the contract type.
104: * @param contract the contract type.
105: */
106: public void setContract(final ContractType contract) {
107: this .contract = contract;
108: }
109:
110: /**
111: * Returns the current work place.
112: * @return the work place.
113: */
114: @Transient
115: public String getPlace() {
116: return place;
117: }
118:
119: /**
120: * Sets the current work place.
121: * @param place the work place.
122: */
123: public void setPlace(final String place) {
124: this.place = place;
125: }
126:
127: }
|