Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.flex.runtime.util.common
Class SegmentDefImpl

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.runtime.util.common.SegmentDefImpl
All Implemented Interfaces:
SegmentDef, UIHints

public class SegmentDefImpl
extends java.lang.Object
implements SegmentDef, UIHints

Standard implementation of SegmentDef.


Nested Class Summary
protected static class SegmentDefImpl.ColumnImpl
          An implementation of Column.
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.applcore.flex.runtime.util.common.SegmentDef
SegmentDef.Column, SegmentDef.Operator
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.applcore.flex.runtime.util.common.UIHints
UIHints.DisplayType, UIHints.DisplayTypeProperty
 
Field Summary
 
Fields inherited from interface oracle.apps.fnd.applcore.flex.runtime.util.common.UIHints
CTL_DATE_TIME, CTL_TYPE_PREFIX
 
Constructor Summary
protected SegmentDefImpl(java.lang.String name)
          Constructs a segment.
 
Method Summary
 SegmentDef.Column getColumn()
          Gets the database table column associated with this segment.
 java.lang.String getControlType()
          Gets the preferred UI control type
 java.util.List<SegmentDef.Operator> getCustomOperators()
          Gets the list of custom operators.
 java.lang.String getDefaultValue()
          Gets the default value of the segment.
 java.lang.String getDefaultValueType()
          Gets the type of the default value.
 java.lang.String getDerivationValue()
          Gets the flexfield parameter code this segment value is derived from.
 java.lang.String getDescription()
          Gets the description.
 UIHints.DisplayType getDisplayType()
          Gets the preferred display type.
 java.lang.Object getDisplayTypeProperty(UIHints.DisplayTypeProperty name)
          Gets a property of a display type.
 int getDisplayWidth()
          Gets the display width.
 java.lang.String getFormattedDefaultValue(java.lang.Class targetJavaType)
          Gets the formatted default value for runtime use.
 java.lang.String getIndexedFlag()
          Gets the Indexed Flag
 java.lang.String getLabel()
          Gets the label in the locale when this information is fetched.
 java.lang.String[] getLabelCodes()
          Gets the list of segment labels associated with this segment.
 java.lang.String getMultiRowUniqueKeyFlag()
          Gets the MultiRow Unique Key Flag
 java.lang.String getName()
          Gets the name of this segment.
 java.lang.Object getProperty(java.lang.String pname)
          Gets the property value.
 java.lang.String[] getPropertyNames()
          Gets the names of all properties.
 java.lang.String getQueryRequiredType()
          Gets the query required type.
 java.lang.String getTitle()
          Gets the title.
 java.util.Map<java.lang.String,java.lang.String> getTranslatedLabels()
          Gets translated labels for multiple languages.
 java.lang.String getTreeCode()
          Gets the tree code associated with this segment.
 UIHints getUIHints()
          Gets the hints for rendering the user interface.
 java.lang.String getUOMClass()
          Gets the UOM Class
 Validator getValidator()
          Gets the validator associated with this segment.
 boolean isBIEnabled()
          Returns true if this segment is BI-enabled.
 boolean isDiscriminator()
          Returns true if this segment is a discriminator.
 boolean isGlobal()
          Returns true if this segment is a global segment.
 boolean isHidden()
          Returns true if the associated component should be hidden.
 boolean isMandatory()
          Returns true if this segment is mandatory.
 boolean isReadOnly()
          Returns true if the segment is read-only.
 boolean isReferenced()
          Returns true if the associated component is referenced by other components.
protected  void setBIEnabled(boolean b)
          Sets whether this segment is BI-enabled.
protected  void setColumn(SegmentDef.Column col)
          Sets the database table column for this segment.
protected  void setControlType(java.lang.String type)
          Sets the preferred UI control type for this segment.
protected  void setCustomOperators(java.util.List<SegmentDef.Operator> opers)
          Sets the list of custom operators.
protected  void setDefaultValue(java.lang.String s)
          Sets the default vlaue of the segment.
protected  void setDefaultValueType(java.lang.String t)
          Sets the type of the default value.
protected  void setDerivationValue(java.lang.String value)
          Sets the derivation value.
protected  void setDescription(java.lang.String s)
          Sets the description of this segment.
protected  void setDiscriminator(boolean b)
          Sets whether this segment is a discriminator.
