com.wm.app.tn.db
Class BDTypeQuery

java.lang.Object
  extended by com.wm.app.tn.db.Query
      extended by com.wm.app.tn.db.BDTypeQuery
All Implemented Interfaces:
com.wm.data.IData

public class BDTypeQuery
extends Query
implements com.wm.data.IData

Author:
rkant Queries on document types in the TN database.

Field Summary
static java.lang.String ATTRIBUTEID
           
static java.lang.String BD_TBL
           
static java.lang.String BDT_ATTR_TBL
           
static java.lang.String BIZDOCTYPEATTRIBUTE_TBL
           
static java.lang.String BIZDOCTYPEDEF_TBL
           
static java.lang.String COL_TYPE
           
static java.lang.String DELETED
           
static java.lang.String EXTRACTEDATTRIBUTE
           
static java.lang.String INCL_UNKNOWN
           
static java.lang.String TIMESTAMP
           
static java.lang.String TYPE
           
static java.lang.String TYPEDESCRIPTION
           
static java.lang.String TYPEID
           
static java.lang.String TYPENAME
           
static java.lang.String VIEW_PERMISSION
           
 
Fields inherited from class com.wm.app.tn.db.Query
ACTLOG_EVENT_TIMESTAMP, BDTYPE_LASTMODIFIED, DJOB_TIME_CREATED, DJOB_TIME_UPDATED, DOC_TIMESTAMP, FN_AVG, FN_MAX, FN_MIN, FN_SUM, INVITE_ALERTDATE, INVITE_EXPIRYDATE, INVITE_LASTSENT, OP_COMP_AFTER, OP_COMP_BEFORE, OP_COMP_CONTAINS, OP_COMP_EQ, OP_COMP_GEQ, OP_COMP_GT, OP_COMP_INCLUDES, OP_COMP_LEQ, OP_COMP_LT, OP_COMP_NEQ, OP_MATCHES, OP_TEST_NOT_NULL, OP_TEST_NULL, TIME_ANYTIME, TIME_CUSTOM, TIME_LAST_7_DAYS, TIME_LAST_MONTH, TIME_LAST_WEEK, TIME_NEXT_10_MIN, TIME_NEXT_12_HOURS, TIME_NEXT_24_HOURS, TIME_NEXT_3_HOURS, TIME_NEXT_30_MIN, TIME_NEXT_6_HOURS, TIME_NEXT_HOUR, TIME_THIS_MONTH, TIME_THIS_WEEK, TIME_TODAY, TIME_TOMORROW, TIME_YESTERDAY, TIME_YTD, TPA_CREATED, TPA_LASTMODIFIED, TYPE_DATE, TYPE_NUMBER, TYPE_STRING
 
Constructor Summary
BDTypeQuery()
          Default query is "select * from documenttypedef".
 
Method Summary
 void clearSortColumn()
          Deprecated. As of TN 7.0, replaced by clearSortColumns()
 void clearSortColumns()
          Clear sort order
