org.tigris.scarab.util.word
Class IssueSearch

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.BaseIssue
          extended byorg.tigris.scarab.om.Issue
              extended byorg.tigris.scarab.util.word.IssueSearch
All Implemented Interfaces:
org.apache.torque.om.Persistent, org.apache.fulcrum.intake.Retrievable, java.io.Serializable

public class IssueSearch
extends Issue

A utility class to build up and carry out a search for similar issues. It subclasses Issue for functionality, it is not a more specific type of Issue.

Version:
$Id: IssueSearch.java 10407 2006-12-28 15:38:01Z ronvoe122 $
Author:
John McNally
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.tigris.scarab.om.Issue
Issue.FederatedId
 
Field Summary
static java.lang.String ANY_KEY
           
static java.lang.String ASC
           
static java.lang.String CREATED_BY_KEY
           
static java.lang.String DESC
           
 
Fields inherited from class org.tigris.scarab.om.Issue
GET_ACTIVITY, GET_ALL_DEPENDENCY_TYPES, GET_ALL_USERS_TO_EMAIL, GET_ASSOCIATED_USERS, GET_ATTRIBUTE_VALUES_MAP, GET_ATTRVALUE, GET_ATTRVALUES, GET_CHILDREN, GET_CLOSED_DATE, GET_COMMENTS, GET_CREATED_BY, GET_CREATED_DATE, GET_DEFAULT_TEXT, GET_DEFAULT_TEXT_ATTRIBUTEVALUE, GET_DEPENDENCY, GET_EXISTING_ATTACHMENTS, GET_HISTORY_LIMIT, GET_INITIAL_ACTIVITYSET, GET_LAST_TRANSACTION, GET_MODIFIED_BY, GET_MODIFIED_DATE, GET_MODULE_ATTRVALUES_MAP, GET_NULL_END_DATE, GET_ORPHAN_ATTRIBUTEVALUES_LIST, GET_PARENTS, GET_TEMPLATE_TYPES, GET_TEMPLATEINFO, GET_TRANSACTIONS, GET_URLS, GET_USER_ATTRIBUTEVALUE, GET_USER_ATTRIBUTEVALUES
 
Fields inherited from class org.tigris.scarab.om.BaseIssue
collActivitys, collAttachments, collAttributeValues, collDependsRelatedByObservedId, collDependsRelatedByObserverId, collIssueTemplateInfos, collIssueVotes
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
(package private) IssueSearch(Issue issue, ScarabUser searcher)
           
(package private) IssueSearch(MITList mitList, ScarabUser searcher)
           
(package private) IssueSearch(Module module, IssueType issueType, ScarabUser searcher)
           
 
Method Summary
 void addUserCriteria(java.lang.String userId, java.lang.String searchCriteria)
          Describe addUserSearch method here.
 void close()
          Releases any managed resources associated with this search (e.g. database connections, etc.).
protected  void finalize()
          Called by the garbage collector to release any database resources associated with this query.
 java.lang.Integer getALL_TEXT()
           
 org.apache.commons.collections.map.LinkedMap getAllAvailableAttributeValuesMap()
          returns the list of attribute values for all attributes in the current module.
 java.util.List getAllOptionTree(Attribute attribute)
           
 java.lang.String getCommentQuery()
          Get the value of commentQuery.
 org.apache.commons.collections.map.LinkedMap getCommonAttributeValuesMap()
          returns the list of attribute values for all attributes in the current module and defined for all currently searched issueTypes.
 java.util.List getCommonOptionTree(Attribute attribute)
           
 int getIssueCount()
           
 int getIssueCount(boolean mergePartialQueries)
           
 java.util.List getIssueListAttributeColumns()
           
 java.util.List getLeafRModuleOptions(Attribute attribute)
           
 java.util.Locale getLocale()
           
 java.lang.String getMaxDate()
          Get the value of maxDate.
 java.lang.String getMaxId()
          Get the value of maxId.
 java.lang.String getMinDate()
          Get the value of minDate.
 java.lang.String getMinId()
          Get the value of minId.
 int getMinVotes()
          Get the value of minVotes.
