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

E22563-01

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

java.lang.Object
  extended by oracle.apps.fnd.applcp.migrate.modeler.common.CPEntityCreator

public class CPEntityCreator
extends java.lang.Object

A helper class for creating an entity object for the flexfield model. For example, the validation rules for entity attributes are added based on the valuesets associated with the flexfield.


Constructor Summary
CPEntityCreator()
          Constructs an entity creator.
 
Method Summary
static oracle.jbo.server.AttributeDefImpl addAttribute(oracle.jbo.server.EntityDefImpl eoDef, SegmentDef seg)
           
 void addAttributes(oracle.jbo.server.EntityDefImpl baseDef, DescriptiveFlexfieldDefImpl descFlexDef)
           
static void addValidators(oracle.jbo.server.EntityDefImpl eoDef, FlexfieldDef ff, java.lang.String discrAttribute, ContextValueDef discrValue, SegmentDef seg)
          This method is from EntityPersonalizer and uses EntityDef instead of pDef TODO: RLAL: Check with Jeremy if this could be made public / moved to a util class.
static oracle.jbo.server.EntityDefImpl createEntityDef(java.lang.String entityDefName, int scope, java.lang.String baseEntityDefName, java.lang.String dbObjName, java.lang.String dbObjType)
          Creates an Entity Def for EFF
static java.lang.String getAttributeName(java.lang.String s)
          Gets the attribute name based on the given string.
static java.lang.String getFlexfieldIdentifier(java.lang.String flexfieldType, java.lang.String appShortName, java.lang.String flexfieldCode, java.lang.String usageCode, java.lang.String tableName)
          Constructs an identifier to uniquely identify a flexfield usage.
static void main(java.lang.String[] args)
           
static void setDefaultValue(oracle.jbo.server.EntityDefImpl eoDef, FlexfieldDef ff, java.lang.String discrAttribute, oracle.jbo.AttributeDef attributeDef, SegmentDef seg)
          This method is from EntityPersonalizer and uses EntityDef instead of pDef TODO: RLAL: Check with Jeremy if this could be made public / moved to a util class.
static void setFormatString(oracle.jbo.server.EntityDefImpl eoDef, FlexfieldDef ff, java.lang.String discrAttribute, SegmentDef seg)
          This method is from EntityPersonalizer and uses EntityDef instead of pDef TODO: RLAL: Check with Jeremy if this could be made public / moved to a util class.
 void write(java.util.List<oracle.jbo.mom.PersistableDefObject> objs, java.lang.String outputPath)
          Writes and saves a list of persistable def objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPEntityCreator

public CPEntityCreator()
Constructs an entity creator.

Method Detail

createEntityDef

public static oracle.jbo.server.EntityDefImpl createEntityDef(java.lang.String entityDefName,
                                                              int scope,
                                                              java.lang.String baseEntityDefName,
                                                              java.lang.String dbObjName,
                                                              java.lang.String dbObjType)
Creates an Entity Def for EFF

Parameters:
entityDefName -
scope -
baseEntityDefName -
dbObjName -
dbObjType -
Returns:

addAttributes

public void addAttributes(oracle.jbo.server.EntityDefImpl baseDef,
                          DescriptiveFlexfieldDefImpl descFlexDef)

addAttribute

public static oracle.jbo.server.AttributeDefImpl addAttribute(oracle.jbo.server.EntityDefImpl eoDef,
                                                              SegmentDef seg)
Parameters:
eoDef -
seg -

getFlexfieldIdentifier

public static java.lang.String getFlexfieldIdentifier(java.lang.String flexfieldType,
                                                      java.lang.String appShortName,
                                                      java.lang.String flexfieldCode,
                                                      java.lang.String usageCode,
                                                      java.lang.String tableName)
Constructs an identifier to uniquely identify a flexfield usage.

Parameters:
flexfieldType - "DFF", "KFF" or "UDA"
appShortName - the application short name
flexfieldCode - the flexfield code
usageCode - the usage code
tableName - the database object name
Returns:
the identifier for the given flexfield usage

setDefaultValue

public static void setDefaultValue(oracle.jbo.server.EntityDefImpl eoDef,
                                   FlexfieldDef ff,
                                   java.lang.String discrAttribute,
                                   oracle.jbo.AttributeDef attributeDef,
                                   SegmentDef seg)
This method is from EntityPersonalizer and uses EntityDef instead of pDef TODO: RLAL: Check with Jeremy if this could be made public / moved to a util class.

Parameters:
eoDef -
ff -
input -
modelerContext -
discrAttribute -
discrValue -
seg -

setFormatString

public static void setFormatString(oracle.jbo.server.EntityDefImpl eoDef,
                                   FlexfieldDef ff,
                                   java.lang.String discrAttribute,
                                   SegmentDef seg)
This method is from EntityPersonalizer and uses EntityDef instead of pDef TODO: RLAL: Check with Jeremy if this could be made public / moved to a util class.

Parameters:
eoDef -
ff -
discrAttribute -
discrValue -
seg -

addValidators

public static void addValidators(oracle.jbo.server.EntityDefImpl eoDef,
                                 FlexfieldDef ff,
                                 java.lang.String discrAttribute,
                                 ContextValueDef discrValue,
                                 SegmentDef seg)
This method is from EntityPersonalizer and uses EntityDef instead of pDef TODO: RLAL: Check with Jeremy if this could be made public / moved to a util class.

Parameters:
eoDef -
ff -
input -
modelerContext -
discrAttribute -
discrValue -
seg -

write

public void write(java.util.List<oracle.jbo.mom.PersistableDefObject> objs,
                  java.lang.String outputPath)
Writes and saves a list of persistable def objects.

Parameters:
objs - the list of persistable def objects
Throws:
java.lang.NullPointerException - if any of the given object is null

getAttributeName

public static java.lang.String getAttributeName(java.lang.String s)
Gets the attribute name based on the given string. The given string must have at least one character.

Parameters:
s - the base of the attribute name
Returns:
the attribute name
Throws:
java.lang.IllegalArgumentException - if the given string is empty
java.lang.NullPointerException - if the given string is null

main

public static void main(java.lang.String[] args)

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

E22563-01

Copyright © 2011 Oracle. All Rights Reserved.