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

E22562-02

oracle.apps.fnd.applcore.flex.runtime.util
Class AbstractBCModeler

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.runtime.util.BCModeler
      extended by oracle.apps.fnd.applcore.flex.runtime.util.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 class AbstractBCModeler.BIEntity
          A BI entity.
protected static class AbstractBCModeler.BIValueLinkInfo
          Information of a link to another entity or view object.
protected static class AbstractBCModeler.BIViewUsageInfo
          Information of BI view usages.
protected static interface AbstractBCModeler.EntityPersonalization
          Personalization data for a flexfield entity.
protected static class AbstractBCModeler.FlattenedSegment
          A flattened segment.
protected static class AbstractBCModeler.IntegerSequence
          A class that produces unique names by appending an integer to the name.
static interface AbstractBCModeler.SegmentAttrElements
          Internal Use Only.
protected static interface AbstractBCModeler.SegmentAttributeInfo
          Information about a segment attribute.
protected static interface AbstractBCModeler.SegmentValidators
          Validators for a segment.
protected static interface AbstractBCModeler.TokenWrapper
          An interface that wraps a token before it is concatenated with other tokens.
protected static interface AbstractBCModeler.ValidatorOnCondition
          The "on condition" of a validator.
 
Nested classes/interfaces inherited from class oracle.apps.fnd.applcore.flex.runtime.util.BCModeler
BCModeler.Arguments, BCModeler.Option, BCModeler.Options, BCModeler.Parameter, BCModeler.ProgressStage
 
Field Summary
protected  java.util.Map<BCModeler.Option,java.lang.Object> _configuration
          The configuration for the entity usage.
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  ServiceEnabler _serviceEnabler
          The service enabler.
protected  BCModelerWriter _writer
          Modeler writer.
protected static java.lang.String BI_ENTITY_ALIAS
           
protected static java.lang.String BI_EO_USAGE_NAME
           
protected static AbstractBCModeler.TokenWrapper SQL_STRING_WRAPPER
          A SQL String wrapper.
 
Constructor Summary
protected AbstractBCModeler(FlexfieldNamespace namespace, FlexfieldDef ff, FlexfieldEntityUsage flexEntityUsage, BCModelerWriter writer, java.util.Map<BCModeler.Option,java.lang.Object> configuration)
          Constructs a modeler.
 
Method Summary
protected  java.util.List<AbstractBCModeler.FlattenedSegment> addBIPrimaryKeys(java.util.List<AbstractBCModeler.FlattenedSegment> list)
          Adds primary key attributes to a flattened segment list.
protected  AbstractBCModeler.FlattenedSegment addBISegmentProperties(AbstractBCModeler.FlattenedSegment fs)
          Adds properties to a flattened segment.
protected  void addContextNameToResourceBundle(java.lang.String bundleOwnerName, ContextValueDef cvd)
          Adds the context name to the resource bundle.
protected  oracle.jbo.server.AttributeDefImpl addEntityTransientAttribute(oracle.jbo.server.EntityDefImpl eoDef, java.lang.String attributeName, java.lang.Class javaType)
          Adds transient attribute for the entity object.
