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