test_class.declarator: virtualDatacenterGenerator
test_class.modifier: private
test_class.original_string: private VirtualDatacenterGenerator virtualDatacenterGenerator;
test_class.type: VirtualDatacenterGenerator
test_class.var_name: virtualDatacenterGenerator
test_class.file: model/src/test/java/com/abiquo/server/core/infrastructure/network/VLANNetworkDAOTest.java
test_class.identifier: VLANNetworkDAOTest
test_class.superclass: extends DefaultDAOTestBase<VLANNetworkDAO, VLANNetwork>
test_case.body: @Test
      public void testFindZeroVLANNetworksByDatacenter()
      {
          List<Object> additionalEntities = new ArrayList<Object>();
  
          VirtualDatacenter vdc1 = virtualDatacenterGenerator.createUniqueInstance();
          this.virtualDatacenterGenerator.addAuxiliaryEntitiesToPersist(vdc1, additionalEntities);
  
          VirtualDatacenter vdc2 = virtualDatacenterGenerator.createUniqueInstance();
          this.virtualDatacenterGenerator.addAuxiliaryEntitiesToPersist(vdc2, additionalEntities);
  
          VLANNetwork n2_1 = eg().createUniqueInstance();
          eg().addAuxiliaryEntitiesToPersist(n2_1, additionalEntities);
  
          n2_1.setNetwork(vdc2.getNetwork());
  
          persistAll(ds(), additionalEntities, vdc1, vdc2, n2_1);
  
          VLANNetworkDAO dao = createDaoForRollbackTransaction();
          List<VLANNetwork> networks = dao.findVlanNetworks(reload(dao, vdc1));
          Assert.assertTrue(networks.isEmpty());
      }
test_case.class_method_signature: VLANNetworkDAOTest.testFindZeroVLANNetworksByDatacenter()
test_case.full_signature: @Test public void testFindZeroVLANNetworksByDatacenter()
test_case.identifier: testFindZeroVLANNetworksByDatacenter
test_case.invocations: createUniqueInstance addAuxiliaryEntitiesToPersist createUniqueInstance addAuxiliaryEntitiesToPersist createUniqueInstance eg addAuxiliaryEntitiesToPersist eg setNetwork getNetwork persistAll ds createDaoForRollbackTransaction findVlanNetworks reload assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFindZeroVLANNetworksByDatacenter()
focal_class.declarator: FIND_BY_DATACENTER =
          " Select vlan "
              + "FROM com.abiquo.server.core.infrastructure.network.VLANNetwork vlan, "
              + "com.abiquo.server.core.cloud.VirtualDatacenter vdc "
              + "INNER JOIN vdc.network net WHERE vdc.datacenter.id = :datacenterId and vlan.network.id = net.id"
focal_class.modifier: private final
focal_class.original_string: private final String FIND_BY_DATACENTER =
          " Select vlan "
              + "FROM com.abiquo.server.core.infrastructure.network.VLANNetwork vlan, "
              + "com.abiquo.server.core.cloud.VirtualDatacenter vdc "
              + "INNER JOIN vdc.network net WHERE vdc.datacenter.id = :datacenterId and vlan.network.id = net.id";
focal_class.type: String
focal_class.var_name: FIND_BY_DATACENTER
focal_class.declarator: FIND_BY_ENTERPRISE = " SELECT vlan "//
          + "FROM com.abiquo.server.core.infrastructure.network.VLANNetwork vlan, "//
          + "com.abiquo.server.core.cloud.VirtualDatacenter vdc "//
          + "WHERE vlan.network.id = vdc.network.id "//
          + "and vdc.enterprise.id = :enterpriseId"
focal_class.modifier: private final
focal_class.original_string: private final String FIND_BY_ENTERPRISE = " SELECT vlan "//
          + "FROM com.abiquo.server.core.infrastructure.network.VLANNetwork vlan, "//
          + "com.abiquo.server.core.cloud.VirtualDatacenter vdc "//
          + "WHERE vlan.network.id = vdc.network.id "//
          + "and vdc.enterprise.id = :enterpriseId";
