{
CVDal dl = new CVDal(dataSource);
dl.setSql("projecttask.gettaskactivity");
dl.setInt(1, taskId);
tdbvo.setActivityID(taskId);
Collection col = dl.executeQuery();
Iterator ite = col.iterator();
if (ite.hasNext())
{
HashMap hm = (HashMap)ite.next();
tdbvo.setTitle((String)hm.get("title"));
tdbvo.setActivityDetails((String)hm.get("details"));
tdbvo.setCreatedBy(((Integer)hm.get("creator")).intValue());
tdbvo.setCreatedOn((Timestamp)hm.get("created"));
if (hm.get("modified") != null)
{
tdbvo.setModifiedOn((Timestamp)hm.get("modified"));
}
if (hm.get("owner") != null)
{
tdbvo.setOwner(((Integer)hm.get("owner")).intValue());
}
if (hm.get("modifiedby") != null)
{
tdbvo.setModifiedBy(((Integer)hm.get("modifiedby")).intValue());
}
if (hm.get("status") != null)
{
tdbvo.setStatus(((Integer)hm.get("status")).intValue());
}
if (hm.get("name") != null)
{
tdbvo.setSelectedStatus((String)hm.get("name"));
}
if (hm.get("start") != null)
{
Object o = hm.get("start");
tdbvo.setStart((java.sql.Timestamp)o);
}
if (hm.get("duedate") != null)
{
Object ox = hm.get("duedate");
tdbvo.setEnd((java.sql.Timestamp)ox);
}
tdbvo.fillAuditDetails(this.dataSource);
}
dl.clearParameters();
dl.setSql("projecttask.gettask");
dl.setInt(1, taskId);
col = dl.executeQuery();
ite = col.iterator();
if (ite.hasNext())
{
HashMap hm = (HashMap)ite.next();
if (hm.get("projectid") != null)
{
tdbvo.setProjectID(((Long)hm.get("projectid")).intValue());
}
if (hm.get("parent") != null)
{
tdbvo.setParentID(((Long)hm.get("parent")).intValue());
}
if (hm.get("milestone") != null)
{
tdbvo.setIsMileStone((String)hm.get("milestone"));
}
if (hm.get("percentcomplete") != null)
{
tdbvo.setPercentComplete(((Long)hm.get("percentcomplete")).intValue());
}
if (hm.get("projecttitle") != null)
{
tdbvo.setProjectName((String)hm.get("projecttitle"));
}
if (hm.get("projecttaskcount") != null)
{
tdbvo.setProjectTaskCount(((Integer)hm.get("projecttaskcount")).intValue());
}
} // end if (ite.hasNext())
dl.clearParameters();
dl.setSql("projecttask.gettaskassigned");
dl.setInt(1, taskId);
col = dl.executeQuery();
ite = col.iterator();
while (ite.hasNext())
{
HashMap hm = (HashMap)ite.next();
if (hm.get("individualid") != null)
{
tdbvo.setAssignedTo(((Long)hm.get("individualid")).intValue(), (String)hm.get("CONCAT(firstname, ' ' , lastname)"));
}
}
dl.clearParameters();
Collection col1 = null;
Iterator ite1 = null;
int activityid = -1;
dl.setSql("projecttask.gettaskalert");
dl.setInt(1, taskId);
col = dl.executeQuery();
ite = col.iterator();
HashMap emaila = new HashMap();
HashMap alerta = new HashMap();
boolean email = false;
boolean alert = false;
while (ite.hasNext())
{
HashMap hm = (HashMap)ite.next();
if (hm.get("actionid") != null)
{
activityid = ((Long)hm.get("actionid")).intValue();
}
dl.setSql("projecttask.gettaskalertaction");
dl.setInt(1, activityid);
col1 = dl.executeQuery();
ite1 = col1.iterator();
if (ite1.hasNext())
{
Object o = ite1.next();
HashMap hhm = (HashMap)o;