private void assertNamespaceIamRoleAuthorizationNotExist(NamespaceEntity namespaceEntity){
  if (CollectionUtils.isNotEmpty(namespaceIamRoleAuthorizationDao.getNamespaceIamRoleAuthorizations(namespaceEntity))) {
    throw new AlreadyExistsException(String.format("Namespace IAM role authorizations with namespace \"%s\" already exist",namespaceEntity.getCode()));
  }
}

private void assertNamespaceIamRoleAuthorizationNotExist ( NamespaceEntity namespaceEntity ) { if ( CollectionUtils . isNotEmpty ( namespaceIamRoleAuthorizationDao . getNamespaceIamRoleAuthorizations ( namespaceEntity ) ) ) { throw new AlreadyExistsException ( String . format ( "Namespace IAM role authorizations with namespace \"%s\" already exist" , namespaceEntity . getCode ( ) ) ) ; } }
asserts that no namespaceiamroleauthorizationentities exist for the given namespace . throws a alreadyexistsexception if any namespaceiamroleauthorizationentity exist .
