KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > ipanema > accounting > ProductInfoFactory


1 /*
2  * Created on 02.11.2004
3  */

4 package com.nightlabs.ipanema.accounting;
5
6 import java.io.Serializable JavaDoc;
7
8 import com.nightlabs.ModuleException;
9 import com.nightlabs.ipanema.store.Product;
10
11 /**
12  * @author Marco Schulze - marco at nightlabs dot de
13  *
14  * @jdo.persistence-capable
15  * identity-type = "application"
16  * objectid-class = "com.nightlabs.ipanema.accounting.id.ProductInfoFactoryID"
17  * detachable = "true"
18  *
19  * @jdo.inheritance strategy = "new-table"
20  */

21 public abstract class ProductInfoFactory
22     implements Serializable JavaDoc
23 {
24
25     /**
26      * @jdo.field primary-key="true"
27      * @jdo.column length="100"
28      */

29     private String JavaDoc organisationID;
30
31     /**
32      * @jdo.field primary-key="true"
33      * @jdo.column length="100"
34      */

35     private String JavaDoc productInfoFactoryID;
36
37     protected ProductInfoFactory() { }
38     public ProductInfoFactory(String JavaDoc organisationID, String JavaDoc productInfoFactoryID)
39     {
40         if (organisationID == null)
41             throw new NullPointerException JavaDoc("organisationID");
42         this.organisationID = organisationID;
43         
44         if (productInfoFactoryID == null)
45             throw new NullPointerException JavaDoc("productInfoFactoryID");
46         this.productInfoFactoryID = productInfoFactoryID;
47     }
48
49     public abstract ProductInfo createProductInfo(
50             Product product, ProductInfo extendedProductInfo)
51         throws ModuleException;
52
53 }
54
Popular Tags