Compoze Software, Inc.

com.compoze.calendar
Class AppointmentFilter

java.lang.Object
  |
  +--com.compoze.ebusiness.AbstractFilter
        |
        +--com.compoze.calendar.AppointmentFilter
All Implemented Interfaces:
java.io.Serializable

public class AppointmentFilter
extends AbstractFilter
implements java.io.Serializable

This class represents an appointment filter. An appointment filter is used to restrict the appointments that are returned as they are iterated over in a Appointments collection. By setting properties in this filter, the appointments that are returned include only those appointments with properties that are the same. The string filters are case-insensitive.

See the Appointments class for futher details and examples on how to filter appointments.

See Also:
Appointments.setFilter(AppointmentFilter), Serialized Form

Fields inherited from class com.compoze.ebusiness.AbstractFilter
m_rules, m_where
 
Constructor Summary
AppointmentFilter()
          Constructor.
 
Method Summary
 void appendFilter(AppointmentFilter filter, boolean bOr)
          Appends the filter to this filter.
 void clearFilters()
          Clears all filter that are appended to this filter.
 java.util.Date getEndDate()
          Gets the end date for the filter.
 com.compoze.ejb.persistence.database.IFilterRule getFilterRule()
           
 java.util.List getFilters()
          Gets a unmodifiable list of appointment filters appended to this filter.
 java.util.Date getStartDate()
          Gets the start date for the filter.
