Package org.apache.xmlbeans
Interface SimpleValue
- All Superinterfaces:
XmlObject,XmlTokenSource
- All Known Implementing Classes:
FilterXmlObject,JavaBase64Holder,JavaBase64HolderEx,JavaBooleanHolder,JavaBooleanHolderEx,JavaDecimalHolder,JavaDecimalHolderEx,JavaDoubleHolder,JavaDoubleHolderEx,JavaFloatHolder,JavaFloatHolderEx,JavaGDateHolderEx,JavaGDurationHolderEx,JavaHexBinaryHolder,JavaHexBinaryHolderEx,JavaIntegerHolder,JavaIntegerHolderEx,JavaIntHolder,JavaIntHolderEx,JavaLongHolder,JavaLongHolderEx,JavaNotationHolder,JavaNotationHolderEx,JavaQNameHolder,JavaQNameHolderEx,JavaStringEnumerationHolderEx,JavaStringHolder,JavaStringHolderEx,JavaUriHolder,JavaUriHolderEx,XmlAnySimpleTypeImpl,XmlAnySimpleTypeRestriction,XmlAnyTypeImpl,XmlAnyUriImpl,XmlAnyUriRestriction,XmlBase64BinaryImpl,XmlBase64BinaryRestriction,XmlBooleanImpl,XmlBooleanRestriction,XmlByteImpl,XmlComplexContentImpl,XmlDateImpl,XmlDateTimeImpl,XmlDecimalImpl,XmlDecimalRestriction,XmlDoubleImpl,XmlDoubleRestriction,XmlDurationImpl,XmlEntitiesImpl,XmlEntityImpl,XmlFloatImpl,XmlFloatRestriction,XmlGDayImpl,XmlGMonthDayImpl,XmlGMonthImpl,XmlGYearImpl,XmlGYearMonthImpl,XmlHexBinaryImpl,XmlHexBinaryRestriction,XmlIdImpl,XmlIdRefImpl,XmlIdRefsImpl,XmlIntegerImpl,XmlIntegerRestriction,XmlIntImpl,XmlIntRestriction,XmlLanguageImpl,XmlListImpl,XmlLongImpl,XmlLongRestriction,XmlNameImpl,XmlNCNameImpl,XmlNegativeIntegerImpl,XmlNmTokenImpl,XmlNmTokensImpl,XmlNonNegativeIntegerImpl,XmlNonPositiveIntegerImpl,XmlNormalizedStringImpl,XmlNotationImpl,XmlNotationRestriction,XmlObjectBase,XmlPositiveIntegerImpl,XmlQNameImpl,XmlQNameRestriction,XmlShortImpl,XmlStringEnumeration,XmlStringImpl,XmlStringRestriction,XmlTimeImpl,XmlTokenImpl,XmlUnionImpl,XmlUnsignedByteImpl,XmlUnsignedIntImpl,XmlUnsignedLongImpl,XmlUnsignedShortImpl
public interface SimpleValue extends XmlObject
All XmlObject implementations can be coerced to SimpleValue.
For any given schema type, only a subset of the conversion
methods will work. Others will throw an exception.
SimpleValue is useful for declaring variables which can hold more than one similar schema type that may not happen to have a common XML base type, for example, two list types, or two unrelated integer restrictions that happen to fit into an int.
-
Field Summary
-
Method Summary
Modifier and Type Method Description BigDecimalgetBigDecimalValue()Returns the value as aBigDecimal.BigIntegergetBigIntegerValue()Returns the value as aBigInteger.booleangetBooleanValue()Returns the value as a boolean.byte[]getByteArrayValue()Returns the value as a byte array.bytegetByteValue()Returns the value as a byte.CalendargetCalendarValue()Returns the value as aCalendar.DategetDateValue()Returns the value as aDate.doublegetDoubleValue()Returns the value as a double.StringEnumAbstractBasegetEnumValue()Returns the value as aStringEnumAbstractBase.floatgetFloatValue()Returns the value as a float.GDategetGDateValue()Returns the value as aGDate.GDurationgetGDurationValue()Returns the value as aGDuration.intgetIntValue()Returns the value as an int.List<?>getListValue()Returns the value as aListof friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration).longgetLongValue()Returns the value as a long.ObjectgetObjectValue()Returns a union value as a its natural friendly Java object (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration).QNamegetQNameValue()Returns the value as aQName.shortgetShortValue()Returns the value as a short.StringgetStringValue()Returns the value as aString.SchemaTypeinstanceType()The same as getSchemaType unless this is a union instance or nil value.voidsetBigDecimalValue(BigDecimal obj)Sets the value as aBigDecimal.voidsetBigIntegerValue(BigInteger obj)Sets the value as aBigInteger.voidsetBooleanValue(boolean v)Sets the value as a boolean.voidsetByteArrayValue(byte[] obj)Sets the value as a byte array.voidsetByteValue(byte v)Sets the value as a byte.voidsetCalendarValue(Calendar obj)Sets the value as aCalendar.voidsetDateValue(Date obj)Sets the value as aDate.voidsetDoubleValue(double v)Sets the value as a double.voidsetEnumValue(StringEnumAbstractBase obj)Sets the value as aStringEnumAbstractBase.voidsetFloatValue(float v)Sets the value as a float.voidsetGDateValue(GDate obj)Sets the value as aGDate.voidsetGDurationValue(GDuration obj)Sets the value as aGDuration.voidsetIntValue(int v)Sets the value as an int.voidsetListValue(List<?> obj)Sets the value as aList.voidsetLongValue(long v)Sets the value as a long.voidsetObjectValue(Object obj)Sets the value as an arbitraryObject.voidsetQNameValue(QName obj)Sets the value as aQName.voidsetShortValue(short v)Sets the value as a short.voidsetStringValue(String obj)Sets the value as aString.List<? extends XmlAnySimpleType>xgetListValue()Returns the value as aListof XmlAnySimpleType objects.Methods inherited from interface org.apache.xmlbeans.XmlObject
changeType, compareTo, compareValue, copy, copy, execQuery, execQuery, isImmutable, isNil, schemaType, selectAttribute, selectAttribute, selectAttributes, selectChildren, selectChildren, selectChildren, selectPath, selectPath, set, setNil, substitute, toString, validate, validate, valueEquals, valueHashCodeMethods inherited from interface org.apache.xmlbeans.XmlTokenSource
documentProperties, dump, getDomNode, monitor, newCursor, newDomNode, newDomNode, newInputStream, newInputStream, newReader, newReader, newXMLStreamReader, newXMLStreamReader, save, save, save, save, save, save, save, save, xmlText, xmlText
-
Method Details
-
instanceType
SchemaType instanceType()The same as getSchemaType unless this is a union instance or nil value.For unions, this returns the non-union consituent type of this instance. This type may change if setters are called that cause the instance to change to another constituent type of the union.
For nil values, this returns null.
-
getStringValue
String getStringValue()Returns the value as aString. -
getBooleanValue
boolean getBooleanValue()Returns the value as a boolean. -
getByteValue
byte getByteValue()Returns the value as a byte. -
getShortValue
short getShortValue()Returns the value as a short. -
getIntValue
int getIntValue()Returns the value as an int. -
getLongValue
long getLongValue()Returns the value as a long. -
getBigIntegerValue
BigInteger getBigIntegerValue()Returns the value as aBigInteger. -
getBigDecimalValue
BigDecimal getBigDecimalValue()Returns the value as aBigDecimal. -
getFloatValue
float getFloatValue()Returns the value as a float. -
getDoubleValue
double getDoubleValue()Returns the value as a double. -
getByteArrayValue
byte[] getByteArrayValue()Returns the value as a byte array. -
getEnumValue
StringEnumAbstractBase getEnumValue()Returns the value as aStringEnumAbstractBase. -
getCalendarValue
Calendar getCalendarValue()Returns the value as aCalendar. -
getDateValue
Date getDateValue()Returns the value as aDate. -
getGDateValue
GDate getGDateValue()Returns the value as aGDate. -
getGDurationValue
GDuration getGDurationValue()Returns the value as aGDuration. -
getQNameValue
QName getQNameValue()Returns the value as aQName. -
getListValue
List<?> getListValue()Returns the value as aListof friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration). -
xgetListValue
List<? extends XmlAnySimpleType> xgetListValue()Returns the value as aListof XmlAnySimpleType objects. -
getObjectValue
Object getObjectValue()Returns a union value as a its natural friendly Java object (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration). -
setStringValue
Sets the value as aString. -
setBooleanValue
void setBooleanValue(boolean v)Sets the value as a boolean. -
setByteValue
void setByteValue(byte v)Sets the value as a byte. -
setShortValue
void setShortValue(short v)Sets the value as a short. -
setIntValue
void setIntValue(int v)Sets the value as an int. -
setLongValue
void setLongValue(long v)Sets the value as a long. -
setBigIntegerValue
Sets the value as aBigInteger. -
setBigDecimalValue
Sets the value as aBigDecimal. -
setFloatValue
void setFloatValue(float v)Sets the value as a float. -
setDoubleValue
void setDoubleValue(double v)Sets the value as a double. -
setByteArrayValue
void setByteArrayValue(byte[] obj)Sets the value as a byte array. -
setEnumValue
Sets the value as aStringEnumAbstractBase. -
setCalendarValue
Sets the value as aCalendar. -
setDateValue
Sets the value as aDate. -
setGDateValue
Sets the value as aGDate. -
setGDurationValue
Sets the value as aGDuration. -
setQNameValue
Sets the value as aQName. -
setListValue
Sets the value as aList. -
setObjectValue
Sets the value as an arbitraryObject.
-