Returns true if a tenant with the specified name exists, otherwise false.

@since 4.3
542816
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;
    }
90613
@Override
	public boolean exists() {
		try {
			InputStream inputStream = this.assetManager.open(this.fileName);
			if (inputStream != null) {
				return true;
			} else {
				return false;
			}
		} catch (IOException e) {
			return false;
		}
	}
166584
def exists(self, **kwargs):
        """"""
        kwargs.pop('partition', None)
        kwargs['transform_name'] = True
        return self._exists(**kwargs)
227241
private boolean existsUser(String name) {

        CmsUser user = null;
        try {
            user = m_cms.readUser(name);
        } catch (CmsException e) {
            // this will happen, if the user does not exist
        }
        return user != null;
    }
160114
def table_exists?(name)
      return false unless name
      schema ? @connection.table_exists?(name, schema) : @connection.table_exists?(name)
    end
900584
public boolean snapshotExists(String snapshotName)
    {
        assert snapshotName != null;
        for (ColumnFamilyStore cfStore : columnFamilyStores.values())
        {
            if (cfStore.snapshotExists(snapshotName))
                return true;
        }
        return false;
    }
1278097
public function hasProperty($name, $property)
    {
        $result = false;
        if($this->has($name)) {
            $result = property_exists($this->_data[$name], $property);
        }

        return $result;
    }
650194
protected function checkIfEntityExists()
    {
        $query = new ReadQuery($this->connection, $this->model, $this->factory, $this->accessor, $this->dispatcher);

        foreach ($this->model->primaryFields() as $field) {
            $value = $this->accessor->getPropertyValue($this->instance, $field->name());

            if ($value === null) {
                return false;
            }

            $query->where($field->name(), $value, '=', 'and');
        }

        return $query->count() > 0;
    }
39827
def user_exists(self, name):
        """"""
        users = self.data['users']
        for user in users:
            if user['name'] == name:
                return True
        return False
772366
public boolean indexExists(String indexName) {
        return this.client.admin().indices().prepareExists(indexName).execute().actionGet().isExists();
    }
211181
protected boolean isSpecialPropertyName(String name) {
        for (String special : specialVersions) {
            if (special.equals(name)) {
                return true;
            }
        }
        return false;
    }
720048
private void checkTenants() {
        m_logger.info("The following tenants and applications are defined:");
        Collection<Tenant> tenantList = TenantService.instance().getTenants();
        for (Tenant tenant : tenantList) {
            checkTenantApps(tenant);
        }
        if (tenantList.size() == 0) {
            m_logger.info("   <no tenants>");
        }
    }
1357540
public boolean existsAnyBroker () {
        boolean result = false;

        synchronized ( this.brokerDetails ) {
            Iterator<PerBrokerInfo> iter = this.brokerDetails.values().iterator();

            while ( ( ! result ) && ( iter.hasNext() ) ) {
                result = iter.next().exists;
            }
        }

        return result;
    }
1245349
public boolean isSet(String propName) {
        if (propName.equals("roles")) {
            return isSetRoles();
        }
        if (propName.equals("entitlements")) {
            return isSetEntitlements();
        }
        if (propName.equals("entitlementCheckResult")) {
            return isSetEntitlementCheckResult();
        }
        return false;
    }
837337
private static boolean sameTenantDefs(TenantDefinition tenantDef1, TenantDefinition tenantDef2) {
        return isEqual(tenantDef1.getProperty(TenantService.CREATED_ON_PROP),
                       tenantDef2.getProperty(TenantService.CREATED_ON_PROP)) &&
               isEqual(tenantDef1.getProperty(TenantService.CREATED_ON_PROP),
                       tenantDef2.getProperty(TenantService.CREATED_ON_PROP));
    }
492641
public static boolean exists(@NonNull String name, @NonNull File directory) {
        if (name == null) { throw new IllegalArgumentException("name cannot be null."); }
        if (directory == null) { throw new IllegalArgumentException("directory cannot be null."); }
        return getDatabasePath(directory, name).exists();
    }