static void main(java.lang.String[] args)
          Exerciser.
 void removeFilter(AppointmentFilter filter)
          Removes the filter from this filter.
 void setCustomNum1(long lCustomNum1)
          Sets filtering by the custom num1 field.
 void setCustomNum1(long[] customNum1s)
          Sets filtering by the custom num1 field.
 void setCustomNum1(long lCustomNum1, boolean bGreaterThan)
          Sets filtering by the custom num1 field.
 void setCustomNum1(long lFromCount, long lToCount)
          Sets filtering by custom num1 between the specified range.
 void setCustomNum2(long lCustomNum2)
          Sets filtering by the custom num2 field.
 void setCustomNum2(long[] customNum2s)
          Sets filtering by the custom num2 field.
 void setCustomNum2(long lCustomNum2, boolean bGreaterThan)
           
 void setCustomNum2(long lFromCount, long lToCount)
          Sets filtering by custom num2 between the specified range.
 void setCustomNum3(long lCustomNum3)
          Sets filtering by the custom num3 field.
 void setCustomNum3(long[] customNum3s)
          Sets filtering by the custom num3 field.
 void setCustomNum3(long lCustomNum3, boolean bGreaterThan)
          Sets filtering by the custom num3 field.
 void setCustomNum3(long lFromCount, long lToCount)
          Sets filtering by custom num3 between the specified range.
 void setCustomNum4(long lCustomNum4)
          Sets filtering by the custom num4 field.
 void setCustomNum4(long[] customNum4s)
          Sets filtering by the custom num4 field.
 void setCustomNum4(long lCustomNum4, boolean bGreaterThan)
          Sets filtering by the custom num4 field.
 void setCustomNum4(long lFromCount, long lToCount)
          Sets filtering by custom num4 between the specified range.
 void setCustomStr1(java.lang.String sCustomStr1)
          Sets filtering by custom str1.
 void setCustomStr1(java.lang.String[] customString1s)
          Sets filtering by custom str1.
 void setCustomStr1(java.lang.String[] customString1s, boolean bExactMatch)
          Sets filtering by custom str1.
 void setCustomStr1(java.lang.String sCustomStr1, boolean bExactMatch)
          Sets filtering by custom str1.
 void setCustomStr2(java.lang.String sCustomStr2)
          Sets filtering by custom str2.
 void setCustomStr2(java.lang.String[] customString2s)
          Sets filtering by custom str2.
 void setCustomStr2(java.lang.String[] customString2s, boolean bExactMatch)
          Sets filtering by custom str2.
 void setCustomStr2(java.lang.String sCustomStr2, boolean bExactMatch)
          Sets filtering by custom str2.
 void setCustomStr3(java.lang.String sCustomStr3)
          Sets filtering by custom str3.
 void setCustomStr3(java.lang.String[] customString3s)
          Sets filtering by custom str3.
 void setCustomStr3(java.lang.String[] customString3s, boolean bExactMatch)
          Sets filtering by custom str3.
 void setCustomStr3(java.lang.String sCustomStr3, boolean bExactMatch)
          Sets filtering by custom str3.
 void setCustomStr4(java.lang.String sCustomStr4)
          Sets filtering by custom str4.
 void setCustomStr4(java.lang.String[] customString4s)
          Sets filtering by custom str4.
 void setCustomStr4(java.lang.String[] customString4s, boolean bExactMatch)
          Sets filtering by custom str4.
 void setCustomStr4(java.lang.String sCustomStr4, boolean bExactMatch)
          Sets filtering by custom str4.
 void setDates(java.util.Calendar cal, java.util.Date startDate, java.util.Date endDate)
          Sets the filtering by start and end date.
 void setDates(java.util.Date startDate, java.util.Date endDate)
          Sets the filtering by start and end date.
 void setDay(java.util.Calendar cal)
          Sets the start and end date properties to include all appointments in the day of the specified date.
 void setDay(java.util.Calendar cal, int iYear, int iMonth, int iDayOfMonth)
          Sets the start and end date properties to include all appointments in the specified day.
 void setDescription(java.lang.String sDescription)
          Sets filtering by description.
 void setDescription(java.lang.String[] descriptions)
          Sets filtering by description.
 void setDescription(java.lang.String[] descriptions, boolean bExactMatch)
          Sets filtering by descriptions.
 void setDescription(java.lang.String sDescription, boolean bExactMatch)
          Sets filtering by description.
 void setMonth(java.util.Calendar cal)
          Sets the start and end date properties to include all appointments in the month of the specified date.
 void setMonth(java.util.Calendar cal, int iYear, int iMonth)
          Sets the start and end date properties to include all appointments in the specified month.
 void setSummary(java.lang.String sSummary)
          Sets filtering by summary.
 void setSummary(java.lang.String[] summaries)
          Sets filtering by summary.
 void setSummary(java.lang.String[] summaries, boolean bExactMatch)
          Sets filtering by summaries.
 void setSummary(java.lang.String sSummary, boolean bExactMatch)
          Sets filtering by summary.
 void setWeek(java.util.Calendar cal)
          Sets the start and end date properties to include all appointments in the week of the specified date.
 void setWeek(java.util.Calendar cal, int iYear, int iMonth, int iWeek)
          Sets the start and end date properties to include all appointments in the specified week.
 void setWorkWeek(java.util.Calendar cal)
          Sets the start and end date properties to include all appointments that occur during the work week (M-F) of the specified date.
 void setYear(java.util.Calendar cal)
          Sets the start and end date properties to include all appointments in the year of the specified Calendar.
 void setYear(java.util.Calendar cal, int iYear)
          Sets the start and end date properties to include all appointments in the specified year.
 void unsetCustomNum1()
          Unsets filtering by custom num1.
 void unsetCustomNum2()
          Unsets filtering by custom num2.
 void unsetCustomNum3()
          Unsets filtering by custom num3.
 void unsetCustomNum4()
          Unsets filtering by custom num4.
 void unsetCustomStr1()
          Unsets filterting by custom str1.
 void unsetCustomStr2()
          Unsets filterting by custom str2.
 void unsetCustomStr3()
          Unsets filterting by custom str3.
 void unsetCustomStr4()
          Unsets filterting by custom str4.
 void unsetDates()
          Unsets filterting by end date.
 void unsetDescription()
          Unsets filterting by descriptions.
 void unsetSummary()
          Unsets filterting by summaries.
 
