Returns True if this entity no longer exists in the underlying
        model.
493289
def dead(self):
        
        return (
            self.data is None or
            self.model.state.entity_data(
                self.entity_type, self.entity_id, -1) is None
        )
1096606
def has_model(self, name):
        
        return self.es.exists(index=self.index_name,
                              doc_type=self.DOC_TYPE, id=name)
141503
def _is_initialized(self, entity):
    
    return (not self._required or
            ((self._has_value(entity) or self._default is not None) and
             self._get_value(entity) is not None))
1043620
def is_marked_new(self, entity):
        
        try:
            result = EntityState.get_state(entity).status == ENTITY_STATUS.NEW
        except ValueError:
            result = False
        return result
127231
public function isRemembered() {
		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_REMEMBERED])) {
			return $_SESSION[self::SESSION_FIELD_REMEMBERED];
		}
		else {
			return null;
		}
	}
1116397
protected function isDeleteCascadeEmulationNeeded()
    {
        $table = $this->getTable();
        if ((!$this->getPlatform()->supportsNativeDeleteTrigger() || $this->getBuildProperty('generator.objectModel.emulateForeignKeyConstraints')) && count($table->getReferrers()) > 0) {
            foreach ($table->getReferrers() as $fk) {
                if ( ForeignKey::CASCADE === $fk->getOnDelete()) {
                    return true;
                }
            }
        }

        return false;
    }
1159521
public function delete()
	{
		if ($this->exists)
		{
			if ($this->fireModelEvent('deleting') === false) return false;

			// Here, we'll touch the owning models, verifying these timestamps get updated
			// for the models. This will allow any caching to get broken on the parents
			// by the timestamp. Then we will go ahead and delete the model instance.
			$this->touchOwners();

			$this->performDeleteOnModel();

			$this->exists = false;

			// Once the model has been deleted, we will fire off the deleted event so that
			// the developers may hook into post-delete operations. We will then return
			// a boolean true as the delete is presumably successful on the database.
			$this->fireModelEvent('deleted', false);

			return true;
		}
	}
946497
def hasExpired(self):
        
        return (datetime.datetime.utcnow() - self.lastUpdateTime).total_seconds() > self.maxAgeSeconds
421801
private function hasToBeReloaded()
    {
        if (!$this->getWurflConfig()->allowReload) {
            return false;
        }

        $state = $this->getPersistenceStorage()->load(self::WURFL_API_STATE);

        return !$this->isStateCurrent($state);
    }
1112766
public void checkKeepOrRemove() {
    boolean _hasKeepAfterExpired = heapCache.isKeepAfterExpired();
    if (expiry != 0 || remove || _hasKeepAfterExpired) {
      mutationUpdateHeap();
      return;
    }
    if (_hasKeepAfterExpired) {
      expiredImmediatelyKeepData();
      return;
    }
    expiredImmediatelyAndRemove();
  }
1225526
final boolean isAnyChildIgnored() {
    if (isAnyChildIgnored == null) {
      isAnyChildIgnored = false;
      for (RecursableDiffEntity entity : childEntities()) {
        if ((entity.isIgnored() && !entity.isContentEmpty()) || entity.isAnyChildIgnored()) {
          isAnyChildIgnored = true;
          break;
        }
      }
    }
    return isAnyChildIgnored;
  }
1346392
@Transactional
    public void delete(E entity) {
        if (entityManager.contains(entity)) {
            entityManager.remove(entity);
        } else {
            // could be a delete on a transient instance
            E entityRef = entityManager.getReference(type, entity.getId());

            if (entityRef != null) {
                entityManager.remove(entityRef);
            } else {
                log.warning("Attempt to delete an instance that is not present in the database: " + entity);
            }
        }
    }
578094
@Override
    public boolean hasNext()
    {
        if (fetchSize != 0 && (count % fetchSize) == 0)
        {
            try
            {
                results = populateEntities(entityMetadata, client);
                count = 0;
            }
            catch (Exception e)
            {
                throw new PersistenceException("Error while scrolling over results, Caused by :.", e);
            }
        }
        if (results != null && !results.isEmpty() && count < results.size())
        {
            return true;
        }

        return false;
    }
1081997
def assert_instance_deleted(self, model_class, **kwargs):
        
        return _InstanceContext(
            self.assert_instance_exists,
            self.assert_instance_does_not_exist,
            model_class,
            **kwargs
        )
617061
def has_entities(status):
    
    try:
        if sum(len(v) for v in status.entities.values()) > 0:
            return True

    except AttributeError:
        if sum(len(v) for v in status['entities'].values()) > 0:
            return True

    return False
933316
def exists(self, uri):
        
        ##entity_uri = "/".join([self.base_url, entity_id])
        try:
            urllib.request.urlopen(uri)
            return True
        except urllib.error.HTTPError:
            return False
119252
public boolean exists(){
        return null != new DB(metaModelLocal.getDbName()).firstCell(metaModelLocal.getDialect().selectExists(metaModelLocal), getId());
    }