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 CompanyFactoryAnnotatedJPAAppPM
   30           extends CompanyFactoryAbstractImpl
   31           implements CompanyFactoryNewInstance {
   32       
   33       /**
   34        * Creates a new instance of CompanyFactoryAnnotatedPMFieldClass
   35        */
   36       public CompanyFactoryAnnotatedJPAAppPM(PersistenceManager pm) {
   37           super(pm);
   38       }
   39       
   40       public Class[] getTearDownClasses() {
   41           return new Class[] {
   42               JPAAppDentalInsurance.class,
   43               JPAAppMedicalInsurance.class,
   44               JPAAppPartTimeEmployee.class,
   45               JPAAppFullTimeEmployee.class,
   46               JPAAppProject.class,
   47               JPAAppDepartment.class,
   48               JPAAppCompany.class,
   49               JPAAppAddress.class
   50           };
   51       }
   52       
   53       public IAddress newAddress() {
   54           return (IAddress)pm.newInstance(JPAAppAddress.class);
   55       }
   56       
   57       public ICompany newCompany() {
   58           return (ICompany)pm.newInstance(JPAAppCompany.class);
   59       }
   60       
   61       public IDentalInsurance newDentalInsurance() {
   62           return (IDentalInsurance)pm.newInstance(JPAAppDentalInsurance.class);
   63       }
   64       
   65       public IDepartment newDepartment() {
   66           return (IDepartment)pm.newInstance(JPAAppDepartment.class);
   67       }
   68       
   69       public IFullTimeEmployee newFullTimeEmployee() {
   70           return (IFullTimeEmployee)pm.newInstance(JPAAppFullTimeEmployee.class);
   71       }
   72       
   73       public IMedicalInsurance newMedicalInsurance() {
   74           return (IMedicalInsurance)pm.newInstance(JPAAppMedicalInsurance.class);
   75       }
   76       
   77       public IPartTimeEmployee newPartTimeEmployee() {
   78           return (IPartTimeEmployee)pm.newInstance(JPAAppPartTimeEmployee.class);
   79       }
   80       
   81       public IProject newProject() {
   82           return (IProject)pm.newInstance(JPAAppProject.class);
   83       }
   84   }

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