Interface ObjectLookupFieldMetadata

All Superinterfaces:
ObjectFieldMetadata

public interface ObjectLookupFieldMetadata extends ObjectFieldMetadata
Provides methods to retrieve common metadata on lookup fields.
See Also:
  • Method Details

    • getRelationshipName

      String getRelationshipName()
      Retrieves the name of the relationship to the source object of the given lookup field.
      Returns:
      the name of the relationship to the source object. For example, "to_lookup_source__cr".
    • getSourceField

      String getSourceField()
      Retrieves the source field of the given lookup field.
      Returns:
      the source field that this field is looking up. For example, "source_field__c".
    • getSourceObjectName

      String getSourceObjectName()
      Retrieves the source object of the given lookup field.
      Returns:
      the source object that this field is looking up. For example, "source_object__c".
    • getLookupFieldType

      ObjectLookupFieldType getLookupFieldType()
      Retrieves the ObjectLookupFieldType of the given lookup field.
      Returns:
      the ObjectLookupFieldType of the field. For example, ObjectLookupFieldType.TEXT.
    • isSearchable

      boolean isSearchable()
      Retrieves whether the given lookup field is searchable.
      Returns:
      true if the given field is searchable, otherwise false
    • getLookupTypeMetadata

      <T extends ObjectLookupFieldTypeMetadata> T getLookupTypeMetadata(Class<T> lookupMetadataClass)
      Retrieves a subclass of ObjectLookupFieldTypeMetadata so you can fetch the lookup type field attributes of the given formula field.
      Parameters:
      lookupMetadataClass - a subclass of ObjectLookupFieldTypeMetadata. For example, ObjectLookupTextFieldMetadata.class.
      Returns:
      A subclass of ObjectLookupFieldTypeMetadata of the field. For example, ObjectLookupTextFieldMetadata.