Methods inherited from class com.compoze.ebusiness.AbstractFilter
clearWhereClause, getBaseRule, getOr, getWhereClause, isEmpty, setBeginsRule, setGreaterThanRule, setLessThanRule, setNotRule, setOr, setRule, setRule, setRule, setRule, setRule, setRule, setRule, setRule, setRule, setRule, setWhereClause, toRule, toString, unsetBeginsRule, unsetNotRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppointmentFilter

public AppointmentFilter()
Constructor.
Method Detail

appendFilter

public void appendFilter(AppointmentFilter filter,
                         boolean bOr)
Appends the filter to this filter.
Parameters:
filter - the filter the append
bOr - true to append this filter with an 'or'; false to use 'and'

removeFilter

public void removeFilter(AppointmentFilter filter)
Removes the filter from this filter.
Parameters:
filter - the filter to remove

clearFilters

public void clearFilters()
Clears all filter that are appended to this filter.

getFilters

public java.util.List getFilters()
Gets a unmodifiable list of appointment filters appended to this filter.
Returns:
an unmodifiable list of AppointmentFilter objects

setCustomNum1

public void setCustomNum1(long[] customNum1s)
Sets filtering by the custom num1 field.
Parameters:
lCustomNum1 - the custom num1

setCustomNum1

public void setCustomNum1(long lCustomNum1)
Sets filtering by the custom num1 field.
Parameters:
lCustomNum1 - the custom num1

setCustomNum1

public void setCustomNum1(long lCustomNum1,
                          boolean bGreaterThan)
Sets filtering by the custom num1 field.
Parameters:
lCustomNum1 - the custom num1
bGreaterThan - true for custom num1 greater than specified number; false for custom num1 less than specified number

setCustomNum1

public void setCustomNum1(long lFromCount,
                          long lToCount)
Sets filtering by custom num1 between the specified range. The lFromCount must be less than the lToCount.
Parameters:
lFromCount - the custom num1 low range
lToCount - the custom num1 high range

unsetCustomNum1

public void unsetCustomNum1()
Unsets filtering by custom num1.

setCustomNum2

public void setCustomNum2(long[] customNum2s)
Sets filtering by the custom num2 field.
Parameters:
lCustomNum2 - the custom num2

setCustomNum2

public void setCustomNum2(long lCustomNum2)
Sets filtering by the custom num2 field.
Parameters:
lCustomNum2 - the custom num2

setCustomNum2

public void setCustomNum2(long lCustomNum2,
                          boolean bGreaterThan)

setCustomNum2

public void setCustomNum2(long lFromCount,
                          long lToCount)
Sets filtering by custom num2 between the specified range. The lFromCount must be less than the lToCount.
Parameters:
lFromCount - the custom num2 low range
lToCount - the custom num2 high range

unsetCustomNum2

public void unsetCustomNum2()
Unsets filtering by custom num2.

setCustomNum3

public void setCustomNum3(long[] customNum3s)
Sets filtering by the custom num3 field.
Parameters:
lCustomNum3 - the custom num3

setCustomNum3

public void setCustomNum3(long lCustomNum3)
Sets filtering by the custom num3 field.
Parameters:
lCustomNum3 - the custom num3

setCustomNum3

public void setCustomNum3(long lCustomNum3,
                          boolean bGreaterThan)
Sets filtering by the custom num3 field.
Parameters:
lCustomNum3 - the custom num3
bGreaterThan - true for custom num3 greater than specified number; false for custom num3 less than specified number

setCustomNum3

public void setCustomNum3(long lFromCount,
                          long lToCount)
Sets filtering by custom num3 between the specified range. The lFromCount must be less than the lToCount.
Parameters:
lFromCount - the custom num1 low range
lToCount - the custom num1 high range

unsetCustomNum3

public void unsetCustomNum3()
Unsets filtering by custom num3.

setCustomNum4