(package private)  Module getModule(java.lang.Integer id)
          Used by QueryResult to avoid multiple db hits in the event caching is not being used application-wide.
 java.util.List getOptionAttributeValues()
          Returns OptionAttributes which have been marked for Quick search.
 IteratorWithSize getQueryResults()
          Get a List of Issues that match the criteria given by this SearchIssue's searchWords and the quick search attribute values.
 IteratorWithSize getQueryResults(boolean mergePartialQueries)
          Get a List of Issues that match the criteria given by this SearchIssue's searchWords and the quick search attribute values.
 java.util.List getQuickSearchOptionAttributeValues()
          Returns OptionAttributes which have been marked for Quick search.
 java.util.List getQuickSearchTextAttributeValues()
           
(package private)  RModuleIssueType getRModuleIssueType(java.lang.Integer moduleId, java.lang.Integer issueTypeId)
          Used by QueryResult to avoid multiple db hits in the event caching is not being used application-wide.
 java.lang.String getSearchWords()
          Get the words for which to search.
 java.lang.Integer getSortAttributeId()
          Get the value of sortAttributeId.
 java.lang.String getSortInternalAttribute()
           
 java.lang.String getSortPolarity()
          Whether to do SQL sorting in DESC or ASC order (the default being the latter).
 java.lang.Integer getStateChangeAttributeId()
          Get the value of stateChangeAttributeId.
 java.lang.String getStateChangeFromDate()
          Get the value of stateChangeFromDate.
 java.lang.Integer getStateChangeFromOptionId()
          Get the value of stateChangeFromOptionId.
 java.lang.String getStateChangeToDate()
          Get the value of stateChangeToDate.
 java.lang.Integer getStateChangeToOptionId()
          Get the value of stateChangeToOptionId.
 java.util.List getTextAttributeValues()
           
 java.lang.Integer[] getTextScope()
          Get the value of textScope.
 java.util.List getUserAttributes()
           
 java.util.List getUserIdList()
           
 boolean isOperable()
           
 boolean isXMITSearch()
           
 java.util.Date parseDate(java.lang.String dateString, boolean addTwentyFourHours)
          Attempts to parse a atring as a date, first using the locale-sepcific short date format, and then the ISO standard "yyyy-mm-dd".
 void setCommentQuery(java.lang.String v)
          Set the value of commentQuery.
 void setIsOperable(boolean state)
          The issue can be flagged as inoperable.
 void setIssueListAttributeColumns(java.util.List rmuas)
          List of attributes to show with each issue.
 void setLocale(java.util.Locale newLocale)
           
 void setLocalizationTool(ScarabLocalizationTool l10nTool)
          Allows setting the L10N tool for using when is needed to know the user's locale (example, when parsing date parameters)
 void setMaxDate(java.lang.String newMaxDate)
          Set the value of maxDate.
 void setMaxId(java.lang.String v)
          Set the value of maxId.
 void setMinDate(java.lang.String newMinDate)
          Set the value of minDate.
 void setMinId(java.lang.String v)
          Set the value of minId.
 void setMinVotes(int v)
          Set the value of minVotes.
 void setQuery(java.lang.String query)
          The query currently being launched, so we can access any value from it.
 void setSearchWords(java.lang.String v)
          Set the words for which to search.
 void setSortAttributeId(java.lang.Integer v)
          Set the value of sortAttributeId.
 void setSortInternalAttribute(java.lang.String internal)
           
 void setSortPolarity(java.lang.String v)
          Set the value of sortPolarity.
 void setStateChangeAttributeId(java.lang.Integer v)
          Set the value of stateChangeAttributeId.
 void setStateChangeFromDate(java.lang.String fromDate)
          Set the value of stateChangeFromDate.
 void setStateChangeFromOptionId(java.lang.Integer v)
          Set the value of stateChangeFromOptionId.
 void setStateChangeToDate(java.lang.String toDate)
          Set the value of stateChangeToDate.
 void setStateChangeToOptionId(java.lang.Integer v)
          Set the value of stateChangeToOptionId.
 void setTextScope(java.lang.Integer[] v)
          Set the value of textScope.
 