focal_class.type: String
focal_class.var_name: FIND_BY_ENTERPRISE
focal_class.declarator: GET_VLAN_DATACENTER =
          "SELECT dc " //
              + "FROM com.abiquo.server.core.infrastructure.Datacenter dc " //
              + "inner join dc.network net, com.abiquo.server.core.infrastructure.network.VLANNetwork vlan " //
              + "WHERE net.id = vlan.network.id AND vlan.id = :id"
focal_class.modifier: private final
focal_class.original_string: private final String GET_VLAN_DATACENTER =
          "SELECT dc " //
              + "FROM com.abiquo.server.core.infrastructure.Datacenter dc " //
              + "inner join dc.network net, com.abiquo.server.core.infrastructure.network.VLANNetwork vlan " //
              + "WHERE net.id = vlan.network.id AND vlan.id = :id";
focal_class.type: String
focal_class.var_name: GET_VLAN_DATACENTER
focal_class.file: model/src/main/java/com/abiquo/server/core/infrastructure/network/VLANNetworkDAO.java
focal_class.identifier: VLANNetworkDAO
focal_class.class_method_signature: VLANNetworkDAO.sameNetwork(final Network network)
focal_class.full_signature: private static Criterion sameNetwork(final Network network)
focal_class.identifier: sameNetwork
focal_class.modifiers: private static
focal_class.parameters: (final Network network)
focal_class.return: Criterion
focal_class.signature: Criterion sameNetwork(final Network network)
focal_class.class_method_signature: VLANNetworkDAO.sameNetwork(final VirtualDatacenter virtualDatacenter)
focal_class.full_signature: private static Criterion sameNetwork(final VirtualDatacenter virtualDatacenter)
focal_class.identifier: sameNetwork
focal_class.modifiers: private static
focal_class.parameters: (final VirtualDatacenter virtualDatacenter)
focal_class.return: Criterion
focal_class.signature: Criterion sameNetwork(final VirtualDatacenter virtualDatacenter)
focal_class.class_method_signature: VLANNetworkDAO.VLANNetworkDAO()
focal_class.full_signature: public  VLANNetworkDAO()
focal_class.identifier: VLANNetworkDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  VLANNetworkDAO()
focal_class.class_method_signature: VLANNetworkDAO.VLANNetworkDAO(final EntityManager em)
focal_class.full_signature: public  VLANNetworkDAO(final EntityManager em)
focal_class.identifier: VLANNetworkDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager em)
focal_class.signature:  VLANNetworkDAO(final EntityManager em)
focal_class.class_method_signature: VLANNetworkDAO.existsAnyWithName(final Network network, final String name)
focal_class.full_signature: public boolean existsAnyWithName(final Network network, final String name)
focal_class.identifier: existsAnyWithName
focal_class.modifiers: public
focal_class.parameters: (final Network network, final String name)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithName(final Network network, final String name)
focal_class.class_method_signature: VLANNetworkDAO.findByEnterprise(final int enterpriseId)
focal_class.full_signature: public List<VLANNetwork> findByEnterprise(final int enterpriseId)
focal_class.identifier: findByEnterprise
focal_class.modifiers: public
focal_class.parameters: (final int enterpriseId)
focal_class.return: List<VLANNetwork>
focal_class.signature: List<VLANNetwork> findByEnterprise(final int enterpriseId)
focal_class.class_method_signature: VLANNetworkDAO.findExternalVlanByEnterprise(final Enterprise ent, final Integer vlanId)
focal_class.full_signature: public VLANNetwork findExternalVlanByEnterprise(final Enterprise ent, final Integer vlanId)
focal_class.identifier: findExternalVlanByEnterprise
focal_class.modifiers: public
focal_class.parameters: (final Enterprise ent, final Integer vlanId)
focal_class.return: VLANNetwork
focal_class.signature: VLANNetwork findExternalVlanByEnterprise(final Enterprise ent, final Integer vlanId)
focal_class.class_method_signature: VLANNetworkDAO.findExternalVlanByEnterpriseInDatacenter(final Enterprise ent,
          final Datacenter datacenter, final Integer vlanId)
