001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.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: PersonEC.java 3845 2003-12-05 14:19:55Z legrasi $
023: * --------------------------------------------------------------------------
024: */
025:
026: /**
027: * This is an entity bean with "container managed persistence version 1.x".
028: * This bean is used to test an entity with an unknown primary key class at the development phase.
029: * @author Helene Joanin
030: */package org.objectweb.jonas.jtests.beans.fbasic;
031:
032: import java.rmi.RemoteException;
033: import java.sql.Connection;
034: import java.sql.PreparedStatement;
035: import java.sql.ResultSet;
036: import java.sql.SQLException;
037: import java.sql.Statement;
038: import java.util.Collection;
039: import java.util.Vector;
040: import javax.ejb.CreateException;
041: import javax.ejb.DuplicateKeyException;
042: import javax.ejb.EJBObject;
043: import javax.ejb.EJBException;
044: import javax.ejb.EntityBean;
045: import javax.ejb.EntityContext;
046: import javax.ejb.FinderException;
047: import javax.ejb.ObjectNotFoundException;
048: import javax.ejb.RemoveException;
049: import javax.naming.Context;
050: import javax.naming.InitialContext;
051: import javax.naming.NamingException;
052: import javax.sql.DataSource;
053: import javax.transaction.NotSupportedException;
054: import javax.transaction.Status;
055: import javax.transaction.SystemException;
056: import javax.transaction.UserTransaction;
057:
058: /**
059: *
060: */
061: public class PersonEC extends PersonEC2 implements EntityBean {
062:
063: // ------------------------------------------------------------------
064: // State of the bean (CMP v1)
065: // They must be public for Container Managed Persistence.
066: // ------------------------------------------------------------------
067: public Integer number;
068: public String name;
069:
070: // ------------------------------------------------------------------
071: // Accessors and setters implementation
072: // ------------------------------------------------------------------
073:
074: /**
075: * getNumber
076: */
077: public Integer getNumber() {
078:
079: return number;
080: }
081:
082: /**
083: * setNumber
084: */
085: public void setNumber(Integer num) {
086:
087: number = num;
088: }
089:
090: /**
091: * getName
092: */
093: public String getName() {
094:
095: return name;
096: }
097:
098: /**
099: * setName
100: */
101: public void setName(String s) {
102:
103: name = new String(s);
104: }
105:
106: }
|