Oracle Fusion Middleware extensions for Enterprise Scheduler Service
11g Release 1 (11.1.2)

E22563-02

oracle.apps.fnd.applcp.migrate.modeler.common
Class SegmentDefImpl

java.lang.Object
  extended by oracle.apps.fnd.applcp.migrate.modeler.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.applcp.migrate.modeler.common.SegmentDef
SegmentDef.Column, SegmentDef.ValueAttribute, SegmentDef.ValueAttributeValidator
 
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.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.
 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 getLabel()
          Gets the Label.
 java.lang.String[] getLabelCodes()
          Gets the list of segment labels associated with this segment.
 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 getTitle()
          Gets the title.
 UIHints getUIHints()
          Gets the hints for rendering the user interface.
 Validator getValidator()
          Gets the validator associated with this segment.
 ValueType getValueType()
          Gets the Value Type
 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 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 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 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 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 setProperty(java.lang.String name, java.lang.Object value)
          Sets a property of this segment.
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 setValidator(Validator v)
          Sets the validator for this segment.
 void setValueType(ValueType valueType)
          Sets the Value Type.
 
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.

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

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

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

getValueType

public ValueType getValueType()
Gets the Value Type

Specified by:
getValueType in interface SegmentDef
Returns:
the Value Type

setValueType

public void setValueType(ValueType valueType)
Sets the Value Type.

Specified by:
setValueType in interface SegmentDef
Parameters:
valueType - the value type

Oracle Fusion Middleware extensions for Enterprise Scheduler Service
11g Release 1 (11.1.2)

E22563-02

Copyright © 2011 Oracle. All Rights Reserved.