static com.wm.data.IData create()
          For internal use only
 com.wm.data.IDataCursor getCursor()
           
 java.lang.Object getDeleted()
           
 java.lang.Object getExtractedAttributes()
           
 com.wm.data.IDataHashCursor getHashCursor()
          For internal use only
 com.wm.data.IDataIndexCursor getIndexCursor()
          For internal use only
 com.wm.data.IDataSharedCursor getSharedCursor()
           
 java.lang.String getSortColumn()
          Deprecated. As of TN 7.0, replaced by getSortColumns()
 java.lang.String[][] getSortColumns()
          returns sort columns (may be null)
 java.sql.Timestamp[] getTimeInterval()
           
 int getTimeIntervalType()
           
 com.wm.data.IDataTreeCursor getTreeCursor()
          For internal use only
 java.lang.Object getType()
           
 java.lang.Object getTypeDescription()
           
 java.lang.Object getTypeID()
           
 java.lang.Object getTypeName()
           
 java.lang.String[] getVisibleColumns()
          For internal use only
 boolean isDeletedVisible()
           
 boolean isSortAscending()
          Deprecated. As of TN 7.0, replaced by setSortColumns(String[][])
 boolean isTimestampVisible()
           
 boolean isTypeDescriptionVisible()
           
 boolean isTypeIDVisible()
           
 boolean isTypeNameVisible()
           
 boolean isTypeVisible()
           
 void preSql()
          For internal use only
 void setDeleted(java.lang.String s)
          Search for doctype based on deleted.
 void setDeleted(java.lang.String[][] opVal, boolean isORquery)
          Search for doctype using multiple criteria on type description.
 void setDeletedVisible(boolean b)
           
 void setExtractedAttributes(java.lang.String s)
          Search for doctype from extracted attributes.
 void setExtractedAttributes(java.lang.String[][] opVal, boolean isORquery)
          Search for doctype using multiple criteria on ExtractedAttribute(s).
 void setSortColumn(java.lang.String col, boolean asc)
          Deprecated. As of TN 7.0, replaced by setSortColumns(String[][])
 void setSortColumns(java.lang.String[][] columnOrder)
          Set the sort columns and order for this query.
 void setTimeInterval(int which)
          Set the time interval based on simple codes.
 void setTimeInterval(java.sql.Timestamp since, java.sql.Timestamp until)
          Set the time interval based on absolute times.
 void setTimestampVisible(boolean b)
           
 void setType(java.lang.String s)
          Search for doctype from Type (Unknown - 0, XML - 1, FF - 2, EDI - 3).
 void setType(java.lang.String[][] opVal, boolean isORquery)
          Search for doctype using multiple criteria on type.
 void setTypeDescription(java.lang.String s)
          Search for doctype from type description.
 void setTypeDescription(java.lang.String[][] opVal, boolean isORquery)
          Search for doctype using multiple criteria on type description.
 void setTypeDescriptionVisible(boolean b)
           
 void setTypeID(java.lang.String s)
          Search for doctype from type name.
 void setTypeID(java.lang.String[][] opVal, boolean isORquery)
          Search for doctype using multiple criteria on type ID.
 void setTypeIDVisible(boolean b)
           
 void setTypeName(java.lang.String s)
          Search for doctype from type name.
 void setTypeName(java.lang.String[][] opVal, boolean isORquery)
          Search for doctype using multiple criteria on type name.
 void setTypeNameVisible(boolean b)
           
 void setTypeVisible(boolean b)
           
 java.lang.String toSql()
           
 java.lang.String toSql(boolean agg)
          For internal use only
 
Methods inherited from class com.wm.app.tn.db.Query
beginningOfDay, escapeString, evaluate, evaluateListConditions, generateClause, generateClause, generateColumnList, generateComp, generateComp, generateComp, generateListComp, generateNumericClause, generateStringLit, generateStringLit, generateTimeInterval, generateTimestampLiteral, getIntervalType, getUnique, isDateTime, isDistinct, isIndentSql, isOR, searchMWS, setAlertTimeInterval, setDistinct, setExpiryTimeInterval, setIndentSql, setLastReminderInterval, setOR, setViewPermission
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPEID

public static final java.lang.String TYPEID
See Also:
Constant Field Values

TYPENAME

public static final java.lang.String TYPENAME
See Also:
Constant Field Values

TYPEDESCRIPTION

public static final java.lang.String TYPEDESCRIPTION
See Also:
Constant Field Values

DELETED

public static final java.lang.String DELETED
See Also:
Constant Field Values

TIMESTAMP

public static final java.lang.String TIMESTAMP
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

COL_TYPE

public static final java.lang.String COL_TYPE
See Also:
Constant Field Values

EXTRACTEDATTRIBUTE

public static final java.lang.String EXTRACTEDATTRIBUTE
See Also:
Constant Field Values

BIZDOCTYPEDEF_TBL

public static final java.lang.String BIZDOCTYPEDEF_TBL
See Also:
Constant Field Values

BD_TBL

public static final java.lang.String BD_TBL
See Also:
Constant Field Values

BIZDOCTYPEATTRIBUTE_TBL

public static final java.lang.String BIZDOCTYPEATTRIBUTE_TBL
See Also:
Constant Field Values

BDT_ATTR_TBL

public static final java.lang.String BDT_ATTR_TBL
See Also:
Constant Field Values

ATTRIBUTEID

public static final java.lang.String ATTRIBUTEID
See Also:
Constant Field Values

VIEW_PERMISSION

public static java.lang.String VIEW_PERMISSION

INCL_UNKNOWN

public static final java.lang.String INCL_UNKNOWN
See Also:
Constant Field Values
Constructor Detail

BDTypeQuery

public BDTypeQuery()
Default query is "select * from documenttypedef".

Method Detail

getCursor

public com.wm.data.IDataCursor getCursor()
Specified by:
getCursor in interface com.wm.data.IData

