com.sap.dictionary.runtime

Interface ISimpleType

All Superinterfaces:
Cloneable, IDataType
All Known Subinterfaces:
ISimpleTypeModifiable

public interface ISimpleType
extends IDataType


Field Summary
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_BINARY
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_BOOLEAN
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_DATE
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_DECIMAL
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_DOUBLE
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_FLOAT
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_INTEGER
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_LONG
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_SHORT
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_STRING
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_TIME
           
static com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_TIMESTAMP
           
 
Method Summary
 void checkValid(Object value)
          Validates a value of type Object against the SimpleTypes properties
 ISimpleTypeModifiable cloneType()
          Clones this SimpleType to a modifiable copy
 ISimpleTypeModifiable cloneType(Locale newLocale)
          Clones this SimpleType to a modifiable copy according to given locale
 String format(BigDecimal value)
          Formats a value of type BigDecimal to produce a string.
 String format(BigInteger value)
          Formats a value of type BigInteger to produce a string
 String format(boolean value)
          Formats a value of type boolean to produce a string
 String format(Boolean value)
          Formats a value of type Boolean to produce a string
 String format(byte value)
          Formats a value of type byte to produce a string
 String format(Byte value)
          Formats a value of type Byte to produce a string
 String format(Date value)
          Formats a value of type java.sql.Date to produce a string Formatting is executed by using the underlying SimpleType's format-template.
 String format(Date value)
          Formats a value of type java.sql.Date to produce a string Formatting is executed by using the underlying SimpleType's format-template.
 String format(double value)
          Formats a value of type double to produce a string
 String format(Double value)
          Formats a value of type Double to produce a string
 String format(float value)
          Formats a value of type float to produce a string
 String format(Float value)
          Formats a value of type Float to produce a string
 String format(int value)
          Formats a value of type int to produce a string
 String format(Integer value)
          Formats a value of type Integerg to produce a string
 String format(long value)
          Formats a value of type long to produce a string
 String format(Long value)
          Formats a value of type Long to produce a string
 String format(Object value)
          Formats a value of Object to produce a string
 String format(short value)
          Formats a value of type short to produce a string
 String format(Short value)
          Formats a value of type Short to produce a string
 String format(String value)
          Formats a value of type String to produce a string
 String format(Time value)
          Formats a value of type java.sql.Time to produce a string Formatting is executed by using the underlying SimpleType's format-template.
 String format(Timestamp value)
          Formats a value of type java.sql.Timestamp to produce a string Formatting is executed by using the underlying SimpleType's format-template.
 String formatOfDefaultValue()
          Formats the default value of special type to produce a string.
 Class getAttributeClass()
          A SimpleType is instantiated as object of a class dependent of the SimpleType's builtInType.
 String getBuiltInType()
          Gets the builtInType as String
 Object getBuiltInTypeEnum()
          Gets the builtInType as Object
 String getColumnLabel()
          Gets the columnLabel.
 Object getDefaultValue()
          Gets the defaultValue.
 String getDescription()
          Gets the description.
 Set getEnumeration()
          Gets the enumeration.
 Map getEnumerationTexts()
          Gets the enumerationTexts. enumerationTexts contains a description for each enumeration value.
 String getFieldLabel()
          Gets the fieldLabel.
 String getFormat()
          Gets the format. format is the string the format- and parse- methods are based onto.
 String getFormatTemplate()
          Gets the format template.
 int getFractionDigits()
          Gets fractionDigits. totalDigits is the maximum number of digits in the fractional part of values of type decimal.
 int getLength()
          Gets the length.
 Object getMaxExclusive()
          Gets maxExclusive. maxExclusive is the exclusive upper bound of the value space for a datatype which ca be ordered.
 int getMaxExternalLength()
          Gets the maxExternalLength. maxExternalLength is the maximum length of values of this types on the screen.
 Object getMaxInclusive()
          Gets maxInclusive. maxInclusive is the inclusive upper bound of the value space for a datatype which ca be ordered.
 int getMaxLength()
          Gets the maximal length. maxLength is the maximal number of units of length, where units of length varies depending on the type.
 Object getMinExclusive()
          Gets minExclusive. minExclusive is the exclusive lower bound of the value space for a datatype which ca be ordered.
 Object getMinInclusive()
          Gets minInclusive. minInclusive is the inclusive lower bound of the value space for a datatype which ca be ordered.
 int getMinLength()
          Gets the minimal length. minLength is the minumum number of units of length, where units of length varies depending on the type.
 String getPattern()
          Gets pattern. pattern is a constraint on the value space of a datatype which is achieved by constraining the lexical space to literals which match a specific pattern.
 IDataProvider getProvider()
          Get the SimpleType's provider
 String getQuickInfo()
          Gets the quickInfo.
 boolean getReadOnly()
          Gets readOnly.
 ISimpleValueServices getSVServices()
          Gets the valueservices.
 String getTextLocale()
          Deprecated. return value will be null - always
 ITextServices getTextServices()
          Gets the textservices.
 int getTotalDigits()
          Gets totalDigits. totalDigits is the maximum number of digits in values of type decimal.
 boolean getTranslateFlag()
          Gets translate-property.
 boolean getUppercase()
          Gets Uppercase.
 boolean hasSVService()
          Returns true if a simple value service exists, false otherwise.
 boolean isNumeric()
          Returns the information if a SimpleType accepts only numeric values in the method checkValid().
 boolean isValid(BigDecimal value)
          Deprecated. Use checkValid() instead
 boolean isValid(boolean value)
          Deprecated. Use checkValid() instead
 boolean isValid(Boolean value)
          Deprecated. Use checkValid() instead
 boolean isValid(Date value)
          Deprecated. Use checkValid() instead
 boolean isValid(double value)
          Deprecated. Use checkValid() instead
 boolean isValid(Double value)
          Deprecated. Use checkValid() instead
 boolean isValid(int value)
          Deprecated. Use checkValid() instead
 boolean isValid(Integer value)
          Deprecated. Use checkValid() instead
 boolean isValid(Object value)
          Deprecated. Use checkValid() instead
 boolean isValid(String value)
          Deprecated. Use checkValid() instead
 boolean isValid(Time value)
          Deprecated. Use checkValid() instead
 Object parse(String value)
          Returns an instance of Object with a value matching the given string.
 BigInteger parseBigInteger(String text)
          Returns an instance of BigInteger with a value matching the given string.
 boolean parseBoolean(String text)
          Returns a value of type boolean with a value matching the given string.
 Boolean parseBooleanObject(String text)
          Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".
 byte parseByte(String text)
          Returns a byte with a value matching the given string.
 Byte parseByteObject(String text)
          Returns an instance of Byte with a value matching the given string.
 Date parseDate(String text)
          Returns an instance of java.sql.Date with a value matching the given string.
 BigDecimal parseDecimal(String text)
          Returns an instance of BigDecimal with a value matching the given string.
 double parseDouble(String text)
          Returns a double with a value matching the given string.
 Double parseDoubleObject(String text)
          Returns an instance of Double with a value matching the given string.
 float parseFloat(String text)
          Returns a float with a value matching the given string.
 Float parseFloatObject(String text)
          Returns an instance of Float with a value matching the given string.
 int parseInt(String text)
          Returns an int with a value matching the given string.
 Integer parseInteger(String text)
          Returns an instance of Integer with a value matching the given string.
 long parseLong(String text)
          Returns a long with a value matching the given string.
 Long parseLongObject(String text)
          Returns an instance of Long with a value matching the given string.
 short parseShort(String text)
          Returns a short with a value matching the given string.
 Short parseShortObject(String text)
          Returns an instance of Short with a value matching the given string.
 String parseString(String text)
          Returns an instance of String with a value matching the given string.
 Time parseTime(String text)
          Returns an instance of java.sql.Time with a value matching the given string.
 Timestamp parseTimestamp(String text)
          Returns an instance of java.sql.Timestamp with a value matching the given string.
 Date parseUtilDate(String text)
          Returns an instance of java.util.Date with a value matching the given string.
 int resolveLength()
          Computes the relevant length out of length, minLength and maxLength.
 String toString(Object value)
          Formats a value of type Object to produce a string
 Object valueOf(String string)
          Returns an instance of Object with a value matching the given string using xml as locale Additionally the value is checked against the SimpleType definition.
 
