public boolean nameExists ( final String name ) { boolean rslt = false ; // default try { final ITenant tenant = this . tenantDao . getTenantByName ( name ) ; rslt = tenant != null ; } catch ( IllegalArgumentException iae ) { // This exception is completely fine; it simply // means there is no tenant with this name. rslt = false ; } return rslt ; }
Returns true if a tenant with the specified name exists otherwise false .