Package org.datanucleus.store.schema
Interface MultiTenancyProvider
public interface MultiTenancyProvider
Interface to be implemented where the user wants to allocate a "tenantId" for each datastore access.
One example of such a usage is where the web system "session" has a 'username' and so can access it using this method.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the tenant id for the current tenant (for use in all WRITE operations).String[]
Return the tenant id(s) that the current tenant can view (for use in all READ operations).
-
Method Details
-
getTenantId
Return the tenant id for the current tenant (for use in all WRITE operations).- Parameters:
ec
- ExecutionContext- Returns:
- The tenant id
-
getTenantReadIds
Return the tenant id(s) that the current tenant can view (for use in all READ operations).- Parameters:
ec
- ExecutionContext- Returns:
- The read tenant ids
-