test_class.file: model/src/test/java/com/abiquo/server/core/enterprise/EnterpriseDAOTest.java
test_class.identifier: EnterpriseDAOTest
test_class.superclass: extends DefaultDAOTestBase<EnterpriseDAO, Enterprise>
test_case.body: @Test
      public void existsAnyWithName()
      {
          Enterprise enterprise1 = eg().createInstance("abcd");
          ds().persistAll(enterprise1);
  
          EnterpriseDAO dao = createDaoForReadWriteTransaction();
  
          assertTrue(dao.existsAnyWithName("aBCd"));
  
          assertFalse(dao.existsAnyWithName("inexistent"));
      }
test_case.class_method_signature: EnterpriseDAOTest.existsAnyWithName()
test_case.full_signature: @Test public void existsAnyWithName()
test_case.identifier: existsAnyWithName
test_case.invocations: createInstance eg persistAll ds createDaoForReadWriteTransaction assertTrue existsAnyWithName assertFalse existsAnyWithName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void existsAnyWithName()
focal_class.declarator: storageRep
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageRep storageRep;
focal_class.type: StorageRep
focal_class.var_name: storageRep
focal_class.declarator: vlanNetDAO
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private VLANNetworkDAO vlanNetDAO;
focal_class.type: VLANNetworkDAO
focal_class.var_name: vlanNetDAO
focal_class.declarator: ipPoolDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private IpPoolManagementDAO ipPoolDao;
focal_class.type: IpPoolManagementDAO
focal_class.var_name: ipPoolDao
focal_class.declarator: SUM_VM_RESOURCES =
          "select sum(vm.cpu), sum(vm.ram), sum(vm.hd) from virtualmachine vm, hypervisor hy, physicalmachine pm "
              + " where hy.id = vm.idHypervisor and pm.idPhysicalMachine = hy.idPhysicalMachine "// and
              // pm.idState
              // !=
              // 7"
              // //
              // not
              // HA_DISABLED
              + " and vm.idEnterprise = :enterpriseId and vm.state != 'NOT_ALLOCATED' and vm.idHypervisor is not null"
focal_class.modifier: private static final
focal_class.original_string: private static final String SUM_VM_RESOURCES =
          "select sum(vm.cpu), sum(vm.ram), sum(vm.hd) from virtualmachine vm, hypervisor hy, physicalmachine pm "
              + " where hy.id = vm.idHypervisor and pm.idPhysicalMachine = hy.idPhysicalMachine "// and
              // pm.idState
              // !=
              // 7"
              // //
              // not
              // HA_DISABLED
              + " and vm.idEnterprise = :enterpriseId and vm.state != 'NOT_ALLOCATED' and vm.idHypervisor is not null";
focal_class.type: String
focal_class.var_name: SUM_VM_RESOURCES
focal_class.declarator: SUM_EXTRA_HD_RESOURCES =
          "select sum(r.limitResource) from rasd r, rasd_management rm, virtualdatacenter vdc, virtualmachine vm where r.instanceID = rm.idResource "
              + "and rm.idResourceType = '17' and rm.idVirtualDatacenter = vdc.idVirtualDatacenter and vdc.idEnterprise=:enterpriseId "
              + "and  rm.idVM = vm.idVM and vm.state != 'NOT_ALLOCATED' and vm.idHypervisor is not null"
focal_class.modifier: private static final
focal_class.original_string: private static final String SUM_EXTRA_HD_RESOURCES =
          "select sum(r.limitResource) from rasd r, rasd_management rm, virtualdatacenter vdc, virtualmachine vm where r.instanceID = rm.idResource "
              + "and rm.idResourceType = '17' and rm.idVirtualDatacenter = vdc.idVirtualDatacenter and vdc.idEnterprise=:enterpriseId "
              + "and  rm.idVM = vm.idVM and vm.state != 'NOT_ALLOCATED' and vm.idHypervisor is not null";
