test_class.file: model/src/test/java/com/abiquo/server/core/infrastructure/DatastoreDAOTest.java
test_class.identifier: DatastoreDAOTest
test_class.superclass: extends DefaultDAOTestBase<DatastoreDAO, Datastore>
test_case.body: @Test
      public void findMachineDatastores()
      {
          DatacenterGenerator datacenterGenerator = new DatacenterGenerator(getSeed());
          Datacenter datacenter = datacenterGenerator.createUniqueInstance();
  
          MachineGenerator machineGenerator = new MachineGenerator(getSeed());
          Machine machine = machineGenerator.createMachine(datacenter);
  
          Datastore entity = eg().createInstance(machine);
          ds().persistAll(datacenter, machine, entity);
  
          EntityManager em = ds().createEntityManagerAndBeginRollbackTransaction();
          DatastoreDAO dao = createDao(em);
          MachineDAO machineDao = new MachineDAO(em);
  
          Machine machine_2 = machineDao.findById(machine.getId());
  
          List<Datastore> datastores = dao.findMachineDatastores(machine_2);
          AssertEx.assertSize(datastores, 1);
      }
test_case.class_method_signature: DatastoreDAOTest.findMachineDatastores()
test_case.full_signature: @Test public void findMachineDatastores()
test_case.identifier: findMachineDatastores
test_case.invocations: getSeed createUniqueInstance getSeed createMachine createInstance eg persistAll ds createEntityManagerAndBeginRollbackTransaction ds createDao findById getId findMachineDatastores assertSize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findMachineDatastores()
focal_class.file: model/src/main/java/com/abiquo/server/core/infrastructure/DatastoreDAO.java
focal_class.identifier: DatastoreDAO
focal_class.class_method_signature: DatastoreDAO.DatastoreDAO()
focal_class.full_signature: public  DatastoreDAO()
focal_class.identifier: DatastoreDAO
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DatastoreDAO()
focal_class.class_method_signature: DatastoreDAO.DatastoreDAO(final EntityManager entityManager)
focal_class.full_signature: public  DatastoreDAO(final EntityManager entityManager)
focal_class.identifier: DatastoreDAO
focal_class.modifiers: public
focal_class.parameters: (final EntityManager entityManager)
focal_class.signature:  DatastoreDAO(final EntityManager entityManager)
focal_class.class_method_signature: DatastoreDAO.findMachineDatastores(final Machine machine)
focal_class.full_signature: public List<Datastore> findMachineDatastores(final Machine machine)
focal_class.identifier: findMachineDatastores
focal_class.modifiers: public
focal_class.parameters: (final Machine machine)
focal_class.return: List<Datastore>
focal_class.signature: List<Datastore> findMachineDatastores(final Machine machine)
focal_class.class_method_signature: DatastoreDAO.findShares(final Datastore datastore)
focal_class.full_signature: public List<Datastore> findShares(final Datastore datastore)
focal_class.identifier: findShares
focal_class.modifiers: public
focal_class.parameters: (final Datastore datastore)
focal_class.return: List<Datastore>
focal_class.signature: List<Datastore> findShares(final Datastore datastore)
focal_class.class_method_signature: DatastoreDAO.findDatastore(final String uuid, final Machine machine)
focal_class.full_signature: public Datastore findDatastore(final String uuid, final Machine machine)
focal_class.identifier: findDatastore
focal_class.modifiers: public
focal_class.parameters: (final String uuid, final Machine machine)
focal_class.return: Datastore
focal_class.signature: Datastore findDatastore(final String uuid, final Machine machine)
focal_class.class_method_signature: DatastoreDAO.inMachine(final Machine machine)
focal_class.full_signature: private Criteria inMachine(final Machine machine)
focal_class.identifier: inMachine
focal_class.modifiers: private
focal_class.parameters: (final Machine machine)
focal_class.return: Criteria
focal_class.signature: Criteria inMachine(final Machine machine)
focal_class.class_method_signature: DatastoreDAO.inMachine(final Machine machine, final String uuid)
focal_class.full_signature: private Criteria inMachine(final Machine machine, final String uuid)
focal_class.identifier: inMachine
focal_class.modifiers: private
focal_class.parameters: (final Machine machine, final String uuid)
focal_class.return: Criteria
focal_class.signature: Criteria inMachine(final Machine machine, final String uuid)
focal_class.class_method_signature: DatastoreDAO.sharedUuid(final String uuid)
focal_class.full_signature: private static Criterion sharedUuid(final String uuid)
focal_class.identifier: sharedUuid
focal_class.modifiers: private static
focal_class.parameters: (final String uuid)
focal_class.return: Criterion
focal_class.signature: Criterion sharedUuid(final String uuid)
focal_class.class_method_signature: DatastoreDAO.equalName(final String name)
focal_class.full_signature: private static Criterion equalName(final String name)
focal_class.identifier: equalName
focal_class.modifiers: private static
focal_class.parameters: (final String name)
focal_class.return: Criterion
focal_class.signature: Criterion equalName(final String name)
focal_class.class_method_signature: DatastoreDAO.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: DatastoreDAO.existsAnyOtherWithName(final Datastore entity, final String name)
focal_class.full_signature: public boolean existsAnyOtherWithName(final Datastore entity, final String name)
focal_class.identifier: existsAnyOtherWithName
focal_class.modifiers: public
focal_class.parameters: (final Datastore entity, final String name)
focal_class.return: boolean
focal_class.signature: boolean existsAnyOtherWithName(final Datastore entity, final String name)
focal_class.class_method_signature: DatastoreDAO.equalDirectory(final String directory)
focal_class.full_signature: private static Criterion equalDirectory(final String directory)
focal_class.identifier: equalDirectory
focal_class.modifiers: private static
focal_class.parameters: (final String directory)
focal_class.return: Criterion
focal_class.signature: Criterion equalDirectory(final String directory)
focal_class.class_method_signature: DatastoreDAO.existsAnyWithDirectory(final String directory)
focal_class.full_signature: public boolean existsAnyWithDirectory(final String directory)
focal_class.identifier: existsAnyWithDirectory
focal_class.modifiers: public
focal_class.parameters: (final String directory)
focal_class.return: boolean
focal_class.signature: boolean existsAnyWithDirectory(final String directory)
focal_class.class_method_signature: DatastoreDAO.existsAnyOtherWithDirectory(final Datastore entity, final String directory)
focal_class.full_signature: public boolean existsAnyOtherWithDirectory(final Datastore entity, final String directory)
focal_class.identifier: existsAnyOtherWithDirectory
focal_class.modifiers: public
focal_class.parameters: (final Datastore entity, final String directory)
focal_class.return: boolean
focal_class.signature: boolean existsAnyOtherWithDirectory(final Datastore entity, final String directory)
focal_class.superclass: extends DefaultDAOBase<Integer, Datastore>
focal_method.body: public List<Datastore> findMachineDatastores(final Machine machine)
      {
          assert machine != null;
          assert isManaged2(machine);
  
          Criteria criteria = inMachine(machine);
          // createCriteria().createCriteria(Datastore.MACHINES_PROPERTY).add(
          // Restrictions.in(Machine.ID_PROPERTY, new Integer[] {machine.getId()}));
  
          criteria.addOrder(Order.asc(Datastore.NAME_PROPERTY));
          List<Datastore> result = getResultList(criteria);
          return result;
      }
focal_method.class_method_signature: DatastoreDAO.findMachineDatastores(final Machine machine)
focal_method.full_signature: public List<Datastore> findMachineDatastores(final Machine machine)
focal_method.identifier: findMachineDatastores
focal_method.invocations: isManaged2 inMachine addOrder asc getResultList
focal_method.modifiers: public
focal_method.parameters: (final Machine machine)
focal_method.return: List<Datastore>
focal_method.signature: List<Datastore> findMachineDatastores(final Machine machine)