LazyLoadSchemaAdapter

A functionality extension of SchemaAdapter, this interface provides structure for loading partial schemas within a single Table.

When building Field instances that are Lists or Maps, a flag can be set to mark that Field as “lazy” and available for lazy loading.

Loading part of the schema later in time improves performance and reduces overhead.

If you mark a Field as lazy, Valence may (or may not) call your Adapter to get details about that Field. If that happens, you will be passed info about the Field of interest and should return a List<Field> where each item in that array is an immediate child of the Field that was inquired about.

The method in this interface uses an instance of Field Path to describe what Field should be lazily-loaded.

If you are dynamically inspecting external system schema, you will likely also want to implement NamedCredentialAdapter.

To learn more about how lazy loading is used, check out our Schema documentation.

Definition

/**
 * Implementers of this interface can return lazy Fields from the normal SchemaAdapter call. This interface
 * allows Valence to retrieve the children of those Fields later in time.
 */
global interface LazyLoadSchemaAdapter extends SchemaAdapter {

        List<Field> getLazyFieldChildren(String tableApiName, FieldPath path);
}