コード例 #1
0
 @Test
 @Transactional
 public void findAPdcAxisValueByItsPk() {
   PdcAxisValue value = dao.findOne(aPdcAxisValuePk(3, 1));
   assertThat(value, notNullValue());
   assertThat(value, is(equalTo(aPdcAxisValue("3", "1"))));
 }
コード例 #2
0
 @Test
 public void findAllValuesOfAGivenAxis() {
   List<PdcAxisValue> values = dao.findByAxisId(2l);
   assertThat(values.size(), is(3));
   assertThat(values.get(0), is(aPdcAxisValue("4", "2")));
   assertThat(values.get(1), is(aPdcAxisValue("5", "2")));
   assertThat(values.get(2), is(aPdcAxisValue("6", "2")));
 }
コード例 #3
0
 @Transactional
 private PdcAxisValue savePdcAxisValue(final PdcAxisValue value) {
   return dao.saveAndFlush(value);
 }
コード例 #4
0
 @Transactional
 private PdcAxisValue findPdcAxisValue(String valueId, String axisId) {
   return dao.findOne(PdcAxisValuePk.aPdcAxisValuePk(valueId, axisId));
 }
コード例 #5
0
 @Test
 public void findNoValuesOfAnUnknownAxis() {
   List<PdcAxisValue> values = dao.findByAxisId(1000l);
   assertThat(values.isEmpty(), is(true));
 }