|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arunta.base.search.SearchCriteria
public class SearchCriteria
Search criteria for Recording
s.
This search criteria can be used to filter records based on the:
Note that records are always ordered; most recent and highest channel number first.
Constructor Summary | |
---|---|
SearchCriteria()
Creates a search criteria which will limit the result to 1000 records that match the criteria. |
|
SearchCriteria(int recordCnt)
Creates a search criteria that will limit the result to the specified number of records. |
|
SearchCriteria(SearchCriteria other)
Creates a search criteria that is a copy of another. |
Method Summary | |
---|---|
void |
clearFollowOnQuery()
Disables paging. |
java.lang.String |
getAgentName()
|
java.lang.String |
getCallDirection()
|
java.lang.String |
getChannel()
|
java.lang.String |
getCountSQLQuery(boolean backwardCompatible)
Constructs the full SQL SELECT statement that will fetch the actual number of records that match this criteria. |
java.lang.String |
getExtension()
|
java.lang.String |
getFileName()
|
java.lang.String |
getFromDate()
|
java.lang.String |
getFromTime()
|
java.lang.String |
getNoteKeyword()
|
java.lang.String |
getNumber()
|
int |
getRecordCnt()
|
java.lang.String |
getSQLQuery(boolean backwardCompatible)
Constructs the full SQL SELECT statement that represents this criteria. |
java.lang.String |
getSQLWhereClause(boolean backwardCompatible)
Construct the WHERE part of the SQL SELECT statement that represents this criteria. |
java.lang.String |
getTagged()
|
java.lang.String |
getToDate()
|
java.lang.String |
getToTime()
|
boolean |
isAgentNameFilterEnabled()
|
boolean |
isAuthorisedExtensionsFilterEnabled()
|
boolean |
isCallDirectionFilterEnabled()
|
boolean |
isCallDurationFilterEnabled()
|
boolean |
isChannelFilterEnabled()
|
boolean |
isDateFilterEnabled()
|
boolean |
isExtensionFilterEnabled()
|
boolean |
isFileNameFilterEnabled()
|
boolean |
isFollowonQuery()
|
boolean |
isNoteKeywordFilterEnabled()
|
boolean |
isNumberFilterEnabled()
|
boolean |
isTaggedFilterEnabled()
|
boolean |
isTaggedSearch()
|
boolean |
isTimeFilterEnabled()
|
void |
setAgentName(boolean enable,
java.lang.String agentName)
Sets the agent name filer for this criteria. |
void |
setAuthorisedExtensions(boolean enable,
AuthorisedExtensionsSet authorisedExtensions)
Sets the authorised extensions filer for this criteria. |
void |
setCallDirection(boolean enable,
java.lang.String direction)
Sets the call direction filer for this criteria. |
void |
setCallDurationRange(boolean enable,
java.lang.String min,
java.lang.String max)
Sets the call duration filer for this criteria. |
void |
setChannel(boolean enable,
int channel)
Sets the recording channel number filer for this criteria. |
void |
setChannel(boolean enable,
java.lang.String channel)
Sets the recording channel number filer for this criteria. |
void |
setDateRange(java.lang.String day)
Quick way of specifying a To and From Date filter where the to and from dates are the same day. |
void |
setDateTimeRange(boolean useGMT,
boolean enableDate,
java.lang.String fromDateStr,
java.lang.String toDateStr,
boolean enableTime,
java.lang.String fromTimeStr,
java.lang.String toTimeStr)
Sets the date and/or time filer for this criteria. |
void |
setExtension(boolean enable,
java.lang.String extension)
Sets the extension filer for this criteria. |
void |
setFileName(boolean enable,
java.lang.String fileName)
Sets the file name filer for this criteria. |
void |
setFollowOnQuery(java.lang.String startDate,
java.lang.String startTime,
int channel,
boolean backInTime)
Enables paging. |
void |
setNoteKeyword(boolean enable,
java.lang.String noteKeyword)
Sets the notes keyword filer for this criteria. |
void |
setNumber(boolean enable,
java.lang.String phoneNumber)
Sets the phone number filer for this criteria. |
void |
setRecordCnt(int recordCnt)
Sets the maximum number of records that this criteria should return when used in a search. |
void |
setTagged(boolean enable,
java.lang.String val)
Sets the record tag filer for this criteria. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchCriteria()
Note that the criteria will match all records in the database without setting specific filters.
public SearchCriteria(SearchCriteria other)
other
- An instance of a search criteria which will be used to copy.public SearchCriteria(int recordCnt)
Note that the criteria will match all records in the database without setting specific filters.
recordCnt
- The maximum number of records in the search result.Method Detail |
---|
public int getRecordCnt()
public void setRecordCnt(int recordCnt)
recordCnt
- Desired maximum number of records.public void setDateTimeRange(boolean useGMT, boolean enableDate, java.lang.String fromDateStr, java.lang.String toDateStr, boolean enableTime, java.lang.String fromTimeStr, java.lang.String toTimeStr)
It is possible to enable the date filter only, the time filter only, or both. In addition, it is possible to specify the from date/time only, the to date/time only or both. The criteria will match different records based on which filter is enabled and the values of the from and to date and time. Use the following table as a guide when defining this filter:
useGMT
- Set this flag to true
if the date and time and date
parameters are in GMT (well UTC) time and date. Set it to
false
if the time and date parameters are in local time.enableDate
- Set this flag to true
to enable the date filter. Set
it to false
to ignore the from and to date values.fromDateStr
- From date. Must be in the yyyy.MM.dd format or null
if
not used.toDateStr
- To date. Must be in the yyyy.MM.dd format or null
if
not used.enableTime
- Set this flag to true
to enable the time filter. Set
it to false
to ignore the from and to time values.fromTimeStr
- From time. Must be in the HH:mm:ss format or null
if
not used.toTimeStr
- To time. Must be in the HH:mm:ss format or null
if
not used.public void setDateRange(java.lang.String day)
day
- From and To date. Must be in the yyyy.MM.dd format.public java.lang.String getFromTime()
null
.public java.lang.String getToTime()
null
.public java.lang.String getFromDate()
null
.public java.lang.String getToDate()
null
.public boolean isDateFilterEnabled()
true
if the Date filter is enabled.
Otherwise false
.public boolean isTimeFilterEnabled()
true
if the Time filter is enabled.
Otherwise false
.public void setNumber(boolean enable, java.lang.String phoneNumber)
It creates a filter which will match calls which originated from or terminated at a number that is like the specified phone number.
enable
- Set this flag to true
to enable the phone number filter.phoneNumber
- The phone number to use in the filter. Note that if you set this
parameter to 02 for example, the filter will match any number which
has 02 in it at any position.public java.lang.String getNumber()
null
.public boolean isNumberFilterEnabled()
true
if the phone number filter is enabled.
Otherwise false
.public void setExtension(boolean enable, java.lang.String extension)
It creates a filter which will match calls which originated from or terminated at an extension that is exactly equal to the specified extension.
enable
- Set this flag to true
to enable the extension filter.extension
- The extension to use in the filter.public java.lang.String getExtension()
null
.public boolean isExtensionFilterEnabled()
true
if the extension filter is enabled.
Otherwise false
.public void setAgentName(boolean enable, java.lang.String agentName)
It creates a filter which will match calls which were serviced by the agent with the specified name.
enable
- Set this flag to true
to enable the agent name filter.agentName
- The agent name to use in the filter.public java.lang.String getAgentName()
null
.public boolean isAgentNameFilterEnabled()
true
if the agent name filter is enabled.
Otherwise false
.public void setTagged(boolean enable, java.lang.String val)
It creates a filter which will match records of calls that have been tagged, or not.
enable
- Set this flag to true
to enable the record tag filter.val
- Set to "0" to match records that have not been tagged.
Set to "1" to match records that have been tagged.public java.lang.String getTagged()
null
.public boolean isTaggedFilterEnabled()
true
if the record tag filter is enabled.
Otherwise false
.public boolean isTaggedSearch()
true
if the record tag filter is enabled and if it
limits the search to records that have been tagged.
Otherwise false
.public void setCallDirection(boolean enable, java.lang.String direction)
It creates a filter which will match records of calls with the specified direction.
enable
- Set this flag to true
to enable the call direction
filter.direction
- Set to "0" to match records of incoming calls.
Set to "1" to match records of outgoing calls.
Set to "2" to match records of internal calls.
Set to "3" to match records of unknown calls.public java.lang.String getCallDirection()
null
.public boolean isCallDirectionFilterEnabled()
true
if the call direction filter is enabled.
Otherwise false
.public void setChannel(boolean enable, int channel)
It creates a filter which will match calls were recorded by the specified recording channel number.
enable
- Set this flag to true
to enable the recording channel
number filter.channel
- The recording channel number to use in the filter.public void setChannel(boolean enable, java.lang.String channel)
It creates a filter which will match calls which were recorded by the specified recording channel number.
enable
- Set this flag to true
to enable the recording channel
number filter.channel
- The recording channel number to use in the filter.public java.lang.String getChannel()
null
.public boolean isChannelFilterEnabled()
true
if the recording channel number filter is enabled.
Otherwise false
.public void setFileName(boolean enable, java.lang.String fileName)
It creates a filter which will match calls which were stored in the media file with the specified file name.
enable
- Set this flag to true
to enable the file name filter.fileName
- The fully qualified file name to use in the filter.public java.lang.String getFileName()
null
.public boolean isFileNameFilterEnabled()
true
if the file name filter is enabled.
Otherwise false
.public void setNoteKeyword(boolean enable, java.lang.String noteKeyword)
It creates a filter which will match calls which contain words in the notes that are like the specified keyword.
enable
- Set this flag to true
to enable the notes keyword filter.noteKeyword
- The keyword to use in the filter. Note that if you set this
parameter to "tada" for example, the filter will match any word
which has "tada" in it at any position.public java.lang.String getNoteKeyword()
null
.public boolean isNoteKeywordFilterEnabled()
true
if the note keyword filter is enabled.
Otherwise false
.public void setCallDurationRange(boolean enable, java.lang.String min, java.lang.String max)
It creates a filter which will match calls which duration is in the specified range.
enable
- Set this flag to true
to enable the call duration filter.min
- The minimum duration in milliseconds.max
- The maximum duration in milliseconds.public boolean isCallDurationFilterEnabled()
true
if the call duration filter is enabled.
Otherwise false
.public void setAuthorisedExtensions(boolean enable, AuthorisedExtensionsSet authorisedExtensions)
It creates a filter which will match calls which originated from or terminated at the set of specified extensions.
enable
- Set this flag to true
to enable the authorised
extensions filter.authorisedExtensions
- The extensions to use in the filter.public boolean isAuthorisedExtensionsFilterEnabled()
true
if the call duration filter is enabled.
Otherwise false
.public java.lang.String getSQLQuery(boolean backwardCompatible)
backwardCompatible
- Set this to false
always.
public java.lang.String getCountSQLQuery(boolean backwardCompatible)
backwardCompatible
- Set this to false
always.
public java.lang.String getSQLWhereClause(boolean backwardCompatible)
backwardCompatible
- Set this to false
always.
public void setFollowOnQuery(java.lang.String startDate, java.lang.String startTime, int channel, boolean backInTime)
Configures this criteria to match the maximum number of records that are before or after the specified date and time.
startDate
- The start date of the page in yyyy.MM.dd format.startTime
- The start time of the page in HH:mm:ss format.channel
- The start recording channel number of the page.backInTime
- Set this parameter to true
to select records prior to
the start date and time.
Set this parameter to true
to select records after
the start date and time.public void clearFollowOnQuery()
public boolean isFollowonQuery()
true
if paging is enabled. Otherwise false
.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |