class HostVersionDAO extends CrudDAO<HostVersionEntity, Long> {

  @Override
  @Transactional
  public void create(HostVersionEntity entity) throws IllegalArgumentException{
    // check if repository version is not missing, to avoid NPE
    if (entity.getRepositoryVersion() == null) {
      throw new IllegalArgumentException("RepositoryVersion argument is not set for the entity");
    }

    super.create(entity);
    entity.getRepositoryVersion().updateHostVersionEntityRelation(entity);
  }

  public  HostVersionDAO();

}