Cool documentation

com.sap.tc.col.client.metadata.api
Interface IFieldDescriptor


public interface IFieldDescriptor

Describes the properties of a specific field of a strcuture.


Field Summary
static java.lang.String BINARY
          Constant for the binary data type used by cool fields.
static java.lang.String BOOLEAN
          Constant for the boolean type used by cool fields.
static java.lang.String DATE
          Constant for the date type used by cool fields.
static java.lang.String DECIMAL
          Constant for the decimal type used by cool fields.
static java.lang.String DOUBLE
          Constant for the floating point type used by cool fields.
static java.lang.String INTEGER
          Constant for the integer type used by cool fields.
static java.lang.String STRING
          Constant for the string type used by cool fields.
static int TEXT_FIELDTEXT
           
static int TEXT_SCRTEXT_L
           
static int TEXT_SCRTEXT_M
           
static int TEXT_SCRTEXT_S
           
static java.lang.String TIME
          Constant for the time type used by cool fields.
static java.lang.String TIMESTAMP
          Constant for the timestamp type used by cool fields.
static java.lang.String VARIANT
          Constant for the variant type used by cool fields.
 
Method Summary
 java.lang.String getName()
          Returns the name of the field.
 com.sap.dictionary.runtime.ISimpleType getSimpleType()
          Returns a simple type object which represents the type of this field.
 java.lang.String getText()
          Method getText.
 java.lang.String getText(int textId)
          Method getText.
 java.lang.String getType()
          Returns the cool type of this field.
 IStructureDescriptor getVariant(java.lang.String variantName)
          Returns the structure descriptor for the given field variant.
 IStructureDescriptor[] getVariants()
          Returns an array with the structure descriptors which are possible variants for this field.
 boolean isExtension()
          Returns whether this field is an extension of the original structure.
 boolean isVariant()
          Returns whether this field descriptor describes a variant structure.
 java.lang.String toString()
          returns a string representation of this FieldDescriptor
 

Field Detail

STRING

public static final java.lang.String STRING
Constant for the string type used by cool fields.

INTEGER

public static final java.lang.String INTEGER
Constant for the integer type used by cool fields.

DATE

public static final java.lang.String DATE
Constant for the date type used by cool fields.

BOOLEAN

public static final java.lang.String BOOLEAN
Constant for the boolean type used by cool fields.

DECIMAL

public static final java.lang.String DECIMAL
Constant for the decimal type used by cool fields.

TIMESTAMP

public static final java.lang.String TIMESTAMP
Constant for the timestamp type used by cool fields.

TIME

public static final java.lang.String TIME
Constant for the time type used by cool fields.

DOUBLE

public static final java.lang.String DOUBLE
Constant for the floating point type used by cool fields.

BINARY

public static final java.lang.String BINARY
Constant for the binary data type used by cool fields.

VARIANT

public static final java.lang.String VARIANT
Constant for the variant type used by cool fields. If a field is of the type variant, it stores one of a number of predefined structure variants.
See Also:
getVariant(String), getVariants()

TEXT_FIELDTEXT

public static final int TEXT_FIELDTEXT

TEXT_SCRTEXT_S

public static final int TEXT_SCRTEXT_S

TEXT_SCRTEXT_M

public static final int TEXT_SCRTEXT_M

TEXT_SCRTEXT_L

public static final int TEXT_SCRTEXT_L
Method Detail

getName

public java.lang.String getName()
Returns the name of the field.
Returns:
name of the field.

getType

public java.lang.String getType()
Returns the cool type of this field. This is currently one of the following: STRING, INTEGER, BOOLEAN, DATE.
Returns:
the type of the field

getSimpleType

public com.sap.dictionary.runtime.ISimpleType getSimpleType()
Returns a simple type object which represents the type of this field. The simple type will be created for the locale of the service module (which is the same as the locale for the whole connection).
Returns:
a simple type object.

getText

public java.lang.String getText()
Method getText. return default text for the current field (currently TEXT_FIELDTEXT)
Returns:
String

getText

public java.lang.String getText(int textId)
Method getText. return a specific text for the current field (see static members TEXT_*)
Parameters:
textId - id for the text (for example TEXT_FIELDTEXT)
Returns:
String

isExtension

public boolean isExtension()
Returns whether this field is an extension of the original structure.
Returns:
true if this is an extension field, otherwise false

isVariant

public boolean isVariant()
Returns whether this field descriptor describes a variant structure. If this is the case the createSimpleType() methods will throw an exception.
Returns:
true if this is a variant field, otherwise false
See Also:
#createSimpleType(), #createSimpleType(Locale)

getVariant

public IStructureDescriptor getVariant(java.lang.String variantName)
Returns the structure descriptor for the given field variant.
Parameters:
variantName - name of the field variant
Returns:
the structure of the variant.
Throws:
java.lang.IllegalArgumentException - if the variantName is not in the list of possible variants for this field.
UnsupportedOperationException - if the field is not of type VARIANT
See Also:
VARIANT

getVariants

public IStructureDescriptor[] getVariants()
Returns an array with the structure descriptors which are possible variants for this field.
Returns:
StructureDescriptor[]
Throws:
UnsupportedOperationException - if the field is not of type VARIANT
See Also:
VARIANT

toString

public java.lang.String toString()
returns a string representation of this FieldDescriptor
Overrides:
toString in class java.lang.Object

Cool documentation

Copyright © 2002 SAP AG. Automatically generated Thu Mar 3 2005, 21:55