class TenantServiceImpl extends HibernateDaoImpl implements TenantService, TenantPersistenceResolver, Diagnostic {

    @Override
    public Map<DiagnosticAttribute, DiagnosticCallback> getDiagnosticData() {
        return new DiagnosticAttributeBuilder()
            .addDiagnosticAttribute(DiagnosticAttributeBuilder.TOTAL_ORGANIZATIONS_COUNT, new DiagnosticCallback<Integer>() {
                @Override
                public Integer getDiagnosticAttributeValue() {
                    return getTotalTenantsCount(null);
                }
            }).build();
    }

}