com.sap.dictionary.runtime
Interface ISimpleType

All Superinterfaces:
java.lang.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(java.lang.Object value)
          Validates a value of type Object against the SimpleTypes properties
 ISimpleTypeModifiable cloneType()
          Clones this SimpleType to a modifiable copy
 ISimpleTypeModifiable cloneType(java.util.Locale newLocale)
          Clones this SimpleType to a modifiable copy according to given locale
 java.lang.String format(java.math.BigDecimal value)
          Formats a value of type BigDecimal to produce a string.
 java.lang.String format(java.math.BigInteger value)
          Formats a value of type BigInteger to produce a string
 java.lang.String format(boolean value)
          Formats a value of type boolean to produce a string
 java.lang.String format(java.lang.Boolean value)
          Formats a value of type Boolean to produce a string
 java.lang.String format(byte value)
          Formats a value of type byte to produce a string
 java.lang.String format(java.lang.Byte value)
          Formats a value of type Byte to produce a string
 java.lang.String format(java.util.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.
 java.lang.String format(java.sql.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.
 java.lang.String format(double value)
          Formats a value of type double to produce a string
 java.lang.String format(java.lang.Double value)
          Formats a value of type Double to produce a string
 java.lang.String format(float value)
          Formats a value of type float to produce a string
 java.lang.String format(java.lang.Float value)
          Formats a value of type Float to produce a string
 java.lang.String format(int value)
          Formats a value of type int to produce a string
 java.lang.String format(java.lang.Integer value)
          Formats a value of type Integerg to produce a string
 java.lang.String format(long value)
          Formats a value of type long to produce a string
 java.lang.String format(java.lang.Long value)
          Formats a value of type Long to produce a string
 java.lang.String format(java.lang.Object value)
          Formats a value of Object to produce a string
 java.lang.String format(short value)
          Formats a value of type short to produce a string
 java.lang.String format(java.lang.Short value)
          Formats a value of type Short to produce a string
 java.lang.String format(java.lang.String value)
          Formats a value of type String to produce a string
 java.lang.String format(java.sql.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.
 java.lang.String formatOfDefaultValue()
          Formats the default value of special type to produce a string.
 java.lang.Class getAttributeClass()
          A SimpleType is instantiated as object of a class dependent of the SimpleType's builtInType.
 java.lang.String getBuiltInType()
          Gets the builtInType as String
 java.lang.Object getBuiltInTypeEnum()
          Gets the builtInType as Object
 java.lang.String getColumnLabel()
          Gets the columnLabel.
 java.lang.Object getDefaultValue()
          Gets the defaultValue.
 java.lang.String getDescription()
          Gets the description.
 java.util.Set getEnumeration()
          Gets the enumeration.
 java.util.Map getEnumerationTexts()
          Gets the enumerationTexts. enumerationTexts contains a description for each enumeration value.
 java.lang.String getFieldLabel()
          Gets the fieldLabel.
 java.lang.String getFormat()
          Gets the format. format is the string the format- and parse- methods are based onto.
 java.lang.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.
 java.lang.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.
 java.lang.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.
 java.lang.Object getMinExclusive()
          Gets minExclusive. minExclusive is the exclusive lower bound of the value space for a datatype which ca be ordered.
 java.lang.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.
 java.lang.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
 java.lang.String getQuickInfo()
          Gets the quickInfo.
 boolean getReadOnly()
          Gets readOnly.
 com.sap.typeservices.ISimpleValueServices getSVServices()
          Gets the valueservices.
 java.lang.String getTextLocale()
          Deprecated. return value will be null - always
 com.sap.typeservices.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(java.math.BigDecimal value)
          Deprecated. Use checkValid() instead
 boolean isValid(boolean value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.lang.Boolean value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.sql.Date value)
          Deprecated. Use checkValid() instead
 boolean isValid(double value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.lang.Double value)
          Deprecated. Use checkValid() instead
 boolean isValid(int value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.lang.Integer value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.lang.Object value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.lang.String value)
          Deprecated. Use checkValid() instead
 boolean isValid(java.sql.Time value)
          Deprecated. Use checkValid() instead
 java.lang.Object parse(java.lang.String value)
          Returns an instance of Object with a value matching the given string.
 java.math.BigInteger parseBigInteger(java.lang.String text)
          Returns an instance of BigInteger with a value matching the given string.
 boolean parseBoolean(java.lang.String text)
          Returns a value of type boolean with a value matching the given string.
 java.lang.Boolean parseBooleanObject(java.lang.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(java.lang.String text)
          Returns a byte with a value matching the given string.
 java.lang.Byte parseByteObject(java.lang.String text)
          Returns an instance of Byte with a value matching the given string.
 java.sql.Date parseDate(java.lang.String text)
          Returns an instance of java.sql.Date with a value matching the given string.
 java.math.BigDecimal parseDecimal(java.lang.String text)
          Returns an instance of BigDecimal with a value matching the given string.
 double parseDouble(java.lang.String text)
          Returns a double with a value matching the given string.
 java.lang.Double parseDoubleObject(java.lang.String text)
          Returns an instance of Double with a value matching the given string.
 float parseFloat(java.lang.String text)
          Returns a float with a value matching the given string.
 java.lang.Float parseFloatObject(java.lang.String text)
          Returns an instance of Float with a value matching the given string.
 int parseInt(java.lang.String text)
          Returns an int with a value matching the given string.
 java.lang.Integer parseInteger(java.lang.String text)
          Returns an instance of Integer with a value matching the given string.
 long parseLong(java.lang.String text)
          Returns a long with a value matching the given string.
 java.lang.Long parseLongObject(java.lang.String text)
          Returns an instance of Long with a value matching the given string.
 short parseShort(java.lang.String text)
          Returns a short with a value matching the given string.
 java.lang.Short parseShortObject(java.lang.String text)
          Returns an instance of Short with a value matching the given string.
 java.lang.String parseString(java.lang.String text)
          Returns an instance of String with a value matching the given string.
 java.sql.Time parseTime(java.lang.String text)
          Returns an instance of java.sql.Time with a value matching the given string.
 java.sql.Timestamp parseTimestamp(java.lang.String text)
          Returns an instance of java.sql.Timestamp with a value matching the given string.
 java.util.Date parseUtilDate(java.lang.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.
 java.lang.String toString(java.lang.Object value)
          Formats a value of type Object to produce a string
 java.lang.Object valueOf(java.lang.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(java.util.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 java.lang.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 java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.math.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 java.lang.String format(java.math.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.String format(java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String format(java.util.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 java.lang.String format(java.sql.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 java.lang.String format(java.sql.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()

formatOfDefaultValue

public java.lang.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 java.lang.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 java.lang.Object parse(java.lang.String value)
                       throws java.text.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

parseBoolean

public boolean parseBoolean(java.lang.String text)
                     throws java.text.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
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails

parseString

public java.lang.String parseString(java.lang.String text)
                             throws java.text.ParseException
Returns an instance of String 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

parseBooleanObject

public java.lang.Boolean parseBooleanObject(java.lang.String text)
                                     throws java.text.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.
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails

parseDecimal

public java.math.BigDecimal parseDecimal(java.lang.String text)
                                  throws java.text.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
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails
See Also:
getFormat()

parseBigInteger

public java.math.BigInteger parseBigInteger(java.lang.String text)
                                     throws java.text.ParseException
Returns an instance of BigInteger 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

parseByteObject

public java.lang.Byte parseByteObject(java.lang.String text)
                               throws java.text.ParseException
Returns an instance of Byte 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

parseDoubleObject

public java.lang.Double parseDoubleObject(java.lang.String text)
                                   throws java.text.ParseException
Returns an instance of Double 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

parseFloatObject

public java.lang.Float parseFloatObject(java.lang.String text)
                                 throws java.text.ParseException
Returns an instance of Float 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

parseInteger

public java.lang.Integer parseInteger(java.lang.String text)
                               throws java.text.ParseException
Returns an instance of Integer 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

parseLongObject

public java.lang.Long parseLongObject(java.lang.String text)
                               throws java.text.ParseException
Returns an instance of Long 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

parseShortObject

public java.lang.Short parseShortObject(java.lang.String text)
                                 throws java.text.ParseException
Returns an instance of Short 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

parseByte

public byte parseByte(java.lang.String text)
               throws java.text.ParseException
Returns a byte 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

parseDouble

public double parseDouble(java.lang.String text)
                   throws java.text.ParseException
Returns a double 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

parseFloat

public float parseFloat(java.lang.String text)
                 throws java.text.ParseException
Returns a float 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

parseInt

public int parseInt(java.lang.String text)
             throws java.text.ParseException
Returns an int 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

parseLong

public long parseLong(java.lang.String text)
               throws java.text.ParseException
Returns a long 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

parseShort

public short parseShort(java.lang.String text)
                 throws java.text.ParseException
Returns a short 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

parseUtilDate

public java.util.Date parseUtilDate(java.lang.String text)
                             throws java.text.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
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails
See Also:
getFormat()

parseDate

public java.sql.Date parseDate(java.lang.String text)
                        throws java.text.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
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails
See Also:
getFormat()

parseTime

public java.sql.Time parseTime(java.lang.String text)
                        throws java.text.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
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails
See Also:
getFormat()

parseTimestamp

public java.sql.Timestamp parseTimestamp(java.lang.String text)
                                  throws java.text.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
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails
See Also:
getFormat()

toString

public java.lang.String toString(java.lang.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 java.lang.Object valueOf(java.lang.String string)
                         throws java.text.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.
Parameters:
value - - the string to be parsed
Returns:
the parsed value, or ParseException if the parse fails

isValid

public boolean isValid(java.lang.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(java.lang.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(java.sql.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(java.sql.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(java.math.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(java.lang.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(java.lang.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(java.lang.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(java.lang.Object value)
                throws com.sap.dictionary.runtime.DdCheckException
Validates a value of type Object against the SimpleTypes properties
Parameters:
value - - The value to validate
Throws:
DdCheckException, - if value is not valid

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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.Object getDefaultValue()
Gets the defaultValue. The default value is the default send to screen for fields of this type.

getFormat

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

getDescription

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

getFieldLabel

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

getColumnLabel

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

getQuickInfo

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

getTextLocale

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

Gets the textLocale.

getEnumeration

public java.util.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 java.util.Map getEnumerationTexts()
Gets the enumerationTexts. enumerationTexts contains a description for each enumeration value.

getTextServices

public com.sap.typeservices.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 com.sap.typeservices.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 java.lang.String getBuiltInType()
Gets the builtInType as String

getBuiltInTypeEnum

public java.lang.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 © 2005 SAP AG. All Rights Reserved.