|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.db.BizDocStore
public class BizDocStore
Operations on documents in the database.
Field Summary | |
---|---|
static int |
U_D
|
static int |
U_DS
|
static int |
U_DSR
|
static int |
U_DST
|
Constructor Summary | |
---|---|
BizDocStore()
|
Method Summary | |
---|---|
static boolean |
acceptDocument(java.lang.String rec_id,
java.lang.String doc_id,
boolean err)
For internal use only |
static int |
archiveDocuments(java.sql.Timestamp thresh)
For internal use only |
static boolean |
changeRepeatByOne(BizDocEnvelope doc)
Change the repeat number on a document. |
static boolean |
changeRepeatByOne(java.lang.String doc_id,
int repeatNum)
Change the repeat number on a document. |
static boolean |
changeRepeatByOneForResubmission(BizDocEnvelope doc)
Change the repeat number on a document. |
static boolean |
changeRepeatByOneForResubmission(java.lang.String doc_id,
int repeatNum)
Change the repeat number on a document. |
static boolean |
changeStatus(BizDocEnvelope doc,
java.lang.String sys,
java.lang.String usr,
java.lang.String dataType)
Change the status on a document. |
static boolean |
changeStatus(java.lang.String doc_id,
java.lang.String sys,
java.lang.String usr)
Change the status on a document. |
static boolean |
changeStatus(java.lang.String doc_id,
java.lang.String sys,
java.lang.String usr,
java.lang.String dbSource)
|
static int |
checkUnique(int which,
java.lang.String internalId,
java.lang.String natId,
java.lang.String senderId,
java.lang.String otherId)
Check for uniqueness of documents. |
static int |
deleteDocuments(java.lang.String docId,
java.lang.String sysStatus,
java.lang.String userStatus,
java.lang.String docTypeId,
boolean delRelated)
For internal use only |
static int |
deleteDocuments(java.sql.Timestamp thresh)
For internal use only |
static int |
deleteEvents(EventQuery query)
Delete events from the table. |
static boolean |
documentExists(java.lang.String docId)
Check for documents with the supplied webMethods doc ID |
static java.util.ArrayList |
executeQuery(java.lang.String query,
java.sql.Timestamp min_ts,
java.sql.Timestamp max_ts)
|
static com.wm.data.IData |
getComments(java.lang.String docId)
For internal use only |
static java.util.Vector |
getDocInfo(java.lang.String documentId,
java.lang.String senderId,
java.lang.String receiverId)
Get webMethods internal document id, system status, user status of documents using the document id, sender id and receiver id Depending on the uniqueness criteria, there is a chance that this could return more than one row. |
static BizDocEnvelope |
getDocument(java.lang.String docId,
boolean content)
Get a BizDoc by ID. |
static BizDocEnvelope |
getDocument(java.lang.String docId,
boolean content,
java.lang.String archive)
|
static BizDocEnvelope |
getDocument(java.lang.String docId,
boolean content,
java.lang.String[] includeParts,
java.lang.String[] excludeParts)
Get a BizDoc by ID. |
static BizDocEnvelope |
getDocument(java.lang.String docId,
boolean content,
java.lang.String[] includeParts,
java.lang.String[] excludeParts,
java.lang.String archive)
|
static java.util.ArrayList |
getDocuments(java.sql.Timestamp min_ts,
java.sql.Timestamp max_ts)
|
static java.util.ArrayList |
getEarlier(java.lang.String query,
java.sql.Timestamp ts)
|
static java.util.ArrayList |
getEarlierDocuments(java.sql.Timestamp ts)
|
static com.wm.data.IData |
getRelatedDocuments(java.lang.String docId,
java.lang.String groupId)
Look for related documents. |
static com.wm.data.IData |
getRelatedDocuments(java.lang.String docId,
java.lang.String groupId,
java.lang.String ConvId)
Deprecated. as of Trading Networks 6.0, replaced by two-arg getRelatedDocuments |
static java.util.HashSet<java.lang.String> |
getRoutingStatusList()
|
static java.lang.String[] |
getUserStatus()
For internal use only |
static boolean |
insertContentPart(java.lang.String docId,
BizDocContentPart part)
Insert a BizDocContentPart into the datastore. |
static boolean |
insertDocument(BizDocEnvelope doc,
boolean content)
Insert a BizDoc as new into the datastore. |
static void |
loadRoutingStatus(java.sql.Connection conn,
java.lang.String status)
|
static void |
loadRoutingStatus(java.lang.String status)
|
static void |
loadUserStatus()
|
static void |
main(java.lang.String[] args)
|
static java.lang.String[] |
pollDocuments(java.lang.String rec_id)
For internal use only |
static java.lang.String[] |
pollDocumentsForUser(java.lang.String username)
|
static com.wm.data.IData |
queryDocuments(SimpleDocQuery query,
boolean agg,
int pageSize,
int maxRowCount,
int queryTimeout,
int threshold)
Get all BizDocs that satisfy a certain set of criteria. |
static com.wm.data.IData |
queryDocuments(SimpleDocQuery query,
boolean agg,
int pageSize,
int maxRowCount,
int queryTimeout,
int threshold,
java.lang.String queryId)
Get all BizDocs that satisfy a certain set of criteria. |
static com.wm.data.IData |
queryEvents(EventQuery query,
int pageSize,
int maxRowCount,
int queryTimeout,
int threshold)
Get event information. |
static com.wm.data.IData |
queryEvents(EventQuery query,
int pageSize,
int maxRowCount,
int queryTimeout,
int threshold,
java.lang.String queryId)
Get event information. |
static boolean |
queueForDelivery(BizDocEnvelope doc)
For internal use only |
static boolean |
queueForPolling(BizDocEnvelope doc)
For internal use only |
static boolean |
relateDocuments(BizDocEnvelope from,
BizDocEnvelope to,
java.lang.String rel)
Related the two specified documents. |
static boolean |
relateDocuments(java.lang.String from,
java.lang.String to,
java.lang.String rel)
Related the two specified documents. |
static boolean |
replaceContentPart(java.lang.String docId,
BizDocContentPart part)
Replace a BizDocContentPart into the datastore. |
static BizDocContentPart |
retrieveContentPart(java.lang.String docId,
java.lang.String partName)
Retrieve a BizDocContentPart from the datastore. |
static int |
updateAttributes(BizDocEnvelope doc)
Updates user attributes in the database on the supplied bizdoc. |
static java.util.ArrayList |
updateBizDocTimestamp(java.lang.String[] docs,
java.lang.String[] crt_ts,
java.lang.String[] last_mod)
|
static boolean |
updateComments(java.lang.String doc_id,
java.lang.String comment)
Update the comments on a document. |
static boolean |
updateConversationID(BizDocEnvelope doc)
Update Conversation ID in the database on the supplied bizdoc. |
static void |
updateSystemAttributes(BizDocEnvelope doc)
Updates system attributes in the database on the supplied bizdoc. |
static java.util.ArrayList |
updateTimestamp(java.lang.String[] ids,
java.lang.String[] last_mod,
java.lang.String query)
|
static java.util.ArrayList |
updateTimestamp(java.lang.String[] ids,
java.lang.String[] crt_time,
java.lang.String[] last_mod,
java.lang.String query)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int U_D
public static final int U_DS
public static final int U_DSR
public static final int U_DST
Constructor Detail |
---|
public BizDocStore()
Method Detail |
---|
public static int archiveDocuments(java.sql.Timestamp thresh) throws DatastoreException
DatastoreException
public static int deleteDocuments(java.sql.Timestamp thresh) throws DatastoreException
DatastoreException
public static int deleteDocuments(java.lang.String docId, java.lang.String sysStatus, java.lang.String userStatus, java.lang.String docTypeId, boolean delRelated) throws DatastoreException
DatastoreException
public static boolean queueForPolling(BizDocEnvelope doc) throws DatastoreException
DatastoreException
public static boolean queueForDelivery(BizDocEnvelope doc) throws DatastoreException
DatastoreException
public static java.lang.String[] pollDocuments(java.lang.String rec_id) throws DatastoreException
DatastoreException
public static java.lang.String[] pollDocumentsForUser(java.lang.String username) throws DatastoreException
DatastoreException
public static boolean acceptDocument(java.lang.String rec_id, java.lang.String doc_id, boolean err) throws DatastoreException
DatastoreException
public static com.wm.data.IData queryEvents(EventQuery query, int pageSize, int maxRowCount, int queryTimeout, int threshold) throws DatastoreException, java.io.IOException, com.wm.app.repo.RepositoryException, com.wm.app.b2b.server.ServiceException
query
- the query to satisfypageSize
- the number of rows per page; specify -1 to disable pagingmaxRowCount
- the maximum number of rows to return -- excess
rows will be silently dropped. 0 means unlimitedqueryTimeout
- the maximum number of seconds to wait for the
query to return. 0 means unlimited.threshold
- the number of rows to be stored in the session object;
this allows you to override the tn.query.threshold parameter in properties.cnf.
In a cluster, this should be disabled by setting it to -1. If the value is
set to -1, its value from tn.query.threshold parameter in properties.cnf
DatastoreException
- if a database
exception prevents getting the query results
java.io.IOException
com.wm.app.repo.RepositoryException
com.wm.app.b2b.server.ServiceException
public static com.wm.data.IData queryEvents(EventQuery query, int pageSize, int maxRowCount, int queryTimeout, int threshold, java.lang.String queryId) throws DatastoreException, java.io.IOException, com.wm.app.repo.RepositoryException, com.wm.app.b2b.server.ServiceException
query
- the query to satisfypageSize
- the number of rows per page; specify -1 to disable pagingmaxRowCount
- the maximum number of rows to return -- excess
rows will be silently dropped. 0 means unlimitedqueryTimeout
- the maximum number of seconds to wait for the
query to return. 0 means unlimited.threshold
- the number of rows to be stored in the session object;
this allows you to override the tn.query.threshold parameter in properties.cnf.
In a cluster, this should be disabled by setting it to -1. If the value is
set to -1, its value from tn.query.threshold parameter in properties.cnfqueryId
- specifies the unique identifier to store the paged query results.
This is applicable only when the results are paged. If this value is not set,
an Id is automatically generated
DatastoreException
- if a database
exception prevents getting the query results
java.io.IOException
com.wm.app.repo.RepositoryException
com.wm.app.b2b.server.ServiceException
public static int deleteEvents(EventQuery query) throws DatastoreException
query
- all events satisfying this query will be deleted
DatastoreException
- if a database
exception prevents the deletepublic static com.wm.data.IData queryDocuments(SimpleDocQuery query, boolean agg, int pageSize, int maxRowCount, int queryTimeout, int threshold) throws DatastoreException, java.io.IOException, com.wm.app.repo.RepositoryException, com.wm.app.b2b.server.ServiceException
query
- the query to satisfyagg
- should the aggregating version of the query be used?pageSize
- the number of rows per page; specify -1 to disable pagingmaxRowCount
- the maximum number of rows to return -- excess
rows will be silently dropped. 0 means unlimitedqueryTimeout
- the maximum number of seconds to wait for the
query to return. 0 means unlimited.threshold
- the number of rows to be stored in the session object;
this allows you to override the tn.query.threshold parameter in properties.cnf.
In a cluster, this should be disabled by setting it to -1. If the value is
set to -1, its value from tn.query.threshold parameter in properties.cnf
DatastoreException
- if a database
exception prevents getting the query results
java.io.IOException
com.wm.app.repo.RepositoryException
com.wm.app.b2b.server.ServiceException
public static com.wm.data.IData queryDocuments(SimpleDocQuery query, boolean agg, int pageSize, int maxRowCount, int queryTimeout, int threshold, java.lang.String queryId) throws DatastoreException, java.io.IOException, com.wm.app.repo.RepositoryException, com.wm.app.b2b.server.ServiceException
query
- the query to satisfyagg
- should the aggregating version of the query be used?pageSize
- the number of rows per page; specify -1 to disable pagingmaxRowCount
- the maximum number of rows to return -- excess
rows will be silently dropped. 0 means unlimitedqueryTimeout
- the maximum number of seconds to wait for the
query to return. 0 means unlimited.threshold
- the number of rows to be stored in the session object;
this allows you to override the tn.query.threshold parameter in properties.cnf.
In a cluster, this should be disabled by setting it to -1. If the value is
set to -1, its value from tn.query.threshold parameter in properties.cnfqueryId
- specifies the unique identifier to store the paged query results.
This is applicable only when the results are paged. If this value is not set,
an Id is automatically generated
DatastoreException
- if a database
exception prevents getting the query results
java.io.IOException
com.wm.app.repo.RepositoryException
com.wm.app.b2b.server.ServiceException
public static BizDocEnvelope getDocument(java.lang.String docId, boolean content) throws DatastoreException
docId
- the ID of the document to fetchcontent
- should the content be returned as well?
DatastoreException
- if a database
exception prevents fetching the requested documentpublic static BizDocEnvelope getDocument(java.lang.String docId, boolean content, java.lang.String archive) throws DatastoreException
DatastoreException
public static BizDocEnvelope getDocument(java.lang.String docId, boolean content, java.lang.String[] includeParts, java.lang.String[] excludeParts) throws DatastoreException
docId
- the ID of the document to fetchcontent
- should the content be returned as well?includeParts
- the names of the content parts to be retrived (may be null)excludeParts
- the names of the content parts not to be retrived (may be null)
DatastoreException
- if a database
exception prevents fetching the requested documentpublic static BizDocEnvelope getDocument(java.lang.String docId, boolean content, java.lang.String[] includeParts, java.lang.String[] excludeParts, java.lang.String archive) throws DatastoreException
DatastoreException
public static int checkUnique(int which, java.lang.String internalId, java.lang.String natId, java.lang.String senderId, java.lang.String otherId) throws DatastoreException
which
- type of uniqueness check to performinternalId
- the internal ID of the bizdocnatId
- the native ID to look forsenderId
- the sender ID to look for (may be null)otherId
- the "other" ID to look for (i.e. receiver ID or
type ID; may be null)
DatastoreException
- if some exception
prevents the operationpublic static boolean documentExists(java.lang.String docId) throws DatastoreException
docId
- the document ID to look for
DatastoreException
- if some exception
prevents the operationpublic static java.lang.String[] getUserStatus() throws DatastoreException
DatastoreException
public static com.wm.data.IData getComments(java.lang.String docId) throws DatastoreException
DatastoreException
public static boolean insertDocument(BizDocEnvelope doc, boolean content) throws DatastoreException
doc
- the document to insertcontent
- insert the content of this document into the
database if it's available
DatastoreException
- if a database
exception prevents inserting the supplied documentpublic static boolean insertContentPart(java.lang.String docId, BizDocContentPart part) throws DatastoreException
docId
- the internal ID for this content partpart
- the content part to insert
DatastoreException
- if a database
exception prevents inserting the supplied documentpublic static boolean replaceContentPart(java.lang.String docId, BizDocContentPart part) throws DatastoreException
docId
- the internal ID for this content partpart
- the content part to insert
DatastoreException
- if a database
exception prevents inserting the supplied documentpublic static BizDocContentPart retrieveContentPart(java.lang.String docId, java.lang.String partName) throws DatastoreException
docId
- the internal ID for this content partpartName
- the name of content part to retrive
DatastoreException
- if a database
exception prevents retrieving the content partpublic static int updateAttributes(BizDocEnvelope doc) throws DatastoreException
doc
- the document in question
DatastoreException
- if a database
exception prevents inserting the supplied documentpublic static void updateSystemAttributes(BizDocEnvelope doc) throws java.lang.Exception
doc
- the document to be updated
DatastoreException
- if a database
exception prevents inserting the supplied document
java.lang.Exception
public static boolean updateConversationID(BizDocEnvelope doc) throws DatastoreException
doc
- the document in question
DatastoreException
- if a database
exception prevents inserting the supplied documentpublic static boolean updateComments(java.lang.String doc_id, java.lang.String comment) throws DatastoreException
doc_id
- the ID of the document to update commentscomment
- the comment to be updated
DatastoreException
- if some exception
prevents altering the requested documentpublic static boolean changeStatus(BizDocEnvelope doc, java.lang.String sys, java.lang.String usr, java.lang.String dataType) throws DatastoreException
doc
- the document to change status onsys_local
- the new system status (null if no change)usr_local
- the new user status (null if no change)
DatastoreException
- if some exception
prevents altering the requested documentpublic static boolean changeRepeatByOne(BizDocEnvelope doc) throws DatastoreException
doc
- the document to change repeat number on
DatastoreException
- if some exception
prevents altering the requested documentpublic static boolean changeRepeatByOneForResubmission(BizDocEnvelope doc) throws DatastoreException
doc
- the document to change repeat number on
DatastoreException
- if some exception
prevents altering the requested documentpublic static boolean changeStatus(java.lang.String doc_id, java.lang.String sys, java.lang.String usr) throws DatastoreException
doc_id
- the ID of the document to change status onsys
- the new system status (null if no change)usr
- the new user status (null if no change)
DatastoreException
- if some exception
prevents altering the requested documentpublic static boolean changeStatus(java.lang.String doc_id, java.lang.String sys, java.lang.String usr, java.lang.String dbSource) throws DatastoreException
DatastoreException
public static boolean changeRepeatByOne(java.lang.String doc_id, int repeatNum) throws DatastoreException
doc_id
- the ID of the document to change status onrepeatNum
- the current value of repeat number
DatastoreException
- if some exception
prevents altering the requested documentpublic static boolean changeRepeatByOneForResubmission(java.lang.String doc_id, int repeatNum) throws DatastoreException
doc_id
- the ID of the document to change status onrepeatNum
- the current value of repeat number
DatastoreException
- if some exception
prevents altering the requested documentpublic static java.util.Vector getDocInfo(java.lang.String documentId, java.lang.String senderId, java.lang.String receiverId) throws DatastoreException
documentId
- the document idsenderId
- the sender's internal idreceiverId
- the receiver's internal id
DatastoreException
public static boolean relateDocuments(BizDocEnvelope from, BizDocEnvelope to, java.lang.String rel) throws DatastoreException
from
- the "from" documentto
- the "to" documentrel
- the nature of the relationship
DatastoreException
public static boolean relateDocuments(java.lang.String from, java.lang.String to, java.lang.String rel) throws DatastoreException
from
- the "from" documentto
- the "to" documentrel
- the nature of the relationship
DatastoreException
public static com.wm.data.IData getRelatedDocuments(java.lang.String docId, java.lang.String groupId) throws DatastoreException
docId
- the doc ID to search ongroupId
- the group ID to search on (optional)
DatastoreException
public static com.wm.data.IData getRelatedDocuments(java.lang.String docId, java.lang.String groupId, java.lang.String ConvId) throws DatastoreException
DatastoreException
getRelatedDocuments(String docId, String groupId)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static void loadRoutingStatus(java.lang.String status)
public static void loadRoutingStatus(java.sql.Connection conn, java.lang.String status)
public static java.util.HashSet<java.lang.String> getRoutingStatusList()
public static void loadUserStatus()
public static java.util.ArrayList updateBizDocTimestamp(java.lang.String[] docs, java.lang.String[] crt_ts, java.lang.String[] last_mod) throws DatastoreException
DatastoreException
public static java.util.ArrayList executeQuery(java.lang.String query, java.sql.Timestamp min_ts, java.sql.Timestamp max_ts)
public static java.util.ArrayList getEarlierDocuments(java.sql.Timestamp ts) throws DatastoreException
DatastoreException
public static java.util.ArrayList getEarlier(java.lang.String query, java.sql.Timestamp ts)
public static java.util.ArrayList updateTimestamp(java.lang.String[] ids, java.lang.String[] crt_time, java.lang.String[] last_mod, java.lang.String query) throws DatastoreException
DatastoreException
public static java.util.ArrayList updateTimestamp(java.lang.String[] ids, java.lang.String[] last_mod, java.lang.String query) throws DatastoreException
DatastoreException
public static java.util.ArrayList getDocuments(java.sql.Timestamp min_ts, java.sql.Timestamp max_ts) throws DatastoreException
DatastoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |