/**
  * Filter the query by a related Barang object
  *
  * @param   Barang|PropelObjectCollection $barang  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 KemasanQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByBarang($barang, $comparison = null)
 {
     if ($barang instanceof Barang) {
         return $this->addUsingAlias(KemasanPeer::ID, $barang->getIdKemasan(), $comparison);
     } elseif ($barang instanceof PropelObjectCollection) {
         return $this->useBarangQuery()->filterByPrimaryKeys($barang->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBarang() only accepts arguments of type Barang or PropelCollection');
     }
 }