public void setCustomNum4(long[] customNum4s)
Sets filtering by the custom num4 field.
Parameters:
lCustomNum4 - the custom num4

setCustomNum4

public void setCustomNum4(long lCustomNum4)
Sets filtering by the custom num4 field.
Parameters:
lCustomNum4 - the custom num4

setCustomNum4

public void setCustomNum4(long lCustomNum4,
                          boolean bGreaterThan)
Sets filtering by the custom num4 field.
Parameters:
lCustomNum4 - the custom num4
bGreaterThan - true for custom num4 greater than specified number; false for custom num4 less than specified number

setCustomNum4

public void setCustomNum4(long lFromCount,
                          long lToCount)
Sets filtering by custom num4 between the specified range. The lFromCount must be less than the lToCount.
Parameters:
lFromCount - the custom num1 low range
lToCount - the custom num1 high range

unsetCustomNum4

public void unsetCustomNum4()
Unsets filtering by custom num4.

setCustomStr1

public void setCustomStr1(java.lang.String sCustomStr1)
Sets filtering by custom str1. Checks the custom str1 match as a substring of the custom str1.
Parameters:
sCustomStr1 - the Custom String1
See Also:
setCustomStr1(String, boolean)

setCustomStr1

public void setCustomStr1(java.lang.String sCustomStr1,
                          boolean bExactMatch)
Sets filtering by custom str1.
Parameters:
sCustomStr1 - the custom str1
bExactMatch - true for an exact match of the string custom str1; false to match as substring custom str1

setCustomStr1

public void setCustomStr1(java.lang.String[] customString1s)
Sets filtering by custom str1. Checks the custom str1 match as a substring of the custom str1.
Parameters:
customString1s - the custom string1s
See Also:
setCustomStr1(String[], boolean)

setCustomStr1

public void setCustomStr1(java.lang.String[] customString1s,
                          boolean bExactMatch)
Sets filtering by custom str1.
Parameters:
customString1s - the custom string1s
exact - true for an exact match of the custom string1s; false to match a substring

unsetCustomStr1

public void unsetCustomStr1()
Unsets filterting by custom str1.

setCustomStr2

public void setCustomStr2(java.lang.String sCustomStr2)
Sets filtering by custom str2. Checks the custom str2 match as a substring of the custom str2.
Parameters:
sCustomStr2 - the Custom String2
See Also:
setCustomStr2(String, boolean)

setCustomStr2

public void setCustomStr2(java.lang.String sCustomStr2,
                          boolean bExactMatch)
Sets filtering by custom str2.
Parameters:
sCustomStr2 - the custom str2
bExactMatch - true for an exact match of the string custom str2; false to match as substring custom str2

setCustomStr2

public void setCustomStr2(java.lang.String[] customString2s)
Sets filtering by custom str2. Checks the custom str2 match as a substring of the custom str2.
Parameters:
customString2s - the custom string2s
See Also:
setCustomStr2(String[], boolean)

setCustomStr2

public void setCustomStr2(java.lang.String[] customString2s,
                          boolean bExactMatch)
Sets filtering by custom str2.
Parameters:
customString2s - the custom string2s
exact - true for an exact match of the custom string2s; false to match a substring

unsetCustomStr2

public void unsetCustomStr2()
Unsets filterting by custom str2.

setCustomStr3

public void setCustomStr3(java.lang.String sCustomStr3)
Sets filtering by custom str3. Checks the custom str3 match as a substring of the custom str3.
Parameters:
sCustomStr3 - the Custom String3
See Also:
setCustomStr3(String, boolean)

setCustomStr3

public void setCustomStr3(java.lang.String sCustomStr3,
                          boolean bExactMatch)
Sets filtering by custom str3.
Parameters:
sCustomStr3 - the custom str3
bExactMatch - true for an exact match of the string custom str3; false to match as substring custom str3

setCustomStr3

