test_class.file: model/src/test/java/com/abiquo/server/core/pricing/CostCodeCurrencyDAOTest.java
test_class.identifier: CostCodeCurrencyDAOTest
test_class.superclass: extends
      DefaultDAOTestBase<CostCodeCurrencyDAO, CostCodeCurrency>
test_case.body: @Test
      public void findCostCodeCurrencies()
      {
          CostCodeCurrency c1 = eg().createUniqueInstance();
          CostCodeCurrency c2 = eg().createUniqueInstance();
  
          ds().persistAll(c1.getCurrency(), c1.getCostCode(), c1, c2.getCurrency(), c2.getCostCode(),
              c2);
  
          CostCodeCurrencyDAO dao = createDaoForRollbackTransaction();
  
          Collection<CostCodeCurrency> ccs = dao.find(c1.getCostCode(), null);
          AssertEx.assertSize(ccs, 1);
          ccs = dao.find(c2.getCostCode(), null);
          AssertEx.assertSize(ccs, 1);
  
      }
test_case.class_method_signature: CostCodeCurrencyDAOTest.findCostCodeCurrencies()
test_case.full_signature: @Test public void findCostCodeCurrencies()
test_case.identifier: findCostCodeCurrencies
test_case.invocations: createUniqueInstance eg createUniqueInstance eg persistAll ds getCurrency getCostCode getCurrency getCostCode createDaoForRollbackTransaction find getCostCode assertSize find getCostCode assertSize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findCostCodeCurrencies()
focal_class.declarator: COST_CODES =
          " select distinct ccc.costCode FROM com.abiquo.server.core.pricing.CostCodeCurrency ccc "
focal_class.modifier: private final static
focal_class.original_string: private final static String COST_CODES =
          " select distinct ccc.costCode FROM com.abiquo.server.core.pricing.CostCodeCurrency ccc ";
focal_class.type: String
focal_class.var_name: COST_CODES
focal_class.file: model/src/main/java/com/abiquo/server/core/pricing/CostCodeCurrencyDAO.java
focal_class.identifier: CostCodeCurrencyDAO
focal_class.class_method_signature: CostCodeCurrencyDAO.CostCodeCurrencyDAO()
focal_class.full_signature: public  CostCodeCurrencyDAO()
focal_class.identifier: CostCodeCurrencyDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  CostCodeCurrencyDAO()
focal_class.class_method_signature: CostCodeCurrencyDAO.CostCodeCurrencyDAO(final EntityManager entityManager)
focal_class.full_signature: public  CostCodeCurrencyDAO(final EntityManager entityManager)
focal_class.identifier: CostCodeCurrencyDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager entityManager)
focal_class.signature:  CostCodeCurrencyDAO(final EntityManager entityManager)
focal_class.class_method_signature: CostCodeCurrencyDAO.sameCostCode(final CostCode costCode)
focal_class.full_signature: private Criterion sameCostCode(final CostCode costCode)
focal_class.identifier: sameCostCode
focal_class.modifiers: private
focal_class.parameters: (final CostCode costCode)
focal_class.return: Criterion
focal_class.signature: Criterion sameCostCode(final CostCode costCode)
focal_class.class_method_signature: CostCodeCurrencyDAO.sameCurrency(final Currency currency)
focal_class.full_signature: private Criterion sameCurrency(final Currency currency)
focal_class.identifier: sameCurrency
focal_class.modifiers: private
focal_class.parameters: (final Currency currency)
focal_class.return: Criterion
focal_class.signature: Criterion sameCurrency(final Currency currency)
focal_class.class_method_signature: CostCodeCurrencyDAO.findCurrencyCostCode(final CostCode costCode, final Currency currency)
focal_class.full_signature: public CostCodeCurrency findCurrencyCostCode(final CostCode costCode, final Currency currency)
focal_class.identifier: findCurrencyCostCode
focal_class.modifiers: public
focal_class.parameters: (final CostCode costCode, final Currency currency)
focal_class.return: CostCodeCurrency
focal_class.signature: CostCodeCurrency findCurrencyCostCode(final CostCode costCode, final Currency currency)
focal_class.class_method_signature: CostCodeCurrencyDAO.existAnyOtherWithCurrency(final CostCodeCurrency costCodeCurrency,
          final Currency currency, final CostCode costCode)
focal_class.full_signature: public boolean existAnyOtherWithCurrency(final CostCodeCurrency costCodeCurrency,
          final Currency currency, final CostCode costCode)
focal_class.identifier: existAnyOtherWithCurrency
focal_class.modifiers: public
focal_class.parameters: (final CostCodeCurrency costCodeCurrency,
          final Currency currency, final CostCode costCode)
focal_class.return: boolean
focal_class.signature: boolean existAnyOtherWithCurrency(final CostCodeCurrency costCodeCurrency,
          final Currency currency, final CostCode costCode)
focal_class.class_method_signature: CostCodeCurrencyDAO.find(final CostCode cc, final Currency currency)
focal_class.full_signature: public Collection<CostCodeCurrency> find(final CostCode cc, final Currency currency)
focal_class.identifier: find
focal_class.modifiers: public
focal_class.parameters: (final CostCode cc, final Currency currency)
focal_class.return: Collection<CostCodeCurrency>
focal_class.signature: Collection<CostCodeCurrency> find(final CostCode cc, final Currency currency)
focal_class.class_method_signature: CostCodeCurrencyDAO.findCostCodesIds()
focal_class.full_signature: @SuppressWarnings("unchecked") public List<CostCode> findCostCodesIds()
focal_class.identifier: findCostCodesIds
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: ()
focal_class.return: List<CostCode>
focal_class.signature: List<CostCode> findCostCodesIds()
focal_class.superclass: extends DefaultDAOBase<Integer, CostCodeCurrency>
focal_method.body: public Collection<CostCodeCurrency> find(final CostCode cc, final Currency currency)
      {
  
          Criteria criteria = createCriteria();
          if (cc != null)
          {
              criteria.add(sameCostCode(cc));
          }
          else if (currency != null)
          {
              criteria.add(sameCurrency(currency));
          }
          // Criteria criteria = createCriteria(sameCurrency(cc));
  
          return criteria.list();
      }
focal_method.class_method_signature: CostCodeCurrencyDAO.find(final CostCode cc, final Currency currency)
focal_method.full_signature: public Collection<CostCodeCurrency> find(final CostCode cc, final Currency currency)
focal_method.identifier: find
focal_method.invocations: createCriteria add sameCostCode add sameCurrency list
focal_method.modifiers: public
focal_method.parameters: (final CostCode cc, final Currency currency)
focal_method.return: Collection<CostCodeCurrency>
focal_method.signature: Collection<CostCodeCurrency> find(final CostCode cc, final Currency currency)