getSharedCursor

public com.wm.data.IDataSharedCursor getSharedCursor()
Specified by:
getSharedCursor in interface com.wm.data.IData

getIndexCursor

public com.wm.data.IDataIndexCursor getIndexCursor()
For internal use only

Specified by:
getIndexCursor in interface com.wm.data.IData

getTreeCursor

public com.wm.data.IDataTreeCursor getTreeCursor()
For internal use only

Specified by:
getTreeCursor in interface com.wm.data.IData

getHashCursor

public com.wm.data.IDataHashCursor getHashCursor()
For internal use only

Specified by:
getHashCursor in interface com.wm.data.IData

create

public static com.wm.data.IData create()
For internal use only


setTypeID

public void setTypeID(java.lang.String s)
Search for doctype from type name.


setTypeID

public void setTypeID(java.lang.String[][] opVal,
                      boolean isORquery)
Search for doctype using multiple criteria on type ID.

Parameters:
opValue - is the operator and value pair in String[][] (e.g. {{Query.OP_COMP_EQ, "AAA"}, {Query.OP_COMP_NEQ, "BBB"}})
isORquery - should OR operator be used between these criteria (e.g. if isORquery = true, the where clause will be WHERE bd.TypeID = 'AAA' OR bd.TypeID <> 'BBB' else if isORquery = false WHERE bd.TypeID = 'AAA' AND bd.TypeID <> 'BBB' )

setType

public void setType(java.lang.String s)
Search for doctype from Type (Unknown - 0, XML - 1, FF - 2, EDI - 3).


setType

public void setType(java.lang.String[][] opVal,
                    boolean isORquery)
Search for doctype using multiple criteria on type.

