Checks if the current entity is new or not

@return boolean
767440
public function isNew()
    {
        $result = true;
        if($entity = $this->getIterator()->current()) {
            $result = $entity->isNew();
        }

        return $result;
    }
1372411
function is_property($new = null)
    {
        if (isset($new) && ($this->_attributes['is_property'] != $new)){
            $this->change('is_property', (bool)$new);
        }
        return $this->_attributes['is_property'];
    }
490745
public function isNewItemAdded()
    {
        if ($this->_blNewITemAdded == null) {
            $this->_blNewITemAdded = (bool) \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("blAddedNewItem");
            \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable("blAddedNewItem");
        }

        return $this->_blNewITemAdded;
    }
998748
public function newAction()
    {
        $entity = new Family();
        $form   = $this->createForm(new FamilyType(), $entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
173567
public function hasChanges()
    {
        if ($this->hasChanges) {
            return $this->hasChanges;
        }

        $this->hasChanges = count($this->newResources) > 0 || count($this->deletedResources) > 0 || count($this->updatedResources) > 0;

        return $this->hasChanges;
    }
206118
public function hasPrevPost()
    {
        return ($this->prevPost && $this->prevPost->ID !== $this->get('ID')) ? true : false;
    }
1166379
public function objectExists() {
		if ($this->data()->useObjectExistsHandling()) {
			return singleton($this->CreateType)->objectExists($this->request->postVars(), $this->pid);
		}
	}
868173
public function getIsNew ()
		{
			if ($this->_isNew == false)
				return false;

			for ($i = 1; $i <= $this->_params[ 'totalChunks' ]; $i++)
			{
				if ($this->chunkIsUploaded($i))
				{
					$this->_isNew = false;

					return false;
				}
			}

			$this->_isNew = true;

			return true;
		}
296532
protected function hasChangedUsingReflection($entity)
    {
        // Get all the properties in the original entity and the current one
        $hashId                  = $this->getHashId($entity);
        $currentEntityReflection = new ReflectionClass($entity);
        $currentProperties       = $currentEntityReflection->getProperties();
        $currentPropertiesAsHash = [];

        $originalData             = $this->originalData[$hashId];
        $originalEntityReflection = new ReflectionClass($originalData);
        $originalProperties       = $originalEntityReflection->getProperties();
        $originalPropertiesAsHash = [];

        // Map each property name to its value for the current entity
        foreach ($currentProperties as $currentProperty) {
            $currentProperty->setAccessible(true);
            $currentPropertiesAsHash[$currentProperty->getName()] = $currentProperty->getValue($entity);
        }

        // Map each property name to its value for the original entity
        foreach ($originalProperties as $originalProperty) {
            $originalProperty->setAccessible(true);
            $originalPropertiesAsHash[$originalProperty->getName()] = $originalProperty->getValue($originalData);
        }

        if (count($originalProperties) != count($currentProperties)) {
            // Clearly there's a difference here, so update
            return true;
        }

        // Compare all the property values to see if they are identical
        foreach ($originalPropertiesAsHash as $name => $value) {
            if (!array_key_exists($name, $currentPropertiesAsHash) || $currentPropertiesAsHash[$name] !== $value) {
                return true;
            }
        }

        return false;
    }
210045
public function stateChanged($entity, $current, $new)
    {
        $key = $current.'=>'.$new;

        if (!isset($this->_machine[$key])) {
            return true;
        }

        $callbacks = $this->_machine[$key];

        foreach ($callbacks as $callback) {
            $result = $callback;
            if (is_string($callback)) {
                $result = $this->{'_'.$callback}($entity);
            }
            if ($result === false) {
                return false;
            }
        }

        return true;
    }
846594
public function isChanged()
    {
        $snapshot = $this->_snapshot;
        if (!is_array($snapshot)) {
            return true;
        }
        $metadata = $this->getModelsMetaData();
        $attrs = $metadata->getNonPrimaryKeyAttributes($this);
        $automatic = $metadata->getAutomaticUpdateAttributes($this);
        $bindDataTypes = $metadata->getBindTypes($this);
        foreach ($attrs as $name) {
            if (isset($automatic[$name])) {
                continue;
            }
            $value = $this->readAttribute($name);
            $snapshotValue = ArrayHelper::fetch($snapshot, $name);
            if ($value === null) {
                if ($snapshotValue !== null) {
                    return true;
                }
            } else {
                if ($snapshotValue === null) {
                    return true;
                }
                $bindType = ArrayHelper::fetch($bindDataTypes, $name);
                switch ($bindType) {
                    case Column::TYPE_DATE:
                    case Column::TYPE_VARCHAR:
                    case Column::TYPE_DATETIME:
                    case Column::TYPE_CHAR:
                    case Column::TYPE_TEXT:
                    case Column::TYPE_VARCHAR:
                    case Column::TYPE_BIGINTEGER:
                        if (((string)$value) !== ((string)$snapshotValue)) {
                            return true;
                        }
                        break;
                    default:
                        if ($value != $snapshotValue) {
                            return true;
                        }
                }
            }
        }
        return false;
    }
663458
function updated($new = null)
    {
        if (isset($new) && ($this->_attributes['updated'] != $new)){
            $this->change('updated', (int)$new);
        }
        return $this->_attributes['updated'];
    }
813124
public function hasOnUpdate()
    {
        $database = $this->getTable()->getDatabase();
        if($database instanceof Database &&
               $this->onUpdate === $database->getPlatform()->getDefaultFKOnUpdateBehavior()) {
          return false;
        }

        return ($this->onUpdate !== self::NONE);
    }
651680
public function isLocked()
    {
        if($this->getModel()->getState()->isUnique())
        {
            $entity = $this->getModel()->fetch();

            if($entity->isLockable() && $entity->isLocked()) {
                return true;
            }
        }

        return false;
    }
623869
public function newAction()
    {
        $entity = new Service();
        $form   = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
744213
public function isUnique()
    {
        $unique = false;

        //Get the unique states
        $states = $this->getData(true);

        if (!empty($states)) {
            $unique = true;

            //If a state contains multiple values the state is not unique
            foreach ($states as $state) {
                if (is_array($state) && count($state) > 1) {
                    $unique = false;
                    break;
                }
            }
        }

        return $unique;
    }
919101
protected function isVersioned()
    {
        /** @var Versioned|DataObject $owner */
        $owner = $this->owner;
        return class_exists(Versioned::class)
            && $owner->hasExtension(Versioned::class)
            && $owner->hasStages();
    }