focal_class.type: String
focal_class.var_name: SUM_EXTRA_HD_RESOURCES
focal_class.file: model/src/main/java/com/abiquo/server/core/enterprise/EnterpriseDAO.java
focal_class.identifier: EnterpriseDAO
focal_class.class_method_signature: EnterpriseDAO.EnterpriseDAO()
focal_class.full_signature: public  EnterpriseDAO()
focal_class.identifier: EnterpriseDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EnterpriseDAO()
focal_class.class_method_signature: EnterpriseDAO.EnterpriseDAO(final EntityManager entityManager)
focal_class.full_signature: public  EnterpriseDAO(final EntityManager entityManager)
focal_class.identifier: EnterpriseDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager entityManager)
focal_class.signature:  EnterpriseDAO(final EntityManager entityManager)
focal_class.class_method_signature: EnterpriseDAO.findAll()
focal_class.full_signature: @Override public List<Enterprise> findAll()
focal_class.identifier: findAll
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Enterprise>
focal_class.signature: List<Enterprise> findAll()
focal_class.class_method_signature: EnterpriseDAO.findAll(Integer firstElem, final Integer numResults)
focal_class.full_signature: public List<Enterprise> findAll(Integer firstElem, final Integer numResults)
focal_class.identifier: findAll
focal_class.modifiers: public
focal_class.parameters: (Integer firstElem, final Integer numResults)
focal_class.return: List<Enterprise>
focal_class.signature: List<Enterprise> findAll(Integer firstElem, final Integer numResults)
focal_class.class_method_signature: EnterpriseDAO.findByNameAnywhere(final String name)
focal_class.full_signature: public List<Enterprise> findByNameAnywhere(final String name)
focal_class.identifier: findByNameAnywhere
focal_class.modifiers: public
focal_class.parameters: (final String name)
focal_class.return: List<Enterprise>
focal_class.signature: List<Enterprise> findByNameAnywhere(final String name)
focal_class.class_method_signature: EnterpriseDAO.findByPricingTemplate(Integer firstElem, final PricingTemplate pt,
          final boolean included, final String filterName, final Integer numResults,
          final Integer idEnterprise)
focal_class.full_signature: public List<Enterprise> findByPricingTemplate(Integer firstElem, final PricingTemplate pt,
          final boolean included, final String filterName, final Integer numResults,
          final Integer idEnterprise)
focal_class.identifier: findByPricingTemplate
focal_class.modifiers: public
focal_class.parameters: (Integer firstElem, final PricingTemplate pt,
          final boolean included, final String filterName, final Integer numResults,
          final Integer idEnterprise)
focal_class.return: List<Enterprise>
focal_class.signature: List<Enterprise> findByPricingTemplate(Integer firstElem, final PricingTemplate pt,
          final boolean included, final String filterName, final Integer numResults,
          final Integer idEnterprise)