protected  void addEntityValueSetCustomProperties(SegmentDef seg, oracle.jbo.server.AttributeDefImpl adi)
          Setup of custom properties for EFF entity attributes to be used later for value set processing in view object.
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  AbstractBCModeler.SegmentAttributeInfo addSegmentAttr(oracle.jbo.server.ViewDefImpl viewDef, SegmentDef seg, AbstractBCModeler.IntegerSequence aliasSeq, 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 addSegmentAttribute(oracle.jbo.server.ViewDefImpl viewDef, SegmentDef seg, AbstractBCModeler.IntegerSequence aliasSeq, 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 addValueSetParameterTransients(oracle.jbo.server.ViewDefImpl viewDef, SegmentDefList segments)
          Adds transient attributes for flexfield parameters used in the value sets of a list of segments.
protected  void addValueSetTransients(oracle.jbo.server.ViewDefImpl viewDef)
          Adds transient attributes for the use of value sets.
 void build()
          Builds the model.
protected  void buildBIApplicationModule(AbstractBCModeler.BIViewUsageInfo vuInfo)
          Builds a BI application module.
protected  void buildBIAssociation(oracle.jbo.server.EntityDefImpl entityDef, AbstractBCModeler.BIValueLinkInfo info)
          Builds a BI entity association.
protected  AbstractBCModeler.BIEntity buildBIEntity(java.util.List<AbstractBCModeler.FlattenedSegment> segments, AbstractBCModeler.FlattenedSegment concatSeg, java.lang.String aliasName)
          Builds a BI entity.
protected  AbstractBCModeler.BIEntity buildBIEntity(java.util.List<AbstractBCModeler.FlattenedSegment> segments, java.lang.String aliasName)
          Builds a BI entity.
protected  AbstractBCModeler.BIViewUsageInfo buildBIViewDefAndViewLinks(AbstractBCModeler.BIEntity biEntity, java.util.List<AbstractBCModeler.FlattenedSegment> segments)
          Builds a BI view definition based on an entity and create view links based on the segment information.
protected  void buildBIViewLink(oracle.jbo.server.ViewDefImpl viewDef, AbstractBCModeler.BIValueLinkInfo info)
          Builds a BI view link.
protected abstract  void buildInternal()
          Builds the model.
protected  void buildListDataSourceViewObjects(FlexfieldEntity flexfieldEntity)
          Builds the view objects used for lists of values.
protected  AbstractBCModeler.SegmentAttributeInfo buildSegmentAttr(oracle.jbo.server.ViewDefImpl viewDef, SegmentDef seg, 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, oracle.jbo.server.AttributeDefImpl adi)
          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.
protected static java.lang.String concatenate(java.util.List<java.lang.String> list, java.lang.String delimiter)
          Concatenates a list of strings together.
protected static java.lang.String concatenate(java.util.List<java.lang.String> list, java.lang.String delimiter, AbstractBCModeler.TokenWrapper wrapper)
          Concatenates a list of Strings together.
static AbstractBCModeler.SegmentAttrElements copySegmentAttrElements(oracle.jbo.server.ViewDefImpl srcViewDef, oracle.jbo.server.AttributeDefImpl srcAttrDef, oracle.jbo.server.ViewDefImpl dstViewDef, oracle.jbo.server.AttributeDefImpl dstAttrDef, java.util.Map<java.lang.String,java.lang.String> attrNameMap)
          Internal Use Only.
protected static void copyTypeInfoFromEntity(AbstractBCModeler.FlattenedSegment fs, oracle.jbo.AttributeDef adi)
          Copy the necessary type information from an attribute definition to a flattened segment definition.
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 static java.lang.String escapeSQLString(java.lang.String s)
          Prepares a String for being used as a SQL String literal.
protected static java.lang.String getAlias(java.lang.String name, AbstractBCModeler.IntegerSequence intSeq)
          Constructs a SQL alias by shortening the name and append a sequence number.
protected  AbstractBCModeler.BIValueLinkInfo getBIAssociationInfo(AbstractBCModeler.BIEntity biEntity, AbstractBCModeler.FlattenedSegment fs)
          Gets the BI association info.
protected  AbstractBCModeler.FlattenedSegment getBIConcatenatedSegments(java.lang.String tableAlias, boolean includeGlobals)
          Gets the segment that represents the concatenated segment values.
protected  java.util.List<java.lang.String> getBIEqualizationLabels(SegmentDef seg)
          Gest the list of BI equalization labels for a segment.
protected  java.util.List<AbstractBCModeler.FlattenedSegment> getBIFlattenedSegments(java.lang.String tableAlias)
          Gets the flattened list of BI-enabled segments.
protected  java.lang.String getBIModelType()
          Gets the value of property FND_ACFF_Type for BI objects.
protected  java.lang.String getBITransactionAMDefFullName()
          Gets the full name of the application module definition of the main model.
protected  java.util.Map<java.lang.Object,java.lang.String> getDiscrValueToViewObjectMap()
          Gets the map from discriminator values to full names of the corresponding view definitions.
protected  java.lang.Class getEntityAttributeType(SegmentDef seg)
           
protected  java.util.Map<java.lang.String,java.lang.String> getEntityDiscrProperties()
          Gets the properties that should be set on the discriminator of a flexfield entity.
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  int getEstimatedListObjWriteCount()
          Gets the estimated number of list objects to be created or updated.
protected abstract  FlexfieldEntity getFlexfieldEntity()
          Gets the flexfield entity.
 java.util.List<java.lang.String> getPackages()
          Gets the list of packages that will be created or updated.
protected  LOVDef.PropertyBoundValue getPropertyBoundValue(java.lang.Object discrValue, SegmentDef seg)
           
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  oracle.apps.fnd.applcore.flex.runtime.util.ResourceBundleBuilder getResourceBundleBuilder(java.lang.String srcDefFullName)
          Gets the resource bundle builder for an object.
protected  java.lang.Class getResourceBundleClass()
          Gets the resource bundle class.
protected  AbstractBCModeler.ValidatorOnCondition getValidatorOnCondition()
          Gets the on-condition for a validator.
 java.lang.String getVersion()
          Gets the version of this modeler.
protected  boolean isBIGlobalSegment(SegmentDef globalSeg)
          Checks whether a global segment should be included in the BI model.
protected  boolean isDebugMode()
          Returns true if this modeler should run in debug mode.
protected  boolean isValueSetValueDisplaySupported()
          Returns true if the model should support the use of "display values" for ID-based and translatable value sets.
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 populateDiscrViewObjectMap(oracle.jbo.server.ViewDefImpl viewDef)
          Populates the discr-value-to-view-object map as custom properties.
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 populateSegmentUIHints(oracle.jbo.server.AttributeDefImpl adi, UIHints uih, boolean isRequired, java.lang.String bundleOwnerName)
          Populates the UI hints.
protected  void setDebugMode(boolean b)
          Sets whether this modeler should run in debug mode.
protected  void setResourceBundleClass(oracle.jbo.server.ViewDefImpl vdi)
          Sets the resource bundle class for a view definition.
 
Methods inherited from class oracle.apps.fnd.applcore.flex.runtime.util.BCModeler
escapeJavaString, getFactory, getFactory, isDevelopmentMode, main, notifyAction, notifyProgress, notifyProgress, run, run, run
 
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.


_configuration

protected final java.util.Map<BCModeler.Option,java.lang.Object> _configuration
The configuration for the entity usage.


_serviceEnabler

protected final ServiceEnabler _serviceEnabler
The service enabler.


SQL_STRING_WRAPPER

protected static final AbstractBCModeler.TokenWrapper SQL_STRING_WRAPPER
A SQL String wrapper. A string is enclosed in single quotes and all single quotes in the String are replaced with double single quotes.


BI_EO_USAGE_NAME

protected static final java.lang.String BI_EO_USAGE_NAME

BI_ENTITY_ALIAS

protected static final java.lang.String BI_ENTITY_ALIAS
Constructor Detail

AbstractBCModeler

protected AbstractBCModeler(FlexfieldNamespace namespace,
                            FlexfieldDef ff,
                            FlexfieldEntityUsage flexEntityUsage,
                            BCModelerWriter writer,
                            java.util.Map<BCModeler.Option,java.lang.Object> configuration)
Constructs a modeler.

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

getVersion

public java.lang.String getVersion()
Description copied from class: BCModeler
Gets the version of this modeler.

Overrides:
getVersion in class BCModeler
Returns:
the version of this modeler.

getPackages

public java.util.List<java.lang.String> getPackages()
Description copied from class: BCModeler
Gets the list of packages that will be created or updated. Subclasses should override this method if they want to support auto configuration of the current ADF context.

Overrides:
getPackages in class BCModeler
Returns:
the list of packages that will be created or updated
See Also:
BCModeler.run(Arguments)

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

setDebugMode

protected final void setDebugMode(boolean b)
Sets whether this modeler should run in debug mode.

Parameters:
b - true if this modeler should run in debug mode

isDebugMode

protected final boolean isDebugMode()
Returns true if this modeler should run in debug mode.

Returns:
true if this modeler should run in debug mode

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()

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.


getEstimatedListObjWriteCount

protected int getEstimatedListObjWriteCount()
Gets the estimated number of list objects to be created or updated.

Returns:
the estimated number of list objects to be created or updated

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.applcore.flex.runtime.util.common.SegmentDef, oracle.apps.fnd.applcore.flex.runtime.util.AbstractBCModeler.IntegerSequence, java.lang.String, oracle.apps.fnd.applcore.flex.runtime.util.FlexfieldEntity, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, oracle.apps.fnd.applcore.flex.runtime.util.common.ContextValueDef, boolean)

getPropertyBoundValue

protected LOVDef.PropertyBoundValue getPropertyBoundValue(java.lang.Object discrValue,
                                                          SegmentDef seg)

buildListDataSourceViewObjects

protected final void 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 (null for Eff case)

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

concatenate

protected static java.lang.String concatenate(java.util.List<java.lang.String> list,
                                              java.lang.String delimiter,
                                              AbstractBCModeler.TokenWrapper wrapper)
Concatenates a list of Strings together.

Parameters:
list - the list of Strings
delimiter - the delimiter
wrapper - the wrapper that wraps each String in the list
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.

addSegmentAttribute

protected oracle.jbo.server.AttributeDefImpl addSegmentAttribute(oracle.jbo.server.ViewDefImpl viewDef,
                                                                 SegmentDef seg,
                                                                 AbstractBCModeler.IntegerSequence aliasSeq,
                                                                 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
aliasSeq - the sequence used to construct the alias names; null if alias names should not be set
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 persisted view attribute
See Also:
getPropertyBoundValue(java.lang.Object, oracle.apps.fnd.applcore.flex.runtime.util.common.SegmentDef), addSegmentAttr(oracle.jbo.server.ViewDefImpl, oracle.apps.fnd.applcore.flex.runtime.util.common.SegmentDef, oracle.apps.fnd.applcore.flex.runtime.util.AbstractBCModeler.IntegerSequence, java.lang.String, oracle.apps.fnd.applcore.flex.runtime.util.FlexfieldEntity, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, oracle.apps.fnd.applcore.flex.runtime.util.common.ContextValueDef, boolean)

addSegmentAttr

protected AbstractBCModeler.SegmentAttributeInfo addSegmentAttr(oracle.jbo.server.ViewDefImpl viewDef,
                                                                SegmentDef seg,
                                                                AbstractBCModeler.IntegerSequence aliasSeq,
                                                                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
aliasSeq - the sequence used to construct the alias names; null if alias names should not be set
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 segment attribute information
See Also:
getPropertyBoundValue(java.lang.Object, oracle.apps.fnd.applcore.flex.runtime.util.common.SegmentDef)

copySegmentAttrElements

public static AbstractBCModeler.SegmentAttrElements copySegmentAttrElements(oracle.jbo.server.ViewDefImpl srcViewDef,
                                                                            oracle.jbo.server.AttributeDefImpl srcAttrDef,
                                                                            oracle.jbo.server.ViewDefImpl dstViewDef,
                                                                            oracle.jbo.server.AttributeDefImpl dstAttrDef,
                                                                            java.util.Map<java.lang.String,java.lang.String> attrNameMap)
Internal Use Only. Applications should not use this method.

Copies the segment information including the associated elements such as view accessors, list bindings, etc. from one view attribute to another. Any extra transient attributes required for the source view attribute to function will also be added to the destination view definition.

Note that this method does not copy the discrColumn flag or the default value of the source view attribute to the destination. This method does not copy objects referenced by the source view attribute. For example, if a view accessor is associated with the source attribute, you must ensure that the view object accessed by the view accessor is also accessible by the destination view object.

Parameters:
srcViewDef - the source view definition
srcAttrDef - the source view attribute
dstViewDef - the destination view definition
dstAttrDef - the destination attribute
attrNameMap - the mapping from the source view attribute names to the destination view attribute names. This map does not have to include all attributes, but if the given source view attribute depends on another view attribute, this map must provide the new name of the dependent attribute; otherwise an exception will be thrown.
Returns:
the elements that have been copied
Throws:
java.lang.IllegalArgumentException - if any of the arguments is null, or if the source does not have enough information

buildSegmentAttr

protected AbstractBCModeler.SegmentAttributeInfo buildSegmentAttr(oracle.jbo.server.ViewDefImpl viewDef,
                                                                  SegmentDef seg,
                                                                  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,
                                                                  oracle.jbo.server.AttributeDefImpl adi)
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
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.
adi - the attribute def impl corresponding to this segment
Returns:
the segment attribute infomation
See Also:
getPropertyBoundValue(java.lang.Object, oracle.apps.fnd.applcore.flex.runtime.util.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

populateSegmentUIHints

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

Parameters:
adi - the segment attribute
uih - the UI hints
isRequired - true if the segment value cannot be null
bundleOwnerName - the full name of the owner of the resource bundle to be used; null if no resource bundle should be used. The owner is usually a view or entity definition.

getResourceBundleBuilder

protected oracle.apps.fnd.applcore.flex.runtime.util.ResourceBundleBuilder getResourceBundleBuilder(java.lang.String srcDefFullName)
Gets the resource bundle builder for an object.

Parameters:
srcDefFullName - the full name of the object
Returns:
the resource bundle builder

addContextNameToResourceBundle

protected void addContextNameToResourceBundle(java.lang.String bundleOwnerName,
                                              ContextValueDef cvd)
Adds the context name to the resource bundle.

Parameters:
bundleOwnerName - the name of the bundle owner
cvd - the context

getDiscrValueToViewObjectMap

protected java.util.Map<java.lang.Object,java.lang.String> getDiscrValueToViewObjectMap()
Gets the map from discriminator values to full names of the corresponding view definitions. The default implementation uses the default FlexfieldNamespace object to construct the view definition full names, and calls ContextValueDef#getValue() to obtain the discriminator value. Subclasses should override this method if the naming of the view objects is different, or the alternative values should be used.

This method is invoked by populateDiscrViewObjectMap.

Returns:
the map from discriminator values to full names of the corresponding view definitions; an empty map if this flexfield does not have any discriminator value
See Also:
populateDiscrViewObjectMap(ViewDefImpl)

populateDiscrViewObjectMap

protected void populateDiscrViewObjectMap(oracle.jbo.server.ViewDefImpl viewDef)
Populates the discr-value-to-view-object map as custom properties. This information is mainly used by OAViewObjecTImpl#findViewDefFromDiscrVals in case "lazy loading" is turned on.

Parameters:
viewDef - the view definition where the map should be stored

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.applcore.flex.runtime.util.FlexfieldEntity, oracle.apps.fnd.applcore.flex.runtime.util.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.applcore.flex.runtime.util.FlexfieldEntity, oracle.apps.fnd.applcore.flex.runtime.util.common.ContextValueDef, boolean)

getEntityDiscrProperties

protected java.util.Map<java.lang.String,java.lang.String> getEntityDiscrProperties()
Gets the properties that should be set on the discriminator of a flexfield entity.

Returns:
the properties for the entity discriminator
See Also:
getEntityDiscriminatorName(oracle.apps.fnd.applcore.flex.runtime.util.FlexfieldEntity), getEntityPersonalization(oracle.apps.fnd.applcore.flex.runtime.util.FlexfieldEntity, oracle.apps.fnd.applcore.flex.runtime.util.common.ContextValueDef, boolean)

getResourceBundleClass

protected java.lang.Class getResourceBundleClass()
Gets the resource bundle class.

Returns:
the resource bundle class

setResourceBundleClass

protected final void setResourceBundleClass(oracle.jbo.server.ViewDefImpl vdi)
Sets the resource bundle class for a view definition. The resource bundle class comes from getResourceBundleClass.

Parameters:
vdi - the view definition
See Also:
getResourceBundleClass()

isValueSetValueDisplaySupported

protected boolean isValueSetValueDisplaySupported()
Returns true if the model should support the use of "display values" for ID-based and translatable value sets.

Returns:
true if the models hould support the use of "display values"

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.applcore.flex.runtime.util.common.SegmentDef, oracle.apps.fnd.applcore.flex.runtime.util.AbstractBCModeler.IntegerSequence, java.lang.String, oracle.apps.fnd.applcore.flex.runtime.util.FlexfieldEntity, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, oracle.apps.fnd.applcore.flex.runtime.util.common.ContextValueDef, boolean)

addValueSetParameterTransients

protected final void addValueSetParameterTransients(oracle.jbo.server.ViewDefImpl viewDef,
                                                    SegmentDefList segments)
Adds transient attributes for flexfield parameters used in the value sets of a list of segments.

Parameters:
viewDef - the view definition
segments - the list of segments

addEntityTransientAttribute

protected oracle.jbo.server.AttributeDefImpl addEntityTransientAttribute(oracle.jbo.server.EntityDefImpl eoDef,
                                                                         java.lang.String attributeName,
                                                                         java.lang.Class javaType)
Adds transient attribute for the entity object.

Parameters:
eoDef - the entity object
attributeName - name of the attribute
javaType - java type of the attribute
Returns:
the attribute definition

getEntityAttributeType

protected java.lang.Class getEntityAttributeType(SegmentDef seg)

addEntityValueSetCustomProperties

protected void addEntityValueSetCustomProperties(SegmentDef seg,
                                                 oracle.jbo.server.AttributeDefImpl adi)
Setup of custom properties for EFF entity attributes to be used later for value set processing in view object. seg.getValidator() must not be null when calling this method

Parameters:
seg - EFF segment def
adi - EFF entity attribute def impl

getBIEqualizationLabels

protected java.util.List<java.lang.String> getBIEqualizationLabels(SegmentDef seg)
Gest the list of BI equalization labels for a segment. A BI equalization label must be a string that can be used as an entity or view attribute name.

Parameters:
seg - the segment
Returns:
the list of BI equalization labels
See Also:
getBIFlattenedSegments(java.lang.String)

addBIPrimaryKeys

protected java.util.List<AbstractBCModeler.FlattenedSegment> addBIPrimaryKeys(java.util.List<AbstractBCModeler.FlattenedSegment> list)
Adds primary key attributes to a flattened segment list.

Parameters:
list - the list of flattened segments
Returns:
the list of flattened segments with primary key attributes added
See Also:
getBIFlattenedSegments(java.lang.String)

copyTypeInfoFromEntity

protected static void copyTypeInfoFromEntity(AbstractBCModeler.FlattenedSegment fs,
                                             oracle.jbo.AttributeDef adi)
Copy the necessary type information from an attribute definition to a flattened segment definition.

Parameters:
fs - the flattened segment definition
adi - the attribute definition

getAlias

protected static java.lang.String getAlias(java.lang.String name,
                                           AbstractBCModeler.IntegerSequence intSeq)
Constructs a SQL alias by shortening the name and append a sequence number. This method does not check if the name has invalid characters.

Parameters:
name - the name
intSeq - the sequence generator
Returns:
the alias
See Also:
AbstractBCModeler.IntegerSequence

getBIConcatenatedSegments

protected AbstractBCModeler.FlattenedSegment getBIConcatenatedSegments(java.lang.String tableAlias,
                                                                       boolean includeGlobals)
Gets the segment that represents the concatenated segment values.

Parameters:
tableAlias - the table alias for the segment columns
includeGlobals - true if the global segments should be part of the concatenated String
Returns:
the segment that represents the concatenated segment values

escapeSQLString

protected static java.lang.String escapeSQLString(java.lang.String s)
Prepares a String for being used as a SQL String literal.

Parameters:
s - the string to be escaped
Returns:
the escaped string; null if the given string is null

isBIGlobalSegment

protected boolean isBIGlobalSegment(SegmentDef globalSeg)
Checks whether a global segment should be included in the BI model.

Parameters:
globalSeg - the global segment
Returns:
true if the global segment should be included in the BI model

getBIFlattenedSegments

protected java.util.List<AbstractBCModeler.FlattenedSegment> getBIFlattenedSegments(java.lang.String tableAlias)
Gets the flattened list of BI-enabled segments.

Parameters:
tableAlias - the table alias for the segment columns
Returns:
the flattened list of BI-enabled segments

addBISegmentProperties

protected AbstractBCModeler.FlattenedSegment addBISegmentProperties(AbstractBCModeler.FlattenedSegment fs)
Adds properties to a flattened segment.

Parameters:
fs - the flattened segment
Returns:
the flattened segment with properties added

buildBIEntity

protected AbstractBCModeler.BIEntity buildBIEntity(java.util.List<AbstractBCModeler.FlattenedSegment> segments,
                                                   java.lang.String aliasName)
Builds a BI entity.

Parameters:
segments - the segments to be included in the entity
aliasName - the alias name
Returns:
the BI entity object

buildBIEntity

protected AbstractBCModeler.BIEntity buildBIEntity(java.util.List<AbstractBCModeler.FlattenedSegment> segments,
                                                   AbstractBCModeler.FlattenedSegment concatSeg,
                                                   java.lang.String aliasName)
Builds a BI entity.

Parameters:
segments - the segments to be included in the entity
concatSeg - the concatenated segment values
aliasName - the alias name
Returns:
the BI entity object

getBIAssociationInfo

protected AbstractBCModeler.BIValueLinkInfo getBIAssociationInfo(AbstractBCModeler.BIEntity biEntity,
                                                                 AbstractBCModeler.FlattenedSegment fs)
Gets the BI association info.

Parameters:
biEntity - the BI entity
fs - the flattened segment
Returns:
the BI association info

getBIModelType

protected java.lang.String getBIModelType()
Gets the value of property FND_ACFF_Type for BI objects.

Returns:
the value of property FND_ACFF_Type

getBITransactionAMDefFullName

protected java.lang.String getBITransactionAMDefFullName()
Gets the full name of the application module definition of the main model.

Returns:
the full name of the application module definition of the main model

buildBIViewDefAndViewLinks

protected AbstractBCModeler.BIViewUsageInfo buildBIViewDefAndViewLinks(AbstractBCModeler.BIEntity biEntity,
                                                                       java.util.List<AbstractBCModeler.FlattenedSegment> segments)
Builds a BI view definition based on an entity and create view links based on the segment information.

Parameters:
biEntity - the BIEntity object
segments - the segment information
Returns:
the view usages that should be added to the BI view application module

buildBIViewLink

protected void buildBIViewLink(oracle.jbo.server.ViewDefImpl viewDef,
                               AbstractBCModeler.BIValueLinkInfo info)
Builds a BI view link.

Parameters:
viewDef - the view definition
info - the view link information

buildBIAssociation

protected void buildBIAssociation(oracle.jbo.server.EntityDefImpl entityDef,
                                  AbstractBCModeler.BIValueLinkInfo info)
Builds a BI entity association.

Parameters:
entityDef - the entity definition
info - the association information

buildBIApplicationModule

protected void buildBIApplicationModule(AbstractBCModeler.BIViewUsageInfo vuInfo)
Builds a BI application module.

Parameters:
vuInfo - the BI view usage information

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

E22562-02

Copyright © 2011 Oracle. All Rights Reserved.