Methods inherited from class org.tigris.scarab.om.Issue
addActivity, addAttributeValue, addComment, addComment, addFile, addUrl, addUrl, addVote, assignUser, attachActivitySet, attachActivitySet, attachActivitySet, changeUserAttributeValue, containsMinimumAttributeValues, deleteIssue, deleteItem, deleteUser, doAddDependency, doChangeDependencyType, doChangeUrlDescription, doChangeUrlUrl, doCheckAttributeValueWorkflow, doCheckAttributeValueWorkflow, doCheckInitialAttributeValueWorkflow, doDeleteDependency, doDeleteUrl, doEditComment, doRemoveAttachment, doSaveFileAttachments, doSaveFileAttachments, getActivitiesWithNullEndDate, getActivity, getActivity, getActivity, getActivitySet, getActivitySet, getActivitySets, getAllAttributeValuesMap, getAllDependencies, getAllDependencyTypes, getAllUsersToEmail, getAssociatedUsers, getAttachments, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getAttributeValuesMap, getBlockedIssues, getBlockingIssues, getChildren, getChildren, getComments, getCommentsCount, getCommentsLimit, getCreatedBy, getCreatedDate, getDefaultText, getDefaultTextAttributeValue, getDependantIssues, getDependency, getDependency, getDuplicateIssues, getEligibleUsers, getExistingAttachments, getFederatedId, getHistoryLimit, getInitialActivitySet, getIssueById, getIssueById, getIssueNewId, getLastActivitySet, getMatchingAttributeValuesList, getMatchingAttributeValuesList, getModifiedBy, getModifiedDate, getModule, getModuleAttributeValuesMap, getModuleAttributeValuesMap, getNewInstance, getNonMatchingAttributeValuesList, getNonMatchingAttributeValuesList, getParents, getParents, getPrerequisiteIssues, getRelatedIssues, getRModuleIssueType, getScarabModule, getTemplateInfo, getUniqueId, getUnsetRequiredAttrs, getUrls, getUserAttributeValue, getUserAttributeValues, getUsersToEmail, hasEditPermission, hasEnterPermission, hasMovePermission, isAttributeValue, isBlocked, isBlockedBy, isBlocking, isBlockingAnyIssue, isBlockingConditionTrue, isCommentsLong, isCreatingUser, isHistoryLong, isHistoryLong, isTemplate, move, parseIssueList, removeFile, save, setAttributeValues, setFederatedId, setInitialAttributeValues, setModule, setScarabModule, setUniqueId, toString
 
Methods inherited from class org.tigris.scarab.om.BaseIssue
addAttachment, addDependRelatedByObservedId, addDependRelatedByObserverId, addIssueTemplateInfo, addIssueVote, copy, copyInto, getActivitys, getActivitys, getActivitys, getActivitys, getActivitySetRelatedByCreatedTransId, getActivitySetRelatedByCreatedTransId, getActivitySetRelatedByLastTransId, getActivitySetRelatedByLastTransId, getActivitysJoinActivitySet, getActivitysJoinAttachment, getActivitysJoinAttribute, getActivitysJoinAttributeOptionRelatedByNewOptionId, getActivitysJoinAttributeOptionRelatedByOldOptionId, getActivitysJoinDepend, getActivitysJoinIssue, getActivitysJoinScarabUserImplRelatedByNewUserId, getActivitysJoinScarabUserImplRelatedByOldUserId, getAttachments, getAttachments, getAttachments, getAttachmentsJoinAttachmentType, getAttachmentsJoinIssue, getAttachmentsJoinScarabUserImplRelatedByCreatedBy, getAttachmentsJoinScarabUserImplRelatedByModifiedBy, getAttributeValues, getAttributeValues, getAttributeValues, getAttributeValues, getAttributeValuesJoinAttribute, getAttributeValuesJoinAttributeOption, getAttributeValuesJoinIssue, getAttributeValuesJoinScarabUserImpl, getByName, getByPeerName, getByPosition, getCreatedTransId, getDeleted, getDependsRelatedByObservedId, getDependsRelatedByObservedId, getDependsRelatedByObservedId, getDependsRelatedByObservedId, getDependsRelatedByObservedIdJoinDependType, getDependsRelatedByObservedIdJoinIssueRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverIdJoinDependType, getDependsRelatedByObserverIdJoinIssueRelatedByObservedId, getFieldNames, getIdCount, getIdDomain, getIdPrefix, getIssueId, getIssueTemplateInfos, getIssueTemplateInfos, getIssueTemplateInfos, getIssueTemplateInfos, getIssueTemplateInfosJoinIssue, getIssueTemplateInfosJoinScope, getIssueType, getIssueType, getIssueVotes, getIssueVotes, getIssueVotes, getIssueVotes, getIssueVotesJoinIssue, getIssueVotesJoinScarabUserImpl, getLastTransId, getModule, getModuleId, getMoved, getPeer, getPrimaryKey, getQueryKey, getTypeId, initActivitys, initAttachments, initAttributeValues, initDependsRelatedByObservedId, initDependsRelatedByObserverId, initIssueTemplateInfos, initIssueVotes, isCacheOnSave, save, save, setActivitySetRelatedByCreatedTransId, setActivitySetRelatedByCreatedTransIdKey, setActivitySetRelatedByLastTransId, setActivitySetRelatedByLastTransIdKey, setCreatedTransId, setDeleted, setIdCount, setIdDomain, setIdPrefix, setIssueId, setIssueType, setIssueTypeKey, setLastTransId, setModuleId, setModuleKey, setMoved, setPrimaryKey, setPrimaryKey, setQueryKey, setTypeId
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Field Detail

