BucketField Class

Contains methods and constructors to work with information about a bucket field, including bucket type, name, and bucketed values.

Namespace

Reports

BucketField Constructors

The following are constructors for BucketField.

BucketField(bucketType, devloperName, label, nullTreatedAsZero, otherBucketLabel, sourceColumnName, values)

Creates an instance of the Reports.BucketField class using the specified parameters.

Signature

public BucketField(Reports.BucketType bucketType, String devloperName, String label, Boolean nullTreatedAsZero, String otherBucketLabel, String sourceColumnName, List<Reports.BucketFieldValue> values)

Parameters

bucketType
Type: Reports.BucketType
The type of bucket.
devloperName
Type: String
API name of the bucket.
label
Type: String
User-facing name of the bucket.
nullTreatedAsZero
Type: Boolean
Specifies whether null values are converted to zero (true) or not (false).
otherBucketLabel
Type: String
Name of the fields grouped as Other (in buckets of BucketType PICKLIST).
sourceColumnName
Type: String
Name of the bucketed field.
values
Type: List<Reports.BucketType>
Types of the values included in the bucket.

BucketField()

Creates an instance of the Reports.BucketField class. You can then set values by using the class’s set methods.

Signature

public BucketField()

BucketField Methods

The following are methods for BucketField.

getBucketType()

Returns the bucket type.

Signature

public Reports.BucketType getBucketType()

Return Value

Type: Reports.BucketType

getDevloperName()

Returns the bucket’s API name.

Signature

public String getDevloperName()

Return Value

Type: String

getLabel()

Returns the user-facing name of the bucket.

Signature

public String getLabel()

Return Value

Type: String

getNullTreatedAsZero()

Returns true if null values are converted to the number zero, otherwise returns false.

Signature

public Boolean getNullTreatedAsZero()

Return Value

Type: Boolean

getOtherBucketLabel()

Returns the name of fields grouped as Other in buckets of type PICKLIST.

Signature

public String getOtherBucketLabel()

Return Value

Type: String

getSourceColumnName()

Returns the API name of the bucketed field.

Signature

public String getSourceColumnName()

Return Value

Type: String

getValues()

Returns the report values grouped by the bucket field.

Signature

public List<Reports.BucketFieldValue> getValues()

Return Value

Type: List<Reports.BucketFieldValue>

setBucketType(value)

Sets the BucketType of the bucket.

Signature

public void setBucketType(String value)

Parameters

value
Type: String
See the Reports.BucketType enum for valid values.

Return Value

Type: void

setBucketType(bucketType)

Sets the BucketType of the bucket.

Signature

public void setBucketType(Reports.BucketType bucketType)

Parameters

bucketType
Type: Reports.BucketType

Return Value

Type: void

setDevloperName(devloperName)

Sets the API name of the bucket.

Signature

public void setDevloperName(String devloperName)

Parameters

devloperName
Type: String
The API name to assign to the bucket.

Return Value

Type: void

setLabel(label)

Sets the user-facing name of the bucket.

Signature

public void setLabel(String label)

Parameters

label
Type: String

Return Value

Type: void

setNullTreatedAsZero(nullTreatedAsZero)

Specifies whether null values in the bucket are converted to zero (true) or not (false).

Signature

public void setNullTreatedAsZero(Boolean nullTreatedAsZero)

Parameters

nullTreatedAsZero
Type: Boolean

Return Value

Type: void

setOtherBucketLabel(otherBucketLabel)

Sets the name of the fields grouped as Other (in buckets of BucketType PICKLIST).

Signature

public void setOtherBucketLabel(String otherBucketLabel)

Parameters

otherBucketLabel
Type: String

Return Value

Type: void

setSourceColumnName(sourceColumnName)

Specifies the name of the bucketed field.

Signature

public void setSourceColumnName(String sourceColumnName)

Parameters

sourceColumnName
Type: String

Return Value

Type: void

setValues(values)

Specifies which type of values are included in the bucket.

Signature

public void setValues(List<Reports.BucketFieldValue> values)

Parameters

values
Type: List<Reports.BucketFieldValue>

Return Value

Type: void

toString()

Returns a string.

Signature

public String toString()

Return Value

Type: String