Apex BOOST Library |
Description | Using this class, a dynamic query can be constructed piece by piece, adding object and field type checking, which avoids typos and references to invalid fields. By default, 'WITH USER_MODE' will be added when executing the query. If any fields or objects referenced in the query are inaccessible to the user, a QueryException is thrown. This can be disabled, if desired. Usage:// get user names where City starts with "San" (method chaining) User[] users = new aBoost.Query(User.SObjectType) .field(User.Name) .whereOp(User.City, 'LIKE', 'San%') .run(); // get the number of contacts in Dallas accounts (complex query) aBoost.Query dallasAccounts = new aBoost.Query(Account.SObjectType) .whereOp(Account.City, '=', 'Dallas')); Integer contactCount = new aBoost.Query(Contact.SObjectType) .field(Contact.Name) .whereIn(Contact.AccountId, dallasAccounts) .count(); // get the contacts in certain accounts (child query) Account[] results = new aBoost.Query(Account.SObjectType) .fields(new Query().createChildQuery(Contact.SObjectType, 'Contacts')) .whereIn(Account.Id, accounts) .run(); |
---|
Description | Create a query for the specified SObjectType |
---|---|
Throws | InvalidParameterValueException if objectType is null |
Description | Construct a query with no object name. This can be useful in constructing a WHERE clause |
---|
Description | Executes a "count" query (i.e. Database.countQuery() ) |
---|
Description | Create a child query for the specified SObjectType and relationship name. The resulting object can then be passed to a field() call. |
---|---|
Throws | InvalidParameterValueException if objectType is null, or objectName is blank |
Description | Add the specified field to the SELECT list |
---|---|
Throws | InvalidParameterValueException if field is null |
Description | Add the specified field to the SELECT list |
---|---|
Throws | InvalidParameterValueException if field is blank |
Description | Add the specified fields to the SELECT list |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Add the specified fields to the SELECT list |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Add the specified fields to the SELECT list |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Add the specified fields to the SELECT list |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Add the specified child query to the SELECT list |
---|---|
Throws | InvalidParameterValueException if childQuery is not a valid child query |
Description | Add the specified field set members to the SELECT list |
---|---|
Throws | InvalidParameterValueException if members is null |
Description | Specify a GROUP BY field |
---|---|
Throws | InvalidParameterValueException if field is null |
Description | Specify GROUP BY fields |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Specify a GROUP BY clause |
---|---|
Throws | InvalidParameterValueException if clause is null |
Description | Specify GROUP BY fields |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Returns | a Database.QueryLocator ; useful in a Batchable.start method |
---|
Description | Specify an ORDER BY field |
---|---|
Throws | InvalidParameterValueException if field is null |
Description | Specify an ORDER BY field |
---|---|
Throws | InvalidParameterValueException if field is empty |
Description | Specify ORDER BY fields |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Specify ORDER BY fields |
---|---|
Throws | InvalidParameterValueException if fields is null or empty |
Description | Specify an ORDER BY field |
---|---|
Throws | InvalidParameterValueException if field is null |
Description | Specify an ORDER BY field |
---|---|
Throws | InvalidParameterValueException if field is empty |
Description | Specify an ORDER BY field |
---|---|
Throws | InvalidParameterValueException if field is null |
Description | Specify an ORDER BY field |
---|---|
Throws | InvalidParameterValueException if field is empty |
Description | Executes the query (i.e. Database.query() ) |
---|
Description | Set the enforceSecurity attribute. If true, 'WITH USER_MODE' will be added to the query. By default, enforceSecurity is true. |
---|
Throws | InvalidParameterValueException if theLimit is null or negative |
---|
Throws | InvalidParameterValueException if offset is null or negative |
---|
Description | Standard toString override |
---|
Description | Specify an AND clause that will be grouped within parenthesis. Use an empty constructor to build the query to be passed in. |
---|---|
Throws | InvalidParameterValueException if query is null |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN query) |
---|---|
Throws | InvalidParameterValueException if field is null, or query is null |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, values is null or empty |
Description | Add a WHERE clause (field IN query) |
---|---|
Throws | InvalidParameterValueException if field is null, or query is null |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or query is null |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN values) |
---|---|
Throws | InvalidParameterValueException if field is null, or values is null or empty |
Description | Add a WHERE clause (field NOT IN query) |
---|---|
Throws | InvalidParameterValueException if field is null, or query is null |
Description | Add a WHERE clause (field |
---|---|
Throws | InvalidParameterValueException if field is null, or op is invalid (valid operators are =, !=, <, <=, >, >=, LIKE) |
Description | Add a WHERE clause (field |
---|---|
Throws | InvalidParameterValueException if field is null, or op is invalid (valid operators are =, !=, <, <=, >, >=, LIKE) |
Description | Add a free-form WHERE clause |
---|---|
Throws | InvalidParameterValueException if clause is empty |