1 2 5 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 m_name; 24 private Object 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 |