com.wm.app.tn.db
Class BDTypeAttributeQuery

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

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

Author:
rkant Attribute-based queries on the shared datastore.

Field Summary
static java.lang.String ATTRIBUTEDESCRIPTION
           
static java.lang.String ATTRIBUTEID
           
static java.lang.String ATTRIBUTENAME
           
static java.lang.String ATTRIBUTETYPE
           
static java.lang.String BD_ATTR__DEF_TBL
           
static java.lang.String BD_TBL
           
static java.lang.String BD_TYPEID
           
static java.lang.String BD_TYPENAME
           
static java.lang.String BDT_ATTR_TBL
           
static java.lang.String BIZDOCATTRIBUTEDEF_TBL
           
static java.lang.String BIZDOCTYPEATTRIBUTE_TBL
           
static java.lang.String BIZDOCTYPEDEF_TBL
           
static java.lang.String DELETED
           
static java.lang.String INCL_UNKNOWN
           
static java.lang.String PERSIST
           
static java.lang.String RELATEDDOCTYPEID
           
static java.lang.String RELATEDDOCTYPENAME
           
static java.lang.String TIMESTAMP
           
 
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
BDTypeAttributeQuery()
          Default query is "select * from BizDocAttributeDef".
 
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
 java.lang.Object getAttributeDescription()
           
 java.lang.Object getAttributeID()
           
 java.lang.Object getAttributeName()
           
 java.lang.Object getAttributeType()
           
 com.wm.data.IDataCursor getCursor()
           
 java.lang.Object getDeleted()
           
 com.wm.data.IDataHashCursor getHashCursor()
          For internal use only
 com.wm.data.IDataIndexCursor getIndexCursor()
          For internal use only
 java.lang.Object getPersist()
           
 java.lang.Object getRelatedDocTypeID()
           
 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.String[] getVisibleColumns()
          For internal use only
 boolean isAttributeDescriptionVisible()
           
 boolean isAttributeIDVisible()
           
 boolean isAttributeNameVisible()
           
 boolean isAttributeTypeVisible()
           
 boolean isDeletedVisible()
           
 boolean isPersistVisible()
           
 boolean isSortAscending()
          Deprecated. As of TN 7.0, replaced by setSortColumns(String[][])
 boolean isTimestampVisible()
           
 void preSql()
          For internal use only
 void setAttributeDescription(java.lang.String s)
          Search for attribute from attribute description.
 void setAttributeDescription(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on attribute description.
 void setAttributeDescriptionVisible(boolean b)
           
 void setAttributeID(java.lang.String s)
          Search for attribute by attribute ID.
 void setAttributeID(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on attribute ID.
 void setAttributeIDVisible(boolean b)
           
 void setAttributeName(java.lang.String s)
          Search for attribute from type name.
 void setAttributeName(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on type name.
 void setAttributeNameVisible(boolean b)
           
 void setAttributeType(java.lang.String s)
          Search for attribute from attribute type.
 void setAttributeType(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on attribute type.
 void setAttributeTypeVisible(boolean b)
           
 void setDeleted(java.lang.String s)
          Search for attribute based on deleted status.
 void setDeleted(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on deleted status.
 void setDeletedVisible(boolean b)
           
 void setPersist(java.lang.String s)
          Search for attribute based on Persist status.
 void setPersist(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on deleted status.
 void setPersistVisible(boolean b)
           
 void setRelatedDocTypeID(java.lang.String s)
          Search for attribute based on related doc type ID.
 void setRelatedDocTypeID(java.lang.String[][] opVal, boolean isORquery)
          Search for attribute using multiple criteria on related doc type ID(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)
           
 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

ATTRIBUTENAME

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

ATTRIBUTEID

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

ATTRIBUTEDESCRIPTION

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

ATTRIBUTETYPE

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

DELETED

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

PERSIST

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

TIMESTAMP

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

BIZDOCATTRIBUTEDEF_TBL

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

BD_ATTR__DEF_TBL

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

RELATEDDOCTYPEID

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

BD_TYPEID

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

RELATEDDOCTYPENAME

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

BD_TYPENAME

public static final java.lang.String BD_TYPENAME
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

INCL_UNKNOWN

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

BDTypeAttributeQuery

public BDTypeAttributeQuery()
Default query is "select * from BizDocAttributeDef".

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


setAttributeID

public void setAttributeID(java.lang.String s)
Search for attribute by attribute ID.


setAttributeID

public void setAttributeID(java.lang.String[][] opVal,
                           boolean isORquery)
Search for attribute using multiple criteria on attribute 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 bdadef.AttributeID = 'AAA' OR bd.TypeID <> 'BBB' else if isORquery = false WHERE bdadef.AttributeID = 'AAA' AND bd.TypeID <> 'BBB' )

setAttributeName

public void setAttributeName(java.lang.String s)
Search for attribute from type name.


setAttributeName

public void setAttributeName(java.lang.String[][] opVal,
                             boolean isORquery)
Search for attribute 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 bdadef.AttributeName = 'AAA' OR bdadef.AttributeName <> 'BBB' else if isORquery = false WHERE bdadef.AttributeName = 'AAA' AND bdadef.AttributeName <> 'BBB' )

setAttributeDescription

public void setAttributeDescription(java.lang.String s)
Search for attribute from attribute description.


setAttributeDescription

public void setAttributeDescription(java.lang.String[][] opVal,
                                    boolean isORquery)
Search for attribute using multiple criteria on attribute 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 bdadef.AttributeDescription = 'AAA' OR bdadef.AttributeDescription <> 'BBB' else if isORquery = false WHERE bdadef.AttributeDescription = 'AAA' AND bdadef.AttributeDescription <> 'BBB' )

setAttributeType

public void setAttributeType(java.lang.String s)
Search for attribute from attribute type.


setAttributeType

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

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 bdadef.AttributeType = 'AAA' OR bdadef.AttributeType <> 'BBB' else if isORquery = false WHERE bdadef.AttributeType = 'AAA' AND bdadef.AttributeType <> 'BBB' )

setDeleted

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


setDeleted

public void setDeleted(java.lang.String[][] opVal,
                       boolean isORquery)
Search for attribute using multiple criteria on deleted status.

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 bdadef.Deleted = 'AAA' OR bdadef.Deleted <> 'BBB' else if isORquery = false WHERE bdadef.Deleted = 'AAA' AND bdadef.Deleted <> 'BBB' )

setPersist

public void setPersist(java.lang.String s)
Search for attribute based on Persist status.


setPersist

public void setPersist(java.lang.String[][] opVal,
                       boolean isORquery)
Search for attribute using multiple criteria on deleted status.

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 bdadef.Persist = 'AAA' OR bdadef.Persist <> 'BBB' else if isORquery = false WHERE bdadef.Persist = 'AAA' AND bdadef.Persist <> '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)

setRelatedDocTypeID

public void setRelatedDocTypeID(java.lang.String s)
Search for attribute based on related doc type ID.


setRelatedDocTypeID

public void setRelatedDocTypeID(java.lang.String[][] opVal,
                                boolean isORquery)
Search for attribute using multiple criteria on related doc type ID(s). User can set related type id multiple times, which may not the case with other criteria for document attribute 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 bd.TypeID = 'AAA' OR bd.TypeID <> 'BBB' else if isORquery = false WHERE bd.TypeID = 'AAA' AND bd.TypeID <> 'BBB' )

