OracleAS Personalization Java API Reference
10g Release 2 (10.1.2)

B14053-01


oracle.dmt.op.re.reapi.rt
Class REProxyRT

java.lang.Object
  extended byoracle.dmt.op.re.reapi.rt.REProxyRT


public final class REProxyRT
extends java.lang.Object

This class provides real-time recommendation functions. An instance of REProxyRT, a.k.a proxy, must be created or obtained before any REAPI method can be called in a client application. Although a public constructor is provided for creating proxies directly, it is strongly recommended that you create proxies through class REProxyManager. Class REProxy encapsulates a JDBC connection pool and a data collection cache; both are created during proxy initialization. The former is used to maintain a pooling mechanism for JDBC connections that are used by almost every REAPI method. This guarantees the best use of the resources. The latter provides the most efficient way to collect user profile data that is essential for building and improving data mining models, which is the core of the real-time recommendation engine.

It is expensive to create a new instance of REProxyRT, both time-wise and resource-wise. For web applications, it is better to create the needed proxies during the application initiation stage. The REProxyRT objects need NOT be destroyed until the application (not necessarily for every program module, such as servlets or JSPs) closes or when the server, namely OracleAS, shuts down.

The majority of the public methods provided in this class can be divided into two categories: recommendation and data collection. Every recommendation method requires a JDBC connection to the designated RE schema where the model and the profile data are stored. Recommendation results are made in real time based on the model and the profile. The data collection methods, such as addItem, do not require individual JDBC connections. The profile data collected is first stored temporarily in the data collection cache. The data is then periodically archived, in batch, in the RE schema via a dedicated JDBC connection. Eventually, the data is saved (synchronised) in the MTR, either at the end of a synch interval or when the session closes or times out.

Although RE always maintains its own session internally, all methods in this class support both sessionful and sessionless applications. If the host application is sessionful, the RE session can be mapped to the host app session. This is done by calling create session methods. There are two such methods, one for customers, namely registered users; the other for visitors, those who never registered, hence there is no or little profle data about them. If the application is sessionless, all REProxyRT methods can be called without creating a session first.

Since:
9.0.0
See Also:
REProxyManager

