
package org.thdl.roster.om;


import org.apache.torque.om.Persistent;

/** 
 * 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 Member  extends org.thdl.roster.om.BaseMember implements RosterMember, java.io.Serializable
{

	public void setMemberData( RosterMemberData memberData ) throws RosterMemberTypeException
	{
		throw new RosterMemberTypeException( "Can't set memberData of generic instance of RosterMember, class " + this.getClass().getName() );
	}

	public RosterMemberData getMemberData() throws RosterMemberTypeException
	{
		throw new RosterMemberTypeException( "Can't get memberData of generic instance of RosterMember, class " + this.getClass().getName() );
	}

	public void save() throws Exception
	{
		java.util.Date now = new java.util.Date( System.currentTimeMillis() );
		setModifiedOn( now );
		super.save();
	}
//synthetic accessors
	public boolean getPersonMember() {
		boolean b = false;
		if ( this instanceof Person )
		{
			b=true;
		}
		return b;
	}
	public boolean getProjectMember() {
		boolean b = false;
		if ( this instanceof Project )
		{
			b=true;
		}
		return b;
	}
	public boolean getOrganizationMember() {
		boolean b = false;
		if ( this instanceof Organization )
		{
			b=true;
		}
		return b;
	}	
	public void save( Integer thdlUserId )
	{
		if ( isNew() )
		{
			setCreatedBy( thdlUserId );
			setModifiedBy( thdlUserId );
			java.util.Date now = new java.util.Date( System.currentTimeMillis() );
			setCreatedOn( now );
			setModifiedOn( now );
			setDeleted( "false" );
		}
	}
}
