/**
  * Filter the query by a related Kemasan object
  *
  * @param   Kemasan|PropelObjectCollection $kemasan The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 BarangQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByKemasan($kemasan, $comparison = null)
 {
     if ($kemasan instanceof Kemasan) {
         return $this->addUsingAlias(BarangPeer::ID_KEMASAN, $kemasan->getId(), $comparison);
     } elseif ($kemasan instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(BarangPeer::ID_KEMASAN, $kemasan->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByKemasan() only accepts arguments of type Kemasan or PropelCollection');
     }
 }