test_class.file: model/src/test/java/com/abiquo/server/core/cloud/HypervisorDAOTest.java
test_class.identifier: HypervisorDAOTest
test_class.superclass: extends DefaultDAOTestBase<HypervisorDAO, Hypervisor>
test_case.body: @Test
      public void existAnyWithIpSameDatacenter()
      {
          Hypervisor hypervisor = eg().createUniqueInstance();
  
          ds().persistAll(hypervisor.getMachine().getDatacenter(), hypervisor.getMachine().getRack(),
              hypervisor.getMachine(), hypervisor);
          /** ##### ##### */
  
          HypervisorDAO dao = createDaoForRollbackTransaction();
  
          Assert.assertTrue(dao.existsAnyWithIpAndDatacenter(hypervisor.getIp(), hypervisor
              .getMachine().getDatacenter().getId()));
      }
test_case.class_method_signature: HypervisorDAOTest.existAnyWithIpSameDatacenter()
test_case.full_signature: @Test public void existAnyWithIpSameDatacenter()
test_case.identifier: existAnyWithIpSameDatacenter
test_case.invocations: createUniqueInstance eg persistAll ds getDatacenter getMachine getRack getMachine getMachine createDaoForRollbackTransaction assertTrue existsAnyWithIpAndDatacenter getIp getId getDatacenter getMachine
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void existAnyWithIpSameDatacenter()
focal_class.declarator: QUERY_USED_VDRP = "SELECT vm.vdrpPort " + //
          "FROM com.abiquo.server.core.cloud.VirtualMachine vm, " + //
          "com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE vm.hypervisor.id = :idHyper "
focal_class.modifier: private final
focal_class.original_string: private final String QUERY_USED_VDRP = "SELECT vm.vdrpPort " + //
          "FROM com.abiquo.server.core.cloud.VirtualMachine vm, " + //
          "com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE vm.hypervisor.id = :idHyper ";
focal_class.type: String
focal_class.var_name: QUERY_USED_VDRP
focal_class.declarator: QUERY_SAME_IP_DATACENTER = "SELECT h " + //
          "FROM com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE h.ip = :ip AND h.machine.datacenter.id = :datacenterId"
focal_class.modifier: private final
focal_class.original_string: private final String QUERY_SAME_IP_DATACENTER = "SELECT h " + //
          "FROM com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE h.ip = :ip AND h.machine.datacenter.id = :datacenterId";
focal_class.type: String
focal_class.var_name: QUERY_SAME_IP_DATACENTER
focal_class.declarator: QUERY_SAME_IP_SERVICE_DATACENTER = "SELECT h " + //
          "FROM com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE h.ipService = :ip AND h.machine.datacenter.id = :datacenterId"
focal_class.modifier: private final
focal_class.original_string: private final String QUERY_SAME_IP_SERVICE_DATACENTER = "SELECT h " + //
          "FROM com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE h.ipService = :ip AND h.machine.datacenter.id = :datacenterId";
focal_class.type: String
focal_class.var_name: QUERY_SAME_IP_SERVICE_DATACENTER
focal_class.declarator: QUERY_HTYPES_DATACENTER = "SELECT h.type " + //
          "FROM com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE h.machine.datacenter.id = :datacenterId"
focal_class.modifier: private final
focal_class.original_string: private final String QUERY_HTYPES_DATACENTER = "SELECT h.type " + //
          "FROM com.abiquo.server.core.cloud.Hypervisor h " + //
          "WHERE h.machine.datacenter.id = :datacenterId";