getAttributeID

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

getAttributeName

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

getAttributeDescription

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

getAttributeType

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

getDeleted

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

getPersist

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

getRelatedDocTypeID

public java.lang.Object getRelatedDocTypeID()
Returns:
the related Doc Type ID 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)

setAttributeNameVisible

public void setAttributeNameVisible(boolean b)

setAttributeIDVisible

public void setAttributeIDVisible(boolean b)

setAttributeDescriptionVisible

public void setAttributeDescriptionVisible(boolean b)

setAttributeTypeVisible

public void setAttributeTypeVisible(boolean b)

setTimestampVisible

public void setTimestampVisible(boolean b)

setDeletedVisible

public void setDeletedVisible(boolean b)

setPersistVisible

public void setPersistVisible(boolean b)

isAttributeNameVisible

public boolean isAttributeNameVisible()

isAttributeIDVisible

public boolean isAttributeIDVisible()

isAttributeDescriptionVisible

public boolean isAttributeDescriptionVisible()

isAttributeTypeVisible

public boolean isAttributeTypeVisible()

isDeletedVisible

public boolean isDeletedVisible()

isPersistVisible

public boolean isPersistVisible()

isTimestampVisible

public boolean isTimestampVisible()

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, ATTRIBUTEID, 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"}, {ATTRIBUTEID, "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