Title: RE: [castor-dev] PROPOSED PATCH : Adding toCalendar() method to date/time types

Object reloading is removed, because there is a lot of pitfall.

A real inheritance mechanism is going to implemented. But, it going to take a while...

 

 

Thomas

 

-----Original Message-----
>From: Kesav Kumar [mailto:[EMAIL PROTECTED]]
>Sent: Friday, August 31, 2001 9:55 AM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] Inheritance plz help me
>
>
Hi to all.  I am new to castor as I am trying to get my inheritance relation its not working.
>
 
>
I have a main table called WorkFlow which contains various tasks.  Each task can be different types(ftp, email).  I want to establish inheritance relation between task and individual tasks.
>
 
>
My code is like this
>
 
>
public class WorkFlow
>
{
>
    private Collection tasks;
>
    public Collection getTasks()
>
    {
>
        return this.tasks;
>
    }
>
 
>
    public void setTasks(Collection tasks)
>
    {
>
        this.tasks = tasks;
>
    }
>
}
>
 
>
 
>
public class Task implements Persistent
>
{
>
    private String taskType;
>
    public String getTaskType()
>
    {
>
        return this.taskType;
>
    }
>
 
>
    public void setTaskType(String taskType)
>
    {
>
        this.taskType = taskType;
>
    }
>
 
>
    public Class jdoLoad(short mode)
>
    {
>
        if(this.taskType.equals("FTP")) return FTPTask.class;
>
        if(this.taskType.equals("EMAIL")) return EmailTask.class
>
        return null;
>
    }
>
}
>
 
>
public class FTPTask extends Task
>
{
>
}
>
 
>
When I called getTasks() on workFlow object I expected that the collection will contain individual tasks.  But I am getting the Task class only.
>
 
>
Please help me in solving this. I am attaching my mapping file.
>
 
>
Thanks in advance.
>
 
>
Kesav Kumar Kolla
>
Voquette Inc
>
650 356 3740(W)
>
510 889 6840(R)
>
Voquette....Delivering Sound Information
>

Reply via email to