Oracle Fusion Middleware extensions for Seed Data Framework
11g Release 1 (11.1.2)

E22564-02

oracle.apps.fnd.applseed.rt.extract.util
Class ExUtil

java.lang.Object
  extended by oracle.apps.fnd.applseed.rt.extract.util.ExUtil

public final class ExUtil
extends java.lang.Object

Utility class for Seed Data Extract. Class contains a collection of static methods that are designtime specific.


Method Summary
static void executeViewQuery(SDViewNode viewNode)
          Execute a ViewObject's query.
static void executeViewQuery(oracle.jbo.server.ViewObjectImpl vo)
          Execute the query for a ViewObject.
static java.lang.String format(java.lang.Class cls, java.lang.String key, java.lang.Object... args)
          Format the resource value that is returned for the key using the array of objects as parameters.
static java.lang.String format(java.lang.Class cls, java.lang.String key, java.lang.String param)
          Format the resource value that is returned for the key using param.
static java.lang.Object getAttribObjectValue(java.lang.Object val, oracle.jbo.AttributeDef attr, boolean encode)
          Get the Object value of the passed AttributeDef from the passed Row.
static java.lang.Object getAttribRowValue(oracle.jbo.Row row, oracle.jbo.AttributeDef attr, boolean encode)
          Get the Object value of the passed AttributeDef from the passed Row.
static java.lang.String getAttribStringValue(java.lang.Object attribObj)
          Get the attribute value object as a String.
static java.lang.String getConnectBy(SDViewNode viewNode)
          This method return back the connect by string that needs to be used in the query for ordering the hierarchical data.
static java.lang.String getExtractSaveName()
          Get the extract save name for this extract run.
static java.lang.String getResolvedRowKeyValue(oracle.jbo.Row row, SDViewNode viewNode)
          Get a String of resolved key values, delimited.
static java.lang.String getResourceForString(java.lang.Class cls, java.lang.String key)
          Method returns string from the resource bundle belonging to class cls for the given key.
