01: // license-header java merge-point
02: /**
03: * This is only generated once! It will never be overwritten.
04: * You can (and have to!) safely modify it by hand.
05: */package org.andromda.samples.animalquiz.decisiontree;
06:
07: /**
08: * @see org.andromda.samples.animalquiz.decisiontree.DecisionItem
09: */
10: public class DecisionItemDaoImpl
11: extends
12: org.andromda.samples.animalquiz.decisiontree.DecisionItemDaoBase {
13: /**
14: * @see org.andromda.samples.animalquiz.decisiontree.DecisionItemDao#toVODecisionItem(org.andromda.samples.animalquiz.decisiontree.DecisionItem)
15: */
16: public org.andromda.samples.animalquiz.decisiontree.VODecisionItem toVODecisionItem(
17: final org.andromda.samples.animalquiz.decisiontree.DecisionItem entity) {
18: DecisionItem yesSuccessor = entity.getYesSuccessor();
19: DecisionItem noSuccessor = entity.getNoSuccessor();
20: try {
21: return new VODecisionItem(entity.getId(), entity
22: .getPrompt(), (yesSuccessor == null) ? null
23: : yesSuccessor.getId(),
24: (noSuccessor == null) ? null : noSuccessor.getId());
25: } catch (Exception ex) {
26: throw new DecisionServiceException(ex);
27: }
28: }
29:
30: public DecisionItem vODecisionItemToEntity(
31: VODecisionItem vODecisionItem) {
32: // TODO Auto-generated method stub
33: return null;
34: }
35:
36: }
|