Interface MetaDataAccessor<M>

Type Parameters:
M - EDMX model type
All Known Implementing Classes:
MetaDataAccessorImpl, MetaDataAccessorSingleModelImpl

public interface MetaDataAccessor<M>
Provides access to tenant-specific CDS and EDMX models
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    evict(String tenantId)
    evicts CDS and EDMX models for the specified tenant
    com.sap.cds.reflect.CdsModel
    getCdsModel(ModelId modelId, int maxAgeSeconds)
     
    default com.sap.cds.reflect.CdsModel
    getCdsModel(String tenantId)
     
    getEdmx(ModelId modelId, int maxAgeSeconds)
     
    getI18n(ModelId modelId, int maxAgeSeconds)
     
    default void
    refresh(String tenantId)
    Synchronously CDS and EDMX models for the specified tenant if they have changed
    void
    refresh(String tenantId, int maxAgeSeconds)
    TODO sync Rereads CDS and EDMX models for the specified tenant if they have changed
  • Method Details

    • getEdmx

      M getEdmx(ModelId modelId, int maxAgeSeconds)
      Parameters:
      modelId - model identifier
      maxAgeSeconds - maximum acceptable age of resource
      Returns:
      EDMX model
    • getI18n

      MetaDataAccessor.I18n getI18n(ModelId modelId, int maxAgeSeconds)
      Parameters:
      modelId - model identifier
      maxAgeSeconds - maximum acceptable age of resource
      Returns:
      model related i18n resources
    • getCdsModel

      default com.sap.cds.reflect.CdsModel getCdsModel(String tenantId)
      Parameters:
      tenantId - tenant identifier
      Returns:
      CDS model
    • getCdsModel

      com.sap.cds.reflect.CdsModel getCdsModel(ModelId modelId, int maxAgeSeconds)
      Parameters:
      modelId - model identifier
      maxAgeSeconds - maximum acceptable age of resource
      Returns:
      CDS model
    • refresh

      default void refresh(String tenantId)
      Synchronously CDS and EDMX models for the specified tenant if they have changed
      Parameters:
      tenantId - tenant identifier
    • refresh

      void refresh(String tenantId, int maxAgeSeconds)
      TODO sync Rereads CDS and EDMX models for the specified tenant if they have changed
      Parameters:
      tenantId - tenant identifier
      maxAgeSeconds - maximum acceptable age of resource
    • evict

      void evict(String tenantId)
      evicts CDS and EDMX models for the specified tenant
      Parameters:
      tenantId - tenant identifier