protected  void setDisplayType(UIHints.DisplayType type)
          Sets the preferred display type for this segment.
protected  void setDisplayTypeProperty(UIHints.DisplayTypeProperty name, java.lang.Object value)
          Sets a property of a display type.
protected  void setDisplayWidth(int w)
          Sets the display width.
protected  void setGlobal(boolean b)
          Sets whether this segment is a global segment.
protected  void setHidden(boolean b)
          Sets whether this segment should be hidden.
protected  void setIndexedFlag(java.lang.String indexedFlag)
          Sets the Indexed Flag.
protected  void setLabel(java.lang.String s)
          Sets the label for this segment.
protected  void setLabelCodes(java.lang.String[] codes)
          Sets the list of segment labels associated with this segment.
protected  void setMandatory(boolean b)
          Sets whether this segment is mandatory.
protected  void setMultiRowUniqueKeyFlag(java.lang.String multiRowUniqueKeyFlag)
          Sets the MultiRow Unique Key Flag.
protected  void setProperty(java.lang.String name, java.lang.Object value)
          Sets a property of this segment.
protected  void setQueryRequiredType(java.lang.String type)
          Sets the query required type.
protected  void setReadOnly(boolean b)
          Sets whether this segment is read-only.
protected  void setReferenced(boolean b)
          Sets whether this segment is referenced by other components.
protected  void setTitle(java.lang.String s)
          Sets the title of this segment.
protected  void setTranslatedLabels(java.util.Map<java.lang.String,java.lang.String> map)
          Sets the translated labels.
protected  void setTreeCode(java.lang.String code)
          Sets the tree code associated with this segment.
protected  void setUOMClass(java.lang.String uomClass)
          Sets the UOM Class.
protected  void setValidator(Validator v)
          Sets the validator for this segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentDefImpl

protected SegmentDefImpl(java.lang.String name)
Constructs a segment.

Parameters:
name - the name of the segment
Throws:
java.lang.IllegalArgumentException - if the given name is null
Method Detail

getName

public java.lang.String getName()
Gets the name of this segment.

Specified by:
getName in interface SegmentDef
Returns:
the name of this segment

isGlobal

public boolean isGlobal()
Returns true if this segment is a global segment.

Specified by:
isGlobal in interface SegmentDef
Returns:
true if this segment is a global segment

setGlobal

protected void setGlobal(boolean b)
Sets whether this segment is a global segment.

Parameters:
b - true if this segment is a global segment

isDiscriminator

public boolean isDiscriminator()
Returns true if this segment is a discriminator.

Specified by:
isDiscriminator in interface SegmentDef
Returns:
true if this segment is a discriminator

setDiscriminator

protected void setDiscriminator(boolean b)
Sets whether this segment is a discriminator.

Parameters:
b - true if this segment is a discriminator

isMandatory

public boolean isMandatory()
Returns true if this segment is mandatory.

Specified by:
isMandatory in interface SegmentDef
Returns:
true if this segment is mandatory.

setMandatory

protected void setMandatory(boolean b)
Sets whether this segment is mandatory.

Parameters:
b - true if this segment is mandatory

isReadOnly

public boolean isReadOnly()
Returns true if the segment is read-only.

Specified by:
isReadOnly in interface UIHints
Returns:
true if the segment is read-only

setReadOnly

protected void setReadOnly(boolean b)
Sets whether this segment is read-only.

Parameters:
b - true if this segment is read-only

getDerivationValue

public java.lang.String getDerivationValue()
Gets the flexfield parameter code this segment value is derived from.

Specified by:
getDerivationValue in interface SegmentDef
Returns:
the flexfield parameter code

setDerivationValue

protected void setDerivationValue(java.lang.String value)
Sets the derivation value.

Parameters:
value - the derivation value

getDefaultValue

public java.lang.String getDefaultValue()
Gets the default value of the segment.

Specified by:
getDefaultValue in interface SegmentDef
Returns:
the default value

getFormattedDefaultValue

public java.lang.String getFormattedDefaultValue(java.lang.Class targetJavaType)
Gets the formatted default value for runtime use.

Specified by:
getFormattedDefaultValue in interface SegmentDef
Parameters:
targetJavaType - the Java type of the attribute where the default value will be applied
Returns:
the formatted default value

setDefaultValue

