Save This Page
Home » jdo2-tck-2.3-ea-src » org.apache.jdo.tck.pc.companyAnnotatedJPA » [javadoc | source]
    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   
   18   package org.apache.jdo.tck.pc.companyAnnotatedJPA;
   19   
   20   import javax.jdo.PersistenceManager;
   21   import org.apache.jdo.tck.pc.company;
   22   
   23   /*
   24    * CompanyFactoryAnnotatedPMFieldClass.java
   25    *
   26    * This class uses the PersistenceManager.newInstance method with the concrete
   27    * class as a parameter.
   28    */
   29   public class CompanyFactoryAnnotatedJPAAppConcrete
   30           extends CompanyFactoryAbstractImpl {
   31       
   32       PersistenceManager pm = null;
   33       
   34       /**
   35        * Creates a new instance of CompanyFactoryAnnotatedPMFieldClass
   36        */
   37       public CompanyFactoryAnnotatedJPAAppConcrete(PersistenceManager pm) {
   38           super(pm);
   39           this.pm = pm;        
   40       }
   41       
   42       public Class[] getTearDownClasses() {
   43           return new Class[] {
   44               JPAAppDentalInsurance.class,
   45               JPAAppMedicalInsurance.class,
   46               JPAAppPartTimeEmployee.class,
   47               JPAAppFullTimeEmployee.class,
   48               JPAAppProject.class,
   49               JPAAppDepartment.class,
   50               JPAAppCompany.class,
   51               JPAAppAddress.class
   52           };
   53       }
   54       
   55       public IAddress newAddress() {
   56           return (IAddress) new JPAAppAddress();
   57       }
   58       
   59       public ICompany newCompany() {
   60           return (ICompany) new JPAAppCompany();
   61       }
   62       
   63       public IDentalInsurance newDentalInsurance() {
   64           return (IDentalInsurance) new JPAAppDentalInsurance();
   65       }
   66       
   67       public IDepartment newDepartment() {
   68           return (IDepartment) new JPAAppDepartment();
   69       }
   70       
   71       public IFullTimeEmployee newFullTimeEmployee() {
   72           return (IFullTimeEmployee) new JPAAppFullTimeEmployee();
   73       }
   74       
   75       public IMedicalInsurance newMedicalInsurance() {
   76           return (IMedicalInsurance) new JPAAppMedicalInsurance();
   77       }
   78       
   79       public IPartTimeEmployee newPartTimeEmployee() {
   80           return (IPartTimeEmployee) new JPAAppPartTimeEmployee();
   81       }
   82       
   83       public IProject newProject() {
   84           return (IProject) new JPAAppProject();
   85       }
   86   }

Save This Page
Home » jdo2-tck-2.3-ea-src » org.apache.jdo.tck.pc.companyAnnotatedJPA » [javadoc | source]