package org.thdl.roster.om;

import org.apache.torque.om.Persistent;
import org.apache.torque.*;
import org.apache.torque.util.*;
import java.util.*;

/** 
 * The skeleton for this class was autogenerated by Torque on:
 *
 * [Thu Feb 27 15:11:05 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 ProjectData 
    extends org.thdl.roster.om.BaseProjectData
    implements java.io.Serializable, RosterMemberData
{
	//attributes
	private List projectTypeIdList;
	//accessors
	public void setId(Integer v) throws TorqueException
	{
		super.setId( v );
		setProjectTypeIdList( buildIdList() );
	}
	public void setProjectTypeIdList( List projectTypeIdList )
	{
		this.projectTypeIdList = projectTypeIdList;
	}
	public List getProjectTypeIdList() throws TorqueException
	{
		return projectTypeIdList;
	}
	//helpers
	public List buildIdList() throws TorqueException
	{
			Criteria crit = new Criteria();
			crit.add(  ProjectProjectTypePeer.PROJECT_DATA_ID, getId() );
			crit.addAscendingOrderByColumn( ProjectProjectTypePeer.RELEVANCE );
			List idSourceList = ProjectProjectTypePeer.doSelect( crit );
			LinkedList newList = new LinkedList();
			ListIterator iterator = idSourceList.listIterator( 0 );
			while ( iterator.hasNext() )
			{
				ProjectProjectType ppt = (ProjectProjectType) iterator.next();
				Integer id = ppt.getProjectType().getId();
				newList.add( id );
			}
			return newList;
	}


	public java.util.List getMemberTypes() throws org.apache.torque.TorqueException
	{
		return getProjectProjectTypes();
	}
	public void setMemberTypes( java.util.List memberTypes )
	{
		// WRONG setPersonPersonTypes( memberTypes );
	}
}
