public class ConsolidatorManager
extends java.lang.Object
The Consolidator admin API includes the following topics:
Some API calls involve real database DDL calls. Therefore, the rollback will not work. User should treat the API calls as DDL calls. In fact, for each API call, we commit first, and rollback or commit at the end, just as a real DDL does. The Consolidator API uses DROP CASCADE semantics. The Java source files sample11.java contain samples that demonstrate the use of the Consolidator API. All functions in this document contain examples which execute Java function calls from a Java program.
To use the API, a user needs to "new" an object from the class ConsolidatorManager and then call the appropriate methods of the object. In the examples, we assume an object "consolidatorManager" has been created via:
ConsolidatorManager consolidatorManager = new ConsolidatorManager();
Consolidator
Modifier and Type | Field and Description |
---|---|
static oracle.lite.common.NLSResources |
RESOURCES |
Constructor and Description |
---|
ConsolidatorManager() |
Modifier and Type | Method and Description |
---|---|
void |
addDescription(java.lang.String objectName,
int objectType,
java.lang.String description)
Adds description for object.
|
void |
addJavaResource(java.lang.String publication,
java.lang.String rsrcName)
Add java resource to a publication
|
void |
addJavaResourceAndScripts(java.lang.String publication,
java.lang.String rsrcName)
Add java resource and all associated scripts to a publication
|
void |
addMapPartitions(java.lang.String pub_item,
int num_parts,
java.lang.String storage,
java.lang.String ind_storage)
Add partitions to the publication item map table.
|
void |
addMobileDmlProcedure(java.lang.String publication,
java.lang.String pub_item,
java.lang.String mobile_dml_procedure)
Registers a PLSQL procedure to handle client's DML operations during APPLY of the in queue.
|
void |
addPublicationItem(java.lang.String template,
java.lang.String publication,
java.lang.String columns,
java.lang.String disabled_dml,
java.lang.String conflict_rule)
|
void |
addPublicationItem(java.lang.String publication,
java.lang.String item,
java.lang.String columns,
java.lang.String disabled_dml,
java.lang.String conflict_rule,
java.lang.String restricting_predicate,
int weight)
|
void |
addPublicationItem(java.lang.String template,
java.lang.String publication,
java.lang.String columns,
java.lang.String disabled_dml,
java.lang.String conflict_rule,
java.lang.String restricting_predicate,
int weight,
java.lang.String mobile_dml_procedure) |
void |
addPublicationItem(java.lang.String template,
java.lang.String publication,
java.lang.String columns,
java.lang.String disabled_dml,
java.lang.String conflict_rule,
java.lang.String restricting_predicate,
int weight,
java.lang.String mobile_dml_procedure,
boolean conflict_res_only,
boolean is_shared,
java.lang.String group_fnc)
Adds a stand-alone publication item to a publication.
|
void |
addPublicationItem(java.lang.String publication,
java.lang.String item,
java.lang.String columns,
java.lang.String disabled_dml,
java.lang.String conflict_rule,
java.lang.String restricting_predicate,
java.lang.String weight)
Adds a stand-alone publication item to a publication.
|
void |
addPublicationItem(java.lang.String template,
java.lang.String publication,
java.lang.String columns,
java.lang.String disabled_dml,
java.lang.String conflict_rule,
java.lang.String restricting_predicate,
java.lang.String weight,
java.lang.String mobile_dml_procedure) |
void |
addPublicationSequence(java.lang.String pubName,
java.lang.String seqName)
This method will add a sequence to a publication.
|
void |
addSqlScript(java.lang.String publication,
java.lang.String scrName)
Add sql script
|
void |
addSqlScript(java.lang.String publication,
java.lang.String scrName,
int scrWeight)
Add sql script
|
void |
addSqlScript(java.lang.String publication,
java.lang.String scrName,
java.lang.String weight_s)
Add sql script
|
void |
addSyncRule(java.lang.String ruleName)
Add sync rule for all clients
|
void |
addSyncRule(java.lang.String publication,
java.lang.String ruleName)
Add sync rule
|
long |
advanceSequenceWindow(java.lang.String seqName,
java.lang.String clientID)
This method will force a client to advance the specified sequence's window.
|
void |
alterDatabase(java.lang.String name,
Consolidator.DBProps props)
Modifies details for a registered app database.
|
void |
alterPublicationItem(java.lang.String name,
java.lang.String select_stmt)
Allow additional columns to be added to an existing publication item.
|
void |
assignWeights(java.lang.String pub,
boolean createScripts)
Automatically calculates weights for all publication items belonging to a publication.
|
boolean |
authenticate(java.lang.String clientid,
java.lang.String password)
Authenticate a Consolidator user.
|
void |
closeConnection()
Closes an open JDBC connection.
|
void |
completeRefresh(java.lang.String clientid,
java.lang.String publication)
Forces complete refresh of a publication for a given client.
|
boolean |
connectionIsClosed()
Tests if the connection is closed.
|
void |
createDataCollectionQueue(java.lang.String name,
java.lang.String owner,
java.lang.String store,
java.lang.String inq_cols,
java.lang.String pk_columns,
boolean purgeClientAfterSync,
boolean isOutView)
Creates a new stand-alone data collection queue publication item.
|
void |
createDataCollectionQueue(java.lang.String name,
java.lang.String db_inst,
java.lang.String owner,
java.lang.String store,
java.lang.String inq_cols,
java.lang.String pk_columns,
boolean purgeClientAfterSync,
boolean isOutView)
Same as
createDataCollectionQueue but with an additional db_inst parameter that msut be used to specify a
registered app database or the MAIN database. |
void |
createJavaResource(java.lang.String jarName,
java.lang.String className,
boolean replace)
Load java resource into the mobile repository
|
void |
createJob(java.lang.String jobName,
java.lang.String jobClassName,
java.lang.String jobParamValue,
Schedule jobSchedule,
java.lang.String jobEngine,
boolean initiallyEnabled,
boolean saveToJobHistory)
A user uses this method to submit job information.
|
void |
createMessagingAddress(java.lang.String clientid,
java.lang.String deviceType,
java.lang.String networkProviderId,
java.lang.String address)
Create network address for a client device
|
void |
createNoSQLQueue(java.lang.String name,
Consolidator.NoSQLTableProps nsp)
Create a queue publication item based on a NoSQL Enterprise Edition table.
|
java.lang.String |
createPubItemComposePkg(java.lang.String pub_item)
Generates text of a plsql package for compose phase of MGP.
|
void |
createPublication(java.lang.String name,
int client_storage_type,
java.lang.String client_name_template,
java.lang.String enforce_ri)
Creates a new Publication.
|
void |
createPublication(java.lang.String name,
int client_storage_type,
java.lang.String client_name_template,
java.lang.String enforce_ri,
int device_types_flg)
Creates a new Publication.
|
void |
createPublication(java.lang.String name,
java.lang.String db_inst,
int client_storage_type,
java.lang.String client_name_template,
java.lang.String enforce_ri)
Same as
createPublication but with
an additional db_inst parameter that can be used to specify a registered app database
or the MAIN database. |
void |
createPublication(java.lang.String name,
java.lang.String db_inst,
int client_storage_type,
java.lang.String client_name_template,
java.lang.String enforce_ri,
int device_types_flg)
Same as
createPublication
but with an additional db_inst parameter that can be used to specify a
registered app database or the MAIN database.If the MAIN database is specified, this is
equivalent to the older createPublication call referred to above. |
void |
createPublicationItem(java.sql.Connection rmt_conn,
java.lang.String name,
java.lang.String owner,
java.lang.String store,
java.lang.String refresh_mode,
java.lang.String select_stmt,
java.lang.String cbk_owner,
java.lang.String cbk_name)
Creates a new stand-alone publication item for a synonym for a remote database object
Example:
Consolidator.CreatePublicationItem("jdbc:oracle:oci8:@remote_oracle.world","P_SAMPLE1",
"SAMPLE1", "PAYROLL_ORACLE", "F",
"SELECT * FROM sample1.PAYROLL_ORACLE WHERE SALARY > :CAP", null, null);
|
void |
createPublicationItem(java.lang.String name,
Consolidator.PubItemProps pi_props)
Creates a new stand-alone publication item.
|
void |
createPublicationItem(java.lang.String name,
java.lang.String owner,
java.lang.String store,
java.lang.String refresh_mode,
java.lang.String select_stmt,
java.lang.String cbk_owner,
java.lang.String cbk_name)
Creates a new stand-alone publication item.
|
void |
createPublicationItem(java.lang.String rmt_jdbc_url,
java.lang.String name,
java.lang.String owner,
java.lang.String store,
java.lang.String refresh_mode,
java.lang.String select_stmt,
java.lang.String cbk_owner,
java.lang.String cbk_name)
Creates a new stand-alone publication item for a synonym for a remote database object
Example:
Consolidator.CreatePublicationItem("jdbc:oracle:oci8:@oracle.world","P_SAMPLE1",
"SAMPLE1", "PAYROLL_ORACLE", "F",
"SELECT * FROM sample1.PAYROLL_ORACLE WHERE SALARY > :CAP", null, null);
|
void |
createPublicationItemIndex(java.lang.String name,
java.lang.String publication_item,
java.lang.String pmode,
java.lang.String columns)
Defines an index on a publication item.
|
void |
createQueuePublicationItem(java.lang.String name,
java.lang.String owner,
java.lang.String store,
java.lang.String select_stmt,
java.lang.String pk_columns,
java.lang.String cbk_owner,
java.lang.String cbk_name)
Creates a new stand-alone queue publication item.
|
void |
createSequence(java.lang.String name)
Creates a replicated sequence.
|
void |
createSequence(java.lang.String seqName,
int minValue,
int windowSize,
int threshold,
int incrementBy)
This method will create a Consolidator Sequence object.
|
void |
createSequencePartition(java.lang.String name,
java.lang.String clientid,
long curr_val,
long incr)
Creates a replicated sequence partition for a given client.
|
void |
createSqlScript(java.lang.String scrName,
java.lang.String scrText,
boolean replace)
Load sql script into mobile repository
|
void |
createStoredProc(java.lang.String jarName,
java.lang.String className,
java.lang.String methodName,
java.lang.String procName)
Create stored procedure script and load java class into mobile server repository
|
void |
createStoredProc(java.lang.String jarName,
java.lang.String className,
java.lang.String methodName,
java.lang.String procName,
java.lang.String procText)
Create stored procedure using supplied sql script and load
java class into mobile server repository
|
void |
createSubscription(java.lang.String publication,
java.lang.String clientid)
Creates a client subscription to a publication.
|
void |
createSyncRule(java.lang.String ruleName,
java.lang.String ruleText,
boolean replace)
Load rules into mobile repository
|
void |
createVirtualPKColumn(java.lang.String owner,
java.lang.String store,
java.lang.String column)
Allows a virtual primary key to be specified for a publication item where the
base object does not have one.
|
void |
createVirtualPKColumn(java.lang.String db_inst,
java.lang.String owner,
java.lang.String store,
java.lang.String column)
Same as
createVirtualPKColumn but with
an additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. |
void |
deinstantiateSubscription(java.lang.String publication,
java.lang.String clientid)
De-instantiates a subscription.
|
int |
deleteJobExecutionLogs(java.lang.String jobNameTemplate,
int jobResult,
java.util.Date jobFinishTimeFrom,
java.util.Date jobFinishTimeTo)
A user can use this method to delete all the job execution logs satisfying
a certain criteria from the job execution history.
|
void |
dependencyHint(java.lang.String owner,
java.lang.String store,
java.lang.String owner_d,
java.lang.String store_d)
Hints for non-apparent depedencies.
|
void |
dependencyHint(java.lang.String db_inst,
java.lang.String owner,
java.lang.String store,
java.lang.String owner_d,
java.lang.String store_d)
Same as
dependencyHint but with an
additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. |
void |
deRegisterDatabase(java.lang.String name)
Deregisters a registered app database.
|
void |
deRegisterJobClass(java.lang.String jobClassName,
boolean unloadJobClassFromDB)
A user uses this method to deregister a job class.
|
void |
deRegisterMyCompose(java.lang.String publication,
java.lang.String pubItem,
boolean removeBytecode)
Deregister a customized compose class.
|
void |
deRegisterQueuePkg()
De-registers the current Queue package.
|
void |
deRegisterQueuePkg(java.lang.String pub)
De-registers the queue package of the specified publication.
|
void |
disableJob(java.lang.String jobName)
Disable a job.
|
void |
disablePubItemQueryCache(java.lang.String publication_item)
Disables cache of publication item query during MGP compose phase.
|
void |
dropAllMapPartitions(java.lang.String pub_item)
Drops all partitions of the publication item map table.
|
void |
dropJavaResource(java.lang.String rsrcName)
Drop java resource
|
void |
dropJob(java.lang.String jobName)
Drop a job.
|
void |
dropMapPartition(java.lang.String partition)
Drops the partition table.
|
void |
dropPublication(java.lang.String name)
Drops a publication.
|
void |
dropPublicationItem(java.lang.String name)
Drops a stand-alone publication item.
|
void |
dropPublicationItemIndex(java.lang.String name)
Drops the index of a publication item.
|
void |
dropSequence(java.lang.String seqName)
This method will drop a Consolidator Sequence object.
|
void |
DropSequence(java.lang.String name)
Drops a replicated sequence.
|
void |
dropSequencePartition(java.lang.String name,
java.lang.String clientid)
Drops a replicated sequence partition.
|
void |
dropSqlScript(java.lang.String scrName)
Drop sql script
|
void |
dropStoredProc(java.lang.String procName)
Drop stored procedure
|
void |
dropSubscription(java.lang.String publication,
java.lang.String clientid)
Drops a subscription.
|
void |
dropSyncRule(java.lang.String ruleName)
Drop sync rule
|
void |
dropVirtualPKColumns(java.lang.String owner,
java.lang.String store)
Allows a primary key to be dropped.
|
void |
dropVirtualPKColumns(java.lang.String db_inst,
java.lang.String owner,
java.lang.String store)
Same as
dropVirtualPKColumns but with
an additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. |
void |
enableJob(java.lang.String jobName)
Enable a job.
|
void |
enablePubItemQueryCache(java.lang.String publication_item)
Enables caching of publication item query during MGP compose phase.
|
long |
enQueueNotification(java.lang.String clientid,
java.lang.String publication,
java.lang.String pubItems,
int recordCount,
int dataSize,
int priority)
En queue a sync notification
|
void |
executeStatement(java.lang.String stmt)
Executes a SQL statement over a Consolidator database connection.
|
void |
executeTransaction(java.lang.String clientid,
java.lang.String dbInst,
long tid)
Re-executes transactions in the Consolidator error queue.
|
java.lang.String |
generateMobileDmlProcedure(java.lang.String publication_item,
char type)
Generates default dml procedure for a publication item
|
java.lang.String |
generateStoredProcScript(java.lang.String jarName,
java.lang.String className,
java.lang.String methodName,
java.lang.String procName)
Generate sql script for creating stored procedure
from a given class method
|
java.util.Vector |
getAllSubscribedClients(java.lang.String publication)
Gets a Vector of all subscribed clients.
|
oracle.lite.sync.JupConnection |
getConnection() |
java.util.Vector |
getConsolidatorObject(java.lang.String publicationName,
int objectType)
Returns objects(scripts,resources,sequences,publicationitems) associated with publication.
|
java.util.Hashtable |
getConsolidatorObjectAttributes(java.lang.String objectName,
int objectType)
Gets attributes of the /**
Gets attributes of the consolidator object based on specified name and type
Example:
ConsolidatorManager.getConsolidatorObjectAttributes("SCRIPT1",Consolidator.SCRIPTS);
|
java.lang.String |
getCurrentTime()
Return the current time as a string in a format that is used by Consolidator.
|
java.util.Map |
getDatabases()
Looks up details of all registered app databases.
|
java.lang.String |
getDescription(java.lang.String objectName,
int objectType)
Returns description of object.
|
DownloadInfo |
getDownloadInfo(java.lang.String clientid,
boolean uncompressed,
boolean completeRefresh)
This method calculates the estimated download size for a client from its download history.
|
java.util.Vector |
getJobExecutionLogs(java.lang.String jobNameTemplate,
int jobResult,
java.util.Date jobFinishTimeFrom,
java.util.Date jobFinishTimeTo)
A user can use this method to find all the job execution logs satisfying
a certain criteria from the job execution history.
|
int |
getOSECreator(Consolidator.OSEPluginProps plProps)
Get registered creator id based on plProps.recordLayoutClassName
and plProps.clientLib
|
Consolidator.OSEPluginProps[] |
getOSEPluginProps()
Get an array of OSEPluginProps objects for all creator ids in the repository
|
Consolidator.OSEPluginProps |
getOSEPluginProps(int creator)
Get OSEPluginProps object corresponding to the passed in creator
if the creator id is not found, returns null.
|
long |
getPlatformDevFlg(java.lang.String platform)
Gets device flag for the platform.
|
java.lang.String |
getPlatformName(int devFlg)
Get platform name based on device flag.
|
long |
getPublicationDeviceType(java.lang.String pubName)
Gets device flag for the publication.
|
java.lang.String[] |
getPublicationNames(java.lang.String objName,
int objectType)
Get the publication names associated with the script
|
java.util.Hashtable |
getPublicationPubItemAttributes(java.lang.String publicationname,
java.lang.String pubitemname)
Returns Publication,PublicationItem relationship attributes.
|
java.lang.String |
getQueuePkg()
Returns current default Queue package name.
|
java.lang.String |
getQueuePkg(java.lang.String pub)
Returns the name of the publication's Queue package
Example:
consolidatorManager.getQueuePkg ("pub1");
|
int |
getQueuePkgType()
Returns type of the current default Queue package ( either Consolidator.QPKG_PLSQL_i or Consolidator.QPKG_JAVA_i )
Example:
int dflt_pkg_type = consolidatorManager.getQueuePkgType ();
|
int |
getQueuePkgType(java.lang.String pub)
Returns the type of the publication's Queue package
Example:
consolidatorManager.getQueuePkgType ("pub1");
|
java.lang.String |
getSqlScript(java.lang.String scrName)
Get the text of the sql script stored in mobile repository
|
java.util.Hashtable |
getSubscriptionParameters(java.lang.String publication,
java.lang.String clientid)
Gets client's subscription parameters for the publication.
|
java.lang.String |
getSyncRule(java.lang.String ruleName)
Get the text of the sync rule stored in mobile repository
|
java.util.Hashtable |
getSyncRuleParams(int ruleType,
java.lang.String ruleText)
For Publication rules:
==============
-- RULE_MAX_DB_REC Setting sync immediately if database contains more than modified
records (Passing pub name, record numbers)
-- Getting sync immediately if database contains more than modified records( passing
pub name return RULE PROPS OBJECT with NREC or NULL)
props:
NREC
-- RULE_MAX_PI_REC Setting immediately if out queue contains more than modified
records(Passing pub item name, record numbers)
-- Getting immediately if out queue contains more than modified records(Passing pub
item name return RULE PROPS OBJECT with NREC or NULL)
props:
NREC
For Platform rules:
============
EVENTS:
-- RULE_HIGH_BANDWIDTH Setting sync immediately when network bandwidth greater than x
bits/sec (Passing platform FLAG, network bandwidth)
-- Getting sync immediately when network bandwidth greater than x bits/sec (Passing
platform name return RULE PROPS OBJECT w NET or NULL)
props:
NET
-- RULE_LOW_PWR Setting sync immediately when battery level drop to x percentage
(Passing platform name, battery level)
-- Getting sync immediately when battery level drop to x percentage (Passing platform
name return return RULE PROPS OBJECT w BAT or NULL)
props:
BAT
-- RULE_AC_PWR Setting sync immediately when AC power is detected (passing platform
name)
-- Getting sync immediately when AC power is detected (passing platform name return
RULE PROPS OBJECT w AC or NULL)
props:
AC
CONDITIONS:
-- RULE_MIN_PWR Setting only sync if battery level equal to or greater than X %(
Passing Platform name, battery level)
-- Getting only sync if battery level equal to or greater than X %( Passing Platform
name return RULE PROPS OBJECT w BAT or NULL)
props:
BAT
Setting network priority rules
-- RULE_NET_PRIORITY (Passing Platform, vector of RULE PROPS objects)
-- Getting network priority rules (passing platform, return vector of RULE PROPS
objects)
props:
PRIO
SPEED
PING
AUTODIAL
_________________________________
Setting network parameters
-- NET_CONFIG Setting parameters (passing Platform, vector of RULE PROPS objects)
-- Getting network parameters (passing Platform, return vector of RULE PROPS objects)
props:
NAME,PROXY
|
Consolidator.TemplateItemMetadata |
getTemplateItemMetadata(java.lang.String publication,
java.lang.String publication_item)
Get meta info about a PublicationItem.
|
java.util.Vector |
getVirtualTablePrimaryKey(java.lang.String owner,
java.lang.String store)
Retrieve a virtual primary key column name(s) from a base object
Example:
consolidatorManager.getVirtualTablePrimaryKey("SAMPLE1", "DEPT");
|
java.util.Vector |
getVirtualTablePrimaryKey(java.lang.String db_inst,
java.lang.String owner,
java.lang.String store)
Same as
getVirtualTablePrimaryKey but with
an additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. |
long |
getWeight(java.lang.String scrName,
java.lang.String pubName)
Get the weight associated with the specific script and publication
|
boolean |
highPriorityDataAvailable(java.lang.String clientid)
Check whether a client has high priority data available in the out queue.
|
void |
initialize(java.lang.String user,
java.lang.String jdbcUrl,
java.lang.String pwd) |
void |
instantiateSubscription(java.lang.String publication,
java.lang.String clientid)
Instantiates a subscription.
|
boolean |
isNotificationSent(long notificationId)
Check if a sync notification
has been sent
|
boolean |
isPubForPlatform(java.lang.String pubName,
java.lang.String platform)
Checks if publication is for the platform.
|
boolean |
isSqlScriptModified(java.lang.String scrName,
java.lang.String scrText)
If the passed in scrText differs from the current string stored in mobile repository
returns true
|
boolean |
isSubscribed(java.lang.String client,
java.lang.String publication)
checks if the client is subscribed.
|
boolean |
isSyncRuleModified(java.lang.String ruleName,
java.lang.String ruleText)
If the passed in ruleText differs from the current string stored in mobile repository
returns true
|
void |
loadJavaClass(java.lang.String className,
java.lang.String jarName,
boolean replace)
Load java class (with optional jar file) into the mobile repository
to be used
|
static void |
main(java.lang.String[] argv)
Test ConsolidatorManager functions.
|
void |
mergeMapPartition(java.lang.String from_partition,
java.lang.String to_partition)
Merge data from one map partition to another.
|
void |
modifySequence(java.lang.String seqName,
java.util.Hashtable seqProps_h)
This method will change several properties of a sequence.
|
void |
modifySequence(java.lang.String seqName,
java.lang.String propertyName,
java.lang.String newValue)
This method will change a property of a sequence.
|
void |
openConnection(java.sql.Connection conn)
Specifies an existing JDBC connection for Consolidator.
|
void |
openConnection(java.lang.String user,
java.lang.String password)
Opens a JDBC connection to a default JDBC URL.
|
void |
openConnection(java.lang.String user,
java.lang.String password,
java.lang.String url)
Opens a JDBC connection to a given JDBC URL.
|
void |
parentHint(java.lang.String owner,
java.lang.String store,
java.lang.String owner_d,
java.lang.String store_d)
Defines the parent table for the given table.
|
void |
parentHint(java.lang.String db_inst,
java.lang.String owner,
java.lang.String store,
java.lang.String owner_d,
java.lang.String store_d)
Same as
parentHint but with an additional db_inst parameter that can be used to specify a
registered app database or the MAIN database. |
void |
partitionMap(java.lang.String pub_item,
int num_parts,
java.lang.String storage,
java.lang.String ind_storage)
Create partitions of the publication item map table.
|
void |
primaryKeyHint(java.lang.String publication_item,
java.lang.String column,
java.lang.String b_owner,
java.lang.String b_store,
java.lang.String b_column)
Defines how the primary key of the parent table is called in a publication item.
|
void |
purgeTransaction(java.lang.String clientid,
java.lang.String dbInst,
long tid)
Purges a transaction from the Consolidator error queue.
|
void |
reCreatePublicationItem(java.util.Hashtable pubItem_h,
boolean forceRecreate_b)
Re-creates a publication item.
|
void |
registerDatabase(java.lang.String name,
Consolidator.DBProps props)
Registers an app database so that publications and pub-items can be created against
schemas in that database.
|
void |
registerJobClass(java.lang.String jobClassName,
java.lang.String type,
java.lang.String description,
boolean loadJobClassToDB)
A user uses this method to register a job class.
|
void |
registerMyCompose(java.lang.String publication,
java.lang.String pubItem,
java.lang.String className,
boolean reloadBytecode)
Register and load to DB a customized compose class.
|
int |
registerOSEPlugin(Consolidator.OSEPluginProps plProps)
Saves Open Sync plugin properties in the mobile repository
|
int |
registerOSEPlugin(Consolidator.OSEPluginProps plProps,
boolean force)
Saves Open Sync plugin properties in the mobile repository
|
long |
registerPlatform(java.lang.String platform)
Registers a new platform.
|
long |
registerPlatform(java.lang.String platform,
int[] creatorIds,
boolean supportGlobalMetadata)
Registers a new platform.
|
long |
registerPlatform(java.lang.String platform,
int[] creatorIds,
java.lang.String[] clientLibs,
boolean supportGlobalMetadata)
Registers a new platform.
|
void |
registerQueuePkg(java.lang.String pkg)
Registers a package as the current default PLSQL Queue package.
|
void |
registerQueuePkg(java.lang.String pkg,
int pkg_type)
Registers a package as the current default Queue package.
|
void |
registerQueuePkg(java.lang.String pkg,
int pkg_type,
java.lang.String pub)
Assigns a queue package to a publication
Example:
Using ConsolidatorManager,
consolidatorManager.registerQueuePkg("ASL.QUEUES_PKG", Consolidator.QPKG_PLSQL_i , "MY_PUB");
or
consolidatorManager.registerQueuePkg("my.queuepkg.QueueProcessor", Consolidator.QPKG_JAVA_i , "MY_PUB");
|
void |
registerQueuePkg(java.lang.String pkg,
java.lang.String pub)
Assigns a queue package to a publication, assumes the package type to be Consolidator.QPKG_PLSQL_i
Example:
consolidatorManager.registerQueuePkg("ASL.QUEUES_PKG", "MY_PUB");
|
void |
reInstantiatePublicationItem(java.lang.String pub_item,
java.lang.String publication)
ReInstantiate a PublicationItem.
|
void |
removeDependencyHint(java.lang.String owner,
java.lang.String store,
java.lang.String owner_d,
java.lang.String store_d)
Removes depedency hint.
|
void |
removeDependencyHint(java.lang.String db_inst,
java.lang.String owner,
java.lang.String store,
java.lang.String owner_d,
java.lang.String store_d)
Same as
removeDependencyHint
but with an additional db_inst parameter that can be used to specify a
registered app database or the MAIN database. |
void |
removeJavaResource(java.lang.String publication,
java.lang.String rsrcName)
Remove java resource and all associated scripts
|
void |
removeMobileDmlProcedure(java.lang.String publication,
java.lang.String pub_item)
Removes the customized DML package from a publication item.
|
void |
removePublicationItem(java.lang.String publication,
java.lang.String item)
Removes a publication item from a publication.
|
void |
removePublicationSequence(java.lang.String pubName,
java.lang.String seqName)
This method will remove a sequence from a publication.
|
void |
removeSqlScript(java.lang.String publication,
java.lang.String scrName)
Remove sql script
|
void |
removeSyncRule(java.lang.String publication,
java.lang.String ruleName)
Remove sync rule
|
void |
resetCache()
Reset the Mobile Server repository metadata cached in the local JVM
memory.
|
void |
resetDownloadInfoHistory()
This will reset all the history saved for getDownloadInfo ().
|
java.util.Vector |
searchConsolidatorObject(java.lang.String objectName,
int objectType)
Returns object names matching/containg the specified name for specified object type.
|
java.util.Vector |
searchConsolidatorObject(java.lang.String objectName,
int objectType,
boolean exactMatch)
Returns object names exactly matching or just containing the specified name for specified object type.
|
java.util.Vector |
searchConsolidatorObject(java.lang.String db_inst,
java.lang.String objectName,
int objectType) |
java.util.Vector |
searchConsolidatorObject(java.lang.String db_inst,
java.lang.String objectName,
int objectType,
boolean exactMatch) |
void |
setMessagingMetadata(java.lang.String networkProviderId,
java.lang.String metadata)
Set new meta data string for a network provider
|
void |
setMobilePrivileges(java.lang.String dba_schema,
java.lang.String dba_pass,
int type)
Sets either DBA or operational privileges for mobile server.
|
void |
setMobilePrivileges(java.lang.String jdbc_url,
java.lang.String dba_schema,
java.lang.String dba_pass,
int type)
Same as
setMobilePrivileges but can be used both for app databases and MAIN
database by specifying the appropriate JDBC url. |
void |
setPrimaryMessagingAddress(java.lang.String clientid,
java.lang.String deviceType,
java.lang.String networkProviderId,
java.lang.String address)
Set a message provider's address as the primary address
of a client device
|
void |
setPubApplyDuringSync(java.lang.String name,
boolean tf)
Sets a publication in queue to be/not to be applied during sync
Example:
consolidatorManager.setPubApplyDuringSync ( "MY_PUB", true )
|
void |
setPubItemColOption(java.lang.String pubItem,
java.lang.String column,
int nullType,
java.lang.String defaultValue)
Same setPubItemColOption.
|
void |
setPubItemColOption(java.lang.String pubItem,
java.lang.String column,
int nullType,
java.lang.String defaultValue,
boolean skipValidation)
Sets NOT NULL and DEFAULT options of a publication item column(s).
|
void |
setPublicationDeviceType(java.lang.String name,
int device_types_flg)
Sets device type(s) of a publication
Example:
SetPublicationDeviceType ( "MY_PUB", Consolidator.DEV_FLG_WCE | Consolidator.DEV_FLG_WIN32 )
|
void |
setPublicationDeviceType(java.lang.String name,
long device_types_flg) |
void |
setSqlScriptWeight(java.lang.String publication,
java.lang.String scrName,
int scrWeight)
Set sql script weight
|
void |
setSubscriptionParameter(java.lang.String publication,
java.lang.String clientid,
java.lang.String param_name,
java.lang.String param_value)
Sets subscription parameter values for a client.
|
java.lang.String |
setSyncRuleParams(int ruleType,
java.util.Hashtable params)
==============
-- RULE_MAX_DB_REC Setting sync immediately if database contains more than modified
records (Passing pub name, record numbers)
-- Getting sync immediately if database contains more than modified records( passing
pub name return RULE PROPS OBJECT with NREC or NULL)
props:
NREC
-- RULE_MAX_PI_REC Setting immediately if out queue contains more than modified
records(Passing pub item name, record numbers)
-- Getting immediately if out queue contains more than modified records(Passing pub
item name return RULE PROPS OBJECT with NREC or NULL)
props:
NREC
For Platform rules:
============
EVENTS:
-- RULE_HIGH_BANDWIDTH Setting sync immediately when network bandwidth greater than x
bits/sec (Passing platform FLAG, network bandwidth)
-- Getting sync immediately when network bandwidth greater than x bits/sec (Passing
platform name return RULE PROPS OBJECT w NET or NULL)
props:
NET
-- RULE_LOW_PWR Setting sync immediately when battery level drop to x percentage
(Passing platform name, battery level)
-- Getting sync immediately when battery level drop to x percentage (Passing platform
name return return RULE PROPS OBJECT w BAT or NULL)
props:
BAT
-- RULE_AC_PWR Setting sync immediately when AC power is detected (passing platform
name)
-- Getting sync immediately when AC power is detected (passing platform name return
RULE PROPS OBJECT w AC or NULL)
props:
AC
CONDITIONS:
-- RULE_MIN_PWR Setting only sync if battery level equal to or greater than X %(
Passing Platform name, battery level)
-- Getting only sync if battery level equal to or greater than X %( Passing Platform
name return RULE PROPS OBJECT w BAT or NULL)
props:
BAT
Setting network priority rules
-- RULE_NET_PRIORITY (Passing Platform, vector of RULE PROPS objects)
-- Getting network priority rules (passing platform, return vector of RULE PROPS
objects)
props:
PRIO
SPEED
PING
AUTODIAL
_________________________________
Setting network parameters
-- NET_CONFIG Setting parameters (passing Platform, vector of RULE PROPS objects)
-- Getting network parameters (passing Platform, return vector of RULE PROPS objects)
props:
NAME,PROXY
|
void |
setTemplateItemMetadata(Consolidator.TemplateItemMetadata md)
Set meta info of a template item.
|
void |
shrinkSharedMap(java.lang.String publication,
java.lang.String item)
Remove clients data from the shared publication item map table
|
void |
shrinkSharedMaps()
Remove clients data from all shared publication item map tables
|
void |
unloadJavaClass(java.lang.String className)
UnLoad java class from the mobile repository
|
void |
unRegisterOSEPlugin(Consolidator.OSEPluginProps plProps,
boolean ignoreMissing)
Removes plugin inforamtion from the mobile repository
|
void |
unRegisterPlatform(java.lang.String platform)
Removes a registered platform
|
void |
updateClientDbName(java.lang.String publicationName,
java.lang.String dbName)
Updates client database name
Example:
ConsolidatorManager.updateClientDbName("S11U1","Newdbname");
|
void |
ValidateStoreName(java.lang.String store,
int client_storage_type) |
public ConsolidatorManager() throws ConsolidatorException
ConsolidatorException
public void addDescription(java.lang.String objectName, int objectType, java.lang.String description) throws ConsolidatorException
Example:
ConsolidatorManager.addDescription("SCRIPT1",Consolidator.SCRIPTS,"Example");
objectName
- Object Name.objectType
- Object type.
Acceptable values are Consolidator.RESOURCES_OBJECT,Consolidator.SCRIPTS_OBJECT,Consolidator.SEQUENCES_OBJECT,Consolidator.PUBLICATIONITEM_OBJECT.description
- String containing the description for the given object.ConsolidatorException
public void addJavaResource(java.lang.String publication, java.lang.String rsrcName) throws ConsolidatorException
publication
- publication namersrcName
- resource name
could be jar file name with extension
Note: You can only load JAR files as a resource into the publication; you cannot load an individual class file as a resource. Loading a single class file will cause MDW to fail when it loads in the publication for modification.
ConsolidatorException
public void addJavaResourceAndScripts(java.lang.String publication, java.lang.String rsrcName) throws ConsolidatorException
publication
- publication namersrcName
- resource name
could be jar file name with extension
Note: You can only load JAR files as a resource into the publication; you cannot load an individual class file as a resource. Loading a single class file will cause MDW to fail when it loads in the publication for modification.
ConsolidatorException
public void addMapPartitions(java.lang.String pub_item, int num_parts, java.lang.String storage, java.lang.String ind_storage) throws ConsolidatorException
Example:
consolidatorManager.addMapPartitions("P_SAMEPLE1",5,"TABLESPACE MOBILEADMIN","initrans 10 pctfree 40",);
pub_item
- The Publication Item.num_parts
- An int indicating the number of partitions.storage
- A string specifying the storage parameters (same syntax as in CREATE TABLE).ind_storage
- A string specifying the storage parameters for indexes (same syntax as in CREATE INDEX).ConsolidatorException
dropMapPartition(String partition)
,
dropAllMapPartitions(String pub_item)
,
mergeMapPartition(String from_partition, String to_partition)
,
partitionMap(String pub_item ,int num_parts, String storage, String ind_storage)
public void addMobileDmlProcedure(java.lang.String publication, java.lang.String pub_item, java.lang.String mobile_dml_procedure) throws ConsolidatorException
Example:
consolidatorManager.addMobileDmlProcedure("T_SAMPLE1", "P_SAMEPLE1", "SCHEMA_NAME.DML_PACKAGE_NAME.DML_PROCEDURE_NAME");
publication
- A string specifying a publication.pub_item
- A string specifying a publication item name.mobile_dml_procedure
- A string specifying a fully qualified name of a PLSQL procedure.
See doc for more info on the procedure specification requirements.ConsolidatorException
removeMobileDmlProcedure(String publication, String pub_item)
public void addPublicationItem(java.lang.String template, java.lang.String publication, java.lang.String columns, java.lang.String disabled_dml, java.lang.String conflict_rule) throws ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
for more detail.ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, String group_fnc)
,
removePublicationItem(String publication, String item)
,
alterPublicationItem(String name, String select_stmt)
public void addPublicationItem(java.lang.String publication, java.lang.String item, java.lang.String columns, java.lang.String disabled_dml, java.lang.String conflict_rule, java.lang.String restricting_predicate, int weight) throws ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
for more detail.ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, String group_fnc)
,
removePublicationItem(String publication, String item)
,
alterPublicationItem(String name, String select_stmt)
public void addPublicationItem(java.lang.String template, java.lang.String publication, java.lang.String columns, java.lang.String disabled_dml, java.lang.String conflict_rule, java.lang.String restricting_predicate, int weight, java.lang.String mobile_dml_procedure) throws ConsolidatorException
mobile_dml_procedure
- A string specifying the callout package for DML operations.
Please see addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
for more detail.ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
removePublicationItem(String publication, String item)
,
alterPublicationItem(String name, String select_stmt)
public void addPublicationItem(java.lang.String template, java.lang.String publication, java.lang.String columns, java.lang.String disabled_dml, java.lang.String conflict_rule, java.lang.String restricting_predicate, int weight, java.lang.String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, java.lang.String group_fnc) throws ConsolidatorException
Example:
consolidatorManager.addPublicationItem( "T_SAMPLE1", // publication "P_SAMPLE1", // publication_item "\"EMPNO\",\"ENAME\",\"JOB\",\"MGR\"", // columns "N", // disabled_dml "S", // conflict_rule "HIGH_PRIORITY_FLAG = 'Y'", // restricting_predicate 100, // weight null, // mobile_dml_procedure true, // conflict_res_only false, // is_shared "MOBILEADMIN.GET_EMP_GROUP_ID" // group_fnc );
publication
- A character string specifying the publication name.columns
- A character string specifying new names for all publication item columns.
This parameter is usually null and is used as needed. For example, Satellite Forms
truncates long column names. To circumvent this feature, the columns parameter
enables you to rename columns on the device. You can rename any number of columns.disabled_dml
- You can use the following options:
Option | Function |
---|---|
Y | Defines a fully updatable publication item. Default. |
N | Defines a read-only publication item. You can also define a read-only publication item by using the "IUD" option. |
I | Disables the propagation of individual insert operations. |
U | Disables the propagation of individual update operations. |
D | Disables the propagation of individual delete operations. |
conflict_rule
- You can use the following options:
Option | Function |
---|---|
S | Defines the server as the winner in conflict resolution. Default. |
C | Defines the client as the winner in conflict resolution. |
restricting_predicate
- A restricting predicate can be assigned to a publication
item as it is added to a publication. When a client is synchronizing in high
priority mode, the predicate is used to limit data pushed to the device.
This parameter can be null. This parameter is for advanced use.weight
- int Table weight is a property of association between
publications and publication items. Weight must be: 0 <= weight < 1024.
Consolidator uses table weight to
determine which order to apply Client Operations to master tables as follows:
mobile_dml_procedure
- A character string specifying the callout procedure name for DML operations.conflict_res_only
- A boolean. If true, mobile_dml_procedure is only used for conflict resolution.is_shared
- A boolean. If true, shared map data will be used. By default, all non-updateable publication items are shared. This must not be set to true for Queue based publication itemgroup_fnc
- A character string specifying name of a PL/SQL group function for this publication item. If is_shared,
group_fnc is used to find client->group association. The function signature must be
( CLIENT in VARCHAR2, PUBLICATION in VARCHAR2, ITEM in VARCHAR2 ) return VARCHAR2.The returned value should uniquely identify client?s group. For example, if client A belongs to group GroupA and client B belongs to group GroupB, the group function F could return:
F (?A?,?SUBSCRIPTION?,?PI_NAME?) = ?GroupA? F (?B?,?SUBSCRIPTION?,?PI_NAME?) = ?GroupB?The implicit assumption of the grouping function is that all the members of GroupA group share the same data. The same is true for the clients in GroupB. The use of group function is to uniquely identify a group of users with the same data for a particular PUBLICATION ITEM. An example of a grouping function that groups employees by their departments is:
Function GET_EMP_GROUP_ID ( clientid in varchar2, publication in varchar2, item in varchar2 ) return varchar2 is group_val_id varchar2(30); begin select DEPTNO into group_val_id from EMP where EMPNO = clientid ; return group_val_id; end; NOTE: this function assumes that EMPNO is the Consolidator clientid.If the group_fnc is not specified, the default grouping is based on subscription parameters.
ConsolidatorException
setTemplateItemMetadata(Consolidator.TemplateItemMetadata md)
,
Please see {@link #addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)}
for more detail.
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
removePublicationItem(String publication, String item)
,
alterPublicationItem(String name, String select_stmt)
public void addPublicationItem(java.lang.String publication, java.lang.String item, java.lang.String columns, java.lang.String disabled_dml, java.lang.String conflict_rule, java.lang.String restricting_predicate, java.lang.String weight) throws ConsolidatorException
Example:
consolidatorManager.addPublicationItem("T_SAMPLE1", "P_SAMPLE1", "\"DATE\", \"ID\", \"FIRST NAME\", \"LAST NAME\"", null, "S", null, null);
publication
- A character string specifying the publication name.item
- A character string specifying the publication item name.columns
- A character string specifying new names for all publication item columns.
This parameter may be null and is used as needed. For example, Satellite Forms
truncates long column names. To circumvent this feature, the columns parameter
enables you to rename columns on the device. You can rename any number of columns.
Please note that each column name has to be enclosed by '"' and in a Java program, you need
to escape it with a '\'.disabled_dml
- You can use the following options:
Option | Function |
---|---|
Y | Defines a fully updatable publication item. |
N | Defines a read-only publication item. You can also define a read-only publication item by using the "IUD" option. |
I | Disables the propagation of individual insert operations. |
U | Disables the propagation of individual update operations. |
D | Disables the propagation of individual delete operations. |
conflict_rule
- You can use the following options:
Option | Function |
---|---|
S | Defines the server as the winner in conflict resolution. Default setting. |
C | Defines the client as the winner in conflict resolution. |
restricting_predicate
- A restricting predicate can be assigned to a publication
item as it is added to a publication. When a client is syncronizing in high
priority mode, the predicate is used to limit data pushed to the device.
This parameter can be null. This parameter is for advanced use.weight
- Table weight is an integer property of association between
publications and publication items. Weight must be: 0 <= weight < 1024.
Consolidator uses table weight to
determine which order to apply Client Operations to master tables as follows:
ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, String group_fnc)
,
removePublicationItem(String publication, String item)
,
alterPublicationItem(String name, String select_stmt)
public void addPublicationItem(java.lang.String template, java.lang.String publication, java.lang.String columns, java.lang.String disabled_dml, java.lang.String conflict_rule, java.lang.String restricting_predicate, java.lang.String weight, java.lang.String mobile_dml_procedure) throws ConsolidatorException
mobile_dml_procedure
- A string specifying the callout package for DML operations.
Please see addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
for more detail.ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, String group_fnc)
,
removePublicationItem(String publication, String item)
,
alterPublicationItem(String name, String select_stmt)
public void addPublicationSequence(java.lang.String pubName, java.lang.String seqName) throws ConsolidatorException
pubName
- The name of the publication.seqName
- The name of the sequence. Any valid String value.java.lang.IllegalArgumentException
- will be thrown if any of the parameter is invalid or null.java.lang.Exception
- will be thrown if the one-to-many relationship is violated.ConsolidatorException
public void addSqlScript(java.lang.String publication, java.lang.String scrName) throws ConsolidatorException
publication
- publication namescrName
- script name
Writing SQL Scripts
When you write and upload a SQL script to the project, each script is executed independently by Oracle Database Lite in no specified order. Therefore, if you have dependencies and need the DDL statements to be executed in a certain order, include all statements in the correct order in a single script, where each DDL statement is separated by a semicolon (";").
If a SQL script fails upon execution, Oracle Database Lite will execute it once again, in case the failure was due to a dependency of a later execution script. However, if you have a script with a dependency on another script, you could effect your performance while Oracle Database Lite re-executes all of the scripts to resolve dependencies.
ConsolidatorException
public void addSqlScript(java.lang.String publication, java.lang.String scrName, int scrWeight) throws ConsolidatorException
publication
- publication namescrName
- script namescrWeight
- int script order of execution ( scripts are executed in ascending order of the weight )
Writing SQL Scripts
When you write and upload a SQL script to the project, each script is executed independently by Oracle Database Lite in no specified order. Therefore, if you have dependencies and need the DDL statements to be executed in a certain order, include all statements in the correct order in a single script, where each DDL statement is separated by a semicolon (";").
If a SQL script fails upon execution, Oracle Database Lite will execute it once again, in case the failure was due to a dependency of a later execution script. However, if you have a script with a dependency on another script, you could effect your performance while Oracle Database Lite re-executes all of the scripts to resolve dependencies.
ConsolidatorException
public void addSqlScript(java.lang.String publication, java.lang.String scrName, java.lang.String weight_s) throws ConsolidatorException
publication
- publication namescrName
- script name
Writing SQL Scripts
When you write and upload a SQL script to the project, each script is executed independently by Oracle Database Lite in no specified order. Therefore, if you have dependencies and need the DDL statements to be executed in a certain order, include all statements in the correct order in a single script, where each DDL statement is separated by a semicolon (";").
If a SQL script fails upon execution, Oracle Database Lite will execute it once again, in case the failure was due to a dependency of a later execution script. However, if you have a script with a dependency on another script, you could effect your performance while Oracle Database Lite re-executes all of the scripts to resolve dependencies.
ConsolidatorException
public void addSyncRule(java.lang.String ruleName) throws ConsolidatorException
ruleName
- script nameConsolidatorException
public void addSyncRule(java.lang.String publication, java.lang.String ruleName) throws ConsolidatorException
publication
- publication nameruleName
- script nameConsolidatorException
public long advanceSequenceWindow(java.lang.String seqName, java.lang.String clientID) throws ConsolidatorException
seqName
- The name of the sequence. Any valid String value.clientID
- The name of the client. Can be null, which stands for all clients.java.lang.IllegalArgumentException
- will be thrown if any of the parameter is invalid or seqName is null.ConsolidatorException
public void alterDatabase(java.lang.String name, Consolidator.DBProps props) throws ConsolidatorException
Example 1: Change description and admin password. The admin password must have already been modified on the APP1 database.
Consolidator.DBProps dbProps = new Consolidator.DBProps(); dbProps.adminPassword = "newsecret"; // null specifies that jdbcUrl must not be modified i.e. old value must be retained dbProps.jdbcUrl = null; dbProps.description = "New description"; consolidatorManager.alterDatabase("APP1", dbProps);
Example 2: Change only the description for app database APP1
Consolidator.DBProps dbProps = new Consolidator.DBProps(); // null value specifies that jdbcUrl and adminPassword must not be modified // i.e. old value must be retained dbProps.jdbcUrl = null; dbProps.adminPassword = null; dbProps.description = "New description"; consolidatorManager.alterDatabase("APP1", dbProps);
The description can be changed at any time. You should not normally change the jdbcUrl. adminPassword can be changed only after the actual password change has been carried out on the app database. Incorrect use of this method can cause failures in various sync components.
name
- A string specifying the registered app database whose details are
to be modifiedprops
- A Consolidator.DBProps object containing the new details. Refer to
the examples above to understand how to set the fields of this object as per the
modification intended.ConsolidatorException
registerDatabase(String name, Consolidator.DBProps)
,
deRegisterDatabase(String name)
,
getDatabases()
public void alterPublicationItem(java.lang.String name, java.lang.String select_stmt) throws ConsolidatorException
Example:
consolidatorManager.alterPublicationItem("P_SAMEPLE1", "select * from EMP"); Use the alterPublicationItem method to add columns to an existing publication item. The WHERE clause may also be altered. If additional parameters are added to the WHERE clause, then these parameters must be set before the alter occurs. See the setSubscriptionParams method. However, if you are creating a fast refresh publication item on a table with a composite primary key, the snapshot query should list the primary key columns in the order that they are present in the table definition. This automatically happens during the column selection when MDW is used or when a SELECT * query is used. Note that the order of the primary key columns in the table definition may be different from those in the primary key constraint definition.
name
- A character string specifying the publication item name.select_stmt
- A new publication item select statement containing additional columns.ConsolidatorException
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, String group_fnc)
,
removePublicationItem(String publication, String item)
public void assignWeights(java.lang.String pub, boolean createScripts) throws ConsolidatorException
pub
- publication namecreateScripts
- if true, creates refrential constraints scripts and adds them to the publication to be propagated to subscribed clientsConsolidatorException
public boolean authenticate(java.lang.String clientid, java.lang.String password)
SiteDef.WTG_URL = "<hostname>:<port>/mobile";
Example:
consolidatorManager.authenticate("S11U1", "manager");
clientid
- The Consolidator client name.password
- The Consolidator client password.ConsolidatorException
createClient(String clientid, String password)
,
dropClient(String clientid)
public void closeConnection() throws ConsolidatorException
Example:
consolidatorManager.closeConnection();
public void completeRefresh(java.lang.String clientid, java.lang.String publication) throws ConsolidatorException
Example:
consolidatorManager.completeRefresh("DAVIDL","T_SAMPLE1");
clientid
- The Consolidator client name.publication
- The publication name.java.lang.Throwable
ConsolidatorException
public boolean connectionIsClosed() throws ConsolidatorException
Example:
boolean boo = consolidatorManager.connectionIsClosed ();
ConsolidatorException
closeConnection()
,
commitTransaction()
,
rollbackTransaction()
,
openConnection(Connection conn)
,
openConnection(java.lang.String user,java.lang.String password)
,
openConnection(java.lang.String user,java.lang.String password,java.lang.String url)
public void createDataCollectionQueue(java.lang.String name, java.lang.String owner, java.lang.String store, java.lang.String inq_cols, java.lang.String pk_columns, boolean purgeClientAfterSync, boolean isOutView) throws ConsolidatorException
Example:
consolidatorManager.createDataCollectionQueue( "P_SAMPLE1", "SAMPLE1", "ADDROLRL4P", "\"Last Name\",\"First Name\", company, note", "Last Name,First Name" );
name
- A character string specifying a new publication item name.owner
- A string specifying the base object owner.store
- A string specifying the base object name.inq_cols
- A string specifigying columns in the order in which to replicate them. Defaults to * if is nullpk_columns
- A string specifying the primary keys.purgeClientAfterSync
- boolean specifies if after every sync client needs to purge uploaded dataisOutView
- boolean if select_stmt is null and ( if isOutView true, creates outqueue as an empty view, otherwise as a table ).ConsolidatorException
createDataCollectionQueue(String name, String db_inst, String owner, String store,
String inq_cols, String pk_columns, boolean purgeClientAfterSync, boolean isOutView)
,
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
reCreatePublicationItem(Hashtable pubItem_h, boolean forceRecreate_b )
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
dropPublicationItem(String name)
public void createDataCollectionQueue(java.lang.String name, java.lang.String db_inst, java.lang.String owner, java.lang.String store, java.lang.String inq_cols, java.lang.String pk_columns, boolean purgeClientAfterSync, boolean isOutView) throws ConsolidatorException
createDataCollectionQueue
but with an additional db_inst parameter that msut be used to specify a
registered app database or the MAIN database. If the MAIN database is specified, this is
equivalent to the older createDataCollectionQueue call referred to above.
A DCQ pub-item, like any other pub-item, can only be added to a publication defined against
the same database.
Example 1: Define against SCOTT.EMP in APP1 database
consolidatorManager.createDataCollectionQueue("PI_DCQ_1", "APP1", "SCOTT", "EMP", "*", null, true, false);
Example 2: Define against SAMPLE1.ADDROLRL4P in the MAIN database
consolidatorManager.createDataCollectionQueue("P_SAMPLE1", Consolidator.MAIN_DB, "SAMPLE1", "ADDROLRL4P", "*", null, true, false );
db_inst
- A string that specifies the database name. Use the name of a registered app database
or Consolidator.MAIN_DB for the MAIN database as appropriateConsolidatorException
public void createJavaResource(java.lang.String jarName, java.lang.String className, boolean replace) throws ConsolidatorException
jarName
- arch name w extension , nullable
if jarName is null, class name must be providedclassName
- class name w/o extension , nullable
if className is null, entire jar archive will be loaded
if jarName is not null, class will be
loaded from the jar, otherwise, class must
be in the current directoryreplace
- if true, current resource, if exists, will be replacedcan
- throw ConsolidatorException with error code
ConsErrorMessages.OBJECT_EXISTSConsolidatorException
public void createJob(java.lang.String jobName, java.lang.String jobClassName, java.lang.String jobParamValue, Schedule jobSchedule, java.lang.String jobEngine, boolean initiallyEnabled, boolean saveToJobHistory) throws ConsolidatorException
jobName
- A unique name for the job.jobClassName
- The fully qualified name (including package name)
of the job class implementing the oracle.lite.job.Job interface.jobParamValue
- The job parameter value in the form of a string.
The parameter value will be passed to the job class instance method
execute(). If a job needs multiple values, a user may use commas to
separate the values and put them in the jobParamValue string.jobSchedule
- An object of class oracle.lite.job.ScheduleinitiallyEnabled
- Whether the job is initially enabled or not.jobEngine
- Job engine instance name on which this job should be run.
If null, the job may be run by any job engine.ConsolidatorException
public void createMessagingAddress(java.lang.String clientid, java.lang.String deviceType, java.lang.String networkProviderId, java.lang.String address) throws ConsolidatorException
clientid
- client iddeviceType
- - Device type , partial, e.g. WIN32, WINCE, LINUXnetworkProviderId
- Messaging network provider ID.
Valid values are
"SMS"
"HTTP"
"RAPI"
"WOR_IAS"
"WOR_SMTP"address
- Address string (phone number, URL etc)ConsolidatorException
public void createNoSQLQueue(java.lang.String name, Consolidator.NoSQLTableProps nsp) throws ConsolidatorException
Note: if the security file includes username/password, then those don't need to be specified
Mapping is created between NoSQL and Oracle data types as follows:
NoSQL | Oracle |
---|---|
String | VARCHAR2(2000) |
Double | BINARY_DOUBLE |
Float | BINARY_FLOAT |
Integer | INTEGER |
Long | INTEGER |
Enum | VARCHAR2(2000) |
FixedBinary | BLOB |
Binary | BLOB |
Boolean | CHAR(1) |
Key features/limitations of NoSQL publication items (PIs) are:
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
name
- publication item namensp
- Consolidator.NoSQLTablePropsConsolidatorException
public java.lang.String createPubItemComposePkg(java.lang.String pub_item) throws ConsolidatorException
pub_item
- name of publication itemConsolidatorException
public void createPublication(java.lang.String name, int client_storage_type, java.lang.String client_name_template, java.lang.String enforce_ri) throws ConsolidatorException
Example:
consolidatorManager.createPublication("T_SAMPLE1", Consolidator.DFLT_CREATOR_ID, "%s", null);
name
- A character string specifying the new publication name.client_storage_type
- An integer specifying the client storage
type for all publication items in the new publication.
The available values are: Consolidator.DFLT_CREATOR_ID, Consolidator.SQLITE_CREATOR_ID
and Consolidator.BDB_CREATOR_ID.client_name_template
- A template for publication item instance names on client
devices. This parameter contains the following predefined values:
Value | Definition |
---|---|
%s | Default. |
DATABASE.%s | Causes all publication items to be instantiated inside an OKAPI database with the name 'DATABASE'. |
SFT-EE_%s | Must be used for Satellite Forms-based applications. |
Note: DATABASE.%s does not support file extensions.
enforce_ri
- Reserved for future use. Use null or an empty string.ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg)
,
createPublication(String name, String db_inst, int client_storage_type, String client_name_template,
String enforce_ri)
,
dropPublication(String name)
public void createPublication(java.lang.String name, int client_storage_type, java.lang.String client_name_template, java.lang.String enforce_ri, int device_types_flg) throws ConsolidatorException
Example:
consolidatorManager.createPublication("T_SAMPLE1", 0, "%s", null, Consolidator.DEV_FLG_WCE | Consolidator.DEV_FLG_WIN32);
name
- A character string specifying the new publication name.client_storage_type
- An integer specifying the client storage. Please specify Consolidator.DFLT_CREATOR_ID.client_name_template
- A template for publication item instance names on clientenforce_ri
- Reserved for future use. Use null or an empty string.device_types_flg
- int Specifies which device type(s) or platforms the publication supports. If more than
one platform, please use a logical or "|" as shown in the example. The available platforms are:
Consolidator.DEV_FLG_LINUX, Consolidator.DEV_FLG_WIN32, and Consolidator.DEV_FLG_WCEConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri)
,
createPublication(String name, String db_inst, int client_storage_type, String client_name_template,
String enforce_ri,int device_types_flag)
,
dropPublication(String name)
public void createPublication(java.lang.String name, java.lang.String db_inst, int client_storage_type, java.lang.String client_name_template, java.lang.String enforce_ri) throws ConsolidatorException
createPublication
but with
an additional db_inst parameter that can be used to specify a registered app database
or the MAIN database. If the MAIN database is specified, this is equivalent to the older
createPublication call referred to above.
Example 1: Define a publication against the app database APP1. This can contain only pub-items that are defined against data in the APP1 database. Client-side odb will be app1_1.odb.
consolidatorManager.createPublication("PUB_APP1_1", "APP1", Consolidator.DFLT_CREATOR_ID, "app1_1.%s", null);
Example 2: Define a publication against the MAIN database. This can contain only pub-items that are defined against data in the MAIN database. Client-side odb will be main_1.odb.
consolidatorManager.createPublication("PUB_MAIN_1", Consolidator.MAIN_DB, Consolidator.DFLT_CREATOR_ID, "main_1.%s", null);
db_inst
- A string that specifies the database name. Use the name of a registered app database
or Consolidator.MAIN_DB for the MAIN database as appropriateConsolidatorException
createPublication(String name,String db_inst,int client_storage_type,String client_name_template,
String enforce_ri,int device_types_flg)
public void createPublication(java.lang.String name, java.lang.String db_inst, int client_storage_type, java.lang.String client_name_template, java.lang.String enforce_ri, int device_types_flg) throws ConsolidatorException
createPublication
but with an additional db_inst parameter that can be used to specify a
registered app database or the MAIN database.If the MAIN database is specified, this is
equivalent to the older createPublication call referred to above.db_inst
- A string that specifies the database name. Use the name of a registered app database
or Consolidator.MAIN_DB for the MAIN database as appropriate.ConsolidatorException
createPublication(String name, String db_inst, int client_storage_type, String client_name_template,
String enforce_ri)
public void createPublicationItem(java.sql.Connection rmt_conn, java.lang.String name, java.lang.String owner, java.lang.String store, java.lang.String refresh_mode, java.lang.String select_stmt, java.lang.String cbk_owner, java.lang.String cbk_name) throws ConsolidatorException
Example:
Consolidator.CreatePublicationItem("jdbc:oracle:oci8:@remote_oracle.world","P_SAMPLE1", "SAMPLE1", "PAYROLL_ORACLE", "F", "SELECT * FROM sample1.PAYROLL_ORACLE WHERE SALARY > :CAP", null, null);
rmt_conn
- A jdbc connection to the remote database where the base object
of the synonym residesname
- A character string specifying a new publication item name.owner
- A string specifying the synonym owner.store
- A string specifying the synonym name.refresh_mode
- A string specifying the refresh mode:
F for fast refresh, C for complete refresh, Q for Queue-based publication item.
The default is fast refresh.select_stmt
- A string specifying a (possibly parameterized)
select statement for the new publication item.cbk_owner
- A string specifying the callback package owner.
May be null. This parameter is for advanced use.cbk_name
- A string specifying the callback package name.
May be null. This parameter is for advanced use.ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri)
,
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
,
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
reCreatePublicationItem(Hashtable pubItem_h, boolean forceRecreate_b )
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
* @see #alterPublicationItem(String name, String select_stmt)
,
dropPublicationItem(String name)
public void createPublicationItem(java.lang.String name, Consolidator.PubItemProps pi_props) throws ConsolidatorException
This is the only form of createPublication that can be used for defining pub-items against schemas in registered app databases. For a queue based pub-item, specify refresh_mode as "Q". A pub-item can be added to a publication only if that publication is also defined against the same database.
Example 1: Create a pub-item PI_1_TASKS against APPUSER1.TASKS on app database APP1
Consolidator.PubItemProps taskPIProps = new Consolidator.PubItemProps(); taskPIProps.db_inst = "APP1"; // Remote APP database name as registered taskPIProps.owner = "APPUSER1"; taskPIProps.store = "TASKS"; taskPIProps.refresh_mode = "F"; taskPIProps.select_stmt = "select id, emp_id, cust_id, stat_id, notes from APPUSER1.TASKS"; consolidatorManager.createPublicationItem("PI_1_TASKS", taskPIPProps);
Example 2: Create an autosync pub-item PI_1_EMP against SCOTT.EMP on MAIN database
Consolidator.PubItemProps empPIProps = new Consolidator.PubItemProps(); empPIProps.db_inst = Consolidator.MAIN_DB; // If you do not set this, MAIN db is assumed empPIProps.owner = "SCOTT"; empPIProps.store = "EMP"; empPIProps.refresh_mode = "F"; empPIProps.select_stmt = "select * from SCOTT.EMP"; empPIProps.isLogBased = true; consolidatorManager.createPublicationItem("PI_1_EMP", empPIPProps);
name
- publication item namepi_props
- Consolidator.PubItemProps objectConsolidatorException
reCreatePublicationItem(Hashtable pubItem_h, boolean forceRecreate_b )
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createQueuePublicationItem(String name, String owner, String store, String select_stmt, String pk_columns, String cbk_owner, String cbk_name)
,
alterPublicationItem(String name, String select_stmt)
,
dropPublicationItem(String name)
public void createPublicationItem(java.lang.String name, java.lang.String owner, java.lang.String store, java.lang.String refresh_mode, java.lang.String select_stmt, java.lang.String cbk_owner, java.lang.String cbk_name) throws ConsolidatorException
Example:
consolidatorManager.createPublicationItem("P_SAMPLE1", "SAMPLE1", "ADDROLRL4P", "F", "SELECT \"LastName\", \"FirstName\", company, phone1, phone2, phone3, phone4, phone5, phone1id, phone2id, phone3id, phone4id, phone5id, displayphone, address, city, state, zipcode, country, title, custom1, custom2, custom3, custom4, note FROM sample1.addrolrl4p WHERE upper(company) > :COMP", null, null);
name
- A character string specifying a new publication item name.owner
- A string specifying the base object owner.store
- A string specifying the base object name.refresh_mode
- A string specifying the refresh mode:
F for fast refresh, C for complete refresh, Q for Queue-based publication item.
The default is fast refresh.select_stmt
- A string specifying a (possibly parameterized)
select statement for the new publication item.cbk_owner
- A string specifying the callback package owner.
May be null. This parameter is for advanced use.cbk_name
- A string specifying the callback package name.
May be null. This parameter is for advanced use.ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri)
,
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
,
reCreatePublicationItem(Hashtable pubItem_h, boolean forceRecreate_b )
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
* @see #alterPublicationItem(String name, String select_stmt)
,
dropPublicationItem(String name)
public void createPublicationItem(java.lang.String rmt_jdbc_url, java.lang.String name, java.lang.String owner, java.lang.String store, java.lang.String refresh_mode, java.lang.String select_stmt, java.lang.String cbk_owner, java.lang.String cbk_name) throws ConsolidatorException
Example:
Consolidator.CreatePublicationItem("jdbc:oracle:oci8:@oracle.world","P_SAMPLE1", "SAMPLE1", "PAYROLL_ORACLE", "F", "SELECT * FROM sample1.PAYROLL_ORACLE WHERE SALARY > :CAP", null, null);
rmt_jdbc_url
- A string specifying a jdbc url for the remote storename
- A character string specifying a new publication item name.owner
- A string specifying the synonym owner.store
- A string specifying the synonym name.refresh_mode
- A string specifying the refresh mode:
F for fast refresh, C for complete refresh, Q for Queue-based publication item.
The default is fast refresh.select_stmt
- A string specifying a (possibly parameterized)
select statement for the new publication item.cbk_owner
- A string specifying the callback package owner.
May be null. This parameter is for advanced use.cbk_name
- A string specifying the callback package name.
May be null. This parameter is for advanced use.ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri)
,
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
,
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
reCreatePublicationItem(Hashtable pubItem_h, boolean forceRecreate_b )
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
* @see #alterPublicationItem(String name, String select_stmt)
,
dropPublicationItem(String name)
public void createPublicationItemIndex(java.lang.String name, java.lang.String publication_item, java.lang.String pmode, java.lang.String columns) throws ConsolidatorException
Example:
consolidatorManager.createPublicationItemIndex("INDX001", "P_SAMPLE1", "I", "STATE,ZIPCODE");
name
- A string specifying an index name.publication_item
- A string specifying a publication item name.pmode
- Specifies the index type according to the following options:
Option | Index Type |
---|---|
U | Unique index |
I | Regular index |
P | Primary key index |
columns
- A list of columns included in the index.ConsolidatorException
dropPublicationItemIndex(String name)
,
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
public void createQueuePublicationItem(java.lang.String name, java.lang.String owner, java.lang.String store, java.lang.String select_stmt, java.lang.String pk_columns, java.lang.String cbk_owner, java.lang.String cbk_name) throws ConsolidatorException
Example:
consolidatorManager.createQueuePublicationItem( "P_SAMPLE1", "SAMPLE1", "ADDROLRL4P", "SELECT \"Last Name\", \"First Name\", company, note FROM sample1.addrolrl4p", "Last Name,First Name", null, null);
name
- A character string specifying a new publication item name.owner
- A string specifying the base object owner.store
- A string specifying the base object name.select_stmt
- A string specifying a (possibly parameterized)
select statement for the new publication item.pk_columns
- A string specifying the primary keys.cbk_owner
- A string specifying the callback package owner.
May be null. This parameter is for advanced use.cbk_name
- A string specifying the callback package name.
May be null. This parameter is for advanced use.ConsolidatorException
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
reCreatePublicationItem(Hashtable pubItem_h, boolean forceRecreate_b )
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
dropPublicationItem(String name)
public void createSequence(java.lang.String name) throws ConsolidatorException
Example:
consolidatorManager.createSequence("CUSTOM1");
name
- A character string specifying the sequence name.ConsolidatorException
dropSequence(String name)
,
(String seqName, int minValue, int windowSize,
int threshold, int incrementBy)
public void createSequence(java.lang.String seqName, int minValue, int windowSize, int threshold, int incrementBy) throws ConsolidatorException
createSequence(String seqName, Integer
minValue, Integer windowSize, Integer threshold, Integer incrementBy,
Integer sequenceMode)
method. The parameter "sequenceMode" is not
supported any more.seqName
- The name of the sequence. Any valid String value.minValue
- The starting value. Any positive or negative integer.windowSize
- The size of each window. It will be one size for all windows.
Please note that this defines the end of the range. For example,
if the starting value is 1, the increment is 2 and the window size
is 100, then the sequence will be an odd sequence starting from 1
to 99. 50 numbers in total. Has to be positive.threshold
- The threshold value. At each sync, if the client's current value
is equal to or has passed the threshold, the next available window
will be assigned to the client. This means, the mobile server will
allocate the next window for the client if (current value)
>= (mininum value of current allocated window) + (window size) -
(threshold value) - 1
. Please note that the threshhold has
to be smaller than the windowSize.incrementBy
- The increment value of the sequence. Any positive or negative
integer. It has to be smaller than windowSize.java.lang.IllegalArgumentException
- will be thrown if any of the parameters are invalid or null.ConsolidatorException
public void createSequencePartition(java.lang.String name, java.lang.String clientid, long curr_val, long incr) throws ConsolidatorException
Example:
consolidatorManager.createSequencePartition("CUSTOM1", "DAVIDL", 1000, 1);
name
- A character string specifying the sequence name.clientid
- A character string specifying a Consolidator client name.curr_val
- An integer that specifies the current (initial) value for a sequence.incr
- An integer that specifies the sequence increment.ConsolidatorException
dropSequencePartition(String name, String clientid)
public void createSqlScript(java.lang.String scrName, java.lang.String scrText, boolean replace) throws ConsolidatorException
scrText
- sript textscrName
- unique name of the scriptreplace
- if scrName already exists, replace scrTextConsolidatorException
public void createStoredProc(java.lang.String jarName, java.lang.String className, java.lang.String methodName, java.lang.String procName) throws ConsolidatorException
jarName
- arch name w extension , nullableclassName
- class name w/o extension , not nullmethodName
- method name , not nullprocName
- if null, procedure name = method nameConsolidatorException
public void createStoredProc(java.lang.String jarName, java.lang.String className, java.lang.String methodName, java.lang.String procName, java.lang.String procText) throws ConsolidatorException
jarName
- arch name w extension , nullableclassName
- class name w/o extension , not nullmethodName
- method name , not nullprocName
- if null, procedure name = method nameprocText
- procedure sql scriptConsolidatorException
public void createSubscription(java.lang.String publication, java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.createSubscription("T_SAMPLE1", "DAVIDL");
publication
- The name of the publication to which the client subscribes.clientid
- The Consolidator client name.ConsolidatorException
ConsolidatorException
dropSubscription(String publication, String clientid)
,
getAllSubscribedClients(String publication)
public void createSyncRule(java.lang.String ruleName, java.lang.String ruleText, boolean replace) throws ConsolidatorException
ruleText
- rule textruleName
- unique name of the rulereplace
- if ruleName already exists, replace rule textConsolidatorException
public void createVirtualPKColumn(java.lang.String owner, java.lang.String store, java.lang.String column) throws ConsolidatorException
Example:
consolidatorManager.createVirtualPKColumn("SAMPLE1", "DEPT", "DEPT_ID");
owner
- A string specifying the owner of the base object.store
- A string specifying the base object.column
- A string specifying a primary key column.
For a composite virtual primary key, call the API once for each primary key column.
The order of the API calls determines the order of the primary key columns.ConsolidatorException
createVirtualPKColumn(String db_inst, String owner, String store, String column)
,
dropVirtualPKColumns(String owner, String store)
public void createVirtualPKColumn(java.lang.String db_inst, java.lang.String owner, java.lang.String store, java.lang.String column) throws ConsolidatorException
createVirtualPKColumn
but with
an additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. If the MAIN database is specified, this is equivalent to the older
createVirtualPKColumn call referred to above.db_inst
- A string that specifies the database name where the table resides. Use
the name of a registered app database or Consolidator.MAIN_DB for the MAIN database as
appropriate.ConsolidatorException
dropVirtualPKColumns(String db_inst, String owner, String store)
public void deinstantiateSubscription(java.lang.String publication, java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.deinstantiateSubscription("T_SAMPLE1","DAVIDL");
publication
- The name of the publication to which the client subscribes.clientid
- The Consolidator client name.ConsolidatorException
instantiateSubscription(String publication, String clientid)
,
reInstantiatePublicationItem(String pub_item, String publication)
public int deleteJobExecutionLogs(java.lang.String jobNameTemplate, int jobResult, java.util.Date jobFinishTimeFrom, java.util.Date jobFinishTimeTo) throws ConsolidatorException
jobNameTemplate
- a sub-string of the job name.jobResult
- Job result; possible values are
ExecutionResult.ALL, ExecutionResult.SUCCESS,
ExecutionResult.WARNING and ExecutionResult.FAILURE.jobFinishTimeFrom
- Minimum value of job finish time.jobFinishTimeTo
- Maximum value of job finish time.ConsolidatorException
public void dependencyHint(java.lang.String owner, java.lang.String store, java.lang.String owner_d, java.lang.String store_d) throws ConsolidatorException
Example:
consolidatorManager.dependencyHint("SAMPLE1", "SAMPLE1_VIEW", "SAMPLE1", "SAMPLE1_TABLE");
owner
- The view owner.store
- The view name.owner_d
- The base object owner.store_d
- The base object name.ConsolidatorException
dependencyHint(String db_inst, String owner, String store, String owner_d, String stored_d)
,
removeDependencyHint(String owner, String store, String owner_d, String store_d)
,
primaryKeyHint(String publication_item, String column, String b_owner, String b_store, String b_column)
,
parentHint(String owner, String store, String owner_d, String store_d)
public void dependencyHint(java.lang.String db_inst, java.lang.String owner, java.lang.String store, java.lang.String owner_d, java.lang.String store_d) throws ConsolidatorException
dependencyHint
but with an
additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. If the MAIN database is specified, this is equivalent to the older
dependencyHint call referred to above.db_inst
- A string that specifies the database name where the hinted table resides. Use
the name of a registered app database or Consolidator.MAIN_DB for the MAIN database as appropriateConsolidatorException
removeDependencyHint(String db_inst, String owner, String store, String owner_d, String store_d)
public void deRegisterDatabase(java.lang.String name) throws ConsolidatorException
Example:
consolidatorManager.deRegisterDatabase("APP1");
name
- A string specifying the name that this app database was registered as.ConsolidatorException
registerDatabase(String name, Consolidator.DBProps)
,
alterDatabase(String name, Consolidator.DBProps)
,
getDatabases()
public void deRegisterJobClass(java.lang.String jobClassName, boolean unloadJobClassFromDB) throws ConsolidatorException
jobClassName
- The fully qualified name (including package name)
of the job class implementing the oracle.lite.job.Job interface.unloadJobClassFromDB
- If true the method will unload the class
byte code from the database repository.ConsolidatorException
public void deRegisterMyCompose(java.lang.String publication, java.lang.String pubItem, boolean removeBytecode) throws ConsolidatorException
publication
- Publication namepubItem
- Publication item nameremoveBytecode
- If true then bytecode of the registered class
is removed from the database. Note that if the bytecode is removed all
publication items registered with this class are deregistered.ConsolidatorException
registerMyCompose(String publication, String pubItem, String className, boolean reloadBytecode)
public void deRegisterQueuePkg() throws java.sql.SQLException, ConsolidatorException
Example:
consolidatorManager.deRegisterQueuePkg();
java.sql.SQLException
ConsolidatorException
registerQueuePkg(String pkg)
public void deRegisterQueuePkg(java.lang.String pub) throws java.sql.SQLException, ConsolidatorException
Example:
consolidatorManager.deRegisterQueuePkg("MY_PUB");
pub
- publication namejava.sql.SQLException
ConsolidatorException
registerQueuePkg(String pub,String pkg)
public void disableJob(java.lang.String jobName) throws ConsolidatorException
jobName
- The name of the job to be disabled.ConsolidatorException
public void disablePubItemQueryCache(java.lang.String publication_item) throws ConsolidatorException
Example:
consolidatorManager.disablePubItemQueryCache("P_SAMPLE3");
publication_item
- The name of the publication item.ConsolidatorException
enablePubItemQueryCache(String publication_item)
public void dropAllMapPartitions(java.lang.String pub_item) throws ConsolidatorException
Example:
consolidatorManager.dropAllMapPartitions("P_SAMPLE1");
pub_item
- The name of the Publication ItemConsolidatorException
addMapPartitions(String pub_item ,int num_parts, String storage, String ind_storage)
,
dropMapPartition(String partition)
,
mergeMapPartition(String from_partition, String to_partition)
,
partitionMap(String pub_item ,int num_parts, String storage, String ind_storage)
public void dropJavaResource(java.lang.String rsrcName) throws ConsolidatorException
rsrcName
- jar file nameConsolidatorException
public void dropJob(java.lang.String jobName) throws ConsolidatorException
jobName
- The name of the job to be dropped.ConsolidatorException
public void dropMapPartition(java.lang.String partition) throws ConsolidatorException
Example:
consolidatorManager.dropMapPartition("MAP101_1");
partition
- The name of the partition to drop.ConsolidatorException
addMapPartitions(String pub_item ,int num_parts, String storage, String ind_storage)
,
dropAllMapPartitions(String pub_item)
,
mergeMapPartition(String from_partition, String to_partition)
,
partitionMap(String pub_item ,int num_parts, String storage, String ind_storage)
public void dropPublication(java.lang.String name) throws ConsolidatorException
Example:
consolidatorManager.dropPublication("T_SAMPLE1");
name
- A string containing the name of the Publication.ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri)
public void dropPublicationItem(java.lang.String name) throws ConsolidatorException
Example:
consolidatorManager.dropPublicationItem("P_SAMPLE1");
name
- A character string specifying a new publication item name.java.lang.Throwable
ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri)
,
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
alterPublicationItem(String name, String select_stmt)
public void dropPublicationItemIndex(java.lang.String name) throws ConsolidatorException
Example:
consolidatorManager.dropPublicationItemIndex("INDX001");
name
- The name of the index to drop.ConsolidatorException
createPublicationItemIndex(String name, String publication_item,String pmode, String columns)
public void dropSequence(java.lang.String seqName) throws ConsolidatorException
seqName
- Name of the sequence. Any valid String value.java.lang.IllegalArgumentException
- will be thrown if any of the parameter is invalid or null.ConsolidatorException
public void DropSequence(java.lang.String name) throws ConsolidatorException
Example:
consolidatorManager.dropSequence("CUSTOM1");
name
- A character string specifying the sequence name.ConsolidatorException
createSequence(String name)
public void dropSequencePartition(java.lang.String name, java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.dropSequencePartition("CUSTOM1", "DAVIDL");
name
- A character string specifying the sequence name.clientid
- A character string specifying a Consolidator client name.ConsolidatorException
createSequencePartition(String name, String clientid, long curr_val, long incr)
public void dropSqlScript(java.lang.String scrName) throws ConsolidatorException
scrName
- sql script nameConsolidatorException
public void dropStoredProc(java.lang.String procName) throws ConsolidatorException
procName
- name of the procedure to dropConsolidatorException
public void dropSubscription(java.lang.String publication, java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.dropSubscription("T_SAMPLE1","DAVIDL");
publication
- The name of the publication to which the client subscribes.clientid
- The Consolidator client name.ConsolidatorException
getAllSubscribedClients(String publication)
,
createSubscription(String publication, String clientid)
public void dropSyncRule(java.lang.String ruleName) throws ConsolidatorException
ruleName
- sql script nameConsolidatorException
public void dropVirtualPKColumns(java.lang.String owner, java.lang.String store) throws ConsolidatorException
Example:
consolidatorManager.dropVirtualPKColumn("SAMPLE1", "DEPT");
owner
- A string specifying the owner of the base object.store
- A string specifying the base object.ConsolidatorException
createVirtualPKColumn(String owner, String store, String column)
public void dropVirtualPKColumns(java.lang.String db_inst, java.lang.String owner, java.lang.String store) throws ConsolidatorException
dropVirtualPKColumns
but with
an additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. If the MAIN database is specified, this is equivalent to the older
dropVirtualPKColumns call referred to above.db_inst
- A string that specifies the database name where the table resides. Use
the name of a registered app database or Consolidator.MAIN_DB for the MAIN database as
appropriate.ConsolidatorException
createVirtualPKColumn(String db_inst, String owner, String store, String column)
public void enableJob(java.lang.String jobName) throws ConsolidatorException
jobName
- The name of the job to be enabled.ConsolidatorException
public void enablePubItemQueryCache(java.lang.String publication_item) throws ConsolidatorException
Example:
consolidatorManager.enablePubItemQueryCache("P_SAMPLE3");
publication_item
- The name of the publication item.ConsolidatorException
disablePubItemQueryCache(String publication_item)
public long enQueueNotification(java.lang.String clientid, java.lang.String publication, java.lang.String pubItems, int recordCount, int dataSize, int priority) throws ConsolidatorException
clientid
- client idpublication
- Publication namepubItems
- Comma separated publication itemsrecordCount
- Record countdataSize
- data sizepriority
- [1..99], highest priority of the modified data.
HIGH_PRIORITY = 2 and TIME_CRITICAL = 1, other positive integer
values less than 99 are not reserved and could be used by applications
for message priority/type customizationConsolidatorException
isNotificationSent(long)
public void executeStatement(java.lang.String stmt) throws ConsolidatorException
Example:
consolidatorManager.executeStatement("drop table dual");
stmt
- The SQL statement text.java.lang.Throwable
ConsolidatorException
public void executeTransaction(java.lang.String clientid, java.lang.String dbInst, long tid) throws ConsolidatorException
Example:
consolidatorManager.executeTransaction("DAVIDL", "APP1", 100002);
clientid
- The Consolidator client name.dbInst
- The database name where PI is definedtid
- The transaction ID.ConsolidatorException
purgeTransaction(String clientid, String dbInst, long tid)
public java.lang.String generateMobileDmlProcedure(java.lang.String publication_item, char type) throws ConsolidatorException
publication_item
- existing publication item.type
- procedure header (Consolidator.PROC_HEADER) or body (Consolidator.PROC_BODY)ConsolidatorException
public java.lang.String generateStoredProcScript(java.lang.String jarName, java.lang.String className, java.lang.String methodName, java.lang.String procName) throws ConsolidatorException
jarName
- arch name w extension , nullableclassName
- class name w/o extension , not nullmethodName
- method name , not nullprocName
- if null, procedure name = method nameConsolidatorException
public java.util.Vector getAllSubscribedClients(java.lang.String publication) throws ConsolidatorException
Example:
consolidatorManager.getAllSubscribedClients("T_SAMPLE1");
publication
- The name of the publication to which the client subscribes.ConsolidatorException
public oracle.lite.sync.JupConnection getConnection() throws ConsolidatorException
ConsolidatorException
public java.util.Vector getConsolidatorObject(java.lang.String publicationName, int objectType) throws ConsolidatorException
Example:
ConsolidatorManager.get/** Returns objects(scripts,resources,sequences,publicationitems) associated with publication.Example:
ConsolidatorManager.getconsolidatorObject("S11U1",Consolidator.SCRIPTS);
publicationName
- Publication Name.objectType
- Object Type.
Acceptable values are Consolidator.(RESOURCES_OBJECT | SCRIPTS_OBJECT | RULES_OBJECT | SEQUENCES_OBJECT |PUBLICATIONITEM_OBJECT).ConsolidatorException
public java.util.Hashtable getConsolidatorObjectAttributes(java.lang.String objectName, int objectType) throws ConsolidatorException
Example:
ConsolidatorManager.getConsolidatorObjectAttributes("SCRIPT1",Consolidator.SCRIPTS);
objectName
- Object Name.objectType
- Object Type.
Acceptable values are Consolidator.RESOURCES_OBJECT,Consolidator.SCRIPTS_OBJECT,Consolidator.SEQUENCES_OBJECT,Consolidator.PUBLICATIONITEM_OBJECT.ConsolidatorException
public java.lang.String getCurrentTime()
public java.util.Map getDatabases() throws ConsolidatorException
Example 1: Prints name and JDBC url for all registered app databases
Map dbMap = consolidatorManager.getDatabases(); Iterator I = dbMap.entrySet().iterator(); while(I.hasNext()) { Map.Entry entry = (Map.Entry) I.next(); String dbName = (String) entry.getKey(); Consolidator.DBProps dbProps = (Consolidator.DBProps)entry.getValue(); System.out.println("Name:" + dbName +", JDBC Url:" + dbProps.jdbcUrl); }
Example 2: Obtains JDBC url of the app database registered as APP1
Map dbMap = consMgr.getDatabases(); Consolidator.DBProps dbProps = (Consolidator.DBProps)dbMap.get("APP1"); if(dbProps == null) { // handle error: not found } String jdbcUrl = dbProps.jdbcUrl;
ConsolidatorException
registerDatabase(String name, Consolidator.DBProps)
,
alterDatabase(String name, Consolidator.DBProps)
,
deRegisterDatabase(String name)
public java.lang.String getDescription(java.lang.String objectName, int objectType) throws ConsolidatorException
Example:
ConsolidatorManager.getDescription("SCRIPT1",Consolidator.SCRIPTS);
objectName
- Object Name.objectType
- Object Type.
Acceptable values are Consolidator.RESOURCES_OBJECT,Consolidator.SCRIPTS_OBJECT,Consolidator.SEQUENCES_OBJECT,Consolidator.PUBLICATIONITEM_OBJECT.ConsolidatorException
public DownloadInfo getDownloadInfo(java.lang.String clientid, boolean uncompressed, boolean completeRefresh)
clientid
- the client id.uncompressed
- a flag indicates whether the calulation is based on uncompressed data or not.
completeRefresh
- determines if the calculation is based on completeRefresh
DownloadInfo
,
PublicationSize
public java.util.Vector getJobExecutionLogs(java.lang.String jobNameTemplate, int jobResult, java.util.Date jobFinishTimeFrom, java.util.Date jobFinishTimeTo) throws ConsolidatorException
jobNameTemplate
- a sub-string of the job name.jobResult
- Job result; possible values are
ExecutionResult.ALL, ExecutionResult.SUCCESS,
ExecutionResult.WARNING and ExecutionResult.FAILURE.jobFinishTimeFrom
- Minimum value of job finish time.jobFinishTimeTo
- Maximum value of job finish time.ConsolidatorException
public int getOSECreator(Consolidator.OSEPluginProps plProps) throws ConsolidatorException
plProps
- properties required for plugin registrationConsolidatorException
- if plugin is not registered.public Consolidator.OSEPluginProps[] getOSEPluginProps() throws ConsolidatorException
ConsolidatorException
public Consolidator.OSEPluginProps getOSEPluginProps(int creator) throws ConsolidatorException
creator
- creator id of a pluginConsolidatorException
public long getPlatformDevFlg(java.lang.String platform) throws ConsolidatorException
Example:
long devFlg_l = getPlatformDevFlg ( "MIDP20" )
platform
- name of device class/type, may only contain alpha-numeric charactersConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public java.lang.String getPlatformName(int devFlg) throws ConsolidatorException
devFlg
- int device flagConsolidatorException
public long getPublicationDeviceType(java.lang.String pubName) throws ConsolidatorException
Example:
long devFlg_l = getPublicationDevFlg ( "MY_PUB" )
pubName
- ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public java.lang.String[] getPublicationNames(java.lang.String objName, int objectType) throws ConsolidatorException
objName
- objectType
- Object Type.
Acceptable values are Consolidator.RESOURCES_OBJECT,Consolidator.SCRIPTS_OBJECT,Consolidator.SEQUENCES_OBJECT,
Consolidator.RULES_OBJECTConsolidatorException
public java.util.Hashtable getPublicationPubItemAttributes(java.lang.String publicationname, java.lang.String pubitemname) throws ConsolidatorException
Example:
ConsolidatorManager.getPublicationPubItemAttributes("S11U1","P_S11U1")
publicationname
- A String object containing the publication namepubitemname
- A String object containing the pubitem nameConsolidatorException
public java.lang.String getQueuePkg() throws java.sql.SQLException
Example:
String dfltPkgName = consolidatorManager.getQueuePkg ();
java.sql.SQLException
public java.lang.String getQueuePkg(java.lang.String pub) throws java.sql.SQLException
Example:
consolidatorManager.getQueuePkg ("pub1");
pub
- A character string specifying the publication.java.sql.SQLException
public int getQueuePkgType() throws java.sql.SQLException, ConsolidatorException
Example:
int dflt_pkg_type = consolidatorManager.getQueuePkgType ();
java.sql.SQLException
ConsolidatorException
public int getQueuePkgType(java.lang.String pub) throws java.sql.SQLException, ConsolidatorException
Example:
consolidatorManager.getQueuePkgType ("pub1");
pub
- A string specifying the publication.java.sql.SQLException
ConsolidatorException
public java.lang.String getSqlScript(java.lang.String scrName) throws ConsolidatorException
scrName
- script nameConsolidatorException
- with error code ConsErrorMessages.RSRC_NOT_FOUNDpublic java.util.Hashtable getSubscriptionParameters(java.lang.String publication, java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.getSubscriptionParameter("T_SAMPLE1", "DAVIDL");
publication
- The name of the publication to which the client subscribes.clientid
- The Consolidator client name.ConsolidatorException
setSubscriptionParameter(String publication, String clientid, String param_name, String param_value)
public java.lang.String getSyncRule(java.lang.String ruleName) throws ConsolidatorException
ruleName
- script nameConsolidatorException
- with error code ConsErrorMessages.RSRC_NOT_FOUNDpublic java.util.Hashtable getSyncRuleParams(int ruleType, java.lang.String ruleText) throws ConsolidatorException
============== -- RULE_MAX_DB_REC Setting sync immediately if database contains more than modified records (Passing pub name, record numbers) -- Getting sync immediately if database contains more than modified records( passing pub name return RULE PROPS OBJECT with NREC or NULL) props: NREC -- RULE_MAX_PI_REC Setting immediately if out queue contains more than modified records(Passing pub item name, record numbers) -- Getting immediately if out queue contains more than modified records(Passing pub item name return RULE PROPS OBJECT with NREC or NULL) props: NREC For Platform rules: ============ EVENTS: -- RULE_HIGH_BANDWIDTH Setting sync immediately when network bandwidth greater than x bits/sec (Passing platform FLAG, network bandwidth) -- Getting sync immediately when network bandwidth greater than x bits/sec (Passing platform name return RULE PROPS OBJECT w NET or NULL) props: NET -- RULE_LOW_PWR Setting sync immediately when battery level drop to x percentage (Passing platform name, battery level) -- Getting sync immediately when battery level drop to x percentage (Passing platform name return return RULE PROPS OBJECT w BAT or NULL) props: BAT -- RULE_AC_PWR Setting sync immediately when AC power is detected (passing platform name) -- Getting sync immediately when AC power is detected (passing platform name return RULE PROPS OBJECT w AC or NULL) props: AC CONDITIONS: -- RULE_MIN_PWR Setting only sync if battery level equal to or greater than X %( Passing Platform name, battery level) -- Getting only sync if battery level equal to or greater than X %( Passing Platform name return RULE PROPS OBJECT w BAT or NULL) props: BAT Setting network priority rules -- RULE_NET_PRIORITY (Passing Platform, vector of RULE PROPS objects) -- Getting network priority rules (passing platform, return vector of RULE PROPS objects) props: PRIO SPEED PING AUTODIAL _________________________________ Setting network parameters -- NET_CONFIG Setting parameters (passing Platform, vector of RULE PROPS objects) -- Getting network parameters (passing Platform, return vector of RULE PROPS objects) props: NAME,PROXY
ruleType
- rule defined in oracle.lite.sync.Rules constantsruleText
- an XML string containing the rule with parametersConsolidatorException
public Consolidator.TemplateItemMetadata getTemplateItemMetadata(java.lang.String publication, java.lang.String publication_item) throws ConsolidatorException
Example:
consolidatorManager.getTemplateItemMetadata("T_SAMPLE1","P_SAMPLE1");
publication
- The Publication that is associated with the Publication Item.publication_item
- The name of the Publication Item.ConsolidatorException
setTemplateItemMetadata(Consolidator.TemplateItemMetadata md)
public java.util.Vector getVirtualTablePrimaryKey(java.lang.String owner, java.lang.String store) throws ConsolidatorException
Example:
consolidatorManager.getVirtualTablePrimaryKey("SAMPLE1", "DEPT");
owner
- A string specifying the owner of the base object.store
- A string specifying the base object.ConsolidatorException
getVirtualTablePrimaryKey(String db_inst, String owner, String store)
,
createVirtualPKColumn(String db_inst, String owner, String store, String column)
,
dropVirtualPKColumns(String owner, String store)
public java.util.Vector getVirtualTablePrimaryKey(java.lang.String db_inst, java.lang.String owner, java.lang.String store) throws ConsolidatorException
getVirtualTablePrimaryKey
but with
an additional db_inst parameter that can be used to specify a registered app database or the
MAIN database. If the MAIN database is specified, this is equivalent to the older
createVirtualPKColumn call referred to above.db_inst
- A string that specifies the database name where the table resides. Use
the name of a registered app database or Consolidator.MAIN_DB for the MAIN database as
appropriate.ConsolidatorException
dropVirtualPKColumns(String db_inst, String owner, String store)
public long getWeight(java.lang.String scrName, java.lang.String pubName) throws ConsolidatorException
scrName
- script namepubName
- publication nameConsolidatorException
public boolean highPriorityDataAvailable(java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.highPriorityDataAvailable("S11U1");
clientid
- The Consolidator client name.java.lang.Throwable
ConsolidatorException
public void initialize(java.lang.String user, java.lang.String jdbcUrl, java.lang.String pwd)
public void instantiateSubscription(java.lang.String publication, java.lang.String clientid) throws ConsolidatorException
Example:
consolidatorManager.instantiateSubscription("T_SAMPLE1", "DAVIDL");
publication
- The name of the publication to which the client subscribes.clientid
- The Consolidator client name.ConsolidatorException
deinstantiateSubscription(String publication, String clientid)
,
reInstantiatePublicationItem(String pub_item, String publication)
public boolean isNotificationSent(long notificationId) throws ConsolidatorException
notificationId
- notification ID returned by enQueueNotificationConsolidatorException
enQueueNotification(java.lang.String, java.lang.String, java.lang.String, int, int, int)
public boolean isPubForPlatform(java.lang.String pubName, java.lang.String platform) throws java.lang.Throwable
Example:
boolean isPub4MIDP20_b = isPubForPlatform ( "MY_PUB","MIDP20" )
pubName
- name of publicationplatform
- name of device class/type, may only contain alpha-numeric charactersjava.lang.Throwable
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public boolean isSqlScriptModified(java.lang.String scrName, java.lang.String scrText) throws ConsolidatorException
scrName
- script namescrText
- script textConsolidatorException
- with error code ConsErrorMessages.RSRC_NOT_FOUNDpublic boolean isSubscribed(java.lang.String client, java.lang.String publication) throws ConsolidatorException
Example:
boolean isSubscribed = /** checks if the client is subscribed.Example:
boolean isSubscribed = consolidatorManager.isSubscribed("S11U1","T_SAMPLE1");
client
- publication
- name of a publication.ConsolidatorException
public boolean isSyncRuleModified(java.lang.String ruleName, java.lang.String ruleText) throws ConsolidatorException
ruleName
- script nameruleText
- script textConsolidatorException
- with error code ConsErrorMessages.RSRC_NOT_FOUNDpublic void loadJavaClass(java.lang.String className, java.lang.String jarName, boolean replace) throws ConsolidatorException
className
- class name w/o extension , nullable
if className is null, entire jar archive will be loaded
if jarName is not null, class will be
loaded from the jar, otherwise, class must
be in the current directoryjarName
- arch name with extension , nullable
if jarName is null, class name must be providedreplace
- if true, current resource, if exists, will be replacedConsolidatorException
- with error code ConsErrorMessages.OBJECT_EXISTSpublic static void main(java.lang.String[] argv) throws ConsolidatorException
Example:
java oracle.lite.sync.ConsolidatorManager MOBILEADMIN MANAGER
ConsolidatorException
public void mergeMapPartition(java.lang.String from_partition, java.lang.String to_partition) throws ConsolidatorException
Example:
consolidatorManager.mergeMapPartition("MAP101_2","MAP101_1");
from_partition
- The name of the partition that data are merged from.to_partition
- The name of the partition that data are merged to.ConsolidatorException
addMapPartitions(String pub_item ,int num_parts, String storage, String ind_storage)
,
dropMapPartition(String partition)
,
dropAllMapPartitions(String pub_item)
,
partitionMap(String pub_item ,int num_parts, String storage, String ind_storage)
public void modifySequence(java.lang.String seqName, java.util.Hashtable seqProps_h) throws ConsolidatorException
(String seqName, String propertyName, String newValue)
for the property list.seqName
- The name of the sequence. Any valid String value.seqProps_h
- A Hashtable object that contains pair of property name
and property value. Please note that each has to be in a String object.ConsolidatorException
- will be thrown if any of the
parameter is invalid or null.public void modifySequence(java.lang.String seqName, java.lang.String propertyName, java.lang.String newValue) throws ConsolidatorException
Property Name | Note | Effective Time |
---|---|---|
MIN_VALUE | This will change the start value of the next available window. In order to avoid any repeat of numbers, the new value has to be larger than (for positive sequence) or smaller than (for negative sequence) the original value of the next available window. All clients have to obtain new window for their sequences. | Immediately on the server side. At the next synchronization for all the clients. |
WINDOW_SIZE | Since this will change some of the conditions, all clients have to obtain new window for their sequences. | Immediately on the server side. At the next synchronization for all the clients. |
THRESHOLD Since this will change some of the conditions, all clients have to obtain new window for their sequences. | Immediately on the server side. At the next synchronization for all the clients. | |
INCREMENT_BY | Since this will change some of the conditions, all clients have to obtain new window for their sequences. This also defines the direction of the sequence (positive or negative) and it is not allowed to be changed. | Immediately on the server side. At the next synchronization for all the clients. |
seqName
- The name of the sequence. Any valid String value.propertyName
- - The name of the property. Available properties to be changed MIN_VALUE, WINDOW_SIZE, THRESHOLD, and INCREMENT_BY.newValue
- The new value of the property.ConsolidatorException
- will be thrown if any of the parameter is invalid or null.public void openConnection(java.sql.Connection conn) throws ConsolidatorException
Example:
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORCL", "MOBILEADMIN","MANAGER"); consolidatorManager.openConnection (conn);
conn
- An existing JDBC connection handle.ConsolidatorException
connectionIsClosed()
,
closeConnection()
,
commitTransaction()
,
rollbackTransaction()
,
openConnection(java.lang.String user,java.lang.String password)
,
openConnection(java.lang.String user,java.lang.String password,java.lang.String url)
,
getConnection()
public void openConnection(java.lang.String user, java.lang.String password) throws ConsolidatorException
Example:
consolidatorManager.openConnection("MOBILEADMIN","MANAGER");
user
- A character string, which may contain special characters
but is case insensitive.password
- A character string that can contain any combination
of numbers, letters, and underscore characters.ConsolidatorException
connectionIsClosed()
,
closeConnection()
,
commitTransaction()
,
rollbackTransaction()
,
openConnection(Connection conn)
,
openConnection(java.lang.String user,java.lang.String password,java.lang.String url)
,
getConnection()
public void openConnection(java.lang.String user, java.lang.String password, java.lang.String url) throws ConsolidatorException
Example:
consolidatorManager.openConnection("MOBILEADMIN", "MANAGER", "jdbc:oracle:thin:@127.0.0.1:1521:ORCL");
user
- A character string, which may contain special characters
but is case insensitive.password
- A character string that can contain any combination
of numbers, letters, and underscore characters.url
- A character string that specifies a JDBC connection URL.ConsolidatorException
connectionIsClosed()
,
closeConnection()
,
commitTransaction()
,
rollbackTransaction()
,
openConnection(java.sql.Connection conn)
,
openConnection(java.lang.String user,java.lang.String password)
,
getConnection()
public void parentHint(java.lang.String owner, java.lang.String store, java.lang.String owner_d, java.lang.String store_d) throws ConsolidatorException
Example:
consolidatorManager.parentHint("SAMPLE3","ADDROLRL4P","SAMPLE3","ADDRESS");
owner
- The view owner.store
- The view name.owner_d
- The parent table owner.store_d
- The parent table name.
For a composite primary key, call the API once for each primary key column
in any order.ConsolidatorException
parentHint(String db_inst, String owner, String store, String owner_d, String store_d)
,
dependencyHint(String owner, String store, String owner_d, String store_d)
,
primaryKeyHint(String publication_item, String column, String b_owner, String b_store, String b_column)
public void parentHint(java.lang.String db_inst, java.lang.String owner, java.lang.String store, java.lang.String owner_d, java.lang.String store_d) throws ConsolidatorException
parentHint
but with an additional db_inst parameter that can be used to specify a
registered app database or the MAIN database. If the MAIN database is specified, this is
equivalent to the older parentHint call referred to above.db_inst
- A string that specifies the database name where the hinted table resides. Use
the name of a registered app database or Consolidator.MAIN_DB for the MAIN database as appropriateConsolidatorException
public void partitionMap(java.lang.String pub_item, int num_parts, java.lang.String storage, java.lang.String ind_storage) throws ConsolidatorException
Example:
consolidatorManager.partitionMap( "PI_SAMPLE1", 5, "TABLESPACE MOBILEADMIN", "initrans 10 pctfree 40" );
pub_item
- The name of the Publication Item.num_parts
- A int that specifies the number of partitions that you desire.storage
- A string specifying the storage parameters.ind_storage
- A string specifying the storage parameters for indexes on the partition.ConsolidatorException
addMapPartitions(String pub_item ,int num_parts, String storage, String ind_storage)
,
dropMapPartition(String partition)
,
dropAllMapPartitions(String pub_item)
,
mergeMapPartition(String from_partition, String to_partition)
public void primaryKeyHint(java.lang.String publication_item, java.lang.String column, java.lang.String b_owner, java.lang.String b_store, java.lang.String b_column) throws ConsolidatorException
Example:
consolidatorManager.primaryKeyHint("P_SAMPLE1", "Last Name", "SAMPLE1","ADDROLRL4P","First Name");
publication_item
- The publication item name.column
- The publication item column name.b_owner
- The base table owner.b_store
- The base table name.b_column
- The name of the primary key column in the base table.ConsolidatorException
dependencyHint(String owner, String store, String owner_d, String store_d)
,
parentHint(String owner, String store, String owner_d, String store_d)
public void purgeTransaction(java.lang.String clientid, java.lang.String dbInst, long tid) throws ConsolidatorException
Example:
consolidatorManager.purgeTransaction("DAVIDL","APP1",100001);
clientid
- The Consolidator client name.dbInst
- Database name.tid
- The transaction ID.ConsolidatorException
executeTransaction(String clientid, String dbInst, long tid)
public void reCreatePublicationItem(java.util.Hashtable pubItem_h, boolean forceRecreate_b) throws ConsolidatorException
pubItem_h
- Hashtable must contain contain NAME key.
and may define the following publication item properties using key-value pairs
Key | Value |
---|---|
NAME | A string specifying publication item name |
OWNER | A string specifying the base object owner. |
STORE | A string specifying the base object name. |
PMODE | A string specifying the refresh mode: F for fast refresh, C for complete refresh, Q for queue-based. The default is fast refresh. |
CBK_OWNER | A string specifying the callback package owner. |
CBK_NAME | A string specifying the callback package name. |
SELECT_STMT_CLOB | A string specifying the select statement. Note: if only the SELECT_STMT_CLOB is provided, this method is equivalent to AlterPublicationItem() |
SET_DFLT_COL_OPTIONS | if TRUE, sets NOT NULL and DEFAULT options of a publication item column(s) |
CL2LOG_REC_STMT | A string specifying client sub-query that correlates primary key of the changed records in the log table with consolidator clientid. |
IS_LOG_BASED | If TRUE, log based (automatic) publication item will be created |
CHNG_NTF | If TRUE, log based (automatic) publication item will send notifications from server about new/modified records |
forceRecreate_b
- boolean re-create publication item even if properties are not modified. *ConsolidatorException
createPublicationItem(String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(String rmt_jdbc_url, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
createPublicationItem(Connection rmt_conn, String name, String owner, String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name)
,
* @see #alterPublicationItem(String name, String select_stmt)
,
dropPublicationItem(String name)
public void registerDatabase(java.lang.String name, Consolidator.DBProps props) throws ConsolidatorException
Example:
Consolidator.DBProps props = new Consolidator.DBProps(); props.jdbcUrl = "jdbc:oracle:thin:@appdb1host:1521:appdb1"; props.description = "App database 1"; props.adminPassword = "secret"; //password for admin schema e.g. mobileadmin on appdb1 consolidatorManager.registerDatabase("APP1", props);
name
- A string specifying the name that the app database should be registered as.
This name is needed for other API calls that define publications and pub-items etc. against
schemas in the app databaseprops
- A Consolidator.DBProps object that is initialized with the access details for
the app database
Note that the admin schema name is not specified in the example. This is because it must be
the same as that used in the MAIN repos (default mobileadmin). Only the password is specified.ConsolidatorException
alterDatabase(String name, Consolidator.DBProps)
,
deRegisterDatabase(String name)
,
getDatabases()
public void registerJobClass(java.lang.String jobClassName, java.lang.String type, java.lang.String description, boolean loadJobClassToDB) throws ConsolidatorException
jobClassName
- The fully qualified name (including package name)
of the job class implementing the oracle.lite.job.Job interface.type
- Normally a job class corresponds to a unique job type.description
- Job description.loadJobClassToDB
- If true the method will load the class
byte code to the database repository so that the job engine can load
the class from database. If false, the user should make sure that the
class is available to the job engine JVM.ConsolidatorException
public void registerMyCompose(java.lang.String publication, java.lang.String pubItem, java.lang.String className, boolean reloadBytecode) throws ConsolidatorException
publication
- Publication namepubItem
- Publication item nameclassName
- MyCompose subclass namereloadBytecode
- If true then existing bytecode of the class (in DB)
is overwritten.ConsolidatorException
deRegisterMyCompose(String publication, String pubItem, boolean removeBytecode)
public int registerOSEPlugin(Consolidator.OSEPluginProps plProps) throws ConsolidatorException
plProps
- properties required for plug-in registrationConsolidatorException
public int registerOSEPlugin(Consolidator.OSEPluginProps plProps, boolean force) throws ConsolidatorException
plProps
- properties required for plugin registrationforce
- if true, overwrite properties if a plugin with the same
plProps.recordLayoutClassName and plProps.clientLib is already
registered.ConsolidatorException
public long registerPlatform(java.lang.String platform) throws ConsolidatorException
Example:
long devFlg_l = registerPlatform ( "MIDP20" )
platform
- name of device class/type, may only contain alpha-numeric charactersConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public long registerPlatform(java.lang.String platform, int[] creatorIds, boolean supportGlobalMetadata) throws ConsolidatorException
Example:
int[] creatorIds = {Consolidator.SQLITE_CREATOR_ID}; long devFlg_l = registerPlatform ( "ANDROID", creatorIds, false);
platform
- name of device class/type, may only contain alpha-numeric characterscreatorIds
- array of integer creator ids (storage types) supported by the platform.
The first element has to be the default creator for the platformsupportGlobalMetadata
- set to true if the platform has a needs to have a single central
database to store properties of indexes, sequences, scripts and resourcesConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public long registerPlatform(java.lang.String platform, int[] creatorIds, java.lang.String[] clientLibs, boolean supportGlobalMetadata) throws ConsolidatorException
Example:
int[] creatorIds = {Consolidator.SQLITE_CREATOR_ID}; String[] clientLibs = {Consolidator.JAVA_SQLITE_PLUGIN}; long devFlg_l = registerPlatform ( "ANDROID_WEST_COAST", creatorIds, clientLibs, false);
platform
- name of device class/type, may only contain alpha-numeric characterscreatorIds
- array of integer creator ids (storage types) supported by the platform.
The first element has to be the default creator for the platformclientLibs
- array of strings which contains client library or class names to handle the
corresponding creator id in creatorIds arraysupportGlobalMetadata
- set to true if the platform has a needs to have a single central
database to store properties of indexes, sequences, scripts and resourcesConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public void registerQueuePkg(java.lang.String pkg) throws java.sql.SQLException, ConsolidatorException
Example:
consolidatorManager.registerQueuePkg("ASL.QUEUES_PKG");
pkg
- A character string specifying the new queue package.java.sql.SQLException
ConsolidatorException
deRegisterQueuePkg()
public void registerQueuePkg(java.lang.String pkg, int pkg_type) throws java.sql.SQLException, ConsolidatorException
Example:
consolidatorManager.registerQueuePkg("ASL.QUEUES_PKG",Consolidator.QPKG_PLSQL_i);
pkg
- A character string specifying the new queue package.pkg_type
- int ( either Consolidator.QPKG_PLSQL_i or Consolidator.QPKG_JAVA_i ).java.sql.SQLException
ConsolidatorException
deRegisterQueuePkg()
public void registerQueuePkg(java.lang.String pkg, int pkg_type, java.lang.String pub) throws java.sql.SQLException, ConsolidatorException
Example:
Using ConsolidatorManager,
consolidatorManager.registerQueuePkg("ASL.QUEUES_PKG", Consolidator.QPKG_PLSQL_i , "MY_PUB"); or consolidatorManager.registerQueuePkg("my.queuepkg.QueueProcessor", Consolidator.QPKG_JAVA_i , "MY_PUB");
pkg
- A character string specifying the new queue package.pkg_type
- int ( either Consolidator.QPKG_PLSQL_i or Consolidator.QPKG_JAVA_i )pub
- A character string specifying the publication.java.sql.SQLException
ConsolidatorException
deRegisterQueuePkg()
public void registerQueuePkg(java.lang.String pkg, java.lang.String pub) throws java.sql.SQLException, ConsolidatorException
Example:
consolidatorManager.registerQueuePkg("ASL.QUEUES_PKG", "MY_PUB");
pub
- A character string specifying the publication.pkg
- A character string specifying the new queue package.java.sql.SQLException
ConsolidatorException
deRegisterQueuePkg()
,
registerQueuePkg(java.lang.String,int,java.lang.String)
public void reInstantiatePublicationItem(java.lang.String pub_item, java.lang.String publication) throws ConsolidatorException
Example:
consolidatorManager.reInstantiatePublicationItem("T_SAMPLE1", "P_SAMEPLE1");
publication
- A string specifying a publication.pub_item
- A string specifying the publication item name.ConsolidatorException
instantiateSubscription(String publication, String clientid)
,
deinstantiateSubscription(String publication, String clientid)
public void removeDependencyHint(java.lang.String owner, java.lang.String store, java.lang.String owner_d, java.lang.String store_d) throws ConsolidatorException
Example:
consolidatorManager.removeDependencyHint("SAMPLE1", "SAMPLE1_VIEW", "SAMPLE1", "SAMPLE1_TABLE");
owner
- The view owner.store
- The view name.owner_d
- The base object owner.store_d
- The base object name.ConsolidatorException
removeDependencyHint(String db_inst, String owner, String store, String owner_d, String store_d)
,
dependencyHint(String owner, String store, String owner_d, String store_d)
public void removeDependencyHint(java.lang.String db_inst, java.lang.String owner, java.lang.String store, java.lang.String owner_d, java.lang.String store_d) throws ConsolidatorException
removeDependencyHint
but with an additional db_inst parameter that can be used to specify a
registered app database or the MAIN database. If the MAIN database is specified, this is
equivalent to the older removeDependency call referred to above.db_inst
- A string that specifies the database name where the hinted table resides. Use
the name of a registered app database or Consolidator.MAIN_DB for the MAIN database as appropriateConsolidatorException
dependencyHint(String db_inst, String owner, String store, String owner_d, String store_d)
public void removeJavaResource(java.lang.String publication, java.lang.String rsrcName) throws ConsolidatorException
publication
- publication namersrcName
- resource name
could be jar file name with extensionConsolidatorException
public void removeMobileDmlProcedure(java.lang.String publication, java.lang.String pub_item) throws ConsolidatorException
Example:
consolidatorManager.removeMobileDmlProcedure("T_SAMPLE1", "P_SAMEPLE1");
publication
- A string specifying a publication.pub_item
- A string specifying a publication item nameConsolidatorException
addMobileDmlProcedure(String publication, String pub_item, String mobile_dml_proceedure)
public void removePublicationItem(java.lang.String publication, java.lang.String item) throws ConsolidatorException
Example:
consolidatorManager.removePublicationItem("T_SAMPLE1", "P_SAMEPLE1");
publication
- A string specifying a publication.item
- A string specifying the publication item name.ConsolidatorException
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight)
,
addPublicationItem(String publication, String item, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, String weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure)
,
addPublicationItem(String template, String publication, String columns, String disabled_dml, String conflict_rule, String restricting_predicate, int weight, String mobile_dml_procedure, boolean conflict_res_only, boolean is_shared, String group_fnc)
,
alterPublicationItem(String name, String select_stmt)
public void removePublicationSequence(java.lang.String pubName, java.lang.String seqName) throws ConsolidatorException
pubName
- The name of the publication.seqName
- The name of the sequence. Any valid String value.java.lang.IllegalArgumentException
- will be thrown if any of the parameter is
invalid or null.ConsolidatorException
public void removeSqlScript(java.lang.String publication, java.lang.String scrName) throws ConsolidatorException
publication
- publication namescrName
- script nameConsolidatorException
public void removeSyncRule(java.lang.String publication, java.lang.String ruleName) throws ConsolidatorException
publication
- publication nameruleName
- script nameConsolidatorException
public void resetCache() throws ConsolidatorException
ConsolidatorException
public void resetDownloadInfoHistory()
Consolidator saves all the information for getDownloadInfo to calculate, e.g. the size of a to-be-downloaded publication item, and this method will erase all those data so that it will have a fresh start.
public java.util.Vector searchConsolidatorObject(java.lang.String objectName, int objectType) throws ConsolidatorException
Example:
ConsolidatorManager.searchConsolidatorObject("SCRIPT1",Consolidator.SCRIPTS);
objectName
- Object Name.objectType
- Object Type.
Acceptable values are Consolidator.RESOURCES_OBJECT,Consolidator.SCRIPTS_OBJECT,Consolidator.SEQUENCES_OBJECT,Consolidator.PUBLICATIONITEM_OBJECT,Consolidator.PUBLICATION_OBJECT.ConsolidatorException
searchConsolidatorObject(String objectName,int objectType, boolean exactMatch)
public java.util.Vector searchConsolidatorObject(java.lang.String objectName, int objectType, boolean exactMatch) throws ConsolidatorException
Example:
ConsolidatorManager.searchConsolidatorObject("SCRIPT1",Consolidator.SCRIPTS);
objectName
- Object Name.objectType
- Object Type.
Acceptable values are Consolidator.RESOURCES_OBJECT,Consolidator.SCRIPTS_OBJECT,Consolidator.SEQUENCES_OBJECT,Consolidator.PUBLICATIONITEM_OBJECT,Consolidator.PUBLICATION_OBJECT.exactMatch
- A flag indicating whether this search is for an exact matching or containing the specified name for specified object type.
if true, it will return an exact match in the returning vector object; if false, it will return names that contain the specified name for specified object type.ConsolidatorException
searchConsolidatorObject(String objectName,int objectType)
public java.util.Vector searchConsolidatorObject(java.lang.String db_inst, java.lang.String objectName, int objectType) throws ConsolidatorException
ConsolidatorException
public java.util.Vector searchConsolidatorObject(java.lang.String db_inst, java.lang.String objectName, int objectType, boolean exactMatch) throws ConsolidatorException
ConsolidatorException
public void setMessagingMetadata(java.lang.String networkProviderId, java.lang.String metadata) throws ConsolidatorException
networkProviderId
- Network provider ID.
Valid values are
"SMS"
"HTTP"
"RAPI"
"WOR_IAS"
"WOR_SMTP"metadata
- Meta data string.
SMS example: "FROM=user@company.com&SERVER=smtp.company.com"ConsolidatorException
public void setMobilePrivileges(java.lang.String dba_schema, java.lang.String dba_pass, int type) throws ConsolidatorException
if C$MOBILE_PRIVILEGES PLSQL package does not exist in dba_schema, it will be created. If the desired type of privileges is Consolidator.DBA, then C$MOBILE_PRIVILEGES.GRANT_MOBILE_DBA_PRIVILEGES is called otherwise, if Consolidator.OPER is desired, C$MOBILE_PRIVILEGES.GRANT_MOBILE_OPER_PRIVILEGES is called.
GRANT_MOBILE_DBA_PRIVILEGES grants almost DBA like privileges that are required for publish/subscribe functions of the mobile server. However, GRANT_MOBILE_OPER_PRIVILEGES gives only the privileges needed to run mobile server without any schema modifications. It gives dml and select access to the publication items base objects as well as to the version,log and error queue tables.
Note that once the C$MOBILE_PRIVILEGES package is created, the mobile server privileges could be administered from sql without the need to call this api
dba_schema
- - will create C$MOBILE_PRIVILEGES pkg in the schemadba_pass
- type
- - either Consolidator.DBA or Consolidator.OPERConsolidatorException
setMobilePrivileges(String jdbc_url,String dba_schema,String dba_pass,int type)
public void setMobilePrivileges(java.lang.String jdbc_url, java.lang.String dba_schema, java.lang.String dba_pass, int type) throws ConsolidatorException
setMobilePrivileges
but can be used both for app databases and MAIN
database by specifying the appropriate JDBC url. If the MAIN database JDBC url
is specified, the call is equivalent to the older setMobilePrivileges mentioned
above.jdbc_url
- - A string specifying the JDBC url of the database to be usedConsolidatorException
public void setPrimaryMessagingAddress(java.lang.String clientid, java.lang.String deviceType, java.lang.String networkProviderId, java.lang.String address) throws ConsolidatorException
clientid
- client iddeviceType
- - Device type , partial, e.g. WIN32, WINCE, LINUXnetworkProviderId
- Network provider ID.
Valid values are
"SMS"
"HTTP"
"RAPI"
"WOR_IAS"
"WOR_SMTP"address
- Address string (phone number, URL etc)ConsolidatorException
public void setPubApplyDuringSync(java.lang.String name, boolean tf) throws ConsolidatorException
Example:
consolidatorManager.setPubApplyDuringSync ( "MY_PUB", true )
name
- Publication nametf
- boolean, if true, publication IN queue is processed during sync.ConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri )
public void setPubItemColOption(java.lang.String pubItem, java.lang.String column, int nullType, java.lang.String defaultValue) throws ConsolidatorException
public void setPubItemColOption(java.lang.String pubItem, java.lang.String column, int nullType, java.lang.String defaultValue, boolean skipValidation) throws ConsolidatorException
Example:
consolidatorManager.setPubItemColOption("PUB_ITEM_A","DATE_COL",Consolidator.NOT_NULL,"SYSDATE");
pubItem
- A character string specifying publication item namecolumn
- A character string specifying column name
If column is null, the settings will affect all the columns of the pubItem
nullType
- An integer specifying nullability type. Possible types are
Consolidator.NULLABLE
Consolidator.NOT_NULL
Consolidator.RESET_COL_OPTIONS
This will remove all current options for the column(s)
defaultValue
- A character string specifying a valid SQL default value for the column,
a null indicates the default value for the column is NULL.skipValidation
- Allows creation of a client-db specific constraint which may not
be valid in Oracle dbConsolidatorException
public void setPublicationDeviceType(java.lang.String name, int device_types_flg) throws ConsolidatorException
Example:
SetPublicationDeviceType ( "MY_PUB", Consolidator.DEV_FLG_WCE | Consolidator.DEV_FLG_WIN32 )
name
- Publication namedevice_types_flg
- int Specifies which device type(s) or platforms the publication supportsConsolidatorException
createPublication(String name, int client_storage_type, String client_name_template, String enforce_ri, int device_types_flg )
public void setPublicationDeviceType(java.lang.String name, long device_types_flg) throws ConsolidatorException
name
- Publication namedevice_types_flg
- long Specifies which device type(s) or platforms the publication supportsConsolidatorException
( String name, int device_types_flg )
public void setSqlScriptWeight(java.lang.String publication, java.lang.String scrName, int scrWeight) throws ConsolidatorException
publication
- publication namescrName
- script namescrWeight
- int script order of execution ( scripts are executed in ascending order of the weight )ConsolidatorException
public void setSubscriptionParameter(java.lang.String publication, java.lang.String clientid, java.lang.String param_name, java.lang.String param_value) throws ConsolidatorException
Example:
consolidatorManager.setSubscriptionParameter("T_SAMPLE1", "DAVIDL", "COMP", "'P'");
publication
- The name of the publication to which the client subscribes.clientid
- The Consolidator client name.param_name
- The subscription parameter name.param_value
- The subscription parameter value.ConsolidatorException
getSubscriptionParameters(String publication, String clientid)
public java.lang.String setSyncRuleParams(int ruleType, java.util.Hashtable params) throws ConsolidatorException
============== -- RULE_MAX_DB_REC Setting sync immediately if database contains more than modified records (Passing pub name, record numbers) -- Getting sync immediately if database contains more than modified records( passing pub name return RULE PROPS OBJECT with NREC or NULL) props: NREC -- RULE_MAX_PI_REC Setting immediately if out queue contains more than modified records(Passing pub item name, record numbers) -- Getting immediately if out queue contains more than modified records(Passing pub item name return RULE PROPS OBJECT with NREC or NULL) props: NREC For Platform rules: ============ EVENTS: -- RULE_HIGH_BANDWIDTH Setting sync immediately when network bandwidth greater than x bits/sec (Passing platform FLAG, network bandwidth) -- Getting sync immediately when network bandwidth greater than x bits/sec (Passing platform name return RULE PROPS OBJECT w NET or NULL) props: NET -- RULE_LOW_PWR Setting sync immediately when battery level drop to x percentage (Passing platform name, battery level) -- Getting sync immediately when battery level drop to x percentage (Passing platform name return return RULE PROPS OBJECT w BAT or NULL) props: BAT -- RULE_AC_PWR Setting sync immediately when AC power is detected (passing platform name) -- Getting sync immediately when AC power is detected (passing platform name return RULE PROPS OBJECT w AC or NULL) props: AC CONDITIONS: -- RULE_MIN_PWR Setting only sync if battery level equal to or greater than X %( Passing Platform name, battery level) -- Getting only sync if battery level equal to or greater than X %( Passing Platform name return RULE PROPS OBJECT w BAT or NULL) props: BAT Setting network priority rules -- RULE_NET_PRIORITY (Passing Platform, vector of RULE PROPS objects) -- Getting network priority rules (passing platform, return vector of RULE PROPS objects) props: PRIO SPEED PING AUTODIAL _________________________________ Setting network parameters -- NET_CONFIG Setting parameters (passing Platform, vector of RULE PROPS objects) -- Getting network parameters (passing Platform, return vector of RULE PROPS objects) props: NAME,PROXY
ruleType
- rule defined in oracle.lite.sync.Rules constantsparams
- Hashtable containing properties key-value pairsConsolidatorException
public void setTemplateItemMetadata(Consolidator.TemplateItemMetadata md) throws ConsolidatorException
Example:
consolidatorManager.templateItemMetadata md = consolidatorManager.getTemplateItemMetadata("T_SAMPLE1","P_SAMPLE1"); md.isUpdatable = false; // changes item to non-updatable mode consolidatorManager.setTemplateItemMetadata(md);
md
- A TemplateItemMetadata objectConsolidatorException
getTemplateItemMetadata(String publication, String publication_item)
public void shrinkSharedMap(java.lang.String publication, java.lang.String item) throws ConsolidatorException
publication
- publication nameitem
- publication item nameConsolidatorException
public void shrinkSharedMaps() throws ConsolidatorException
ConsolidatorException
public void unloadJavaClass(java.lang.String className) throws ConsolidatorException
className
- class name w/o extension fully qualifiedcan
- throw ConsolidatorException with error code
ConsErrorMessages.OBJECT_EXISTSConsolidatorException
public void unRegisterOSEPlugin(Consolidator.OSEPluginProps plProps, boolean ignoreMissing) throws ConsolidatorException
plProps
- properties required for plug-in registrationignoreMissing
- if true, will throw ConsolidatorException
when the plug-in is not registered in the repositoryConsolidatorException
public void unRegisterPlatform(java.lang.String platform) throws ConsolidatorException
platform
- String a name of a registered client platformConsolidatorException
registerPlatform(String platform, int[] crids, String[] client_libs, boolean isGlobalMetaSupported)
public void updateClientDbName(java.lang.String publicationName, java.lang.String dbName) throws ConsolidatorException
Example:
ConsolidatorManager.updateClientDbName("S11U1","Newdbname");
publicationName
- Publication Name.dbName
- New client database name.ConsolidatorException
public void ValidateStoreName(java.lang.String store, int client_storage_type) throws ConsolidatorException
store
- Store nameclient_storage_type
- Client storage typeConsolidatorException
- Checks if base table name of publication item is valid for provided client type