protected void setDefaultValue(java.lang.String s)
Sets the default vlaue of the segment.

Parameters:
s - the default value

getDefaultValueType

public java.lang.String getDefaultValueType()
Gets the type of the default value.

Specified by:
getDefaultValueType in interface SegmentDef
Returns:
the type of the default value

setDefaultValueType

protected void setDefaultValueType(java.lang.String t)
Sets the type of the default value.

Parameters:
t - the type of the default value

getUIHints

public UIHints getUIHints()
Gets the hints for rendering the user interface.

Specified by:
getUIHints in interface SegmentDef
Returns:
the hints for the UI

getTitle

public java.lang.String getTitle()
Gets the title.

Specified by:
getTitle in interface UIHints
Returns:
the title

setTitle

protected void setTitle(java.lang.String s)
Sets the title of this segment.

Parameters:
s - the title of this segment

getDescription

public java.lang.String getDescription()
Gets the description.

Specified by:
getDescription in interface UIHints
Returns:
the description

setDescription

protected void setDescription(java.lang.String s)
Sets the description of this segment.

Parameters:
s - the description of this segment

getLabel

public java.lang.String getLabel()
Gets the label in the locale when this information is fetched.

Specified by:
getLabel in interface UIHints
Returns:
the label

setLabel

protected void setLabel(java.lang.String s)
Sets the label for this segment.

Parameters:
s - the label for this segment

getTranslatedLabels

public java.util.Map<java.lang.String,java.lang.String> getTranslatedLabels()
Description copied from interface: UIHints
Gets translated labels for multiple languages. The keys are language codes and the values are labels in those languages.

Specified by:
getTranslatedLabels in interface UIHints
Returns:
the translated labels for multiple languages; an empty map if no translated labels are available

setTranslatedLabels

protected void setTranslatedLabels(java.util.Map<java.lang.String,java.lang.String> map)
Sets the translated labels.

Parameters:
map - the map of labels where the keys are the language codes and the values are the labels in those languages

getControlType

public java.lang.String getControlType()
Gets the preferred UI control type

Specified by:
getControlType in interface UIHints
Returns:
the preferred control type

setControlType

protected void setControlType(java.lang.String type)
Sets the preferred UI control type for this segment.

Parameters:
type - the preferred UI control type

getDisplayType

public UIHints.DisplayType getDisplayType()
Gets the preferred display type.

Specified by:
getDisplayType in interface UIHints
Returns:
the preferred display type

setDisplayType

protected void setDisplayType(UIHints.DisplayType type)
Sets the preferred display type for this segment.

Parameters:
type - the preferred display type

getDisplayTypeProperty

public java.lang.Object getDisplayTypeProperty(UIHints.DisplayTypeProperty name)
Gets a property of a display type.

Specified by:
getDisplayTypeProperty in interface UIHints
Parameters:
name - the property
Returns:
the property value

setDisplayTypeProperty

protected void setDisplayTypeProperty(UIHints.DisplayTypeProperty name,
                                      java.lang.Object value)
Sets a property of a display type.

Parameters:
name - the name of the property
value - the value

isHidden

public boolean isHidden()
Returns true if the associated component should be hidden.

Specified by:
isHidden in interface UIHints
Returns:
true if the associated component should be hidden

setReferenced

protected void setReferenced(boolean b)
Sets whether this segment is referenced by other components.

Parameters:
b - whether this segment is referenced by other components

isReferenced

public boolean isReferenced()
Returns true if the associated component is referenced by other components. In general, the UI of the associated component should post back the data changes as soon as possible if the component is updatable and referenced.

Specified by:
isReferenced in interface UIHints
Returns:
true if the associated component is referenced by other components

setHidden

protected void setHidden(boolean b)
Sets whether this segment should be hidden.

Parameters:
b - true if this segment should be hidden

getDisplayWidth

public int getDisplayWidth()
Gets the display width. If the display width is -1, it has not been set yet.

Specified by:
getDisplayWidth in interface UIHints
Returns:
the display width; -1 if the display width has never been set

setDisplayWidth

protected void setDisplayWidth(int w)
Sets the display width.

Parameters:
w - the display width
Throws:
java.lang.IllegalArgumentException - if the given width is less than zero

getProperty

public java.lang.Object getProperty(java.lang.String pname)
Gets the property value.

