Aspose::Email::Tools::Search::MailQueryBuilder Class Reference

Represents the builder of search expression. More...

Inherits Object.

Inherited by Aspose::Email::Clients::Exchange::FINAL, Aspose::Email::Clients::Imap::FINAL, and Aspose::Email::Storage::Pst::FINAL.

Public Member Functions

ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_To () const
 Gets the field that allows to find messages that contain the specified string in the envelope structure's TO field. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_Text () const
 Gets the field that allows to find the messages that contain the specified string in the header or body of the message. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_Bcc () const
 Gets the field that allows to find messages that contain the specified string in the envelope structure's BCC field. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_Body () const
 Gets the field that allows to find messages that contain the specified string in the body of the message. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_Cc () const
 Gets the field that allows to find messages that contain the specified string in the envelope structure's CC field. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_From () const
 Gets the field that allows to find messages that contain the specified string in the envelope structure's FROM field. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< StringComparisonField > get_Subject () const
 Gets the field that allows to find messages that contain the specified string in the envelope structure's SUBJECT field. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::Text::Encoding > get_DefaultEncoding () const
 Gets default encoding (charset) for query builder More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< DateComparisonField > get_InternalDate () const
 Gets the field that allows to find messages by internal date. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< DateComparisonField > get_SentDate () const
 Gets the field that allows to find messages by sent date. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< MailQuery > > > get_KeyCollection () const
 Gets the key collection. More...
 
ASPOSE_EMAIL_SHARED_API MailQueryBuilder ()
 Initializes a new instance of the MailQueryBuilder class. More...
 
ASPOSE_EMAIL_SHARED_API MailQueryBuilder (System::SharedPtr< System::Text::Encoding > defaultEncoding)
 Initializes a new instance of the MailQueryBuilder class. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< MailQuery > Or (System::SharedPtr< MailQuery > query1, System::SharedPtr< MailQuery > query2)
 Search messages that match either search key. Provides disjunction between two expressions (OR). More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< MailQuery > GetQuery ()
 Gets the query. More...
 
ASPOSE_EMAIL_SHARED_API void Clear ()
 Clears query. More...
 

Protected Member Functions

virtual ASPOSE_EMAIL_SHARED_API ~MailQueryBuilder ()
 

Friends

class Aspose::Email::Tools::Search::ComparisonField
 
class Aspose::Email::Storage::Pst::PersonalStorageQueryBuilder
 
class Aspose::Email::Clients::Imap::ESearchOptions
 
class Aspose::Email::Clients::Imap::ModificationSequenceField
 
class Aspose::Email::Tools::Search::EnumComparisonField
 
class Aspose::Email::Clients::Imap::SequenceSetField
 
class Aspose::Email::Tools::Search::StringComparisonField
 

Detailed Description

Represents the builder of search expression.

Note: By default, the result is the intersection (AND function) of all the messages that match those keys. To join keys by OR function, please, use Or() method of this class

Constructor & Destructor Documentation

◆ MailQueryBuilder() [1/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Tools::Search::MailQueryBuilder::MailQueryBuilder ( )

Initializes a new instance of the MailQueryBuilder class.

◆ MailQueryBuilder() [2/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Tools::Search::MailQueryBuilder::MailQueryBuilder ( System::SharedPtr< System::Text::Encoding >  defaultEncoding)

Initializes a new instance of the MailQueryBuilder class.

Parameters
defaultEncodingContains default encoding (charset) for query builder.

◆ ~MailQueryBuilder()

virtual ASPOSE_EMAIL_SHARED_API Aspose::Email::Tools::Search::MailQueryBuilder::~MailQueryBuilder ( )
protectedvirtual

Member Function Documentation

◆ Clear()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Tools::Search::MailQueryBuilder::Clear ( )

Clears query.

◆ get_Bcc()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_Bcc ( ) const

Gets the field that allows to find messages that contain the specified string in the envelope structure's BCC field.

The DateComparisonField that represents BCC search field.

◆ get_Body()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_Body ( ) const

Gets the field that allows to find messages that contain the specified string in the body of the message.

The DateComparisonField that represents body search field.

◆ get_Cc()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_Cc ( ) const

Gets the field that allows to find messages that contain the specified string in the envelope structure's CC field.

The DateComparisonField that represents cc search field.

◆ get_DefaultEncoding()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::Text::Encoding> Aspose::Email::Tools::Search::MailQueryBuilder::get_DefaultEncoding ( ) const

Gets default encoding (charset) for query builder

◆ get_From()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_From ( ) const

Gets the field that allows to find messages that contain the specified string in the envelope structure's FROM field.

The DateComparisonField that represents from search field.

◆ get_InternalDate()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<DateComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_InternalDate ( ) const

Gets the field that allows to find messages by internal date.

The DateComparisonField that represents internal date search field.

◆ get_KeyCollection()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<MailQuery> > > Aspose::Email::Tools::Search::MailQueryBuilder::get_KeyCollection ( ) const

Gets the key collection.

The key collection.

◆ get_SentDate()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<DateComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_SentDate ( ) const

Gets the field that allows to find messages by sent date.

The DateComparisonField that represents sent date search field.

◆ get_Subject()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_Subject ( ) const

Gets the field that allows to find messages that contain the specified string in the envelope structure's SUBJECT field.

The DateComparisonField that represents subject search field.

◆ get_Text()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_Text ( ) const

Gets the field that allows to find the messages that contain the specified string in the header or body of the message.

The DateComparisonField that represents text header or body search fields.

◆ get_To()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<StringComparisonField> Aspose::Email::Tools::Search::MailQueryBuilder::get_To ( ) const

Gets the field that allows to find messages that contain the specified string in the envelope structure's TO field.

The DateComparisonField that represents TO search field.

◆ GetQuery()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<MailQuery> Aspose::Email::Tools::Search::MailQueryBuilder::GetQuery ( )

Gets the query.

Returns
MailQuery that represents search query.

◆ Or()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<MailQuery> Aspose::Email::Tools::Search::MailQueryBuilder::Or ( System::SharedPtr< MailQuery >  query1,
System::SharedPtr< MailQuery >  query2 
)

Search messages that match either search key. Provides disjunction between two expressions (OR).

Parameters
query1The query1.
query2The query2.
Returns
MailQuery that represents search query (one searching criterion).

Friends And Related Function Documentation

◆ Aspose::Email::Clients::Imap::ESearchOptions

◆ Aspose::Email::Clients::Imap::ModificationSequenceField

◆ Aspose::Email::Clients::Imap::SequenceSetField

◆ Aspose::Email::Storage::Pst::PersonalStorageQueryBuilder

friend class Aspose::Email::Storage::Pst::PersonalStorageQueryBuilder
friend

◆ Aspose::Email::Tools::Search::ComparisonField

◆ Aspose::Email::Tools::Search::EnumComparisonField

friend class Aspose::Email::Tools::Search::EnumComparisonField
friend

◆ Aspose::Email::Tools::Search::StringComparisonField

friend class Aspose::Email::Tools::Search::StringComparisonField
friend