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

E22563-02

oracle.apps.fnd.applcp.migrate.modeler
Class AbstractBCModeler

java.lang.Object
  extended by oracle.apps.fnd.applcp.migrate.modeler.BCModeler
      extended by oracle.apps.fnd.applcp.migrate.modeler.AbstractBCModeler
Direct Known Subclasses:
DFFBCModeler, KFFBCModeler

public abstract class AbstractBCModeler
extends BCModeler

This class facilitates the implementation of BCModeler class.


Nested Class Summary
protected static interface AbstractBCModeler.EntityPersonalization
          Personalization data for a flexfield entity.
protected static interface AbstractBCModeler.SegmentValidators
          Validators for a segment.
protected static interface AbstractBCModeler.ValidatorOnCondition
          The "on condition" of a validator.
 
Nested classes/interfaces inherited from class oracle.apps.fnd.applcp.migrate.modeler.BCModeler
BCModeler.Arguments, BCModeler.CommandLineArgs, BCModeler.Option, BCModeler.Options, BCModeler.Parameter
 
Field Summary
protected  FlexfieldDef _flexfieldDef
          Flexfield definition.
protected  FlexfieldEntityUsage _flexfieldEntityUsage
          Flexfield entity usage.
protected  java.lang.String _modelID
          Modeler ID derived from the flexfield definition.
protected  FlexfieldNamespace _namespace
          Flexfield namespace.
protected  BCModelerWriter _writer
          Modeler writer.
 
Constructor Summary
protected AbstractBCModeler(FlexfieldNamespace namespace, FlexfieldDef ff, FlexfieldEntityUsage flexEntityUsage, BCModelerWriter writer)
          Constructs a modeler.
 
Method Summary
protected  void addKeyAttributes(oracle.jbo.server.ViewDefImpl viewDef, java.lang.String entityUsageName, FlexfieldEntity flexfieldEntity, SegmentDefList segments, java.util.ArrayList<java.lang.String> selectAttrs)
          Adds key attributes of the input entity to a view object.
protected  oracle.jbo.server.AttributeDefImpl addSegmentAttribute(oracle.jbo.server.ViewDefImpl viewDef, SegmentDef seg, java.lang.String entityUsageName, FlexfieldEntity flexfieldEntity, java.util.ArrayList<java.lang.String> selectAttrs, java.util.ArrayList<java.lang.String> fromClauseItems, java.util.ArrayList<java.lang.String> whereClauseItems, ContextValueDef contextValueDef, boolean useAltDiscriminator)
          Adds a segment to a view object as a view attribute.
protected  oracle.jbo.server.AttributeDefImpl addSegmentAttributeAsViewAttribute(oracle.jbo.server.ViewDefImpl viewDef, SegmentDef seg, java.lang.String entityUsageName, FlexfieldEntity flexfieldEntity, java.util.ArrayList<java.lang.String> selectAttrs, java.util.ArrayList<java.lang.String> fromClauseItems, java.util.ArrayList<java.lang.String> whereClauseItems, ContextValueDef contextValueDef, boolean useAltDiscriminator)
          Adds a segment to a view object as a view attribute.
protected  void addValueSetTransients(oracle.jbo.server.ViewDefImpl viewDef)
          Adds transient attributes for the use of value sets.
 void build()
          Builds the model.
protected abstract  void buildInternal()
          Builds the model.
protected  java.util.List<oracle.jbo.server.ViewDefImpl> buildListDataSourceViewObjects(FlexfieldEntity flexfieldEntity)
          Builds the view objects used for lists of values.
protected static java.lang.String concatenate(java.util.List<java.lang.String> list, java.lang.String delimiter)
          Concatenates a list of strings together.
protected  oracle.jbo.server.ApplicationModuleDefImpl createApplicationModuleDefImpl(int scope, java.lang.String name)
          Creates an ApplicationModuleDefImpl object and sets the corresponding component class.
protected  FlexfieldEntity createFlexfieldEntity()
          Creates a flexfield entity based on the entity usage.
protected  oracle.jbo.server.ViewDefImpl createViewDefImpl(int scope, java.lang.String name)
          Creates a ViweDefImpl object and sets the corresponding row class and component class.
protected  AbstractBCModeler.EntityPersonalization getEntityPersonalization(FlexfieldEntity fe, ContextValueDef targetContext, boolean useAltDiscrValue)
          Gets the personalization data for a flexfield entity.
protected  java.util.Map<java.lang.String,java.lang.String> getEntityProperties(boolean discrExists)
          Gets the properties that should be set on a flexfield entity.
protected abstract  FlexfieldEntity getFlexfieldEntity()
          Gets the flexfield entity.