static java.lang.String getRowKeys(oracle.jbo.Row row, SDViewNode viewNode)
          Get a String of the current row keys in format [ key=value ...
static java.lang.String getRowKeys(SDViewNode viewNode)
          Get a String of the row keys of node's current row.
static java.lang.String getXlfFileName()
          Get the expected Xliff file name for this extract based on driver VO.
static java.lang.String getXmlFileName()
          Get the expected xml file name for this extract based on driver VO.
static java.lang.String getXmlFileName(oracle.jbo.ApplicationModule am, oracle.jbo.ViewObject vo)
          Get the seed XML file name based on given AM and VO.
static java.lang.String getXmlFileName(oracle.jbo.ApplicationModule am, oracle.jbo.ViewObject vo, boolean ignoreExclusiveNode)
          Get the seed XML file name based on given AM and VO.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResourceForString

public static java.lang.String getResourceForString(java.lang.Class cls,
                                                    java.lang.String key)
Method returns string from the resource bundle belonging to class cls for the given key. This method is an adaptor method to handle resources of type ListResourceBundle as well ArrayResourceBundle.

Parameters:
cls - Class of the ResourceBundle
key - Resource key
Returns:
Resource value

format

public static java.lang.String format(java.lang.Class cls,
                                      java.lang.String key,
                                      java.lang.Object... args)
Format the resource value that is returned for the key using the array of objects as parameters. MessageFormat class is used to perform the format.

Parameters:
cls - ResourceBundle class
key - Resource key
args - parameters used to format the resource value
Returns:
formatted resource value

format

public static java.lang.String format(java.lang.Class cls,
                                      java.lang.String key,
                                      java.lang.String param)
Format the resource value that is returned for the key using param. MessageFormat class is used to perform the format.

Parameters:
cls - ResourceBundle class
key - Resource key
param - parameter used to format the resource value
Returns:
formatted resource value

getAttribStringValue

public static java.lang.String getAttribStringValue(java.lang.Object attribObj)
Get the attribute value object as a String.

Parameters:
attribObj - Attribute value as Object
Returns:
String attribute value

getAttribRowValue

public static java.lang.Object getAttribRowValue(oracle.jbo.Row row,
                                                 oracle.jbo.AttributeDef attr,
                                                 boolean encode)
Get the Object value of the passed AttributeDef from the passed Row. Returns SDConstants.SEED_DATA_USER for CreatedBy and LastUpdatedBy history col attrs. Encodes Blob types to Base64 string.

Parameters:
row - Row
attr - AttributeDef
encode - true if the attribute value must be base64 encoded
Returns:
Object value, null for null values, SDConstants.SEED_DATA_USER for CreatedBy, LastUpdatedBy

getAttribObjectValue

public static java.lang.Object getAttribObjectValue(java.lang.Object val,
                                                    oracle.jbo.AttributeDef attr,
                                                    boolean encode)
Get the Object value of the passed AttributeDef from the passed Row. Returns SDConstants.SEED_DATA_USER for CreatedBy and LastUpdatedBy history col attrs. Encodes Blob types to Base64 string.

Parameters:
val - Object attribute value
attr - AttributeDef
encode - true if the attribute value must be base64 encoded
Returns:
Object value, null for null values, SDConstants.SEED_DATA_USER for CreatedBy, LastUpdatedBy

getConnectBy

public static java.lang.String getConnectBy(SDViewNode viewNode)
This method return back the connect by string that needs to be used in the query for ordering the hierarchical data.

Returns:

executeViewQuery

public static void executeViewQuery(SDViewNode viewNode)
                             throws ExtractException
Execute a ViewObject's query. Set sort by the VO primary keys. Handle and log error conditions

Parameters:
viewNode - SDViewNode wrapper for ViewObject
Throws:
ExtractException - SQL statement exception or other error

executeViewQuery

public static void executeViewQuery(oracle.jbo.server.ViewObjectImpl vo)
Execute the query for a ViewObject.

Parameters:
vo - ViewObjectImpl

getRowKeys

public static java.lang.String getRowKeys(oracle.jbo.Row row,
                                          SDViewNode viewNode)
Get a String of the current row keys in format [ key=value ... ].

Parameters:
row - current Row
viewNode - current ViewNode
Returns:
String of key name value pairs

getRowKeys

public static java.lang.String getRowKeys(SDViewNode viewNode)
Get a String of the row keys of node's current row.

Parameters:
viewNode - SDViewNode
Returns:
String of key name value pairs

getResolvedRowKeyValue

public static java.lang.String getResolvedRowKeyValue(oracle.jbo.Row row,
                                                      SDViewNode viewNode)
                                               throws ExtractException
Get a String of resolved key values, delimited.

Parameters:
row - Row containing values
viewNode - SDViewNode
Returns:
String delimited key values
Throws:
ExtractException - error resolving key values

getXmlFileName

public static java.lang.String getXmlFileName()
Get the expected xml file name for this extract based on driver VO.

Returns:
xmlfilename String

getXlfFileName

public static java.lang.String getXlfFileName()
Get the expected Xliff file name for this extract based on driver VO.

Returns:
xliff file name String

getExtractSaveName

public static java.lang.String getExtractSaveName()
Get the extract save name for this extract run.

Returns:
String filename

getXmlFileName

public static java.lang.String getXmlFileName(oracle.jbo.ApplicationModule am,
                                              oracle.jbo.ViewObject vo)
Get the seed XML file name based on given AM and VO. Used with reference AM/VOs to build external refs.

Parameters:
am - ApplicationModule
vo - ViewObject
Returns:
String XML file name to be used as external reference

getXmlFileName

public static java.lang.String getXmlFileName(oracle.jbo.ApplicationModule am,
                                              oracle.jbo.ViewObject vo,
                                              boolean ignoreExclusiveNode)
Get the seed XML file name based on given AM and VO. Set ignoreExclusiveNod to build exclusive root driver reference file name.

Parameters:
am - ApplictionModule
vo - ViewObject
ignoreExclusiveNode - true to not append any exclusive extract child info to file
Returns:
String XML filename to be used as external reference

Oracle Fusion Middleware extensions for Seed Data Framework
11g Release 1 (11.1.2)

E22564-02

Copyright © 2011 Oracle. All Rights Reserved.