Rev 1306 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package pt.estgp.estgweb.services.courseunits;
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.Student;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.utl.ist.berserk.logic.serviceManager.IService;
import java.util.ArrayList;
import java.util.List;
/**
* @author Jorge Machado
* @date 2/Jun/2008
* @see pt.estgp.estgweb.services.courseunits
*/
public class LoadSubscribedUnitsCurrentYearService
implements IService
{
public List
<CourseUnit
> run
(long studentId
)
{
Student t = DaoFactory.
getStudentDaoImpl().
load(studentId
);
List
<CourseUnit
> units = DaoFactory.
getCourseUnitDaoImpl().
loadSubscribedImportYearUnits(studentId, DaoFactory.
getConfigurationDaoImpl().
getInterfaceImportYear());
units =
new ArrayList
<CourseUnit
>(units
);
for(CourseUnit c: units
)
{
c.
getName();
c.
getCourse().
getName();
}
return units
;
}
public List
<CourseUnit
> givenYear
(long studentId,
1.5.0/docs/api/java/lang/String.html">String year
)
{
Student t = DaoFactory.
getStudentDaoImpl().
load(studentId
);
List
<CourseUnit
> units = DaoFactory.
getCourseUnitDaoImpl().
loadSubscribedImportYearUnits(studentId, year
);
units =
new ArrayList
<CourseUnit
>(units
);
for(CourseUnit c: units
)
{
c.
getName();
c.
getCourse().
getName();
}
return units
;
}
}