protected  java.util.Map<java.lang.String,java.lang.Object> getPropertyBoundValueMap(java.lang.Object discrValue, SegmentDef seg)
          Gets the map of property bound values.
 java.util.List<java.lang.String> getReport()
          Gets the report.
protected  AbstractBCModeler.ValidatorOnCondition getValidatorOnCondition()
          Gets the on-condition for a validator.
protected  void populateCommonProperties(oracle.jbo.mom.PersistableDefObject pdef, java.lang.String runtimeVersion)
          Populates common properties shared by all objects built by this modeler.
protected  void populateProperties(oracle.jbo.server.ApplicationModuleDefImpl amDef, java.lang.String runtimeVersion, java.lang.String modelType)
          Populates properties shared by all application modules built by this modeler.
protected  void populateProperties(oracle.jbo.server.ViewDefImpl viewDef, ContextValueDef contextValueDef, FlexfieldEntity flexfieldEntity, java.lang.String runtimeVersion, java.lang.String modelType, boolean isBaseViewDef)
          Populates properties shared by all view objects built by this modeler.
protected static void populateSegmentUIHints(oracle.jbo.server.AttributeDefImpl adi, UIHints uih, boolean isRequired)
          Populates the UI hints.
protected  void setOutputPath(java.lang.String path)
          Sets the output path.
 
Methods inherited from class oracle.apps.fnd.applcp.migrate.modeler.BCModeler
escapeJavaString, isDevelopmentMode, main, run, run, setAttributeControlHints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_namespace

protected final FlexfieldNamespace _namespace
Flexfield namespace.


_flexfieldDef

protected final FlexfieldDef _flexfieldDef
Flexfield definition.


_flexfieldEntityUsage

protected final FlexfieldEntityUsage _flexfieldEntityUsage
Flexfield entity usage.


_writer

protected final BCModelerWriter _writer
Modeler writer.


_modelID

protected final java.lang.String _modelID
Modeler ID derived from the flexfield definition.

Constructor Detail

AbstractBCModeler

protected AbstractBCModeler(FlexfieldNamespace namespace,
                            FlexfieldDef ff,
                            FlexfieldEntityUsage flexEntityUsage,
                            BCModelerWriter writer)
Constructs a modeler.

Parameters:
namespace - the namespace
ff - the flexfield definition
flexEntityUsage - the entity usage
writer - the modeler writer
Throws:
java.lang.IllegalArgumentException - if any of the arguments is null
Method Detail

getFlexfieldEntity

protected abstract FlexfieldEntity getFlexfieldEntity()
Gets the flexfield entity.

Returns:
the flexfield entity

createFlexfieldEntity

protected final FlexfieldEntity createFlexfieldEntity()
Creates a flexfield entity based on the entity usage.

Returns:
a flexfield entity based on the entity usage

setOutputPath

protected final void setOutputPath(java.lang.String path)
Sets the output path. If the output path is not null, prior to calling buildInternal, a private ADF configuration will be generated based on the current configuration, and this private configuration will be set as the current.

Parameters:
path - the output path

build

public final void build()
Builds the model. The subclasses cannot override this method; instead they should implement buildInternal.

Specified by:
build in class BCModeler
See Also:
buildInternal(), setOutputPath(java.lang.String)

getReport

public java.util.List<java.lang.String> getReport()
Description copied from class: BCModeler
Gets the report.

Specified by:
getReport in class BCModeler
Returns:
the report as a list of strings

buildInternal

protected abstract void buildInternal()
Builds the model.


createViewDefImpl

protected oracle.jbo.server.ViewDefImpl createViewDefImpl(int scope,
                                                          java.lang.String name)
Creates a ViweDefImpl object and sets the corresponding row class and component class.

Parameters:
scope - the scope of the object
name - the short name of the view definition
Returns:
a FlexfieldViewDefImpl object
See Also:
FlexfieldViewDefImpl, FlexfieldViewRowImpl, FlexfieldViewObjectImpl

createApplicationModuleDefImpl

protected oracle.jbo.server.ApplicationModuleDefImpl createApplicationModuleDefImpl(int scope,
                                                                                    java.lang.String name)
Creates an ApplicationModuleDefImpl object and sets the corresponding component class.

Parameters:
scope - the scope of the definition object
name - the short name of the application module
Returns:
an ApplicationModuleDefImpl object
See Also:
FlexfieldApplicationModuleImpl

getPropertyBoundValueMap

protected java.util.Map<java.lang.String,java.lang.Object> getPropertyBoundValueMap(java.lang.Object discrValue,
                                                                                    SegmentDef seg)