focal_class.type: String
focal_class.var_name: QUERY_HTYPES_DATACENTER
focal_class.file: model/src/main/java/com/abiquo/server/core/cloud/HypervisorDAO.java
focal_class.identifier: HypervisorDAO
focal_class.class_method_signature: HypervisorDAO.HypervisorDAO()
focal_class.full_signature: public  HypervisorDAO()
focal_class.identifier: HypervisorDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HypervisorDAO()
focal_class.class_method_signature: HypervisorDAO.HypervisorDAO(final EntityManager entityManager)
focal_class.full_signature: public  HypervisorDAO(final EntityManager entityManager)
focal_class.identifier: HypervisorDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager entityManager)
focal_class.signature:  HypervisorDAO(final EntityManager entityManager)
focal_class.class_method_signature: HypervisorDAO.existsAnyWithIp(final String ip)
focal_class.full_signature: public boolean existsAnyWithIp(final String ip)
focal_class.identifier: existsAnyWithIp
focal_class.modifiers: public
focal_class.parameters: (final String ip)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithIp(final String ip)
focal_class.class_method_signature: HypervisorDAO.existsAnyWithIpService(final String ip)
focal_class.full_signature: public boolean existsAnyWithIpService(final String ip)
focal_class.identifier: existsAnyWithIpService
focal_class.modifiers: public
focal_class.parameters: (final String ip)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithIpService(final String ip)
focal_class.class_method_signature: HypervisorDAO.sameIp(final String ip, final String propertyName)
focal_class.full_signature: private Criterion sameIp(final String ip, final String propertyName)
focal_class.identifier: sameIp
focal_class.modifiers: private
focal_class.parameters: (final String ip, final String propertyName)
focal_class.return: Criterion
focal_class.signature: Criterion sameIp(final String ip, final String propertyName)
focal_class.class_method_signature: HypervisorDAO.getUsedPorts(final int idHyper)
focal_class.full_signature: public List<Integer> getUsedPorts(final int idHyper)
focal_class.identifier: getUsedPorts
focal_class.modifiers: public
focal_class.parameters: (final int idHyper)
focal_class.return: List<Integer>
focal_class.signature: List<Integer> getUsedPorts(final int idHyper)
focal_class.class_method_signature: HypervisorDAO.existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)
focal_class.full_signature: public boolean existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)
focal_class.identifier: existsAnyWithIpAndDatacenter
focal_class.modifiers: public
focal_class.parameters: (final String ip, final Integer datacenterId)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)
focal_class.class_method_signature: HypervisorDAO.existsAnyWithIpServiceAndDatacenter(final String ip, final Integer datacenterId)
focal_class.full_signature: public boolean existsAnyWithIpServiceAndDatacenter(final String ip, final Integer datacenterId)
focal_class.identifier: existsAnyWithIpServiceAndDatacenter
focal_class.modifiers: public
focal_class.parameters: (final String ip, final Integer datacenterId)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithIpServiceAndDatacenter(final String ip, final Integer datacenterId)
focal_class.class_method_signature: HypervisorDAO.findTypesfromDatacenter(final Integer datacenterId)
focal_class.full_signature: public Collection<HypervisorType> findTypesfromDatacenter(final Integer datacenterId)
focal_class.identifier: findTypesfromDatacenter
focal_class.modifiers: public
focal_class.parameters: (final Integer datacenterId)
focal_class.return: Collection<HypervisorType>
focal_class.signature: Collection<HypervisorType> findTypesfromDatacenter(final Integer datacenterId)
focal_class.superclass: extends DefaultDAOBase<Integer, Hypervisor>
focal_method.body: public boolean existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)
      {
          Query query = getSession().createQuery(QUERY_SAME_IP_DATACENTER);
          query.setParameter("ip", ip);
          query.setParameter("datacenterId", datacenterId);
  
          return !query.list().isEmpty();
      }
focal_method.class_method_signature: HypervisorDAO.existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)
focal_method.full_signature: public boolean existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)
focal_method.identifier: existsAnyWithIpAndDatacenter
focal_method.invocations: createQuery getSession setParameter setParameter isEmpty list
focal_method.modifiers: public
focal_method.parameters: (final String ip, final Integer datacenterId)
focal_method.return: boolean
focal_method.signature: boolean existsAnyWithIpAndDatacenter(final String ip, final Integer datacenterId)