public VolumeManagement insertVolume(final VolumeManagement volume) { rasdDAO.persist(volume.getRasd()); volumeDAO.persist(volume); volumeDAO.flush(); return volume; }
public void removeVolume(final VolumeManagement volume) { Rasd rasd = volume.getRasd(); volumeDAO.remove(volume); rasdDAO.remove(rasd); volumeDAO.flush(); }
public void removeHardDisk(final DiskManagement diskToDelete) { Rasd rasd = diskToDelete.getRasd(); diskManagementDAO.remove(diskToDelete); rasdDAO.remove(rasd); diskManagementDAO.flush(); }
public void insertHardDisk(final DiskManagement createdDisk) { if (createdDisk.getRasd() != null) { rasdDAO.persist(createdDisk.getRasd()); } diskManagementDAO.persist(createdDisk); }