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

E22564-02

oracle.apps.fnd.applseed.rt.loader.handler.data
Class SDBC4JDataHandler

java.lang.Object
  extended by oracle.apps.fnd.applseed.rt.loader.core.SDDataHandler
      extended by oracle.apps.fnd.applseed.rt.loader.handler.data.SDBC4JDataHandler
Direct Known Subclasses:
SDBC4JDEDataHandler

public class SDBC4JDataHandler
extends SDDataHandler


Field Summary
protected  boolean exclusiveModeParentMissing
           
 
Fields inherited from class oracle.apps.fnd.applseed.rt.loader.core.SDDataHandler
driverNode, fileProps, LOGGER, theMTSHandler, theParams, theRowCounter, warnings
 
Constructor Summary
SDBC4JDataHandler()
           
 
Method Summary
protected  void checkDuplicates(oracle.jbo.Row[] rows, java.util.List<java.lang.Object> keyObjects)
           
protected  java.lang.String encodeValue(java.lang.String val)
          Encode the passed value using hex encoder.
protected  long getCountOfChildEntities(SDDataEntity de)
          Counts the total number of entities under the given entity.
protected  java.lang.String getFileHashValue(SDDataEntity de)
          Get the file hash value from the data entity.
protected  java.lang.String getLastUpdateUserAttrName(oracle.jbo.Row row)
           
protected  oracle.jbo.NameValuePairs getParentKeyAttributes(SDDataEntity de)
           
protected  java.lang.String getRowHashValue(SDViewNode node, oracle.jbo.Row row)
          Get the row hash value depending on the calculating type, db or mid-tier.
protected  oracle.jbo.Row[] getRowsByPrimaryKey(SDDataEntity de)
           
protected  oracle.jbo.Row[] getRowsByUniqueKey(SDDataEntity de)
           
protected  oracle.jbo.ViewObject getViewObject(SDDataEntity de)
           
protected  void handleRegularInsert(SDDataEntity de, oracle.jbo.server.ViewObjectImpl vo)
           
protected  void handleRegularUpdate(SDDataEntity de, oracle.jbo.server.ViewObjectImpl vo, oracle.jbo.Row[] rows)
           
protected  boolean isAncestorOfExclusiveNode(SDLoaderViewNode node)
          Checks if the given node is a parent/ancestor of the exclusive view.
protected  boolean isChangeIndicatorSame(SDDataEntity de, oracle.jbo.Row row)
          Check if the change indicator attr value the same between data entity and row.
protected  boolean isCustomizedRow(SDDataEntity de, oracle.jbo.Row row)
          Check if the row is customized, that is, last update user not equal 0.
protected  boolean isCustomizedRow(java.lang.String lastUpdatedUserAttrName, oracle.jbo.Row row)
          Check if the row is customized, that is, last update user not equal 0.
protected  boolean isMatchingRowByAttrs(SDDataEntity de, oracle.jbo.Row row)
          Check if the database and file records match by comparing each attribute value.
protected  boolean isNLSNonTranslatableNode(SDLoaderViewNode node)
          Method checks for whether the node is translatable or not in NLS mode.
protected  void loadEntity(SDDataEntity de)
           
protected  void loadEntitySingle(SDDataEntity de)
           
protected  void logAllAttributes(SDDataEntity de, java.lang.String msg)
           
 void performCleanup()
           
protected  oracle.jbo.Row performRegularInsert(SDDataEntity de, oracle.jbo.server.ViewObjectImpl vo)
           
protected  void performRegularUpdate(SDDataEntity de, oracle.jbo.server.ViewObjectImpl vo, oracle.jbo.Row r)
           
protected  long removeChildRows(SDViewNode viewNode, int indent)
           
protected  void removeViewCriteria(SDDataEntity de)
           
protected  void resolveAttributes(SDDataEntity de)
           
protected  void selectAttributesIfSIMode(oracle.jbo.server.ViewObjectImpl vo)
           
protected  void setAttributes(SDDataEntity de, oracle.jbo.Row r)
           
 
Methods inherited from class oracle.apps.fnd.applseed.rt.loader.core.SDDataHandler
checkCFV, commitTrans, foundImmutableData, foundMutableData, getDriverNode, getTransaction, getWarnings, handleDMLConstraintException, handleDMLConstraintException, handleGenericException, handleGenericException, handleJboException, handleJboException, initialize, initialize, isTopEntity, loadEntityGroup, loadEntityMain, loadEntityTopLevel, resetAllState, rollbackTrans, setEnterpriseContext, showCommitProgress, showFailedRow, showProgress, showProgress2, showWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exclusiveModeParentMissing

protected boolean exclusiveModeParentMissing
Constructor Detail

SDBC4JDataHandler

public SDBC4JDataHandler()
Method Detail

loadEntitySingle

protected void loadEntitySingle(SDDataEntity de)
                         throws SDLoaderException
Specified by:
loadEntitySingle in class SDDataHandler
Throws:
SDLoaderException

getViewObject

protected oracle.jbo.ViewObject getViewObject(SDDataEntity de)

loadEntity

protected void loadEntity(SDDataEntity de)
                   throws SDLoaderException,
                          SDMetaDataException,
                          java.io.IOException,
                          java.sql.SQLException
Throws:
SDLoaderException
SDMetaDataException
java.io.IOException
java.sql.SQLException

selectAttributesIfSIMode

protected void selectAttributesIfSIMode(oracle.jbo.server.ViewObjectImpl vo)

resolveAttributes

protected void resolveAttributes(SDDataEntity de)
                          throws SDMetaDataException,
                                 SDLoaderException
