Interface ObjectRollupFieldMetadata

All Superinterfaces:
ObjectFieldMetadata

public interface ObjectRollupFieldMetadata extends ObjectFieldMetadata
Provides methods to retrieve common metadata on Roll-up fields.
See Also:
  • Method Details

    • getType

      Retrieves the ObjectRollupFieldType of the given Roll-up field. For example, ObjectRollupFieldType.NUMBER.
      Returns:
      the ObjectRollupFieldType of the field
    • getRollupFilterExpression

      ObjectRollupFieldExpressionMetadata getRollupFilterExpression()
      Retrieves the filter expression of the given Roll-up field.
      Returns:
      any defined filter expression
    • getRollupFunction

      ObjectRollupFieldFunctionType getRollupFunction()
      Retrieves the ObjectRollupFieldFunctionType of the given Roll-up field. For example, ObjectRollupFieldFunctionType.SUM.
      Returns:
      ObjectRollupFieldFunctionType of the field
    • getRollupSourceField

      String getRollupSourceField()
      Retrieves the source field of the given Roll-up field. Returns null for count() functions.
      Returns:
      the source field from the child object
    • getRollupSourceObjectName

      String getRollupSourceObjectName()
      Retrieves the source object of the given Roll-up field.
      Returns:
      the name of the child object, or null if the Roll-up field is invalid
    • getRollupSourceRelationshipName

      String getRollupSourceRelationshipName()
      Retrieves the name of the relationship to the source object of the given Roll-up field.
      Returns:
      the inbound child object relationship name
    • getRollupTypeMetadata

      <T extends ObjectRollupFieldTypeMetadata> T getRollupTypeMetadata(Class<T> rollupMetadataClass)
      Retrieves a subclass of ObjectRollupFieldTypeMetadata so you can fetch the Roll-up type field attributes of the given Roll-up field.
      Parameters:
      rollupMetadataClass - a subclass of ObjectRollupFieldTypeMetadata. For example, ObjectRollupNumberFieldMetadata.
      Returns:
      a subclass of ObjectRollupFieldTypeMetadata for the field
    • isValid

      boolean isValid()
      Returns:
      true if the Roll-up field is valid (all references have been resolved), false otherwise