KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > trading > db > simple > offers > DynPropValue


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.simple.offers;
15
16
17 import java.io.*;
18 import org.omg.CORBA.*;
19 import org.omg.CosTradingDynamic.*;
20 // GB: import jtport.ORBLayer;
21

22
23 public class DynPropValue implements Serializable
24 {
25   private String JavaDoc m_evalInterface;
26   private TypeCodeValue m_returnedType;
27   private AnyValue m_extraInfo;
28
29   private transient org.omg.CORBA.ORB JavaDoc orb;
30
31   static final long serialVersionUID = -7792164971850696279L;
32
33
34   private DynPropValue()
35   {
36   }
37
38
39   public DynPropValue(org.omg.CORBA.ORB JavaDoc orb, Any any)
40   {
41       this.orb = orb;
42     setValue(any);
43   }
44
45
46   public Any getValue()
47   {
48     Any result = orb.create_any();
49
50     DynamicProp p = new DynamicProp();
51     org.omg.CORBA.Object JavaDoc obj = orb.string_to_object(m_evalInterface);
52     p.eval_if = DynamicPropEvalHelper.narrow(obj);
53     p.returned_type = m_returnedType.getValue();
54     p.extra_info = m_extraInfo.getValue();
55     DynamicPropHelper.insert(result, p);
56
57     return result;
58   }
59
60
61   protected void setValue(Any val)
62   {
63     DynamicProp p = DynamicPropHelper.extract(val);
64     m_evalInterface = orb.object_to_string(p.eval_if);
65     m_returnedType = new TypeCodeValue(p.returned_type);
66     m_extraInfo = new AnyValue(orb,p.extra_info);
67   }
68 }
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Popular Tags