/**
  * {@inheritdoc}
  */
 public function getTransformerInfo(ColumnInfoInterface $columnInfo, ClassMetadata $metadata)
 {
     if ($this->class !== $metadata->getName() || !$columnInfo->getAttribute() || $this->backendType !== $columnInfo->getAttribute()->getBackendType()) {
         return;
     }
     return array($this->transformer, array());
 }
 /**
  * {@inheritdoc}
  */
 public function setValue($object, ColumnInfoInterface $columnInfo, $data, array $options = array())
 {
     $suffixes = $columnInfo->getSuffixes();
     $suffix = array_pop($suffixes);
     if (!$object->getMetric()) {
         $metric = $this->metricFactory->createMetric($columnInfo->getAttribute()->getMetricFamily());
         $object->setMetric($metric);
     }
     if ('unit' === $suffix) {
         $object->getMetric()->setUnit($data);
     } else {
         $parts = preg_split('/\\s+/', $data);
         $object->getMetric()->setData($parts[0] === '' ? null : $parts[0]);
         if (isset($parts[1])) {
             $object->getMetric()->setUnit($parts[1]);
         }
     }
 }
 /**
  * Returns a ProductValue
  *
  * @param ProductInterface    $product
  * @param ColumnInfoInterface $columnInfo
  *
  * @return ProductValueInterface
  */
 protected function getProductValue(ProductInterface $product, ColumnInfoInterface $columnInfo)
 {
     $productValue = $product->getValue($columnInfo->getName(), $columnInfo->getLocale(), $columnInfo->getScope());
     if (null === $productValue) {
         $attribute = $columnInfo->getAttribute();
         $locale = $columnInfo->getLocale();
         $scope = $columnInfo->getScope();
         $productValue = $this->productBuilder->createProductValue($attribute, $locale, $scope);
         $product->addValue($productValue);
     }
     return $productValue;
 }