Package grails.plugin.multitenant.core.exception

Examples of grails.plugin.multitenant.core.exception.NoCurrentTenantException


     */
    @Override
    public boolean onPreInsert(PreInsertEvent event) {
        if (isMultiTenantEntity(event.getEntity())) {
            if (!currentTenant.isSet()) {
                throw new NoCurrentTenantException("Tried to save multi-tenant domain class '"
                        + event.getEntity().getClass().getSimpleName() + "', but no tenant is set");
            }

            Integer currentTenantId = currentTenant.get();
            hibernateEventPropertyUpdater.updateProperty(event, MultiTenantAST.TENANT_ID_FIELD_NAME, currentTenantId);
View Full Code Here

TOP

Related Classes of grails.plugin.multitenant.core.exception.NoCurrentTenantException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.