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

E22564-02

oracle.apps.fnd.applseed.rt.common.util
Class SDMultiTenancyUtil

java.lang.Object
  extended by oracle.apps.fnd.applseed.rt.common.util.SDMultiTenancyUtil

public class SDMultiTenancyUtil
extends java.lang.Object

Since:
Drop 8
Version:
$Header: atgpf/applseed/src/java/oracle/apps/fnd/applseed/rt/common/util/SDMultiTenancyUtil.java /main/16 2010/10/25 22:23:45 sjanarth Exp $
Author:
sjanarth

Constructor Summary
SDMultiTenancyUtil()
           
 
Method Summary
static void add2SyncList(java.util.List<SDTable> tables, oracle.jbo.server.DBTransaction dbt, java.sql.Timestamp t)
          Insert pending changes to snyc table.
static java.util.Map<java.lang.String,java.lang.String> getActiveEnterprises(oracle.jbo.server.DBTransaction dbt)
          Get the map of the active enterprises.
static java.lang.String getAdjustedEnterpriseIdForExtract(java.lang.Object attrValue)
          Returns the 'adjusted' enterprise id.
static java.lang.String getDefaultEnterprise()
          Returns the "default" enterprise for a given system or null if none.
static java.lang.String getEnterpriseContext(oracle.jbo.server.DBTransaction dbt)
          Get Enterprise context id value
static boolean isMultiTenancySupportNeeded(oracle.jbo.ApplicationModule appModule)
          Returns true if multi tenant behavior is desired.
static boolean isMultiTenantSystem(oracle.jbo.server.DBTransaction dbt)
          Determine if there are multiple tenants in the system.
static void setEnterpriseContext(oracle.jbo.server.DBTransaction dbt, java.lang.String eid)
          Set Enterprise context id value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDMultiTenancyUtil

public SDMultiTenancyUtil()
Method Detail

getActiveEnterprises

public static java.util.Map<java.lang.String,java.lang.String> getActiveEnterprises(oracle.jbo.server.DBTransaction dbt)
                                                                             throws java.sql.SQLException
Get the map of the active enterprises.

Parameters:
dbt - DBTransaction
Returns:
Map of active enterprises, id to name
Throws:
java.sql.SQLException

setEnterpriseContext

public static void setEnterpriseContext(oracle.jbo.server.DBTransaction dbt,
                                        java.lang.String eid)
                                 throws java.sql.SQLException
Set Enterprise context id value

Parameters:
dbt - DBTransaction
eid - enterprise context
Throws:
java.sql.SQLException

getEnterpriseContext

public static java.lang.String getEnterpriseContext(oracle.jbo.server.DBTransaction dbt)
                                             throws java.sql.SQLException
Get Enterprise context id value

Parameters:
dbt - DBTransaction
Returns:
enterprise context string
Throws:
java.sql.SQLException

isMultiTenancySupportNeeded

public static boolean isMultiTenancySupportNeeded(oracle.jbo.ApplicationModule appModule)
Returns true if multi tenant behavior is desired. This API was intended as a wrapper around various usecases where multi tenant behavior is not expected (like ATGLITE).

Returns:
boolean true if multi tenant behavior is required

getDefaultEnterprise

public static java.lang.String getDefaultEnterprise()
Returns the "default" enterprise for a given system or null if none.

Returns:
String representing default enterprise or null if none

getAdjustedEnterpriseIdForExtract

public static java.lang.String getAdjustedEnterpriseIdForExtract(java.lang.Object attrValue)
Returns the 'adjusted' enterprise id.

Parameters:
attrValue - the eid as read from the database
Returns:
"0" if attrValue is "0", else 1.

add2SyncList

public static void add2SyncList(java.util.List<SDTable> tables,
                                oracle.jbo.server.DBTransaction dbt,
                                java.sql.Timestamp t)
                         throws java.sql.SQLException
Insert pending changes to snyc table.

Parameters:
tables - List of SDTable
dbt - DBTransaction
t - Timestamp
Throws:
java.sql.SQLException

isMultiTenantSystem

public static boolean isMultiTenantSystem(oracle.jbo.server.DBTransaction dbt)
                                   throws java.sql.SQLException
Determine if there are multiple tenants in the system.

Parameters:
dbt - DBTransaction
Returns:
true when number of active enterprises is more than 1
Throws:
java.sql.SQLException

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

E22564-02

Copyright © 2011 Oracle. All Rights Reserved.