Parameters:
opValue - is the operator and value pair in String[][] (e.g. {{Query.OP_COMP_EQ, "0}, {Query.OP_COMP_NEQ, "0"}})
isORquery - should OR operator be used between these criteria (e.g. if isORquery = true, the where clause will be WHERE bd.BDType = '0' OR bd.BDType <> '1' else if isORquery = false WHERE bd.BDType = '0' AND bd.BDType <> '1' )

setTypeName

public void setTypeName(java.lang.String s)
Search for doctype from type name.


setTypeName

public void setTypeName(java.lang.String[][] opVal,
                        boolean isORquery)
Search for doctype using multiple criteria on type name.

Parameters:
opValue - is the operator and value pair in String[][] (e.g. {{Query.OP_COMP_EQ, "AAA"}, {Query.OP_COMP_NEQ, "BBB"}})
isORquery - should OR operator be used between these criteria (e.g. if isORquery = true, the where clause will be WHERE bd.TypeName = 'AAA' OR bd.TypeName <> 'BBB' else if isORquery = false WHERE bd.TypeName = 'AAA' AND bd.TypeName <> 'BBB' )

setTypeDescription

public void setTypeDescription(java.lang.String s)
Search for doctype from type description.


setTypeDescription

public void setTypeDescription(java.lang.String[][] opVal,
                               boolean isORquery)
Search for doctype using multiple criteria on type description.

Parameters:
opValue - is the operator and value pair in String[][] (e.g. {{Query.OP_COMP_EQ, "AAA"}, {Query.OP_COMP_NEQ, "BBB"}})
isORquery - should OR operator be used between these criteria (e.g. if isORquery = true, the where clause will be WHERE bd.TypeDescription = 'AAA' OR bd.TypeDescription <> 'BBB' else if isORquery = false WHERE bd.TypeDescription = 'AAA' AND bd.TypeDescription <> 'BBB' )

setDeleted

public void setDeleted(java.lang.String s)
Search for doctype based on deleted.


setDeleted

public void setDeleted(java.lang.String[][] opVal,
                       boolean isORquery)
Search for doctype using multiple criteria on type description.

Parameters:
opValue - is the operator and value pair in String[][] (e.g. {{Query.OP_COMP_EQ, "AAA"}, {Query.OP_COMP_NEQ, "BBB"}})
isORquery - should OR operator be used between these criteria (e.g. if isORquery = true, the where clause will be WHERE bd.TypeDescription = 'AAA' OR bd.TypeDescription <> 'BBB' else if isORquery = false WHERE bd.TypeDescription = 'AAA' AND bd.TypeDescription <> 'BBB' )

setTimeInterval

public void setTimeInterval(int which)
Set the time interval based on simple codes.

Parameters:
which - the interval to use

setTimeInterval

public void setTimeInterval(java.sql.Timestamp since,
                            java.sql.Timestamp until)
Set the time interval based on absolute times.

Overrides:
setTimeInterval in class Query
Parameters:
since - the start of the interval (null means open-ended)
until - the end of the interval (null means open-ended)

setExtractedAttributes

public void setExtractedAttributes(java.lang.String s)
Search for doctype from extracted attributes.


setExtractedAttributes

public void setExtractedAttributes(java.lang.String[][] opVal,
                                   boolean isORquery)
Search for doctype using multiple criteria on ExtractedAttribute(s). User can set extracted attributes multiple times, which may not the case with other criteria for document type search.

Parameters:
opValue - is the operator and value pair in String[][] (e.g. {{Query.OP_COMP_EQ, "AAA"}, {Query.OP_COMP_NEQ, "BBB"}})
isORquery - should OR operator be used between these criteria (e.g. if isORquery = true, the where clause will be WHERE bdta.AttributeID = 'AAA' OR bdta.AttributeID <> 'BBB' else if isORquery = false WHERE bdta.AttributeID = 'AAA' AND bdta.AttributeID <> 'BBB' )

getTypeID

public java.lang.Object getTypeID()
Returns:
the type ID criterion (could be null, String or IData)

getType

public java.lang.Object getType()
Returns:
the type criterion (could be null, String or IData)

getTypeName

public java.lang.Object getTypeName()
Returns:
the type Name criterion (could be null, String or IData)

getTypeDescription

public java.lang.Object getTypeDescription()
Returns:
the type Description criterion (could be null, String or IData)

getDeleted

public java.lang.Object getDeleted()
Returns:
the deleted criterion (could be null, String or IData)

getTimeInterval

public java.sql.Timestamp[] getTimeInterval()
Returns:
the time interval (one or both of the elts. could be null)

getTimeIntervalType

public int getTimeIntervalType()
Returns:
the code for the time interval (could be -1)

getExtractedAttributes

public java.lang.Object getExtractedAttributes()
Returns:
the extracted attribute criterion (could be null, String or IData)

setTimestampVisible

public void setTimestampVisible(boolean b)

setTypeVisible

public void setTypeVisible(boolean b)

setTypeIDVisible

public void setTypeIDVisible(boolean b)

setTypeNameVisible

public void setTypeNameVisible(boolean b)

setTypeDescriptionVisible

public void setTypeDescriptionVisible(boolean b)

setDeletedVisible

public void setDeletedVisible(boolean b)

isTimestampVisible

public boolean isTimestampVisible()

isTypeVisible

public boolean isTypeVisible()

isTypeIDVisible

public boolean isTypeIDVisible()

isTypeNameVisible

public boolean isTypeNameVisible()

isTypeDescriptionVisible

public boolean isTypeDescriptionVisible()

isDeletedVisible

public boolean isDeletedVisible()

setSortColumns

public void setSortColumns(java.lang.String[][] columnOrder)
Set the sort columns and order for this query. Make sure to use one of the constants above: TIMESTAMP, SENDERID, etc. Trying to sort on a column that's not visible will be ignored.

Overrides:
setSortColumns in class Query
Parameters:
columnOrder - takes column names and sort orders (e.g. {{TIMESTAMP, "ASC"}, {SENDERID, "DESC"}} )

getSortColumns

public java.lang.String[][] getSortColumns()
returns sort columns (may be null)


clearSortColumns

public void clearSortColumns()
Clear sort order


setSortColumn

public void setSortColumn(java.lang.String col,
                          boolean asc)
Deprecated. As of TN 7.0, replaced by setSortColumns(String[][])


getSortColumn

public java.lang.String getSortColumn()
Deprecated. As of TN 7.0, replaced by getSortColumns()


isSortAscending

public boolean isSortAscending()
Deprecated. As of TN 7.0, replaced by setSortColumns(String[][])


clearSortColumn

public void clearSortColumn()
Deprecated. As of TN 7.0, replaced by clearSortColumns()


preSql

public void preSql()
For internal use only

Overrides:
preSql in class Query

toSql

public java.lang.String toSql()
Overrides:
toSql in class Query
Returns:
the SQL statement generated by this query

toSql

public java.lang.String toSql(boolean agg)
For internal use only


getVisibleColumns

public java.lang.String[] getVisibleColumns()
For internal use only