KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > airsent > spec > customer > CustomerManagerFactory


1 /*
2  * Copyright (c) 1999-2001 Lutris Technologies, Inc. All Rights
3  * Reserved.
4  *
5  * This source code file is distributed by Lutris Technologies, Inc. for
6  * use only by licensed users of product(s) that include this source
7  * file. Use of this source file or the software that uses it is covered
8  * by the terms and conditions of the Lutris Enhydra Development License
9  * Agreement included with this product.
10  *
11  * This Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
12  * ANY KIND, either express or implied. See the License for the specific terms
13  * governing rights and limitations under the License.
14  *
15  * Contributor(s):
16  *
17  * $Id: CustomerManagerFactory.java,v 1.1 2004/08/16 09:33:18 slobodan Exp $
18  */

19 package com.lutris.airsent.spec.customer;
20
21
22
23 public class CustomerManagerFactory {
24     
25     /**
26      * Constructor can't be used.
27      */

28     private CustomerManagerFactory() {
29     }
30
31     /**
32      * Create a CustomerManager as state object/value object/data transfer object
33      */

34     public static CustomerManager getCustomerManager(String JavaDoc fullClassName){
35         
36         CustomerManager result = null;
37        
38         Class JavaDoc objectClass = null;
39
40         try {
41             // Create the value object
42

43       
44          objectClass = Class.forName(fullClassName);
45                                    
46           result = (CustomerManager)objectClass.newInstance();
47                
48                        
49                     
50       } catch (Exception JavaDoc ex) {
51             System.out.println("Error on creating the object" + ex);
52         }
53
54         return result;
55     }
56 }
Popular Tags