ASC

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

DESC

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

CREATED_BY_KEY

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

ANY_KEY

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

IssueSearch

IssueSearch(Issue issue,
            ScarabUser searcher)
      throws java.lang.Exception

IssueSearch

IssueSearch(Module module,
            IssueType issueType,
            ScarabUser searcher)
      throws java.lang.Exception

IssueSearch

IssueSearch(MITList mitList,
            ScarabUser searcher)
      throws java.lang.Exception
Method Detail

isOperable

public boolean isOperable()

setIsOperable

public void setIsOperable(boolean state)
The issue can be flagged as inoperable. This can happen when a syntax check on the search criteria fails (e.g. invalid syntax on Date patterns)

Parameters:
state -

getLocale

public java.util.Locale getLocale()

setLocale

public void setLocale(java.util.Locale newLocale)

isXMITSearch

public boolean isXMITSearch()

setIssueListAttributeColumns

public void setIssueListAttributeColumns(java.util.List rmuas)
List of attributes to show with each issue.

Parameters:
rmuas - a List of RModuleUserAttribute objects

getIssueListAttributeColumns

public java.util.List getIssueListAttributeColumns()

getUserIdList

public java.util.List getUserIdList()

getCommonAttributeValuesMap

public org.apache.commons.collections.map.LinkedMap getCommonAttributeValuesMap()
                                                                         throws java.lang.Exception
returns the list of attribute values for all attributes in the current module and defined for all currently searched issueTypes.

Returns:
Throws:
java.lang.Exception

getAllAvailableAttributeValuesMap

public org.apache.commons.collections.map.LinkedMap getAllAvailableAttributeValuesMap()
                                                                               throws java.lang.Exception
returns the list of attribute values for all attributes in the current module.

Returns:
Throws:
java.lang.Exception

getUserAttributes

public java.util.List getUserAttributes()
                                 throws java.lang.Exception
Returns:
The list of attributes of type "user" for the module(s) to search in.
Throws:
java.lang.Exception

getLeafRModuleOptions

public java.util.List getLeafRModuleOptions(Attribute attribute)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getCommonOptionTree

public java.util.List getCommonOptionTree(Attribute attribute)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getAllOptionTree

public java.util.List getAllOptionTree(Attribute attribute)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getSearchWords

public java.lang.String getSearchWords()
Get the words for which to search.

Returns:
Value of #searchWords.

setSearchWords

public void setSearchWords(java.lang.String v)
Set the words for which to search.

Parameters:
v - Value to assign to #searchWords.

getCommentQuery

public java.lang.String getCommentQuery()
Get the value of commentQuery.

Returns:
value of commentQuery.

setCommentQuery

public void setCommentQuery(java.lang.String v)
Set the value of commentQuery.

Parameters:
v - Value to assign to commentQuery.

getTextScope

public java.lang.Integer[] getTextScope()
                                 throws java.lang.Exception
Get the value of textScope. if the scope is not set then all text attributes are returned. if there are no relevant text attributes null will be returned.

Returns:
value of textScope.
Throws:
java.lang.Exception

setTextScope

public void setTextScope(java.lang.Integer[] v)
                  throws java.lang.Exception
Set the value of textScope.

Parameters:
v - Value to assign to textScope.
Throws:
java.lang.Exception

getMinId