focal_class.full_signature: public VLANNetwork findExternalVlanByEnterpriseInDatacenter(final Enterprise ent,
          final Datacenter datacenter, final Integer vlanId)
focal_class.identifier: findExternalVlanByEnterpriseInDatacenter
focal_class.modifiers: public
focal_class.parameters: (final Enterprise ent,
          final Datacenter datacenter, final Integer vlanId)
focal_class.return: VLANNetwork
focal_class.signature: VLANNetwork findExternalVlanByEnterpriseInDatacenter(final Enterprise ent,
          final Datacenter datacenter, final Integer vlanId)
focal_class.class_method_signature: VLANNetworkDAO.findExternalVlansByEnterprise(final Enterprise ent)
focal_class.full_signature: public List<VLANNetwork> findExternalVlansByEnterprise(final Enterprise ent)
focal_class.identifier: findExternalVlansByEnterprise
focal_class.modifiers: public
focal_class.parameters: (final Enterprise ent)
focal_class.return: List<VLANNetwork>
focal_class.signature: List<VLANNetwork> findExternalVlansByEnterprise(final Enterprise ent)
focal_class.class_method_signature: VLANNetworkDAO.findExternalVlansByEnterpriseInDatacenter(final Enterprise ent,
          final Datacenter datacenter)
focal_class.full_signature: public List<VLANNetwork> findExternalVlansByEnterpriseInDatacenter(final Enterprise ent,
          final Datacenter datacenter)
focal_class.identifier: findExternalVlansByEnterpriseInDatacenter
focal_class.modifiers: public
focal_class.parameters: (final Enterprise ent,
          final Datacenter datacenter)
focal_class.return: List<VLANNetwork>
focal_class.signature: List<VLANNetwork> findExternalVlansByEnterpriseInDatacenter(final Enterprise ent,
          final Datacenter datacenter)
focal_class.class_method_signature: VLANNetworkDAO.findPrivateVLANNetworksByDatacenter(final Datacenter datacenter)
focal_class.full_signature: public List<VLANNetwork> findPrivateVLANNetworksByDatacenter(final Datacenter datacenter)
focal_class.identifier: findPrivateVLANNetworksByDatacenter
focal_class.modifiers: public
focal_class.parameters: (final Datacenter datacenter)
focal_class.return: List<VLANNetwork>
focal_class.signature: List<VLANNetwork> findPrivateVLANNetworksByDatacenter(final Datacenter datacenter)
focal_class.class_method_signature: VLANNetworkDAO.findPublicVlanByDatacenter(final Datacenter dc, final Integer vlanId)
focal_class.full_signature: public VLANNetwork findPublicVlanByDatacenter(final Datacenter dc, final Integer vlanId)
focal_class.identifier: findPublicVlanByDatacenter
focal_class.modifiers: public
focal_class.parameters: (final Datacenter dc, final Integer vlanId)
focal_class.return: VLANNetwork
focal_class.signature: VLANNetwork findPublicVlanByDatacenter(final Datacenter dc, final Integer vlanId)
focal_class.class_method_signature: VLANNetworkDAO.findPublicVLANNetworksByDatacenter(final Datacenter datacenter,
          final NetworkType netType)
focal_class.full_signature: public List<VLANNetwork> findPublicVLANNetworksByDatacenter(final Datacenter datacenter,
          final NetworkType netType)
focal_class.identifier: findPublicVLANNetworksByDatacenter
focal_class.modifiers: public
focal_class.parameters: (final Datacenter datacenter,
          final NetworkType netType)
focal_class.return: List<VLANNetwork>
focal_class.signature: List<VLANNetwork> findPublicVLANNetworksByDatacenter(final Datacenter datacenter,
          final NetworkType netType)
