org.exolab.castor.builder.types

Class XSDecimal

public class XSDecimal extends XSType

The decimal XML Schema datatype TODO : handle pattern, enumeration

Author: Andrew Fawcett

Field Summary
BigDecimal_maxExclusive
BigDecimal_maxInclusive
Facets for Decimal type
BigDecimal_minExclusive
BigDecimal_minInclusive
Constructor Summary
XSDecimal()
Method Summary
StringcreateFromJavaObjectCode(String variableName)
Returns the String necessary to convert an Object to an instance of this XSType.
intgetFractionDigits()
Returns the fractionDigits facet value of this XSInteger.
JTypegetJType()
Returns the JType that this XSType represents
BigDecimalgetMaxExclusive()
Returns the maximum exclusive value that this XSInteger can hold.
BigDecimalgetMaxInclusive()
Returns the maximum inclusive value that this XSInteger can hold.
BigDecimalgetMinExclusive()
Returns the minimum exclusive value that this XSInteger can hold.
BigDecimalgetMinInclusive()
Returns the minimum inclusive value that this XSInteger can hold.
intgetTotalDigits()
Returns the totalDigits facet value of this XSInteger.
booleanhasMaximum()
booleanhasMinimum()
StringnewInstanceCode()
Returns the Java code neccessary to create a new instance of the JType associated with this XSType
voidsetFacets(SimpleType simpleType)
voidsetFractionDigits(int fractionDig)
Sets the fractionDigits facet for this XSInteger.
voidsetMaxExclusive(BigDecimal max)
Sets the maximum exclusive value that this XSDecimal can hold.
voidsetMaxInclusive(BigDecimal max)
Sets the maximum inclusive value that this XSDecimal can hold.
voidsetMinExclusive(BigDecimal min)
Sets the minimum exclusive value that this XSDecimal can hold.
voidsetMinInclusive(BigDecimal min)
Sets the minimum inclusive value that this XSDecimalcan hold.
voidsetTotalDigits(int totalDig)
Sets the totalDigits facet for this XSInteger.
voidvalidationCode(JSourceCode jsc, String fixedValue, String fieldValidatorInstanceName)
Creates the validation code for an instance of this XSType.

Field Detail

_maxExclusive

BigDecimal _maxExclusive

_maxInclusive

BigDecimal _maxInclusive
Facets for Decimal type

_minExclusive

BigDecimal _minExclusive

_minInclusive

BigDecimal _minInclusive

Constructor Detail

XSDecimal

public XSDecimal()

Method Detail

createFromJavaObjectCode

public String createFromJavaObjectCode(String variableName)
Returns the String necessary to convert an Object to an instance of this XSType. This method is really only useful for primitive types

Parameters: variableName the name of the Object

Returns: the String necessary to convert an Object to an instance of this XSType

getFractionDigits

public int getFractionDigits()
Returns the fractionDigits facet value of this XSInteger.

Returns: the fractionDigits facet value of this XSInteger.

getJType

public JType getJType()
Returns the JType that this XSType represents

Returns: the JType that this XSType represents

getMaxExclusive

public BigDecimal getMaxExclusive()
Returns the maximum exclusive value that this XSInteger can hold.

Returns: the maximum exclusive value that this XSInteger can hold. If no maximum exclusive value has been set, Null will be returned

See Also: XSDecimal

getMaxInclusive

public BigDecimal getMaxInclusive()
Returns the maximum inclusive value that this XSInteger can hold.

Returns: the maximum inclusive value that this XSInteger can hold. If no maximum inclusive value has been set, Null will be returned

See Also: XSDecimal

getMinExclusive

public BigDecimal getMinExclusive()
Returns the minimum exclusive value that this XSInteger can hold.

Returns: the minimum exclusive value that this XSInteger can hold. If no minimum exclusive value has been set, Null will be returned

See Also: XSDecimal XSDecimal

getMinInclusive

public BigDecimal getMinInclusive()
Returns the minimum inclusive value that this XSInteger can hold.

Returns: the minimum inclusive value that this XSInteger can hold. If no minimum inclusive value has been set, Null will be returned

See Also: XSDecimal

getTotalDigits

public int getTotalDigits()
Returns the totalDigits facet value of this XSInteger.

Returns: the totalDigits facet value of this XSInteger.

hasMaximum

public boolean hasMaximum()

hasMinimum

public boolean hasMinimum()

newInstanceCode

public String newInstanceCode()
Returns the Java code neccessary to create a new instance of the JType associated with this XSType

setFacets

public void setFacets(SimpleType simpleType)

setFractionDigits

public void setFractionDigits(int fractionDig)
Sets the fractionDigits facet for this XSInteger.

Parameters: fractionDig the value of fractionDigits (must be >=0)

setMaxExclusive

public void setMaxExclusive(BigDecimal max)
Sets the maximum exclusive value that this XSDecimal can hold.

Parameters: max the maximum exclusive value this XSDecimal can be

See Also: XSDecimal

setMaxInclusive

public void setMaxInclusive(BigDecimal max)
Sets the maximum inclusive value that this XSDecimal can hold.

Parameters: max the maximum inclusive value this XSDecimal can be

See Also: XSDecimal

setMinExclusive

public void setMinExclusive(BigDecimal min)
Sets the minimum exclusive value that this XSDecimal can hold.

Parameters: max the minimum exclusive value this XSDecimal can be

See Also: XSDecimal

setMinInclusive

public void setMinInclusive(BigDecimal min)
Sets the minimum inclusive value that this XSDecimalcan hold.

Parameters: max the minimum inclusive value this XSDecimal can be

See Also: XSDecimal

setTotalDigits

public void setTotalDigits(int totalDig)
Sets the totalDigits facet for this XSInteger.

Parameters: totalDig the value of totalDigits (must be >0)

validationCode

public void validationCode(JSourceCode jsc, String fixedValue, String fieldValidatorInstanceName)
Creates the validation code for an instance of this XSType. The validation code should if necessary create a newly configured TypeValidator, that should then be added to a FieldValidator instance whose name is provided.

Parameters: fixedValue a fixed value to use if any jsc the JSourceCode to fill in. fieldValidatorInstanceName the name of the FieldValidator that the configured TypeValidator should be added to.

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com