Method Summary
void addItem(IdentificationData idData, DataItem item)
Adds an item to the data collection cache.
void addItems(IdentificationData idData, DataItem[] items)
Adds multiple items to the data collection cache.
void closeSession(IdentificationData idData)
Closes an RE session and marks the session as closed.
void createCustomerSession(java.lang.String customerID, java.lang.String appSessionID)
Creates a new customer session, i.e., a new session for the specified customer (registered user).
void createVisitorSession(java.lang.String visitorID, java.lang.String appSessionID)
Creates a new visitor session, i.e., a new session for a visitor.
RecommendationList crossSellForItemFromHotPicks(IdentificationData idData, Item item, int numOfItems, long[] hotPickGroups, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of cross-sell items from Hotpicks related to the specified item.
RecommendationList crossSellForItemsFromHotPicks(IdentificationData idData, Item[] items, int numOfItems, long[] hotPickGroups, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of cross-sell items from Hotpicks related to the specified items.
void freePooledConnection(java.sql.Connection conn)
java.lang.String getName()
Gets the name of this proxy.
java.sql.Connection getPooledConnection()
REProxyRT getProxy()
Deprecated. use REProxyManager.getProxy instead.
int getQueryTimeout()
Returns the number of seconds the JDBC driver will wait for the underlying SQL query to execute.
float rateItem(IdentificationData idData, Item item, int taxonomyId, TuningSettings tunings, RecommendationContent recContent)
Gives the rating of an item.
RecommendationList rateItems(IdentificationData idData, Item[] items, int taxonomyId, TuningSettings tunings, RecommendationContent recContent)
Gives the rating of the specified items.
RecommendationList recommendBottomItems(IdentificationData idData, int numOfItems, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of bottom-rated items.
RecommendationList recommendCrossSellForItem(IdentificationData idData, Item item, int numOfItems, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of cross-sell items related to the specified item.
RecommendationList recommendCrossSellForItems(IdentificationData idData, Item[] items, int numOfItems, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of cross-sell items related to the specified items.
RecommendationList recommendFromHotPicks(IdentificationData idData, int numOfItems, long[] hotPickGroups, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of Hotpick items.
RecommendationList recommendTopItems(IdentificationData idData, int numOfItems, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Recommends a list of top-rated items.
void removeItem(IdentificationData idData, DataItem item)
Removes an item from the cache and from the RE schema, if it has already been archived.
void removeItems(IdentificationData idData, DataItem[] items)
Removes multiple items from the cache and from the RE schema, if they have already been archived.
RecommendationList selectFromHotPicks(IdentificationData idData, int numOfItems, long[] hotPickGroups, TuningSettings tunings, FilteringSettings filters, RecommendationContent recContent)
Selects the specified number of items from a specified set of hot picks group.
void setQueryTimeout(int nTimeout)
Returns the number of seconds the JDBC driver will wait for the underlying SQL query to execute.
void setVisitorToCustomer(IdentificationData idData, java.lang.String customerID)
Changes the status of a visitor to that of customer during a live session.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getProxy

public REProxyRT getProxy()
Deprecated. use REProxyManager.getProxy instead.
See Also:
REProxyManager

getName

public java.lang.String getName()
Gets the name of this proxy.
Returns:
name of REProxyRT object

getQueryTimeout

public int getQueryTimeout()
Returns the number of seconds the JDBC driver will wait for the underlying SQL query to execute. If the limit is exceeded, it will throw an ErrorExecutingRE exception.
Since:
9.0.4

setQueryTimeout

public void setQueryTimeout(int nTimeout)
Returns the number of seconds the JDBC driver will wait for the underlying SQL query to execute. If the limit is exceeded, it will throw an ErrorExecutingRE exception.
Since:
9.0.4

createCustomerSession

public void createCustomerSession(java.lang.String customerID,
                                  java.lang.String appSessionID)
                           throws StringTooLargeException,
                                  InvalidIDException,
                                  BadDBConnectionException,
                                  ErrorExecutingRE,
                                  REProxyInitException,
                                  ConnectionPoolIsFullException,
                                  NullParameterException
Creates a new customer session, i.e., a new session for the specified customer (registered user). This method is used by sessionful applications that keep track of session state for existing customers.

OP maintains the mapping between appSessionID and customerID. In subsequent calls, the calling application uses appSessionID to identify the customer ID.

If the method completes successfully, a session record is inserted into the table RE_ACTIVE_USER in the RE schema and both IS_CUSTOMER and IS_ACTIVE flags are set to true.

Parameters:
customerID - customer ID
appSessionID - session ID provided by the host application
Throws:
StringTooLargeException - if any input string is too long
InvalidIDException - if any ID is invalid
BadDBConnectionException - if the obtained JDBC connection is not good
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use
NullParameterException - if non-null input parameter is set to null

createVisitorSession

public void createVisitorSession(java.lang.String visitorID,
                                 java.lang.String appSessionID)
                          throws StringTooLargeException,
                                 BadDBConnectionException,
                                 InvalidIDException,
                                 ErrorExecutingRE,
                                 REProxyInitException,
                                 ConnectionPoolIsFullException,
                                 NullParameterException
Creates a new visitor session, i.e., a new session for a visitor. A visitor is an end user unknown to this site or application (that is, a visitor is not a registered user of the site). The calling Web application may assign specific temporary IDs to these unregistered users in order to track them. This method is used by sessionful applications that keep track of session state for visitors. It is not required for sessionless Web appliations.

OP maintains the mapping between appSessionID and visitorID, In subsequent calls, the calling application uses appSessionID to identify the visitor session.

If the method completes successfully, a session record is inserted into the table RE_ACTIVE_USERin the RE schema, the IS_CUSTOMER flag is set to false, and the IS_ACTIVE flag is set to true.

Parameters:
visitorID - ID assigned to a visitor
appSessionID - session ID provided by the host application
Throws:
StringTooLargeException - if any input string is too long
InvalidIDException - if any ID is invalid
BadDBConnectionException - if the obtained JDBC connection is not good
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use
NullParameterException

closeSession

public void closeSession(IdentificationData idData)
                  throws REProxyInitException,
                         BadDBConnectionException,
                         InvalidIDException,
                         ErrorExecutingRE,
                         ConnectionPoolIsFullException,
                         NullParameterException
Closes an RE session and marks the session as closed. This method is used by sessionful Web applications only.

After this method is called, the profile data related to the closed session will be saved in the MTR and then purged from the RE by a data synchronization process that runs periodically. For more information about data synchronization, see the administrator's guide.

If the calling Web application does not call this method explicitly, the session can time out after a specified interval. The time-out flag and the time-out interval are both user-configurable parameters set in table RE_CONFIGURATION in the RE schema (see the administrator's guide). The application can also configure the RE to not time out any sessions. In this case, the calling Web application must close all sessions explicitly using this method. If sessions are not closed (and do not time out), the RE tables may fill up rapidly. Full RE tables can result in poor performance and eventually in failure of the RE.

See the administrator's guide for information about setting configuration parameters.

Parameters:
idData - the user's identification data. When this method completes successfully, the IS_ACTIVE flag of the session is set to false.
Throws:
InvalidIDException - if any ID is invalid
BadDBConnectionException - if the obtained JDBC connection is not valid
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
NullParameterException - if null is given to a non-null parameter
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

recommendTopItems

public RecommendationList recommendTopItems(IdentificationData idData,
                                            int numOfItems,
                                            TuningSettings tunings,
                                            FilteringSettings filters,
                                            RecommendationContent recContent)
                                     throws BadDBConnectionException,
                                            InvalidIDException,
                                            NullParameterException,
                                            ErrorExecutingRE,
                                            REProxyInitException,
                                            ConnectionPoolIsFullException
Recommends a list of top-rated items. That is, returns the degree of interest and other relevant item information from the numberOfItems items with the highest degree of interest along the specified interest dimension. It answers questions such as Which are the N items that peson X is most likely to buy or like?

The rating calculation is based on the data mining model results and the user profile.

Parameters:
idData - the user identification data
numOfItems - the maximum number of recommendations to return
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters the recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

crossSellForItemFromHotPicks

public RecommendationList crossSellForItemFromHotPicks(IdentificationData idData,
                                                       Item item,
                                                       int numOfItems,
                                                       long[] hotPickGroups,
                                                       TuningSettings tunings,
                                                       FilteringSettings filters,
                                                       RecommendationContent recContent)
                                                throws ArrayTooLargeException,
                                                       NullParameterException,
                                                       InvalidIDException,
                                                       BadDBConnectionException,
                                                       ErrorExecutingRE,
                                                       REProxyInitException,
                                                       ConnectionPoolIsFullException
Recommends a list of cross-sell items from Hotpicks related to the specified item. Based on the data mining model and the user profile, it is predicted that the user will most probably like or purchase these Hotpick items because the user is interested in or has purchased the specified item. Hotpick is a group or groups of special items.
Parameters:
idData - the user identification data
item - the item the cross-sell is related to
numOfItems - the maximum number of recommendations to return
hotPickGroups - group ID(s) of hotpick group(s) to be handled
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
ArrayTooLargeException - if input array size exceeds the maximum
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

crossSellForItemsFromHotPicks

public RecommendationList crossSellForItemsFromHotPicks(IdentificationData idData,
                                                        Item[] items,
                                                        int numOfItems,
                                                        long[] hotPickGroups,
                                                        TuningSettings tunings,
                                                        FilteringSettings filters,
                                                        RecommendationContent recContent)
                                                 throws ArrayTooLargeException,
                                                        NullParameterException,
                                                        InvalidIDException,
                                                        BadDBConnectionException,
                                                        ErrorExecutingRE,
                                                        REProxyInitException,
                                                        ConnectionPoolIsFullException
Recommends a list of cross-sell items from Hotpicks related to the specified items. Based on the data mining model and the user profile, it is predicted that the user will most probably like or purchase these Hotpick items because the user is interested in or has purchased the specified items. Hotpick is a group or groups of special items.
Parameters:
idData - the user identification data
items - an array of Item that the cross-sell item is related to
numOfItems - the maximum number of recommendations to return
hotPickGroups - group ID(s) of hotpick group(s) to be included in this recommendation
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters the recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
ArrayTooLargeException - if input array size exceeds the maximum
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

selectFromHotPicks

public RecommendationList selectFromHotPicks(IdentificationData idData,
                                             int numOfItems,
                                             long[] hotPickGroups,
                                             TuningSettings tunings,
                                             FilteringSettings filters,
                                             RecommendationContent recContent)
                                      throws ArrayTooLargeException,
                                             NullParameterException,
                                             InvalidIDException,
                                             BadDBConnectionException,
                                             ErrorExecutingRE,
                                             REProxyInitException,
                                             ConnectionPoolIsFullException
Selects the specified number of items from a specified set of hot picks group. Hotpicks is a group or groups of special items. Use this method to select Hotpick items in any way you want.
Parameters:
idData - the user identification data
numOfItems - the maximum number of recommendations to return
hotPickGroups - group ID(s) of Hotpick group(s) to be included
tunings - set of parameters that tunes the selection
filters - set of parameters that filters the selection
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
ArrayTooLargeException - if input array size exceeds the maximum
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

recommendCrossSellForItem

public RecommendationList recommendCrossSellForItem(IdentificationData idData,
                                                    Item item,
                                                    int numOfItems,
                                                    TuningSettings tunings,
                                                    FilteringSettings filters,
                                                    RecommendationContent recContent)
                                             throws NullParameterException,
                                                    InvalidIDException,
                                                    BadDBConnectionException,
                                                    ErrorExecutingRE,
                                                    REProxyInitException,
                                                    ConnectionPoolIsFullException
Recommends a list of cross-sell items related to the specified item. That is, returns the degree of interest and other relevant item information for the specified number of items most strongly associated with the target item in the argument list. Based on the data mining model and the user profile, it is predicted that the user will most probably like or purchase these items because the user is interested in or has purchased the specified item. Answers questions such as Which are the N items a person is most likely to buy or be interested in, given that he bought or is interested in item Y?
Parameters:
idData - the user identification data
item - the item the cross-sell item is related to
numOfItems - the maximum number of recommendations to return
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

recommendCrossSellForItems

public RecommendationList recommendCrossSellForItems(IdentificationData idData,
                                                     Item[] items,
                                                     int numOfItems,
                                                     TuningSettings tunings,
                                                     FilteringSettings filters,
                                                     RecommendationContent recContent)
                                              throws ArrayTooLargeException,
                                                     NullParameterException,
                                                     InvalidIDException,
                                                     BadDBConnectionException,
                                                     ErrorExecutingRE,
                                                     REProxyInitException,
                                                     ConnectionPoolIsFullException
Recommends a list of cross-sell items related to the specified items. That is, returns the degree of interest and other relevant item information for the N items most strongly associated with the specified items. Based on the data mining model and the user profile, it is predicted that the user will most probably like or purchase these items because the user is interested in or has purchased the specified items. Answers questions such as Which are the N items a person is most likely to buy or be interested in, given that he bought or is interested in items Y1, Y2, ... Yn?
Parameters:
idData - the user identification data
items - an array of items the cross-sell is related to
numOfItems - the maximum number of recommendations to return
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
ArrayTooLargeException - if input array size exceeds the maximum
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

recommendBottomItems

public RecommendationList recommendBottomItems(IdentificationData idData,
                                               int numOfItems,
                                               TuningSettings tunings,
                                               FilteringSettings filters,
                                               RecommendationContent recContent)
                                        throws NullParameterException,
                                               BadDBConnectionException,
                                               InvalidIDException,
                                               ErrorExecutingRE,
                                               REProxyInitException,
                                               ConnectionPoolIsFullException
Recommends a list of bottom-rated items. That is, returns the degree of interest and other relevant item information for the NumberOfItems items with the lowest degree of interest along the specified interst dimension. The rating calculation is based on the data mining model results and the user profile. It is predicted that the user will most likely rate these items at the lower end of the specified interest dimension. It answers questions such as Which are the N items that person X is least likely to buy or like?
Parameters:
idData - the user identification data
numOfItems - the maximum number of recommendations to return
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

recommendFromHotPicks

public RecommendationList recommendFromHotPicks(IdentificationData idData,
                                                int numOfItems,
                                                long[] hotPickGroups,
                                                TuningSettings tunings,
                                                FilteringSettings filters,
                                                RecommendationContent recContent)
                                         throws ArrayTooLargeException,
                                                REProxyInitException,
                                                NullParameterException,
                                                BadDBConnectionException,
                                                InvalidIDException,
                                                ErrorExecutingRE,
                                                ConnectionPoolIsFullException
Recommends a list of Hotpick items. That is, returns the degree of interest and other relevant item information for the N items with the highest degree of interest along the specified interest dimension. Items are selected from the hot picks table. Hotpicks is a group of groups of special items. Based on the data mining model results and the user profile, it is predicted that the user will most likely be interested in these Hotpick items. Answers questions such as Which are the N items from a particular set of Hot Picks group is the specified user most likely to buy or like?
Parameters:
idData - the user identification data
numOfItems - the maximum number of recommendations to return
hotPickGroups - group ID(s) of hotpick group(s) to be handled
tunings - set of parameters that tunes the recommendation process
filters - set of parameters that filters recommendation results
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations
Throws:
ArrayTooLargeException - if input array size exceeds the maximum
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

rateItem

public float rateItem(IdentificationData idData,
                      Item item,
                      int taxonomyId,
                      TuningSettings tunings,
                      RecommendationContent recContent)
               throws NullParameterException,
                      BadDBConnectionException,
                      InvalidIDException,
                      ErrorExecutingRE,
                      REProxyInitException,
                      ConnectionPoolIsFullException
Gives the rating of an item. That is, returns the degree of interest, computed along an interest dimension, for an item. The rating calculation is based on the data mining model results and the user profile. The degree of interest could indicate, for example, the likelihood that customer X will buy item Y.
Parameters:
idData - the user identification data
item - the item to be rated
taxonomyId - ID of the taxonomy from which the rating is calculated
tunings - set of parameters that tunes the recommendation process
recContent - set of parameters that defines how the results shall be presented
Returns:
rating value of floating type
Throws:
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

rateItems

public RecommendationList rateItems(IdentificationData idData,
                                    Item[] items,
                                    int taxonomyId,
                                    TuningSettings tunings,
                                    RecommendationContent recContent)
                             throws ArrayTooLargeException,
                                    NullParameterException,
                                    BadDBConnectionException,
                                    InvalidIDException,
                                    ErrorExecutingRE,
                                    REProxyInitException,
                                    ConnectionPoolIsFullException
Gives the rating of the specified items. That is, returns the degree of interest, computed along an interest dimension, for specified items. The rating calculation is based on the data mining model results and the user profile. The degree of interest could indicate, for example, the likelihood that customer X will buy items Y1, Y2, ... Yn.
Parameters:
idData - the user identification data
items - an array of items to be rated
taxonomyId - ID of the taxonomy from which ratings are calculated
tunings - set of parameters that tunes the recommendation process
recContent - set of parameters that defines how the results shall be presented
Returns:
a list of recommendations containing rating values of floating type
Throws:
ArrayTooLargeException - if input array size exceeds the maximum
BadDBConnectionException - if the obtained JDBC connection is not usable
InvalidIDException - if any input ID is invalid
NullParameterException - if null is given to a non-null parameter
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
ConnectionPoolIsFullException - if the JDBC connection pool reaches its maximum size and all connections are in use

addItem

public void addItem(IdentificationData idData,
                    DataItem item)
             throws BufferIsFullException
Adds an item to the data collection cache. The data in the cache is periodically archived in the RE schema and is eventually flushed to the MTR.
Parameters:
idData - the user identification data
item - the data to be added
Throws:
BufferIsFullException - if the cache buffer is full

addItems

public void addItems(IdentificationData idData,
                     DataItem[] items)
              throws ArrayTooLargeException,
                     BufferIsFullException
Adds multiple items to the data collection cache. The data in the cache is periodically archived in the RE schema and is eventually flushed to the MTR.
Parameters:
idData - the user identification data
items - an array of items to be added
Throws:
ArrayTooLargeException - if the items array exceeds maximum size
BufferIsFullException - if the cache buffer is full

removeItem

public void removeItem(IdentificationData idData,
                       DataItem item)
                throws BadDBConnectionException,
                       InvalidIDException,
                       ErrorExecutingRE,
                       REProxyInitException,
                       ConnectionPoolIsFullException,
                       NullParameterException
Removes an item from the cache and from the RE schema, if it has already been archived.
Parameters:
idData - the user identification data
item - the item to be removed
Throws:
InvalidIDException - if any input ID is invalid
BadDBConnectionException - if the connection obtained is not usable
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
NullParameterException - if null is given to a non-null parameter
ConnectionPoolIsFullException - if the connection pool reaches maximum size and all connections are in use

removeItems

public void removeItems(IdentificationData idData,
                        DataItem[] items)
                 throws ArrayTooLargeException,
                        BadDBConnectionException,
                        InvalidIDException,
                        ErrorExecutingRE,
                        REProxyInitException,
                        ConnectionPoolIsFullException,
                        NullParameterException
Removes multiple items from the cache and from the RE schema, if they have already been archived.
Parameters:
idData - the user identification data
items - an array of items to be removed
Throws:
ArrayTooLargeException - if items array exceeds the maximum (1024)
InvalidIDException - if any input ID is invalid
BadDBConnectionException - if the connection obtained is not usable
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
NullParameterException - if null is given to a non-null parameter
ConnectionPoolIsFullException - if the connection pool reaches maximum and all connections are in use

setVisitorToCustomer

public void setVisitorToCustomer(IdentificationData idData,
                                 java.lang.String customerID)
                          throws InvalidIDException,
                                 BadDBConnectionException,
                                 ErrorExecutingRE,
                                 REProxyInitException,
                                 ConnectionPoolIsFullException,
                                 NullParameterException
Changes the status of a visitor to that of customer during a live session. This method is called when a visitor (unregistered user) registers during a session. This call associates the user ID with the customer ID generated by the Web application when the visitor becomes a registered customer. OP creates a new internal session for the customer. The session data for the visitor is transferred to the customer session. The historical data for the customer is also loaded to the customer session RE cache from permanent storage (MTR).
Parameters:
idData - user identification
customerID - the new customer ID assigned to the user by the application
Throws:
InvalidIDException - if any input ID is invalid
BadDBConnectionException - if the connection obtained is not usable
ErrorExecutingRE - if PL/SQL execution fails
REProxyInitException - if reinitialization fails
NullParameterException - if null is given to a non-null parameter
ConnectionPoolIsFullException - if the connection pool reaches maximum size and all connections are in use

freePooledConnection

public void freePooledConnection(java.sql.Connection conn)

getPooledConnection

public java.sql.Connection getPooledConnection()
                                        throws BadDBConnectionException,
                                               REProxyInitException,
                                               ConnectionPoolIsFullException
Throws:
BadDBConnectionException
REProxyInitException
ConnectionPoolIsFullException

OracleAS Personalization Java API Reference
10g Release 2 (10.1.2)

B14053-01


Copyright © 2005 Oracle. All Rights Reserved.