Gets the map of property bound values. These values are bound to bind variables defined in a list data source view object to participate in the query of the list.

Subclasses should always call the super method first to get the common properties.

Parameters:
discrValue - the discriminator value
seg - the segment
Returns:
the map of property bound values
See Also:
addSegmentAttribute(oracle.jbo.server.ViewDefImpl, oracle.apps.fnd.applcp.migrate.modeler.common.SegmentDef, java.lang.String, oracle.apps.fnd.applcp.migrate.modeler.FlexfieldEntity, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, oracle.apps.fnd.applcp.migrate.modeler.common.ContextValueDef, boolean)

buildListDataSourceViewObjects

protected java.util.List<oracle.jbo.server.ViewDefImpl> buildListDataSourceViewObjects(FlexfieldEntity flexfieldEntity)
Builds the view objects used for lists of values. These view objects are added to the writer buffer. The writer must be flushed if the caller wishes to write out these view objects immediately.

Parameters:
flexfieldEntity - the flexfield entity
Returns:
the view objects built for lists of values

concatenate

protected static java.lang.String concatenate(java.util.List<java.lang.String> list,
                                              java.lang.String delimiter)
Concatenates a list of strings together. For example, given a list {"a", "b", "c"} and delimiter "AND", "a AND b AND c" is returned.

Parameters:
list - the list of strings
delimiter - the delimiter
Returns:
the concatenated string; empty string if the given list is null or empty

addKeyAttributes

protected void addKeyAttributes(oracle.jbo.server.ViewDefImpl viewDef,
                                java.lang.String entityUsageName,
                                FlexfieldEntity flexfieldEntity,
                                SegmentDefList segments,
                                java.util.ArrayList<java.lang.String> selectAttrs)
Adds key attributes of the input entity to a view object.

Parameters:
viewDef - the view object
entityUsageName - the name of the entity usage
flexfieldEntity - the flexfield entity
segments - the list of segments that will be included in this view object. This is to check if a key attribute is already added as a global segment; if so, it will not be added again. This check does not involve context-sensitive segments.
selectAttrs - the list of items in the select clause. When an attribute is added, the corresponding item should be added to the list as well.

addValueSetTransients

protected final void addValueSetTransients(oracle.jbo.server.ViewDefImpl viewDef)
Adds transient attributes for the use of value sets. If you use addSegmentAttribute in this class to build a view attribute for a segment, you must includes these transient view attributes in the same view definition.

Parameters:
viewDef - the view definition where the transient attributes should be added
See Also:
addSegmentAttribute(oracle.jbo.server.ViewDefImpl, oracle.apps.fnd.applcp.migrate.modeler.common.SegmentDef, java.lang.String, oracle.apps.fnd.applcp.migrate.modeler.FlexfieldEntity, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, oracle.apps.fnd.applcp.migrate.modeler.common.ContextValueDef, boolean)

addSegmentAttributeAsViewAttribute

protected oracle.jbo.server.AttributeDefImpl addSegmentAttributeAsViewAttribute(oracle.jbo.server.ViewDefImpl viewDef,
                                                                                SegmentDef seg,
                                                                                java.lang.String entityUsageName,
                                                                                FlexfieldEntity flexfieldEntity,
                                                                                java.util.ArrayList<java.lang.String> selectAttrs,
                                                                                java.util.ArrayList<java.lang.String> fromClauseItems,
                                                                                java.util.ArrayList<java.lang.String> whereClauseItems,
                                                                                ContextValueDef contextValueDef,
                                                                                boolean useAltDiscriminator)
Adds a segment to a view object as a view attribute. This is a complex process which involves adding transient attributes, view accessors, list bindings, and anything that is required for the segment to function properly at runtime.

Parameters:
viewDef - the view object
seg - the segment
entityUsageName - the name of the entity usage
flexfieldEntity - the flexfield entity
selectAttrs - the list of items in the select clause
fromClauseItems - the list of items in the from clause
whereClauseItems - the list of items in the where clause
contextValueDef - the context value
useAltDiscriminator - true if the alternative value of the context should be used as a discriminator value. In such a case, the view attribute will not be marked as a discriminator.
Returns:
the view attribute added for the segment
See Also:
getPropertyBoundValue(java.lang.Object, oracle.apps.fnd.applcp.migrate.modeler.common.SegmentDef)

addSegmentAttribute

protected oracle.jbo.server.AttributeDefImpl addSegmentAttribute(oracle.jbo.server.ViewDefImpl viewDef,
                                                                 SegmentDef seg,
                                                                 java.lang.String entityUsageName,
                                                                 FlexfieldEntity flexfieldEntity,
                                                                 java.util.ArrayList<java.lang.String> selectAttrs,
                                                                 java.util.ArrayList<java.lang.String> fromClauseItems,
                                                                 java.util.ArrayList<java.lang.String> whereClauseItems,
                                                                 ContextValueDef contextValueDef,
                                                                 boolean useAltDiscriminator)