389702
@Override
    public final boolean propertyExists(String name) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "propertyExists", name);

        boolean result = false;

        /* Got to check Maelstrom's transportVersion first as performance for it */
        /* is critical. */
        if (name.equals(MfpConstants.PRP_TRANSVER) && isTransportVersionSet()) {
            result = true;
        }

        /* Next try the user property map as the most likely */
        else if ((mayHaveJmsUserProperties()) && (getJmsUserPropertyMap().containsKey(name))) {
            result = true;
        }

        /* If name starts with JMS it may be a smoke-and-mirrors property */
        else if (name.startsWith(JMS_PREFIX)) {

            /* If it is a JMSX property.... */
            if (name.charAt(JMS_LENGTH) == JMSX_EXTRA_PREFIX) {
                int count = name.length() - JMSX_LENGTH;

                if (name.regionMatches(JMSX_LENGTH, SIProperties.JMSXDeliveryCount, JMSX_LENGTH, count)) {
                    if (isSent())
                        result = true;
                }
                else if (name.regionMatches(JMSX_LENGTH, SIProperties.JMSXAppID, JMSX_LENGTH, count)) {
                    if (getHdr2().getChoiceField(JsHdr2Access.XAPPID) != JsHdr2Access.IS_XAPPID_EMPTY)
                        result = true;
                }
                else if (name.regionMatches(JMSX_LENGTH, SIProperties.JMSXUserID, JMSX_LENGTH, count)) {
                    if (getUserid() != null)
                        result = true;
                }
                /* The other supported JMSX properties just live in the system map */
                else if (mayHaveMappedJmsSystemProperties()) {
                    result = getJmsSystemPropertyMap().containsKey(name);
                }

            }
            /* All the remaining header properties start with JMS_IBM_ */
            else if (name.startsWith(JMS_IBM_EXTRA_PREFIX, JMS_LENGTH)) {
                int count;

                /* First check for the Report ones */
                if (name.regionMatches(JMS_IBM_LENGTH, REPORT, 0, REPORT_LENGTH)) {

                    count = name.length() - REPORT_OFFSET;

                    if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_Expiration, REPORT_OFFSET, count)) {
                        if (getHdr2().getChoiceField(JsHdr2Access.REPORTEXPIRY) != JsHdr2Access.IS_REPORTEXPIRY_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_COA, REPORT_OFFSET, count)) {
                        if (getHdr2().getChoiceField(JsHdr2Access.REPORTCOA) != JsHdr2Access.IS_REPORTCOA_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_COD, REPORT_OFFSET, count)) {
                        if (getHdr2().getChoiceField(JsHdr2Access.REPORTCOD) != JsHdr2Access.IS_REPORTCOD_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_Exception, REPORT_OFFSET, count)) {
                        if (getApi().getChoiceField(JsApiAccess.REPORTEXCEPTION) != JsApiAccess.IS_REPORTEXCEPTION_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_PAN, REPORT_OFFSET, count)) {
                        if (getApi().getChoiceField(JsApiAccess.REPORTPAN) != JsApiAccess.IS_REPORTPAN_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_NAN, REPORT_OFFSET, count)) {
                        if (getApi().getChoiceField(JsApiAccess.REPORTNAN) != JsApiAccess.IS_REPORTNAN_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_Pass_Msg_ID, REPORT_OFFSET, count)) {
                        if (getApi().getChoiceField(JsApiAccess.REPORTPASSMSGID) != JsApiAccess.IS_REPORTPASSMSGID_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_Pass_Correl_ID, REPORT_OFFSET, count)) {
                        if (getApi().getChoiceField(JsApiAccess.REPORTPASSCORRELID) != JsApiAccess.IS_REPORTPASSCORRELID_UNSET)
                            result = true;
                    }
                    else if (name.regionMatches(REPORT_OFFSET, SIProperties.JMS_IBM_Report_Discard_Msg, REPORT_OFFSET, count)) {
                        if (getApi().getChoiceField(JsApiAccess.REPORTDISCARDMSG) != JsApiAccess.IS_REPORTDISCARDMSG_UNSET)
                            result = true;
                    }

                }
                else {
                    /* Then try the other smoke-and-mirrors ones */
                    count = name.length() - JMS_IBM_LENGTH;

                    if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_ExceptionReason, JMS_IBM_LENGTH, count)) {
                        if (getHdr2().getChoiceField(JsHdr2Access.EXCEPTION) != JsHdr2Access.IS_EXCEPTION_EMPTY)
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_ExceptionTimestamp, JMS_IBM_LENGTH, count)) {
                        if (getHdr2().getChoiceField(JsHdr2Access.EXCEPTION) != JsHdr2Access.IS_EXCEPTION_EMPTY)
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_ExceptionMessage, JMS_IBM_LENGTH, count)) {
                        if (getHdr2().getChoiceField(JsHdr2Access.EXCEPTION) != JsHdr2Access.IS_EXCEPTION_EMPTY)
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_ExceptionProblemDestination, JMS_IBM_LENGTH, count)) {
                        if (getExceptionProblemDestination() != null)
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_ExceptionProblemSubscription, JMS_IBM_LENGTH, count)) {
                        if (getExceptionProblemSubscription() != null)
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_Feedback, JMS_IBM_LENGTH, count)) {
                        if ((getApi().getChoiceField(JsApiAccess.REPORTFEEDBACK) != JsApiAccess.IS_REPORTFEEDBACK_UNSET) ||
                            (getApi().getChoiceField(JsApiAccess.REPORTFEEDBACKINT) != JsApiAccess.IS_REPORTFEEDBACKINT_UNSET))
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_System_MessageID, JMS_IBM_LENGTH, count)) {
                        if (getSystemMessageId() != null)
                            result = true;
                    }
                    else if (name.regionMatches(JMS_IBM_LENGTH, SIProperties.JMS_IBM_ArmCorrelator, JMS_IBM_LENGTH, count)) {
                        if (getARMCorrelator() != null)
                            result = true;
                    }

                    /* The other supported JMS_IBM_ properties just live in one (or both) of the maps */
                    else {
                        if (mayHaveMappedJmsSystemProperties()) {
                            result = getJmsSystemPropertyMap().containsKey(name);
                        }
                        if (result == false) {
                            result = getMQMDSetPropertiesMap().containsKey(name);
                        }
                    }
                } // end of else of if Report
            } // end of if JMS_IBM_

            // JMS_TOG_ARM_Correlator
            else if (name.equals(SIProperties.JMS_TOG_ARM_Correlator)) {
                if (getARMCorrelator() != null)
                    result = true;
            }

        } // end of if JMS

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "propertyExists", Boolean.valueOf(result));
        return result;

    }