focal_class.class_method_signature: VLANNetworkDAO.findVlanByNameInNetwork(final Network network, final String name)
focal_class.full_signature: public VLANNetwork findVlanByNameInNetwork(final Network network, final String name)
focal_class.identifier: findVlanByNameInNetwork
focal_class.modifiers: public
focal_class.parameters: (final Network network, final String name)
focal_class.return: VLANNetwork
focal_class.signature: VLANNetwork findVlanByNameInNetwork(final Network network, final String name)
focal_class.class_method_signature: VLANNetworkDAO.findVlanByVirtualDatacenterId(final VirtualDatacenter virtualDatacenter,
          final Integer vlanId)
focal_class.full_signature: public VLANNetwork findVlanByVirtualDatacenterId(final VirtualDatacenter virtualDatacenter,
          final Integer vlanId)
focal_class.identifier: findVlanByVirtualDatacenterId
focal_class.modifiers: public
focal_class.parameters: (final VirtualDatacenter virtualDatacenter,
          final Integer vlanId)
focal_class.return: VLANNetwork
focal_class.signature: VLANNetwork findVlanByVirtualDatacenterId(final VirtualDatacenter virtualDatacenter,
          final Integer vlanId)
focal_class.class_method_signature: VLANNetworkDAO.findVlanNetworks(final VirtualDatacenter virtualDatacenter)
focal_class.full_signature: public List<VLANNetwork> findVlanNetworks(final VirtualDatacenter virtualDatacenter)
focal_class.identifier: findVlanNetworks
focal_class.modifiers: public
focal_class.parameters: (final VirtualDatacenter virtualDatacenter)
focal_class.return: List<VLANNetwork>
focal_class.signature: List<VLANNetwork> findVlanNetworks(final VirtualDatacenter virtualDatacenter)
focal_class.class_method_signature: VLANNetworkDAO.getVLANTagsUsedInRack(final Rack rack)
focal_class.full_signature: public List<Integer> getVLANTagsUsedInRack(final Rack rack)
focal_class.identifier: getVLANTagsUsedInRack
focal_class.modifiers: public
focal_class.parameters: (final Rack rack)
focal_class.return: List<Integer>
focal_class.signature: List<Integer> getVLANTagsUsedInRack(final Rack rack)
focal_class.class_method_signature: VLANNetworkDAO.isPublic(final VLANNetwork vlan)
focal_class.full_signature: public boolean isPublic(final VLANNetwork vlan)
focal_class.identifier: isPublic
focal_class.modifiers: public
focal_class.parameters: (final VLANNetwork vlan)
focal_class.return: boolean
focal_class.signature: boolean isPublic(final VLANNetwork vlan)
focal_class.class_method_signature: VLANNetworkDAO.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.superclass: extends DefaultDAOBase<Integer, VLANNetwork>
focal_method.body: public List<VLANNetwork> findVlanNetworks(final VirtualDatacenter virtualDatacenter)
      {
          assert virtualDatacenter != null;
  
          Criteria criteria = createCriteria(sameNetwork(virtualDatacenter));
          criteria.addOrder(Order.asc(VLANNetwork.NAME_PROPERTY));
          List<VLANNetwork> result = getResultList(criteria);
  
          return result;
      }
focal_method.class_method_signature: VLANNetworkDAO.findVlanNetworks(final VirtualDatacenter virtualDatacenter)
focal_method.full_signature: public List<VLANNetwork> findVlanNetworks(final VirtualDatacenter virtualDatacenter)
focal_method.identifier: findVlanNetworks
focal_method.invocations: createCriteria sameNetwork addOrder asc getResultList
focal_method.modifiers: public
focal_method.parameters: (final VirtualDatacenter virtualDatacenter)
focal_method.return: List<VLANNetwork>
focal_method.signature: List<VLANNetwork> findVlanNetworks(final VirtualDatacenter virtualDatacenter)