01: /*
02: * Enhydra Java Application Server
03: * The Initial Developer of the Original Code is Lutris Technologies Inc.
04: * Portions created by Lutris are Copyright (C) 1997-2000 Lutris Technologies
05: * Inc.
06: * All Rights Reserved.
07: *
08: * The contents of this file are subject to the Enhydra Public License Version
09: * 1.0 (the "License"); you may not use this file except in compliance with the
10: * License. You may obtain a copy of the License at
11: * http://www.enhydra.org/software/license/epl.html
12: *
13: * Software distributed under the License is distributed on an "AS IS" basis,
14: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
15: * License for the specific language governing rights and limitations under the
16: * License.
17: *
18: *
19: */
20:
21: package golfShop.business.item;
22:
23: import golfShop.business.cart.CartItemQuery;
24:
25: import golfShop.spec.cart.*;
26:
27: /**
28: This object is the glue between the shopping cart, which needs an
29: object it can use to lookup Objectids, and the Item buiness objects,
30: which has a class method that can do just that.
31: */
32: public class ItemQuery implements CartItemQuery, java.io.Serializable {
33: //
34: // All shopping cart hold pointers to this object.
35: //
36: public static final ItemQuery global = new ItemQuery();
37:
38: // Only let the one static object be created. More is a waste of memory.
39: private ItemQuery() {
40: }
41:
42: // This is how the shopping cart talks to the Item class.
43: public CartItem getItem(long ObjectId) {
44: return (CartItem) Item.getItem(ObjectId);
45: }
46: }
|