public void setCustomStr3(java.lang.String[] customString3s)
Sets filtering by custom str3. Checks the custom str3 match as a substring of the custom str3.
Parameters:
customString3s - the custom string3s
See Also:
setCustomStr3(String[], boolean)

setCustomStr3

public void setCustomStr3(java.lang.String[] customString3s,
                          boolean bExactMatch)
Sets filtering by custom str3.
Parameters:
customString3s - the custom string3s
exact - true for an exact match of the custom string3s; false to match a substring

unsetCustomStr3

public void unsetCustomStr3()
Unsets filterting by custom str3.

setCustomStr4

public void setCustomStr4(java.lang.String sCustomStr4)
Sets filtering by custom str4. Checks the custom str4 match as a substring of the custom str4.
Parameters:
sCustomStr4 - the Custom String4
See Also:
setCustomStr4(String, boolean)

setCustomStr4

public void setCustomStr4(java.lang.String sCustomStr4,
                          boolean bExactMatch)
Sets filtering by custom str4.
Parameters:
sCustomStr4 - the custom str4
bExactMatch - true for an exact match of the string custom str4; false to match as substring custom str4

setCustomStr4

public void setCustomStr4(java.lang.String[] customString4s)
Sets filtering by custom str4. Checks the custom str4 match as a substring of the custom str4.
Parameters:
customString4s - the custom string4s
See Also:
setCustomStr4(String[], boolean)

setCustomStr4

public void setCustomStr4(java.lang.String[] customString4s,
                          boolean bExactMatch)
Sets filtering by custom str4.
Parameters:
customString4s - the custom string4s
exact - true for an exact match of the custom string4s; false to match a substring

unsetCustomStr4

public void unsetCustomStr4()
Unsets filterting by custom str4.

setSummary

public void setSummary(java.lang.String sSummary)
Sets filtering by summary. Checks the summary match as a substring of the summary.
Parameters:
sSummary - the summary
See Also:
setSummary(String, boolean)

setSummary

public void setSummary(java.lang.String sSummary,
                       boolean bExactMatch)
Sets filtering by summary.
Parameters:
sSummary - the summary
bExactMatch - true for an exact match of the string summary; false to match as substring summary

setSummary

public void setSummary(java.lang.String[] summaries)
Sets filtering by summary. Checks the summaries match as a substring of the summary.
Parameters:
summaries - the summaries
See Also:
setSummary(String[], boolean)

setSummary

public void setSummary(java.lang.String[] summaries,
                       boolean bExactMatch)
Sets filtering by summaries.
Parameters:
summaries - the summaries
exact - true for an exact match of the summaries; false to match a substring

unsetSummary

public void unsetSummary()
Unsets filterting by summaries.

setDescription

public void setDescription(java.lang.String sDescription)
Sets filtering by description. Checks the description match as a substring of the description.
Parameters:
sDescription - the description
See Also:
setDescription(String, boolean)

setDescription

public void setDescription(java.lang.String sDescription,
                           boolean bExactMatch)
Sets filtering by description.
Parameters:
sDescription - the description
bExactMatch - true for an exact match of the string description; false to match as substring description

setDescription

public void setDescription(java.lang.String[] descriptions)
Sets filtering by description. Checks the summaries match as a substring of the description.
Parameters:
descriptions - the descriptions
See Also:
setDescription(String[], boolean)

setDescription

public void setDescription(java.lang.String[] descriptions,
                           boolean bExactMatch)
Sets filtering by descriptions.
Parameters:
descriptions - the descriptions
exact - true for an exact match of the descriptions; false to match a substring

unsetDescription

public void unsetDescription()
Unsets filterting by descriptions.

setDates

public void setDates(java.util.Date startDate,
                     java.util.Date endDate)
Sets the filtering by start and end date. Appointments must occur after between the start and end date to pass through the filter. The default Calendar.getInstance() is used for the system-wide default calendar.
Parameters:
startDate - the starting date (may not be null)
endDate - the ending date (may not be null)

