Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.model
Interface PresetDescriptor

All Superinterfaces:
ModelObject, XMLObject

public interface PresetDescriptor
extends ModelObject

A PresetDescriptor is created by the PresetCategory. It defines one of the attributes of the Presets.


Field Summary
static int TYPEID
          The type id of this class.
static java.lang.String TYPENAME
          The constant class type identifier

 

Method Summary
 java.lang.String getDescription()
          Gets the description of the preset attribute.
 java.lang.String getFormat()
          Gets the format of the preset value.
 java.lang.String getName()
          Gets the name of the preset attribute.
 java.lang.String[] getOptions()
          Gets the options.
 DataType getPresetDataType()
          Get the DataType which is a symbolic description of the stored type.
 ArgumentType getPresetType()
          Gets the type of the preset, such as enum, single line, multi-line, etc.
 java.lang.Long getScale()
          Gets the scale of the numeric data type.
 java.lang.Long getSize()
          Gets the size of the data of the given data type.
 int getStoredType()
          Gets the stored data type in the database.
 boolean isEmptyOK()
          Test if the preset value can be empty.
 void setDescription(java.lang.String description)
          Sets the description of the preset attribute.
 void setEmptyOK(boolean emptyOK)
          Sets if the preset can be empty or not empty.
 void setFormat(java.lang.String format)
          Sets the format of the preset value.
 void setName(java.lang.String name)
          Sets the name of the preset attribute.
 void setOptions(java.lang.String[] options)
          Sets the options.
 void setPresetDataType(DataType type)
          Set the stored data type using the symbolic description.
 void setPresetDataType(java.lang.String code)
          Set the stored data type using the code number of the DataType.
 void setPresetType(ArgumentType type)
          Sets the type of the preset, such as enum, single line, multi-line, etc.
 void setScale(java.lang.Long scale)
          Sets the scale of the numeric data type.
 void setSize(java.lang.Long size)
          Sets the size of the data of the given data type.
 void setStoredType(int storedType)
          Sets the stored data type in the database.
 boolean verifyFormat(java.lang.String value)
          Verify if the preset value satisfy the format specification.

 

Methods inherited from interface oracle.panama.model.ModelObject
delete, getCreatedDate, getId, getLastModifiedDate, getTypeId, getTypeName, isSystem, setSystem, undoAll

 

Methods inherited from interface oracle.panama.model.XMLObject
setXML, toXML

 

Field Detail

TYPEID

public static final int TYPEID
The type id of this class.
See Also:
Constant Field Values

TYPENAME

public static final java.lang.String TYPENAME
The constant class type identifier
See Also:
Constant Field Values

Method Detail

getDescription

public java.lang.String getDescription()
Gets the description of the preset attribute.

getFormat

public java.lang.String getFormat()
Gets the format of the preset value. The format string must conform to 1. the decimal expressions of java.text.DecimalFormat for NUMERIC data types 2. the regular expressions of org.apache.regexp.RE for CHAR or VARCHAR data types
See Also:
setFormat(String)

getName

public java.lang.String getName()
Gets the name of the preset attribute.
Specified by:
getName in interface ModelObject
Returns:
String the name of the object

getOptions

public java.lang.String[] getOptions()
Gets the options. Valid only if the type is ENUM.

getPresetDataType

public DataType getPresetDataType()
Get the DataType which is a symbolic description of the stored type.

getPresetType

public ArgumentType getPresetType()
Gets the type of the preset, such as enum, single line, multi-line, etc.

getScale

public java.lang.Long getScale()
Gets the scale of the numeric data type.

getSize

public java.lang.Long getSize()
Gets the size of the data of the given data type. It may be the size of VARCHAR2(size) or the precision of the NUMBER(precision).

getStoredType

public int getStoredType()
Gets the stored data type in the database. The valid stored types are java.sql.Types.NUMERIC; java.sql.Types.BIGINT; java.sql.Types.DOUBLE: java.sql.Types.FLOAT; java.sql.Types.INTEGER; java.sql.Types.SMALLINT; java.sql.Types.VARCHAR; java.sql.Types.CHAR; java.sql.Types.TIME; java.sql.Types.DATE; java.sql.Types.TIMESTAMP;

isEmptyOK

public boolean isEmptyOK()
Test if the preset value can be empty.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the preset attribute.

setEmptyOK

public void setEmptyOK(boolean emptyOK)
Sets if the preset can be empty or not empty.

setFormat

public void setFormat(java.lang.String format)
Sets the format of the preset value. The format string must conform to 1. the decimal expressions of java.text.DecimalFormat for NUMERIC data types 2. the regular expressions of org.apache.regexp.RE for CHAR or VARCHAR data types The validity of the format expression is checked only when verifyFormat() is called.
See Also:
getFormat()

setName

public void setName(java.lang.String name)
Sets the name of the preset attribute.
Specified by:
setName in interface ModelObject
Parameters:
name - must be not null

setOptions

public void setOptions(java.lang.String[] options)
                throws TooManyOptionsException
Sets the options. Valid only if the type is ENUM.
Throws:
TooManyOptionsException - if the options do not satisfy the format

setPresetDataType

public void setPresetDataType(DataType type)
Set the stored data type using the symbolic description.

setPresetDataType

public void setPresetDataType(java.lang.String code)
Set the stored data type using the code number of the DataType.

setPresetType

public void setPresetType(ArgumentType type)
Sets the type of the preset, such as enum, single line, multi-line, etc.
See Also:
ArgumentType

setScale

public void setScale(java.lang.Long scale)
Sets the scale of the numeric data type.

setSize

public void setSize(java.lang.Long size)
Sets the size of the data of the given data type. It may be the size of VARCHAR2(size) or the precision of the NUMBER(precision).

setStoredType

public void setStoredType(int storedType)
Sets the stored data type in the database. The valid stored types are java.sql.Types.NUMERIC; java.sql.Types.BIGINT; java.sql.Types.DOUBLE: java.sql.Types.FLOAT; java.sql.Types.INTEGER; java.sql.Types.SMALLINT; java.sql.Types.VARCHAR; java.sql.Types.CHAR; java.sql.Types.TIME; java.sql.Types.DATE; java.sql.Types.TIMESTAMP;

verifyFormat

public boolean verifyFormat(java.lang.String value)
                     throws PanamaException
Verify if the preset value satisfy the format specification.
Returns:
true if the value satisfy the format specification
Throws:
PanamaException - if the format expression is not valid

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.