public java.lang.String getMinId()
Get the value of minId.

Returns:
value of minId.

setMinId

public void setMinId(java.lang.String v)
Set the value of minId.

Parameters:
v - Value to assign to minId.

getMaxId

public java.lang.String getMaxId()
Get the value of maxId.

Returns:
value of maxId.

setMaxId

public void setMaxId(java.lang.String v)
Set the value of maxId.

Parameters:
v - Value to assign to maxId.

getMinDate

public java.lang.String getMinDate()
Get the value of minDate.

Returns:
value of minDate.

setMinDate

public void setMinDate(java.lang.String newMinDate)
Set the value of minDate.

Parameters:
newMinDate - Value to assign to minDate.

getMaxDate

public java.lang.String getMaxDate()
Get the value of maxDate.

Returns:
value of maxDate.

setMaxDate

public void setMaxDate(java.lang.String newMaxDate)
Set the value of maxDate.

Parameters:
newMaxDate - Value to assign to maxDate.

getMinVotes

public int getMinVotes()
Get the value of minVotes.

Returns:
value of minVotes.

setMinVotes

public void setMinVotes(int v)
Set the value of minVotes.

Parameters:
v - Value to assign to minVotes.

getStateChangeAttributeId

public java.lang.Integer getStateChangeAttributeId()
Get the value of stateChangeAttributeId.

Returns:
value of stateChangeAttributeId.

setStateChangeAttributeId

public void setStateChangeAttributeId(java.lang.Integer v)
Set the value of stateChangeAttributeId.

Parameters:
v - Value to assign to stateChangeAttributeId.

getStateChangeFromOptionId

public java.lang.Integer getStateChangeFromOptionId()
Get the value of stateChangeFromOptionId.

Returns:
value of stateChangeFromOptionId.

setStateChangeFromOptionId

public void setStateChangeFromOptionId(java.lang.Integer v)
Set the value of stateChangeFromOptionId.

Parameters:
v - Value to assign to stateChangeFromOptionId.

getStateChangeToOptionId

public java.lang.Integer getStateChangeToOptionId()
Get the value of stateChangeToOptionId.

Returns:
value of stateChangeToOptionId.

setStateChangeToOptionId

public void setStateChangeToOptionId(java.lang.Integer v)
Set the value of stateChangeToOptionId.

Parameters:
v - Value to assign to stateChangeToOptionId.

getStateChangeFromDate

public java.lang.String getStateChangeFromDate()
Get the value of stateChangeFromDate.

Returns:
value of stateChangeFromDate.

setStateChangeFromDate

public void setStateChangeFromDate(java.lang.String fromDate)
Set the value of stateChangeFromDate.

Parameters:
fromDate - Value to assign to stateChangeFromDate.

getStateChangeToDate

public java.lang.String getStateChangeToDate()
Get the value of stateChangeToDate.

Returns:
value of stateChangeToDate.

setStateChangeToDate

public void setStateChangeToDate(java.lang.String toDate)
Set the value of stateChangeToDate.

Parameters:
toDate - Value to assign to stateChangeToDate.

getSortAttributeId

public java.lang.Integer getSortAttributeId()
Get the value of sortAttributeId.

Returns:
value of SortAttributeId.

setSortAttributeId

public void setSortAttributeId(java.lang.Integer v)
Set the value of sortAttributeId.

Parameters:
v - Value to assign to sortAttributeId.

setSortInternalAttribute

public void setSortInternalAttribute(java.lang.String internal)

getSortInternalAttribute

public java.lang.String getSortInternalAttribute()

getSortPolarity

public java.lang.String getSortPolarity()
Whether to do SQL sorting in DESC or ASC order (the default being the latter).

Returns:
value of sortPolarity.

setSortPolarity

public void setSortPolarity(java.lang.String v)
Set the value of sortPolarity.

Parameters:
v - Value to assign to sortPolarity.

addUserCriteria

public void addUserCriteria(java.lang.String userId,
                            java.lang.String searchCriteria)
Describe addUserSearch method here.

Parameters:
userId - a String represention of the PrimaryKey
searchCriteria - a String either a String representation of an Attribute PrimaryKey, or the Strings "created_by" "any"

getALL_TEXT

public java.lang.Integer getALL_TEXT()

getQuickSearchTextAttributeValues

