/**
  * @param EncryptedTransaction $encryptedTransaction
  * @return bool
  */
 public function equals(EncryptedTransaction $encryptedTransaction)
 {
     if ($this->id->equals($encryptedTransaction->getId())) {
         return true;
     } else {
         return false;
     }
 }
 /**
  * @param EncryptedTransaction $encryptedTransaction
  * @return EncryptedTransactionDocument
  */
 private function encryptedTransactionToDocument(EncryptedTransaction $encryptedTransaction)
 {
     $searchFields = array('id' => $encryptedTransaction->getId()->getValue(), 'walletId' => $encryptedTransaction->getWalletId()->getValue(), 'hash' => $encryptedTransaction->getHash(), 'description' => $encryptedTransaction->getDescription(), 'creationTime' => clone $encryptedTransaction->getCreationTime(), 'hash-walletId' => $encryptedTransaction->getHash() . '-' . $encryptedTransaction->getWalletId()->getValue());
     $docArray = $searchFields;
     $docArray['data'] = serialize($encryptedTransaction);
     $encryptedTransactionDocument = new EncryptedTransactionDocument($docArray);
     $encryptedTransactionDocument->setId($encryptedTransaction->getId()->getValue());
     return $encryptedTransactionDocument;
 }