Adds a segment to a view object as a view attribute. This is a complex process which involves adding transient attributes, view accessors, list bindings, and anything that is required for the segment to function properly at runtime.

Parameters:
viewDef - the view object
seg - the segment
entityUsageName - the name of the entity usage
flexfieldEntity - the flexfield entity
selectAttrs - the list of items in the select clause
fromClauseItems - the list of items in the from clause
whereClauseItems - the list of items in the where clause
contextValueDef - the context value
useAltDiscriminator - true if the alternative value of the context should be used as a discriminator value. In such a case, the view attribute will not be marked as a discriminator.
Returns:
the view attribute added for the segment
See Also:
getPropertyBoundValue(java.lang.Object, oracle.apps.fnd.applcp.migrate.modeler.common.SegmentDef)

populateSegmentUIHints

protected static void populateSegmentUIHints(oracle.jbo.server.AttributeDefImpl adi,
                                             UIHints uih,
                                             boolean isRequired)
Populates the UI hints.

Parameters:
adi - the segment attribute
uih - the UI hints
isRequired - true if the segment value cannot be null

populateProperties

protected void populateProperties(oracle.jbo.server.ViewDefImpl viewDef,
                                  ContextValueDef contextValueDef,
                                  FlexfieldEntity flexfieldEntity,
                                  java.lang.String runtimeVersion,
                                  java.lang.String modelType,
                                  boolean isBaseViewDef)
Populates properties shared by all view objects built by this modeler. The common properties are populated by populateCommonProperties before any application module specific properties are populated.

Parameters:
viewDef - the view object definition
contextValueDef - the context value
flexfieldEntity - the flexfieldEntity
runtimeVersion - the runtime version; null if this information is not available
modelType - the type of the model; this is generally a hint for the design time UI. The value depends on the implementation of the design time UI.
isBaseViewDef - true if the given view object will not inherit any properties from another view object
See Also:
populateCommonProperties(oracle.jbo.mom.PersistableDefObject, java.lang.String)

populateProperties

protected void populateProperties(oracle.jbo.server.ApplicationModuleDefImpl amDef,
                                  java.lang.String runtimeVersion,
                                  java.lang.String modelType)
Populates properties shared by all application modules built by this modeler. The common properties are populated by populateCommonProperties before any application module specific properties are populated.

Parameters:
amDef - the application module
runtimeVersion - the runtime version; null if this information is not available
modelType - the type of the model; this is generally a hint for the design time UI. The value depends on the implementation of the design time UI.
See Also:
populateCommonProperties(oracle.jbo.mom.PersistableDefObject, java.lang.String)

populateCommonProperties

protected void populateCommonProperties(oracle.jbo.mom.PersistableDefObject pdef,
                                        java.lang.String runtimeVersion)
Populates common properties shared by all objects built by this modeler.

Parameters:
pdef - the object
runtimeVersion - the runtime version; null if no version information is available

getEntityPersonalization

protected AbstractBCModeler.EntityPersonalization getEntityPersonalization(FlexfieldEntity fe,
                                                                           ContextValueDef targetContext,
                                                                           boolean useAltDiscrValue)
Gets the personalization data for a flexfield entity.

Parameters:
fe - the flexfield entity
targetContext - the context for which the entity is personalized; null if the personalization should include all contexts
useAltDiscrValue - if the alternative values of the discriminator will be used to differentiate different subtypes
Returns:
the personalization data

getValidatorOnCondition

protected AbstractBCModeler.ValidatorOnCondition getValidatorOnCondition()
Gets the on-condition for a validator.

Returns:
the on-condition
See Also:
getEntityPersonalization(oracle.apps.fnd.applcp.migrate.modeler.FlexfieldEntity, oracle.apps.fnd.applcp.migrate.modeler.common.ContextValueDef, boolean)

getEntityProperties

protected java.util.Map<java.lang.String,java.lang.String> getEntityProperties(boolean discrExists)
Gets the properties that should be set on a flexfield entity.

Parameters:
discrExists - if a discriminator exists
Returns:
the properties for the entity
See Also:
getEntityPersonalization(oracle.apps.fnd.applcp.migrate.modeler.FlexfieldEntity, oracle.apps.fnd.applcp.migrate.modeler.common.ContextValueDef, boolean)

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

E22563-02

Copyright © 2011 Oracle. All Rights Reserved.