com.endeca.mobile.services.cart.models
Class Model

java.lang.Object
  extended by com.endeca.mobile.services.cart.models.Model
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Address, Card, CartItem, CartItemSpec, GiftWrap, GiftWrapSpec, NamedModel, ShippingOptionGroup, TextFieldModel, TextFieldModelSpec

public class Model
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
Model()
           
Model(java.lang.String id)
           
 
Method Summary
 boolean containsProperty(java.lang.String key)
          Convenience method that will check to see if the internal maps is null before calling containsKey(
 java.lang.String getId()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getProperty(java.lang.String key)
          Convenience method that will check to see if the internal map is null.
 java.lang.Float getPropertyAsFloat(java.lang.String key)
           
 java.lang.Integer getPropertyAsInt(java.lang.String key)
           
 java.lang.Long getPropertyAsLong(java.lang.String key)
           
 void putProperty(java.lang.String key, java.lang.String value)
          Convenience method that will check to see if the internal map is null, and create a new HashMap if it is, before putting the key and value.
 void setId(java.lang.String id)
           
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model

public Model()

Model

public Model(java.lang.String id)
Method Detail

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

putProperty

public void putProperty(java.lang.String key,
                        java.lang.String value)
Convenience method that will check to see if the internal map is null, and create a new HashMap if it is, before putting the key and value.


getProperty

public java.lang.String getProperty(java.lang.String key)
Convenience method that will check to see if the internal map is null.

Returns:
null if there is no property in the map with this key or the map is null. Otherwise returns the value of this key in the map.

getPropertyAsFloat

public java.lang.Float getPropertyAsFloat(java.lang.String key)

getPropertyAsLong

public java.lang.Long getPropertyAsLong(java.lang.String key)
Throws:
java.lang.NumberFormatException

getPropertyAsInt

public java.lang.Integer getPropertyAsInt(java.lang.String key)
Throws:
java.lang.NumberFormatException

containsProperty

public boolean containsProperty(java.lang.String key)
Convenience method that will check to see if the internal maps is null before calling containsKey(

Parameters:
key -