Methods inherited from interface com.sap.dictionary.runtime.IDataType
getAssociatedClass, getBackendConversionRule, getBackendName, getLocale, getLocalName, getName, getPrefix, getQualifiedName, isModifyAllowed, isSimpleType, isStructure
 

Field Detail

TYPE_STRING

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_STRING

TYPE_BINARY

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_BINARY

TYPE_DATE

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_DATE

TYPE_TIME

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_TIME

TYPE_TIMESTAMP

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_TIMESTAMP

TYPE_BOOLEAN

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_BOOLEAN

TYPE_DOUBLE

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_DOUBLE

TYPE_INTEGER

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_INTEGER

TYPE_DECIMAL

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_DECIMAL

TYPE_FLOAT

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_FLOAT

TYPE_LONG

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_LONG

TYPE_SHORT

public static final com.sap.dictionary.runtime.BuiltInTypeEnum TYPE_SHORT
Method Detail

getProvider

public IDataProvider getProvider()
Get the SimpleType's provider

Returns:
a provider

cloneType

public ISimpleTypeModifiable cloneType()
Clones this SimpleType to a modifiable copy

Returns:
the clone of this SimpleType

cloneType

public ISimpleTypeModifiable cloneType(Locale newLocale)
Clones this SimpleType to a modifiable copy according to given locale

