@Override protected ToStringBuilder appendAttributes(ToStringBuilder tsb) { return super.appendAttributes(tsb) .append("clusterId", getClusterId()); } }
@Override protected MapSqlParameterSource createFullParametersMapper(CpuProfile obj) { MapSqlParameterSource map = super.createFullParametersMapper(obj); map.addValue("cluster_id", obj.getClusterId()); return map; }
static org.ovirt.engine.core.common.businessentities.profiles.CpuProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getClusterId()).thenReturn(GUIDS[index]); return entity; } }
static org.ovirt.engine.core.common.businessentities.profiles.CpuProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getClusterId()).thenReturn(GUIDS[index]); return entity; } }
static org.ovirt.engine.core.common.businessentities.profiles.CpuProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getClusterId()).thenReturn(GUIDS[index]); return entity; } }
private void checkResults(List<CpuProfile> result) { assertNotNull(result); assertEquals(2, result.size()); for (CpuProfile cpuProfile : result) { assertEquals(FixturesTool.CLUSTER_RHEL6_ISCSI, cpuProfile.getClusterId()); } }
@Mapping(from = org.ovirt.engine.core.common.businessentities.profiles.CpuProfile.class, to = CpuProfile.class) public static CpuProfile map(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, CpuProfile template) { CpuProfile model = template != null ? template : new CpuProfile(); if (entity.getId() != null) { model.setId(entity.getId().toString()); } if (entity.getName() != null) { model.setName(entity.getName()); } if (entity.getDescription() != null) { model.setDescription(entity.getDescription()); } if (entity.getClusterId() != null) { model.setCluster(new Cluster()); model.getCluster().setId(entity.getClusterId().toString()); } if (entity.getQosId() != null) { model.setQos(new Qos()); model.getQos().setId(entity.getQosId().toString()); } return model; } }