CampaignEnrollmentsQuery¶
-
public class
CampaignEnrollmentsQuery
¶ This is the Query builder for retrieving campaign enrollments. It provides methods for different query criteria. The order of criteria matters, as the first criterion is used to fetch the result from database. and the other criterion are used to filter the results fetched by the first criterion (in memory).
Methods¶
getCriteria¶
getPrimaryCriterion¶
getSecondaryCriteria¶
-
public List<Criterion>
getSecondaryCriteria
()¶ Returns all the criterion other than primary criterion in the built query, which are used to filter the results of the primary criterion. This is a sub list of created criteria, containing all the entries but the first one, or an empty list, if there are no secondary criteria.
Returns: secondary criteria
havingState¶
-
public CampaignEnrollmentsQuery
havingState
(CampaignEnrollmentStatus campaignEnrollmentStatus)¶ Provides the method for the Status Criterion, using which, the campaign enrollments are filtered based on their status.
Parameters: - campaignEnrollmentStatus – the enrollment status to use in the criterion
Returns: this instance of a query, with Status criterion added
withCampaignName¶
-
public CampaignEnrollmentsQuery
withCampaignName
(String campaignName)¶ This provides the method for the CampaignName Criterion, using which, the campaign enrollments are filtered based on belonging to a particular campaign.
Parameters: - campaignName – the campaign name to use in the criterion
Returns: this instance of a query, with Campaign name criterion added
withExternalId¶
-
public CampaignEnrollmentsQuery
withExternalId
(String externalId)¶ This provides the method for the ExternalId Criterion, using which, the campaign enrollments are filtered based on External ID.
Parameters: - externalId – the external ID to use in the criterion
Returns: this instance of a query, with External ID criterion added