Examples of TimeAllocationVO


Examples of org.andromda.timetracker.vo.TimeAllocationVO

        // Set submitter and approver associations
        timecard.setSubmitter(getPersonDao().findByUsername(timecardVO.getSubmitterName()));
        timecard.setApprover(getPersonDao().findByUsername(timecardVO.getApproverName()));

        // Set allocations
        TimeAllocationVO allocations[] = timecardVO.getAllocations();
        for (int i=0; i<allocations.length; i++) {
            // Create TimeAllocation from TimeAllocationVO
            TimeAllocationVO allocationVO = allocations[i];
            TimeAllocation allocation = TimeAllocation.Factory.newInstance();
            getTimeAllocationDao().timeAllocationVOToEntity(allocationVO, allocation, true);

            // Connect to timecard
            timecard.addTimeAllocation(allocation);

            // Connect to task
            allocation.setTask(getTaskDao().load(allocationVO.getTaskId()));
        }

        // Create the timecard
        getTimecardDao().create(timecard);
        return timecard.getId();
View Full Code Here

Examples of org.andromda.timetracker.vo.TimeAllocationVO

    /**
     * @see org.andromda.timetracker.domain.TimeAllocationDao#toTimeAllocationVO(org.andromda.timetracker.domain.TimeAllocation)
     */
    public org.andromda.timetracker.vo.TimeAllocationVO toTimeAllocationVO(final org.andromda.timetracker.domain.TimeAllocation entity)
    {
        TimeAllocationVO targetVO = new TimeAllocationVO();
        toTimeAllocationVO(entity, targetVO);
        return targetVO;
    }
View Full Code Here

Examples of org.andromda.timetracker.vo.TimeAllocationVO

        timecard.setAllocations(allocations);
        for (int i = 0; i < count; i++) {
            Date startTime = new Date(timecard.getBegDate().getTime() + i * MILLIS_IN_DAY);
            Date endTime   = new Date(timecard.getBegDate().getTime() + (i + 1) * MILLIS_IN_DAY);
            TaskVO task = tasks[(int)Math.round((Math.random()*(tasks.length - 1)))];
            allocations[i] = new TimeAllocationVO(
                null,
                new TimePeriodVO(startTime, endTime),
                task.getId());
        }

View Full Code Here

Examples of org.andromda.timetracker.vo.TimeAllocationVO

        timecard.setAllocations(allocations);
        for (int i = 0; i < count; i++) {
            Date startTime = new Date(timecard.getBegDate().getTime() + i * MILLIS_IN_DAY);
            Date endTime   = new Date(timecard.getBegDate().getTime() + (i + 1) * MILLIS_IN_DAY);
            TaskVO task = tasks[(int)Math.round((Math.random()*(tasks.length - 1)))];
            allocations[i] = new TimeAllocationVO(
                null,
                new TimePeriodVO(startTime, endTime),
                task.getId());
        }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.