Specified by:
getProperty in interface SegmentDef
Parameters:
pname - the property name
Returns:
the property value

getPropertyNames

public java.lang.String[] getPropertyNames()
Gets the names of all properties.

Specified by:
getPropertyNames in interface SegmentDef
Returns:
the names of all properties

setProperty

protected void setProperty(java.lang.String name,
                           java.lang.Object value)
Sets a property of this segment.

Parameters:
name - the name of the property
value - the value of the property

getValidator

public Validator getValidator()
Gets the validator associated with this segment.

Specified by:
getValidator in interface SegmentDef
Returns:
the validator associated with this segment; null if no validator is associated with this segment

setValidator

protected void setValidator(Validator v)
Sets the validator for this segment.

Parameters:
v - the validator

getColumn

public SegmentDef.Column getColumn()
Gets the database table column associated with this segment.

Specified by:
getColumn in interface SegmentDef
Returns:
the database table column associated with this segment

setColumn

protected void setColumn(SegmentDef.Column col)
Sets the database table column for this segment.

Parameters:
col - the database table column

getLabelCodes

public java.lang.String[] getLabelCodes()
Gets the list of segment labels associated with this segment.

Specified by:
getLabelCodes in interface SegmentDef
Returns:
the list of segment labels

setLabelCodes

protected void setLabelCodes(java.lang.String[] codes)
Sets the list of segment labels associated with this segment.

Parameters:
codes - the list of segment label codes

getCustomOperators

public java.util.List<SegmentDef.Operator> getCustomOperators()
Gets the list of custom operators. If no custom operator is defined, an empty list is returned. This method never returns null.

Specified by:
getCustomOperators in interface SegmentDef
Returns:
the list of custom operators

setCustomOperators

protected void setCustomOperators(java.util.List<SegmentDef.Operator> opers)
Sets the list of custom operators.

Parameters:
opers - the list of custom operators

getUOMClass

public java.lang.String getUOMClass()
Gets the UOM Class

Specified by:
getUOMClass in interface SegmentDef
Returns:
the UOM Class

setUOMClass

protected void setUOMClass(java.lang.String uomClass)
Sets the UOM Class.

Parameters:
uomClass - the UOM Class

getIndexedFlag

public java.lang.String getIndexedFlag()
Gets the Indexed Flag

Specified by:
getIndexedFlag in interface SegmentDef
Returns:
the Indexed Flag

setIndexedFlag

protected void setIndexedFlag(java.lang.String indexedFlag)
Sets the Indexed Flag.

Parameters:
indexedFlag - the Indexed Flag

setBIEnabled

protected void setBIEnabled(boolean b)
Sets whether this segment is BI-enabled.

Parameters:
b - true if this segment is BI-enabled

isBIEnabled

public boolean isBIEnabled()
Returns true if this segment is BI-enabled.

Specified by:
isBIEnabled in interface SegmentDef
Returns:
true if this segment is BI-enabled

getMultiRowUniqueKeyFlag

public java.lang.String getMultiRowUniqueKeyFlag()
Gets the MultiRow Unique Key Flag

Specified by:
getMultiRowUniqueKeyFlag in interface SegmentDef
Returns:
the MultiRow Unique Key Flag

setMultiRowUniqueKeyFlag

protected void setMultiRowUniqueKeyFlag(java.lang.String multiRowUniqueKeyFlag)
Sets the MultiRow Unique Key Flag.

Parameters:
multiRowUniqueKeyFlag - the MultiRow Unique Key Flag

getTreeCode

public java.lang.String getTreeCode()
Description copied from interface: SegmentDef
Gets the tree code associated with this segment.

Specified by:
getTreeCode in interface SegmentDef
Returns:
the tree code

setTreeCode

protected void setTreeCode(java.lang.String code)
Sets the tree code associated with this segment.

Parameters:
code - the tree code

getQueryRequiredType

public java.lang.String getQueryRequiredType()
Description copied from interface: SegmentDef
Gets the query required type. The types are defined in oracle.apps.fnd.applcore.flex.common.util.QueryRequiredType

Specified by:
getQueryRequiredType in interface SegmentDef
Returns:
the query required type; null if not applicable
See Also:
QueryRequiredType

setQueryRequiredType

protected void setQueryRequiredType(java.lang.String type)
Sets the query required type.

Parameters:
type - the query required type

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.