Throws:
SDMetaDataException
SDLoaderException

logAllAttributes

protected void logAllAttributes(SDDataEntity de,
                                java.lang.String msg)

removeViewCriteria

protected void removeViewCriteria(SDDataEntity de)

getParentKeyAttributes

protected oracle.jbo.NameValuePairs getParentKeyAttributes(SDDataEntity de)

getRowsByUniqueKey

protected oracle.jbo.Row[] getRowsByUniqueKey(SDDataEntity de)
                                       throws SDLoaderException
Throws:
SDLoaderException

getRowsByPrimaryKey

protected oracle.jbo.Row[] getRowsByPrimaryKey(SDDataEntity de)
                                        throws SDLoaderException
Throws:
SDLoaderException

checkDuplicates

protected void checkDuplicates(oracle.jbo.Row[] rows,
                               java.util.List<java.lang.Object> keyObjects)
                        throws SDLoaderException
Throws:
SDLoaderException

setAttributes

protected void setAttributes(SDDataEntity de,
                             oracle.jbo.Row r)
                      throws java.io.IOException
Throws:
java.io.IOException

handleRegularUpdate

protected void handleRegularUpdate(SDDataEntity de,
                                   oracle.jbo.server.ViewObjectImpl vo,
                                   oracle.jbo.Row[] rows)
                            throws java.io.IOException
Throws:
java.io.IOException

handleRegularInsert

protected void handleRegularInsert(SDDataEntity de,
                                   oracle.jbo.server.ViewObjectImpl vo)
                            throws java.io.IOException
Throws:
java.io.IOException

performRegularUpdate

protected void performRegularUpdate(SDDataEntity de,
                                    oracle.jbo.server.ViewObjectImpl vo,
                                    oracle.jbo.Row r)
                             throws java.io.IOException
Throws:
java.io.IOException

performRegularInsert

protected oracle.jbo.Row performRegularInsert(SDDataEntity de,
                                              oracle.jbo.server.ViewObjectImpl vo)
                                       throws SDMetaDataException,
                                              java.io.IOException
Throws:
SDMetaDataException
java.io.IOException

performCleanup

public void performCleanup()
                    throws SDLoaderCleanupException
Specified by:
performCleanup in class SDDataHandler
Throws:
SDLoaderCleanupException

removeChildRows

protected long removeChildRows(SDViewNode viewNode,
                               int indent)

getLastUpdateUserAttrName

protected java.lang.String getLastUpdateUserAttrName(oracle.jbo.Row row)

isCustomizedRow

protected boolean isCustomizedRow(SDDataEntity de,
                                  oracle.jbo.Row row)
Check if the row is customized, that is, last update user not equal 0.

Parameters:
row - Row to check
Returns:
True when row last update user is not null and any value other than 0.

isCustomizedRow

protected boolean isCustomizedRow(java.lang.String lastUpdatedUserAttrName,
                                  oracle.jbo.Row row)
Check if the row is customized, that is, last update user not equal 0.

Parameters:
lastUpdatedUserAttrName - LastUpdatedUserName
row - Row to check
Returns:
True when row last update user is not null and any value other than 0.

isMatchingRowByAttrs

protected boolean isMatchingRowByAttrs(SDDataEntity de,
                                       oracle.jbo.Row row)
Check if the database and file records match by comparing each attribute value.

Parameters:
de - SDDataEntity, contains attribute values parsed from upload file
row - Row, contains atribute values read from database
Returns:
true when all attributes match, false on first mismatch

isAncestorOfExclusiveNode

protected boolean isAncestorOfExclusiveNode(SDLoaderViewNode node)
Checks if the given node is a parent/ancestor of the exclusive view.

Parameters:
node - to be checked
Returns:
true if all the following are true, else false - We have an exclusive child view object in the app module - The given node is a parent/ancestor of that exclusive view object

getCountOfChildEntities

protected long getCountOfChildEntities(SDDataEntity de)
Counts the total number of entities under the given entity.

Parameters:
de - - the entity whose children/grand-children are to be counted.
Returns:
count of tatal number of children under the given entity

isChangeIndicatorSame

protected boolean isChangeIndicatorSame(SDDataEntity de,
                                        oracle.jbo.Row row)
Check if the change indicator attr value the same between data entity and row.

Parameters:
de - SDDataEntity attribute values parsed from file
row - Row data retrieved from database
Returns:
True when change indicator attribute values between file and database are the same

getRowHashValue

protected java.lang.String getRowHashValue(SDViewNode node,
                                           oracle.jbo.Row row)
Get the row hash value depending on the calculating type, db or mid-tier.

Parameters:
node - SDViewNode
row - db fetched row
Returns:
String hash value hex encoded, null if not found

getFileHashValue

protected java.lang.String getFileHashValue(SDDataEntity de)
Get the file hash value from the data entity. This will be either a de attribute when calculated on database, or a property when calculated mid-tier.

Parameters:
de - SDDataEntity
Returns:
String hex encoded value, null if not found in either de attributes or properties

encodeValue

protected java.lang.String encodeValue(java.lang.String val)
Encode the passed value using hex encoder.

Parameters:
val - String to encode
Returns:
String hex encoded value

isNLSNonTranslatableNode

protected boolean isNLSNonTranslatableNode(SDLoaderViewNode node)
Method checks for whether the node is translatable or not in NLS mode.

Parameters:
node - to be checked
Returns:
true , if node is non-translatable else false

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

E22564-02

Copyright © 2011 Oracle. All Rights Reserved.