View Javadoc
1   // license-header java merge-point
2   /**
3    * This is only generated once! It will never be overwritten.
4    * You can (and have to!) safely modify it by hand.
5    */
6   package org.andromda.timetracker.service;
7   
8   import java.util.List;
9   import org.andromda.timetracker.domain.Timecard;
10  import org.andromda.timetracker.vo.TimecardSearchCriteriaVO;
11  import org.andromda.timetracker.vo.TimecardSummaryVO;
12  
13  /**
14   * @see org.andromda.timetracker.service.TimeTrackingService
15   */
16  public class TimeTrackingServiceImpl
17      extends TimeTrackingServiceBase
18  {
19      /**
20       * @param criteria
21       * @return timecards
22       * @throws Exception
23       * @see org.andromda.timetracker.service.TimeTrackingService#findTimecards(TimecardSearchCriteriaVO)
24       */
25      @Override
26      protected TimecardSummaryVO[] handleFindTimecards(TimecardSearchCriteriaVO criteria)
27          throws Exception
28      {
29          List<Timecard> timecards = getTimecardDao().findByCriteria(criteria);
30          getTimecardDao().toTimecardSummaryVOCollection(timecards);
31          return timecards.toArray(new TimecardSummaryVO[timecards.size()]);
32      }
33  }