package org.thdl.roster.om;

import java.util.*;
import org.apache.torque.om.BaseObject;
import org.apache.torque.util.BasePeer;
import org.apache.torque.util.Criteria;
import org.apache.torque.TorqueException;


/** 
 * The skeleton for this class was autogenerated by Torque on:
 *
 * [Thu Feb 27 12:26:47 EST 2003]
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 */
public class Project extends org.thdl.roster.om.Member implements RosterMember
{
//attributes
//accessors
	public void setMemberData (RosterMemberData memberData)  throws RosterMemberTypeException
	{
		if ( memberData instanceof ProjectData )
		{
			try { 
				ProjectData pd = (ProjectData) memberData;
				setProjectData( pd );
			}
			catch ( 	TorqueException te )
			{
				throw new RosterMemberTypeException( te.getMessage() );
			}
		}
		else
		{
			throw new RosterMemberTypeException( "MemberData must be a ProjectData for this object" );
		}
	}
	public RosterMemberData getMemberData() throws RosterMemberTypeException
	{
		try 
		{ 
			return getProjectData();
		}
		catch ( 	TorqueException te )
		{
			throw new RosterMemberTypeException( te.getMessage() );
		}
	}
//helpers
   public Member copy() throws TorqueException
    {
      Project project = new Project();
		project = (Project) copyInto( project );
		project.setProjectData( getProjectData().copy() );
		return project;
    }
//constructors
    public Project() throws TorqueException
    {
		setMemberType(MemberPeer.CLASSKEY_PROJECT);
		setProjectData( new ProjectData() );
		setContactInfo( new ContactInfo() );
		setResearchInterest( new ResearchInterest() );
		setPublication( new Publication() );
		//setDocument( new Document() );
   }
}
