com.servingxml.util.record
Class DefaultingValue

java.lang.Object
  extended by com.servingxml.util.record.DefaultingValue
All Implemented Interfaces:
Value

public class DefaultingValue
extends java.lang.Object
implements Value


Field Summary
 
Fields inherited from interface com.servingxml.util.record.Value
EMPTY, EMPTY_ATTRIBUTES, EMPTY_VALUE_ARRAY
 
Constructor Summary
DefaultingValue(Value value, Value defaultValue)
           
 
Method Summary
 boolean equalsValue(Value aValue)
           
 java.lang.Object getObject()
           
 Record[] getRecords()
          Returns the value as an array of records
 Record[] getSegments()
          Deprecated. since ServingXML 0.8.3: replaced by EmptyFieldValue.getRecords()
 int getSqlType()
           
 java.lang.Object getSqlValue()
           
 java.lang.String getString()
           
 java.lang.String[] getStringArray()
           
 ValueType getType()
           
 int hashCode()
           
 void writeToContentHandler(Name fieldName, PrefixMap prefixMap, org.xml.sax.ContentHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultingValue

public DefaultingValue(Value value,
                       Value defaultValue)
Method Detail

getString

public java.lang.String getString()
Specified by:
getString in interface Value

getStringArray

public java.lang.String[] getStringArray()
Specified by:
getStringArray in interface Value

getObject

public java.lang.Object getObject()
Specified by:
getObject in interface Value

getSegments

@Deprecated
public Record[] getSegments()
Deprecated. since ServingXML 0.8.3: replaced by EmptyFieldValue.getRecords()

Returns the value as an array of records

Specified by:
getSegments in interface Value

getRecords

public Record[] getRecords()
Returns the value as an array of records

Specified by:
getRecords in interface Value

getType

public ValueType getType()
Specified by:
getType in interface Value

getSqlValue

public java.lang.Object getSqlValue()
Specified by:
getSqlValue in interface Value

getSqlType

public int getSqlType()
Specified by:
getSqlType in interface Value

writeToContentHandler

public final void writeToContentHandler(Name fieldName,
                                        PrefixMap prefixMap,
                                        org.xml.sax.ContentHandler handler)
                                 throws org.xml.sax.SAXException
Specified by:
writeToContentHandler in interface Value
Throws:
org.xml.sax.SAXException

equalsValue

public boolean equalsValue(Value aValue)
Specified by:
equalsValue in interface Value

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object