focal_class.class_method_signature: EnterpriseDAO.nameLikeAnywhere(final String name)
focal_class.full_signature: private static Criterion nameLikeAnywhere(final String name)
focal_class.identifier: nameLikeAnywhere
focal_class.modifiers: private static
focal_class.parameters: (final String name)
focal_class.return: Criterion
focal_class.signature: Criterion nameLikeAnywhere(final String name)
focal_class.class_method_signature: EnterpriseDAO.persist(final Enterprise enterprise)
focal_class.full_signature: @Override public void persist(final Enterprise enterprise)
focal_class.identifier: persist
focal_class.modifiers: @Override public
focal_class.parameters: (final Enterprise enterprise)
focal_class.return: void
focal_class.signature: void persist(final Enterprise enterprise)
focal_class.class_method_signature: EnterpriseDAO.existsAnyWithName(final String name)
focal_class.full_signature: public boolean existsAnyWithName(final String name)
focal_class.identifier: existsAnyWithName
focal_class.modifiers: public
focal_class.parameters: (final String name)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithName(final String name)
focal_class.class_method_signature: EnterpriseDAO.nameEqual(final String name)
focal_class.full_signature: private Criterion nameEqual(final String name)
focal_class.identifier: nameEqual
focal_class.modifiers: private
focal_class.parameters: (final String name)
focal_class.return: Criterion
focal_class.signature: Criterion nameEqual(final String name)
focal_class.class_method_signature: EnterpriseDAO.existsAnyOtherWithName(final Enterprise enterprise, final String name)
focal_class.full_signature: public boolean existsAnyOtherWithName(final Enterprise enterprise, final String name)
focal_class.identifier: existsAnyOtherWithName
focal_class.modifiers: public
focal_class.parameters: (final Enterprise enterprise, final String name)
focal_class.return: boolean
focal_class.signature: boolean existsAnyOtherWithName(final Enterprise enterprise, final String name)
focal_class.class_method_signature: EnterpriseDAO.differentPricingTemplateOrNull(final PricingTemplate pricingTemplate)
focal_class.full_signature: private Criterion differentPricingTemplateOrNull(final PricingTemplate pricingTemplate)
focal_class.identifier: differentPricingTemplateOrNull
focal_class.modifiers: private
focal_class.parameters: (final PricingTemplate pricingTemplate)
focal_class.return: Criterion
focal_class.signature: Criterion differentPricingTemplateOrNull(final PricingTemplate pricingTemplate)
focal_class.class_method_signature: EnterpriseDAO.samePricingTemplate(final PricingTemplate pricingTemplate)
focal_class.full_signature: private Criterion samePricingTemplate(final PricingTemplate pricingTemplate)
focal_class.identifier: samePricingTemplate
focal_class.modifiers: private
focal_class.parameters: (final PricingTemplate pricingTemplate)
focal_class.return: Criterion
focal_class.signature: Criterion samePricingTemplate(final PricingTemplate pricingTemplate)
focal_class.class_method_signature: EnterpriseDAO.withPricingTemplate()
focal_class.full_signature: private Criterion withPricingTemplate()
focal_class.identifier: withPricingTemplate
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Criterion
focal_class.signature: Criterion withPricingTemplate()
focal_class.class_method_signature: EnterpriseDAO.withoutPricingTemplate()
focal_class.full_signature: private Criterion withoutPricingTemplate()
focal_class.identifier: withoutPricingTemplate
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Criterion
focal_class.signature: Criterion withoutPricingTemplate()
focal_class.class_method_signature: EnterpriseDAO.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: EnterpriseDAO.getEnterpriseResourceUsage(final int enterpriseId)
focal_class.full_signature: public DefaultEntityCurrentUsed getEnterpriseResourceUsage(final int enterpriseId)
focal_class.identifier: getEnterpriseResourceUsage
focal_class.modifiers: public
focal_class.parameters: (final int enterpriseId)
focal_class.return: DefaultEntityCurrentUsed
focal_class.signature: DefaultEntityCurrentUsed getEnterpriseResourceUsage(final int enterpriseId)
focal_class.class_method_signature: EnterpriseDAO.getStorageUsage(final Integer idEnterprise)
focal_class.full_signature: private Long getStorageUsage(final Integer idEnterprise)
focal_class.identifier: getStorageUsage
focal_class.modifiers: private
focal_class.parameters: (final Integer idEnterprise)
focal_class.return: Long
focal_class.signature: Long getStorageUsage(final Integer idEnterprise)
focal_class.class_method_signature: EnterpriseDAO.getVLANUsage(final Integer idEnterprise)
focal_class.full_signature: private Long getVLANUsage(final Integer idEnterprise)
focal_class.identifier: getVLANUsage
focal_class.modifiers: private
focal_class.parameters: (final Integer idEnterprise)
focal_class.return: Long
focal_class.signature: Long getVLANUsage(final Integer idEnterprise)
focal_class.class_method_signature: EnterpriseDAO.getPublicIPUsage(final Integer idEnterprise)
focal_class.full_signature: private Long getPublicIPUsage(final Integer idEnterprise)
focal_class.identifier: getPublicIPUsage
focal_class.modifiers: private
focal_class.parameters: (final Integer idEnterprise)
focal_class.return: Long
focal_class.signature: Long getPublicIPUsage(final Integer idEnterprise)
focal_class.class_method_signature: EnterpriseDAO.getRepositoryUsage(final Integer idEnterprise)
focal_class.full_signature: private Long getRepositoryUsage(final Integer idEnterprise)
focal_class.identifier: getRepositoryUsage
focal_class.modifiers: private
focal_class.parameters: (final Integer idEnterprise)
focal_class.return: Long
focal_class.signature: Long getRepositoryUsage(final Integer idEnterprise)
focal_class.class_method_signature: EnterpriseDAO.existAnyEnterpriseWithPricingTemplate(final PricingTemplate pricingTemplate)
focal_class.full_signature: public boolean existAnyEnterpriseWithPricingTemplate(final PricingTemplate pricingTemplate)
focal_class.identifier: existAnyEnterpriseWithPricingTemplate
focal_class.modifiers: public
focal_class.parameters: (final PricingTemplate pricingTemplate)
focal_class.return: boolean
focal_class.signature: boolean existAnyEnterpriseWithPricingTemplate(final PricingTemplate pricingTemplate)
focal_class.class_method_signature: EnterpriseDAO.createCriteria(final PricingTemplate pricingTemplate, final boolean included,
          final String filter, final Integer enterpriseId)
focal_class.full_signature: private Criteria createCriteria(final PricingTemplate pricingTemplate, final boolean included,
          final String filter, final Integer enterpriseId)
focal_class.identifier: createCriteria
focal_class.modifiers: private
focal_class.parameters: (final PricingTemplate pricingTemplate, final boolean included,
          final String filter, final Integer enterpriseId)
focal_class.return: Criteria
focal_class.signature: Criteria createCriteria(final PricingTemplate pricingTemplate, final boolean included,
          final String filter, final Integer enterpriseId)
focal_class.superclass: extends DefaultDAOBase<Integer, Enterprise>
focal_method.body: public boolean existsAnyWithName(final String name)
      {
          assert !StringUtils.isEmpty(name);
  
          return existsAnyByCriterions(nameEqual(name));
      }
focal_method.class_method_signature: EnterpriseDAO.existsAnyWithName(final String name)
focal_method.full_signature: public boolean existsAnyWithName(final String name)
focal_method.identifier: existsAnyWithName
focal_method.invocations: isEmpty existsAnyByCriterions nameEqual
focal_method.modifiers: public
focal_method.parameters: (final String name)
focal_method.return: boolean
focal_method.signature: boolean existsAnyWithName(final String name)