@Override public VMTemplateWithPlugInfo mapRow(ResultSet rs, int rowNum) throws SQLException { @SuppressWarnings("synthetic-access") VMTemplateWithPlugInfo entity = new VMTemplateWithPlugInfo(); entity.setPlugged(rs.getBoolean("is_plugged")); entity.setVmTemplate(VMTemplateRowMapper.instance.mapRow(rs, rowNum)); return entity; }
@Override public Map<Boolean, VmTemplate> getAllForImage(Guid imageId) { VMTemplateWithPlugInfo plugInfo = getVMTemplatesWithPlugInfo(imageId); Map<Boolean, VmTemplate> result = new HashMap<Boolean, VmTemplate>(); if (plugInfo != null) { result.put(plugInfo.isPlugged(), plugInfo.getVmTemplate()); } return result; }