Parameters:
newLocale - the locale for the modfiable type
Returns:
the clone of this SimpleType

getAttributeClass

public Class getAttributeClass()
A SimpleType is instantiated as object of a class dependent of the SimpleType's builtInType.

Returns:
the Class this SimpleType is instantiated with

format

public String format(boolean value)
Formats a value of type boolean to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Boolean value)
Formats a value of type Boolean to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(String value)
Formats a value of type String to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Object value)
Formats a value of Object to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(BigDecimal value)
Formats a value of type BigDecimal to produce a string. Format is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type decimal refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.DecimalFormat. The default-template is #,##0.###############################

Parameters:
value - - The value to format
Returns:
the value passed in as the result string
See Also:
getFormat()

format

public String format(BigInteger value)
Formats a value of type BigInteger to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Byte value)
Formats a value of type Byte to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Double value)
Formats a value of type Double to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Float value)
Formats a value of type Float to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Integer value)
Formats a value of type Integerg to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Long value)
Formats a value of type Long to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Short value)
Formats a value of type Short to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(byte value)
Formats a value of type byte to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(double value)
Formats a value of type double to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(float value)
Formats a value of type float to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(int value)
Formats a value of type int to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(long value)
Formats a value of type long to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(short value)
Formats a value of type short to produce a string

Parameters:
value - - The value to format
Returns:
the value passed in as the result string

format

public String format(Date value)
Formats a value of type java.sql.Date to produce a string Formatting is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type date refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat.

Parameters:
value - - The value to format
Returns:
the value passed in as the result string
See Also:
getFormat()

format

public String format(Date value)
Formats a value of type java.sql.Date to produce a string Formatting is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type date refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat.

Parameters:
value - - The value to format
Returns:
the value passed in as the result string
See Also:
getFormat()

format

public String format(Time value)
Formats a value of type java.sql.Time to produce a string Formatting is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type time refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat.

Parameters:
value - - The value to format
Returns:
the value passed in as the result string
See Also:
getFormat()

format

public String format(Timestamp value)
Formats a value of type java.sql.Timestamp to produce a string Formatting is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type timestamp refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat.

Parameters:
value - - The value to format
Returns:
the value passed in as the result string
See Also:
getFormat()

formatOfDefaultValue

public String formatOfDefaultValue()
Formats the default value of special type to produce a string. The default value can be used as first proposal for a field of this type.

Returns:
the default value passed in as the result string

getFormatTemplate

public String getFormatTemplate()
Gets the format template. This is built out of the dictionary's locale and the SimpleType information such as the used builtInType and the format.

Returns:
the format template

parse

public Object parse(String value)
             throws ParseException
Returns an instance of Object with a value matching the given string. No checks against the SimpleType's properties are executed

Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseBoolean

public boolean parseBoolean(String text)
                     throws ParseException
Returns a value of type boolean with a value matching the given string. The value is true, if the string argument is not null and is equal, ignoring case, to the string "true". Otherwise, the value is false. The empty String or null lead to a ParseException. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseString

public String parseString(String text)
                   throws ParseException
Returns an instance of String with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseBooleanObject

public Boolean parseBooleanObject(String text)
                           throws ParseException
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true". Otherwise, allocate a Boolean object representing the value false. The empty String or null lead to a ParseException. No checks against the SimpleType's properties are executed.

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseDecimal

public BigDecimal parseDecimal(String text)
                        throws ParseException
Returns an instance of BigDecimal with a value matching the given string. Parsing is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type decimal refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.DecimalFormat. The default-template is #,##0.############################### No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException
See Also:
getFormat()

parseBigInteger

public BigInteger parseBigInteger(String text)
                           throws ParseException
Returns an instance of BigInteger with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseByteObject

public Byte parseByteObject(String text)
                     throws ParseException
Returns an instance of Byte with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseDoubleObject

public Double parseDoubleObject(String text)
                         throws ParseException
Returns an instance of Double with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseFloatObject

public Float parseFloatObject(String text)
                       throws ParseException
Returns an instance of Float with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseInteger

public Integer parseInteger(String text)
                     throws ParseException
Returns an instance of Integer with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseLongObject

