test_class.file: model/src/test/java/com/abiquo/server/core/pricing/CostCodeDAOTest.java
test_class.identifier: CostCodeDAOTest
test_class.superclass: extends DefaultDAOTestBase<CostCodeDAO, CostCode>
test_case.body: @Test
      public void findCostCodes()
      {
          CostCode c1 = eg().createUniqueInstance();
          CostCode c2 = eg().createUniqueInstance();
  
          ds().persistAll(c1, c2);
  
          CostCodeDAO dao = createDaoForRollbackTransaction();
  
          Collection<CostCode> costCodes = dao.find(null, null, false, 0, 25);
          AssertEx.assertSize(costCodes, 2);
  
      }
test_case.class_method_signature: CostCodeDAOTest.findCostCodes()
test_case.full_signature: @Test public void findCostCodes()
test_case.identifier: findCostCodes
test_case.invocations: createUniqueInstance eg createUniqueInstance eg persistAll ds createDaoForRollbackTransaction find assertSize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findCostCodes()
focal_class.file: model/src/main/java/com/abiquo/server/core/pricing/CostCodeDAO.java
focal_class.identifier: CostCodeDAO
focal_class.class_method_signature: CostCodeDAO.CostCodeDAO()
focal_class.full_signature: public  CostCodeDAO()
focal_class.identifier: CostCodeDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  CostCodeDAO()
focal_class.class_method_signature: CostCodeDAO.CostCodeDAO(final EntityManager entityManager)
focal_class.full_signature: public  CostCodeDAO(final EntityManager entityManager)
focal_class.identifier: CostCodeDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager entityManager)
focal_class.signature:  CostCodeDAO(final EntityManager entityManager)
focal_class.class_method_signature: CostCodeDAO.sameName(final String name)
focal_class.full_signature: public static Criterion sameName(final String name)
focal_class.identifier: sameName
focal_class.modifiers: public static
focal_class.parameters: (final String name)
focal_class.return: Criterion
focal_class.signature: Criterion sameName(final String name)
focal_class.class_method_signature: CostCodeDAO.filterBy(final String filter)
focal_class.full_signature: private Criterion filterBy(final String filter)
focal_class.identifier: filterBy
focal_class.modifiers: private
focal_class.parameters: (final String filter)
focal_class.return: Criterion
focal_class.signature: Criterion filterBy(final String filter)
focal_class.class_method_signature: CostCodeDAO.existAnyOtherCostCodeWithName(final CostCode costCode, final String name)
focal_class.full_signature: public boolean existAnyOtherCostCodeWithName(final CostCode costCode, final String name)
focal_class.identifier: existAnyOtherCostCodeWithName
focal_class.modifiers: public
focal_class.parameters: (final CostCode costCode, final String name)
focal_class.return: boolean
focal_class.signature: boolean existAnyOtherCostCodeWithName(final CostCode costCode, final String name)
focal_class.class_method_signature: CostCodeDAO.existAnyOtherCostCodeWithName(final String name)
focal_class.full_signature: public boolean existAnyOtherCostCodeWithName(final String name)
focal_class.identifier: existAnyOtherCostCodeWithName
focal_class.modifiers: public
focal_class.parameters: (final String name)
focal_class.return: boolean
focal_class.signature: boolean existAnyOtherCostCodeWithName(final String name)
focal_class.class_method_signature: CostCodeDAO.find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_class.full_signature: public Collection<CostCode> find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_class.identifier: find
focal_class.modifiers: public
focal_class.parameters: (final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_class.return: Collection<CostCode>
focal_class.signature: Collection<CostCode> find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_class.class_method_signature: CostCodeDAO.createCriteria(final String filter, final String orderBy, final boolean desc)
focal_class.full_signature: private Criteria createCriteria(final String filter, final String orderBy, final boolean desc)
focal_class.identifier: createCriteria
focal_class.modifiers: private
focal_class.parameters: (final String filter, final String orderBy, final boolean desc)
focal_class.return: Criteria
focal_class.signature: Criteria createCriteria(final String filter, final String orderBy, final boolean desc)
focal_class.superclass: extends DefaultDAOBase<Integer, CostCode>
focal_method.body: public Collection<CostCode> find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
      {
          Criteria criteria = createCriteria(filter, orderBy, desc);
  
          Long total = count(criteria);
  
          criteria = createCriteria(filter, orderBy, desc);
          numResults = (int) (numResults != 0 ? numResults : total);
          if (numResults != 0)
          {
              criteria.setFirstResult(offset * numResults);
              criteria.setMaxResults(numResults);
          }
  
          List<CostCode> result = getResultList(criteria);
  
          PagedList<CostCode> page = new PagedList<CostCode>();
          page.addAll(result);
          if (numResults != 0)
          {
              page.setCurrentElement(offset);
              page.setPageSize(numResults);
          }
          page.setTotalResults(total.intValue());
  
          return page;
      }
focal_method.class_method_signature: CostCodeDAO.find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_method.full_signature: public Collection<CostCode> find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_method.identifier: find
focal_method.invocations: createCriteria count createCriteria setFirstResult setMaxResults getResultList addAll setCurrentElement setPageSize setTotalResults intValue
focal_method.modifiers: public
focal_method.parameters: (final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)
focal_method.return: Collection<CostCode>
focal_method.signature: Collection<CostCode> find(final String filter, final String orderBy, final boolean desc,
          final int offset, int numResults)