KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > trading > db > pse > offers > OfferProperty


1
2 // Copyright (C) 1998-1999
3
// Object Oriented Concepts, Inc.
4

5 // **********************************************************************
6
//
7
// Copyright (c) 1997
8
// Mark Spruiell (mark@intellisoft.com)
9
//
10
// See the COPYING file for more information
11
//
12
// **********************************************************************
13

14 package org.jacorb.trading.db.pse.offers;
15
16
17 import org.omg.CosTrading.Property;
18 import org.jacorb.trading.util.*;
19
20
21 public class OfferProperty
22 {
23   private String JavaDoc m_name;
24   private Object JavaDoc m_value;
25
26
27   private OfferProperty()
28   {
29   }
30
31
32   public OfferProperty(Property prop)
33   {
34     m_name = prop.name;
35     if (PropUtil.isDynamicProperty(prop.value.type()))
36       m_value = new DynPropValue(prop.value);
37     else
38       m_value = new AnyValue(prop.value);
39   }
40
41
42   public Property describe()
43   {
44     Property result = new Property();
45
46     result.name = m_name;
47     if (m_value instanceof AnyValue)
48       result.value = ((AnyValue)m_value).getValue();
49     else if (m_value instanceof DynPropValue)
50       result.value = ((DynPropValue)m_value).getValue();
51
52     return result;
53   }
54 }
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Popular Tags