public Long parseLongObject(String text)
                     throws ParseException
Returns an instance of Long with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseShortObject

public Short parseShortObject(String text)
                       throws ParseException
Returns an instance of Short with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseByte

public byte parseByte(String text)
               throws ParseException
Returns a byte with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseDouble

public double parseDouble(String text)
                   throws ParseException
Returns a double with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseFloat

public float parseFloat(String text)
                 throws ParseException
Returns a float with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseInt

public int parseInt(String text)
             throws ParseException
Returns an int with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseLong

public long parseLong(String text)
               throws ParseException
Returns a long with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseShort

public short parseShort(String text)
                 throws ParseException
Returns a short with a value matching the given string. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

parseUtilDate

public Date parseUtilDate(String text)
                   throws ParseException
Returns an instance of java.util.Date with a value matching the given string. Parsing is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type date refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException
See Also:
getFormat()

parseDate

public Date parseDate(String text)
               throws ParseException
Returns an instance of java.sql.Date with a value matching the given string. Parsing is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type date refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException
See Also:
getFormat()

parseTime

public Time parseTime(String text)
               throws ParseException
Returns an instance of java.sql.Time with a value matching the given string. Parsing is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type time refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the class java.text.SimpleDateFormat. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException
See Also:
getFormat()

parseTimestamp

public Timestamp parseTimestamp(String text)
                         throws ParseException
Returns an instance of java.sql.Timestamp with a value matching the given string. Parsing is executed by using the underlying SimpleType's format-template. The format-template can be defined in the dictionary designtime. For a description of how to define a format-template for type timestamp refer to http://java.sun.com/j2se/1.4/docs.api/index.html under the java.text.class SimpleDateFormat. No checks against the SimpleType's properties are executed

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException
See Also:
getFormat()

toString

public String toString(Object value)
Formats a value of type Object to produce a string

Parameters:
value - - the value to format
Returns:
the value passed in as the result string

valueOf

public Object valueOf(String string)
               throws ParseException
Returns an instance of Object with a value matching the given string using xml as locale Additionally the value is checked against the SimpleType definition.

Returns:
the parsed value, or ParseException if the parse fails
Throws:
ParseException

isValid

public boolean isValid(Object value)
Deprecated. Use checkValid() instead

Validates a value of type Object against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise

isValid

public boolean isValid(boolean value)
Deprecated. Use checkValid() instead

Validates a value of type boolean against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeBoolean.

isValid

public boolean isValid(int value)
Deprecated. Use checkValid() instead

Validates a value of type int against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeInt.

isValid

public boolean isValid(double value)
Deprecated. Use checkValid() instead

Validates a value of type double against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeDouble.

isValid

public boolean isValid(String value)
Deprecated. Use checkValid() instead

Validates a value of type String against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeString.

isValid

public boolean isValid(Date value)
Deprecated. Use checkValid() instead

Validates a value of type java.sql.Date against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeDate.

isValid

public boolean isValid(Time value)
Deprecated. Use checkValid() instead

Validates a value of type java.sql.Time against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeTime.

isValid

public boolean isValid(BigDecimal value)
Deprecated. Use checkValid() instead

Validates a value of type BigDecimal against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeDecimal.

isValid

public boolean isValid(Boolean value)
Deprecated. Use checkValid() instead

Validates a value of type java.lang.Boolean against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeBooleanObject.

isValid

public boolean isValid(Integer value)
Deprecated. Use checkValid() instead

Validates a value of type java.lang.Integer against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeIntegerObject.

isValid

public boolean isValid(Double value)
Deprecated. Use checkValid() instead

Validates a value of type java.lang.Double against the SimpleTypes properties

Parameters:
value - - The value to validate
Returns:
true, if the value is valid, false otherwise, IllegalArgumentException, if the SimpleType is not of type DdTypeDoubleObject.

checkValid

public void checkValid(Object value)
                throws DdCheckException
Validates a value of type Object against the SimpleTypes properties

Parameters:
value - - The value to validate
Throws:
DdCheckException, - if value is not valid
DdCheckException

getLength

public int getLength()
Gets the length. Length is the number of units of length, where units of length varies depending on the type. The value of length must be a non negative Integer


getMinLength

public int getMinLength()
Gets the minimal length. minLength is the minumum number of units of length, where units of length varies depending on the type. The value of minLength must be a non negative Integer.


getMaxLength

public int getMaxLength()
Gets the maximal length. maxLength is the maximal number of units of length, where units of length varies depending on the type. The value of maxLength must be a non negative Integer.


resolveLength