public java.util.List getQuickSearchTextAttributeValues()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

getTextAttributeValues

public java.util.List getTextAttributeValues()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getQuickSearchOptionAttributeValues

public java.util.List getQuickSearchOptionAttributeValues()
                                                   throws java.lang.Exception
Returns OptionAttributes which have been marked for Quick search.

Returns:
a List value
Throws:
java.lang.Exception - if an error occurs

getOptionAttributeValues

public java.util.List getOptionAttributeValues()
                                        throws java.lang.Exception
Returns OptionAttributes which have been marked for Quick search.

Returns:
a List value
Throws:
java.lang.Exception - if an error occurs

parseDate

public java.util.Date parseDate(java.lang.String dateString,
                                boolean addTwentyFourHours)
                         throws java.text.ParseException
Attempts to parse a atring as a date, first using the locale-sepcific short date format, and then the ISO standard "yyyy-mm-dd". If it sees a ':' character in the date string then the string will be interpreted as a date and time. Throws a ParseException if the String does not contain a suitable format.

Parameters:
dateString - a String value
addTwentyFourHours - if no time is given in the date string and this flag is true, then 24 hours - 1 msec will be added to the date.
Returns:
a Date value
Throws:
java.text.ParseException

getQueryResults

public IteratorWithSize getQueryResults()
                                 throws ComplexQueryException,
                                        java.lang.Exception
Get a List of Issues that match the criteria given by this SearchIssue's searchWords and the quick search attribute values. Perform a logical AND on partial queries (in text searches)

Returns:
a List value
Throws:
java.lang.Exception - if an error occurs
ComplexQueryException

getQueryResults

public IteratorWithSize getQueryResults(boolean mergePartialQueries)
                                 throws ComplexQueryException,
                                        java.lang.Exception
Get a List of Issues that match the criteria given by this SearchIssue's searchWords and the quick search attribute values. if (mergePartialQueries==true) perform a logical OR on partial queries, otherwise perform a logical AND on partial queries.

Returns:
a List value
Throws:
java.lang.Exception - if an error occurs
ComplexQueryException

getIssueCount

public int getIssueCount()
                  throws ComplexQueryException,
                         java.lang.Exception
Throws:
ComplexQueryException
java.lang.Exception

getIssueCount

public int getIssueCount(boolean mergePartialQueries)
                  throws ComplexQueryException,
                         java.lang.Exception
Throws:
ComplexQueryException
java.lang.Exception

getModule

Module getModule(java.lang.Integer id)
           throws org.apache.torque.TorqueException
Used by QueryResult to avoid multiple db hits in the event caching is not being used application-wide. It is used if the IssueList.vm template is printing the module names next to each issue id. As this IssueSearch object is short-lived, use of a simple Map based cache is ok, need to re-examine if the lifespan is increased.

Parameters:
id - an Integer value
Returns:
a Module value
Throws:
org.apache.torque.TorqueException - if an error occurs

getRModuleIssueType

RModuleIssueType getRModuleIssueType(java.lang.Integer moduleId,
                                     java.lang.Integer issueTypeId)
                               throws org.apache.torque.TorqueException
Used by QueryResult to avoid multiple db hits in the event caching is not being used application-wide. It is used if the IssueList.vm template is printing the issue type names next to each issue id. As this IssueSearch object is short-lived, use of a simple Map based cache is ok, need to re-examine if the lifespan is increased.

Parameters:
moduleId - an Integer value
issueTypeId - an Integer value
Returns:
a RModuleIssueType value
Throws:
org.apache.torque.TorqueException - if an error occurs

finalize

protected void finalize()
                 throws java.lang.Throwable
Called by the garbage collector to release any database resources associated with this query.

Throws:
java.lang.Throwable
See Also:
close()

close

public void close()
Releases any managed resources associated with this search (e.g. database connections, etc.).


setQuery

public void setQuery(java.lang.String query)
              throws java.lang.Exception
The query currently being launched, so we can access any value from it.

Parameters:
query -
Throws:
java.lang.Exception

setLocalizationTool

public void setLocalizationTool(ScarabLocalizationTool l10nTool)
Allows setting the L10N tool for using when is needed to know the user's locale (example, when parsing date parameters)

Parameters:
l10nTool -


Copyright © 2000-2004 Tigris.org. All Rights Reserved.