Injects the data mapper

@param DataMapper $dataMapper
@return void
505276
public function injectDataMapper(DataMapper $dataMapper)
    {
        $this->dataMapper = $dataMapper;
        $this->dataMapper->setPersistenceManager($this);
    }
788473
public function addConfigured(FileNameMapper $fileNameMapper)
    {
        if ($this->map !== null || $this->mapperElement !== null) {
            throw new BuildException('Cannot define more than one mapper');
        }
        $this->map = $fileNameMapper;
    }
510799
private function getDataMapper()
    {
        if($this->dataMapper == null) {
            $this->dataMapper = new \Friday\Model\DataMapper(self::$app->config);
        }
        return $this->dataMapper;
    }
542648
protected function getDataMapper() {
		if(!$this->dataMapper)
			$this->dataMapper = $this->definition->getContainer()['dataMapper'];
		return $this->dataMapper;
	}
472409
public function add(Mapper $fileNameMapper)
    {
        if ($this->isReference()) {
            throw $this->noChildrenAllowed();
        }
        if ($this->container == null) {
            if ($this->type == null && $this->classname == null) {
                $this->container = new CompositeMapper();
            } else {
                $m = $this->getImplementation();
                if ($m instanceof ContainerMapper) {
                    $this->container = $m;
                } else {
                    throw new BuildException("$m mapper implementation does not support nested mappers!");
                }
            }
        }
        $this->container->add($fileNameMapper);
        $this->checked = false;
    }
494407
protected function _insert(Garp_Model $model, array $data, array $mapping) {
        $newData = array();
        // Remove unused mappings
        $mapping = array_filter($mapping);
        foreach ($mapping as $key => $val) {
            $newData[$val] = $data[$key];
        }
        return $model->insert($newData);
    }
1040545
public function createMapper()
    {
        if ($this->mapperElement !== null) {
            throw new BuildException(
                'Cannot define more than one mapper',
                $this->getLocation()
            );
        }
        $this->mapperElement = new Mapper($this->project);

        return $this->mapperElement;
    }
468580
public function getDataMapper()
    {
        $dataMapper = Ioc::make(DataMapper::class);
        $dataMapper->setSchema($this->getSchema());

        return $dataMapper;
    }
72102
public static function createDataMapper($table = null, $keys = null, $db = null)
    {
        $table = $table ?: static::$table;
        $keys = $keys ?: static::$keys;

        $mapper = new DataMapper($table, $keys, $db);

        if (static::$alias !== null) {
            $mapper->alias(static::$alias);
        } else {
            $mapper->alias(StringInflector::getInstance()->toSingular($table));
        }

        if (static::$dataClass) {
            $mapper->setDataClass(static::$dataClass);
        }

        if (static::$dataSetClass) {
            $mapper->setDatasetClass(static::$dataSetClass);
        }

        $mapper->getDispatcher()->addListener(new static());

        static::init($mapper);

        return $mapper;
    }
1240980
public function setFormMapper(FormMapper $mapper)
	{
		$this->formMapper = $mapper;
		$mapper->setAdmin($this);
		return $this;
	}
496511
public function execute(DataSetInterface $dataSet): void
    {
        $shoppingListEntity = $this->createShoppingListQuery()
            ->filterByKey($dataSet[ShoppingListDataSetInterface::COLUMN_KEY])
            ->findOneOrCreate();

        $shoppingListEntity
            ->setName($dataSet[ShoppingListDataSetInterface::COLUMN_NAME])
            ->setCustomerReference($dataSet[ShoppingListDataSetInterface::COLUMN_OWNER_CUSTOMER_REFERENCE])
            ->save();
    }
63339
public function getDataMapper()
    {
        if (!$this->mapper) {
            $this->mapper = new DataMapper($this->table, $this->keys);
        }

        return $this->mapper;
    }
564253
protected function configureListFields(ListMapper $listMapper)
	{

		$listMapper
		->addIdentifier('name',NULL,array('label'=>'Name'))
		->add('description',NULL,array('label'=>'Description'))
		->add('subject',NULL,array('label'=>'Subject'))
		->add('is_active',NULL,array('label'=>'Active'))
		->add('created',NULL,array('label'=>'Created'))
		->add('updated',NULL,array('label'=>'Updated'));
	
		$listMapper->add('_action', 'actions',array('actions' => array('edit' => array())));
	
	}
826232
public function setListMapper(ListMapper $mapper)
	{
		$this->listMapper = $mapper;
		$mapper->setAdmin($this);
		return $this;
	}
793788
private function saveManyToManyAndCommaSeparatedRelatedModels(\Tx_Oelib_List $list, \Tx_Oelib_DataMapper $mapper)
    {
        /** @var \Tx_Oelib_Model $model */
        foreach ($list as $model) {
            $mapper->save($model);
        }
    }
666814
public void addDataProvider(K key, DataProvider<DPO> dataProvider) {
        dataProviders.put(key, dataProvider);
    }
1265030
public function injectEntityManager(EntityManagerInterface $entityManager, ClassMetadata $classMetadata) : void
    {
        if ($entityManager !== self::$entityManager) {
            throw new RuntimeException(
                'Trying to use PersistentObject with different EntityManager instances. ' .
                'Was PersistentObject::setEntityManager() called?'
            );
        }

        $this->cm = $classMetadata;
    }