public int resolveLength()
Computes the relevant length out of length, minLength and maxLength. The following hierarchie is used delivering the first value whose lenth >0. External Length Maximum Length Fixed Length

Returns:
a non negative Integer

getMinInclusive

public Object getMinInclusive()
Gets minInclusive. minInclusive is the inclusive lower bound of the value space for a datatype which ca be ordered. The value of minInclusive must be in the value space of the base type.


getMaxInclusive

public Object getMaxInclusive()
Gets maxInclusive. maxInclusive is the inclusive upper bound of the value space for a datatype which ca be ordered. The value of maxInclusive must be in the value space of the base type.


getMinExclusive

public Object getMinExclusive()
Gets minExclusive. minExclusive is the exclusive lower bound of the value space for a datatype which ca be ordered. The value of minExclusive must be in the value space of the base type.


getMaxExclusive

public Object getMaxExclusive()
Gets maxExclusive. maxExclusive is the exclusive upper bound of the value space for a datatype which ca be ordered. The value of maxExclusive must be in the value space of the base type.


getTotalDigits

public int getTotalDigits()
Gets totalDigits. totalDigits is the maximum number of digits in values of type decimal. The value of totalDigits must be a positive integer.


getFractionDigits

public int getFractionDigits()
Gets fractionDigits. totalDigits is the maximum number of digits in the fractional part of values of type decimal. The value of totalDigits must be a positive integer.


getPattern

public String getPattern()
Gets pattern. pattern is a constraint on the value space of a datatype which is achieved by constraining the lexical space to literals which match a specific pattern.


getReadOnly

public boolean getReadOnly()
Gets readOnly. Expresses if a value in a field based on this type can only be shown or also modified.

Returns:
true, if type has readOnly property, false otherwise

getUppercase

public boolean getUppercase()
Gets Uppercase. Expresses if a value in a field based on this type has to be shown in uppercase letters.

Returns:
true, if type has uppercase property, false otherwise

getTranslateFlag

public boolean getTranslateFlag()
Gets translate-property. Expresses if a value in a field based on this type has to be translated.

Returns:
true, if type has translate flag switched on, false otherwise

getMaxExternalLength

public int getMaxExternalLength()
Gets the maxExternalLength. maxExternalLength is the maximum length of values of this types on the screen.


getDefaultValue

public Object getDefaultValue()
Gets the defaultValue. The default value is the default send to screen for fields of this type.


getFormat

public String getFormat()
Gets the format. format is the string the format- and parse- methods are based onto.


getDescription

public String getDescription()
Gets the description. A short description of the types semantic.


getFieldLabel

public String getFieldLabel()
Gets the fieldLabel. A keyword to use for a field with this type


getColumnLabel

public String getColumnLabel()
Gets the columnLabel. A keyword to use as column-title if column is of this type


getQuickInfo

public String getQuickInfo()
Gets the quickInfo. A keyword which expresses the meaning of the type. Will be used as quickInfo on a screen.


getTextLocale

public String getTextLocale()
Deprecated. return value will be null - always

Gets the textLocale.


getEnumeration

public Set getEnumeration()
Gets the enumeration. Enumeration contrains the value space to a specified set of values. Works only if type is java type and not backend type. In the latter case use getEnumerationTexts() to get the string values and texts for this enumeration.


getEnumerationTexts

public Map getEnumerationTexts()
Gets the enumerationTexts. enumerationTexts contains a description for each enumeration value.


getTextServices

public ITextServices getTextServices()
Gets the textservices. If no textservices are avaliable, null is delivered. If getting a textservices instance is not possible a RuntimeException is thrown.

Throws:
DdRuntimeException - - error when trying to instantiate textservices

hasSVService

public boolean hasSVService()
Returns true if a simple value service exists, false otherwise. Currently it is only checked if an enumeration exists.


getSVServices

public ISimpleValueServices getSVServices()
Gets the valueservices. If no valueservices are avaliable, null is delivered. If getting a valueservices instance is not possible a RuntimeException is thrown.

Throws:
DdRuntimeException - - error when trying to instantiate valueservices

getBuiltInType

public String getBuiltInType()
Gets the builtInType as String


getBuiltInTypeEnum

public Object getBuiltInTypeEnum()
Gets the builtInType as Object

Returns:
an Instance of BuiltInTypeEnum for the type's builtInType

isNumeric

public boolean isNumeric()
Returns the information if a SimpleType accepts only numeric values in the method checkValid().

Returns:
true - if the SimpleType accepts numeric values only, false otherwise. The method returns especially true, if the SimpleType is generated from a R/3-backend Type with dataType NUMC.


Copyright 2006 SAP AG Complete Copyright Notice