setDates

public void setDates(java.util.Calendar cal,
                     java.util.Date startDate,
                     java.util.Date endDate)
Sets the filtering by start and end date. Appointments must occur after between the start and end date to pass through the filter.
Parameters:
cal - the calendar to use to calculate the dates (pass in Calendar.getInstance() for the system-wide default, but you probably want to use the user's calendar set to their locale and time zone)
startDate - the starting date (may not be null)
endDate - the ending date (may not be null)

unsetDates

public void unsetDates()
Unsets filterting by end date.

getStartDate

public java.util.Date getStartDate()
Gets the start date for the filter.
Returns:
the starting date or null if no start date rule is set

getEndDate

public java.util.Date getEndDate()
Gets the end date for the filter.
Returns:
the ending date or null if no end date rule is set

setYear

public void setYear(java.util.Calendar cal,
                    int iYear)
Sets the start and end date properties to include all appointments in the specified year.
Parameters:
cal - the calendar to use to calculate the dates (pass in Calendar.getInstance() for the system-wide default, but you probably want to use the user's calendar set to their locale and time zone)
iYear - the year (the calendar is first set to this year)

setYear

public void setYear(java.util.Calendar cal)
Sets the start and end date properties to include all appointments in the year of the specified Calendar.
Parameters:
cal - a calendar set to the desired year

setMonth

public void setMonth(java.util.Calendar cal,
                     int iYear,
                     int iMonth)
Sets the start and end date properties to include all appointments in the specified month.
Parameters:
cal - the calendar to use to calculate the dates (pass in Calendar.getInstance() for the system-wide default, but you probably want to use the user's calendar set to their locale and time zone)
iYear - the year (the calendar is first set to this year)
iMonth - the month (the calendar is first set to this month, see month constants in java.util.Calendar)

setMonth

public void setMonth(java.util.Calendar cal)
Sets the start and end date properties to include all appointments in the month of the specified date.
Parameters:
cal - a calendar set to the desired month

setWeek

public void setWeek(java.util.Calendar cal,
                    int iYear,
                    int iMonth,
                    int iWeek)
Sets the start and end date properties to include all appointments in the specified week.
Parameters:
cal - the calendar to use to calculate the dates (pass in Calendar.getInstance() for the system-wide default, but you probably want to use the user's calendar set to their locale and time zone)
iYear - the year (the calendar is first set to this year)
iMonth - the month (the calendar is first set to this month, see month constants in java.util.Calendar)
iWeekOfMonth - the week of the month (the calendar is first set to this week of the month)

setWeek

public void setWeek(java.util.Calendar cal)
Sets the start and end date properties to include all appointments in the week of the specified date.
Parameters:
cal - a calendar set to the desired week

setWorkWeek

public void setWorkWeek(java.util.Calendar cal)
Sets the start and end date properties to include all appointments that occur during the work week (M-F) of the specified date.
Parameters:
cal - a calendar set to the desired date

setDay

public void setDay(java.util.Calendar cal,
                   int iYear,
                   int iMonth,
                   int iDayOfMonth)
Sets the start and end date properties to include all appointments in the specified day.
Parameters:
cal - the calendar to use to calculate the dates (pass in Calendar.getInstance() for the system-wide default, but you probably want to use the user's calendar set to their locale and time zone)
iYear - the year (the calendar is first set to this year)
iMonth - the month (see month constants in java.util.Calendar)
iDayOfMonth - the day of the month (the calendar is first set to this day of the month)

setDay

public void setDay(java.util.Calendar cal)
Sets the start and end date properties to include all appointments in the day of the specified date.
Parameters:
cal - a calendar set to the desired date

getFilterRule

public com.compoze.ejb.persistence.database.IFilterRule getFilterRule()
Overrides:
getFilterRule in class AbstractFilter

main

public static void main(java.lang.String[] args)
Exerciser.

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.