/* ======================================================================
   Parts Copyright 2006 University of Leeds, Oxford University, University of the Highlands and Islands.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

====================================================================== */

package org.bodington.assessment;

import java.util.Enumeration;

import org.bodington.sqldatabase.*;
import org.bodington.database.*;
import org.bodington.server.BuildingServerException;
import org.bodington.text.BigString;

public class PigeonHoleResponse extends org.bodington.sqldatabase.SqlPersistentObject
	{
	private PrimaryKey pigeonhole_response_id;
	private PrimaryKey pigeonhole_entry_id;
	private PrimaryKey pigeonhole_question_id;
	private Integer mark;
	
	
	public static PigeonHoleResponse findPigeonHoleResponse( PrimaryKey key )
	    throws BuildingServerException
	    {
	    return (PigeonHoleResponse)findPersistentObject( key, "org.bodington.server.assessment.PigeonHoleResponse" );
	    }
	
	public static PigeonHoleResponse findPigeonHoleResponse( String where )
	    throws BuildingServerException
	    {
	    return (PigeonHoleResponse)findPersistentObject( where, "org.bodington.assessment.PigeonHoleResponse" );
	    }
	
	public static Enumeration findPigeonHoleResponses( String where )
	    throws BuildingServerException
	    {
	    return findPersistentObjects( where, "org.bodington.assessment.PigeonHoleResponse" );
	    }
	
	public static Enumeration findPigeonHoleResponses( String where, String order )
	    throws BuildingServerException
	    {
	    return findPersistentObjects( where, order, "org.bodington.assessment.PigeonHoleResponse" );
	    }
	

	
    public PrimaryKey getPrimaryKey()
    	{
        return getPigeonHoleResponseId();
    	}

    public void setPrimaryKey(PrimaryKey key)
    	{
    	setPigeonHoleResponseId( key );
    	}

	
	public PrimaryKey getPigeonHoleResponseId()
		{
		return pigeonhole_response_id;
		}
		
	public void setPigeonHoleResponseId( PrimaryKey id )
		{
		pigeonhole_response_id = id;
		}


	public PrimaryKey getPigeonHoleEntryId()
		{
		return pigeonhole_entry_id;
		}
		
	public void setPigeonHoleEntryId( PrimaryKey id )
		{
		pigeonhole_entry_id = id;
		}


	public PrimaryKey getPigeonHoleQuestionId()
		{
		return pigeonhole_question_id;
		}
		
	public void setPigeonHoleQuestionId( PrimaryKey id )
		{
		pigeonhole_question_id = id;
		}


	public Integer getMark()
		{
		return mark;
		}
		
	public void setMark( Integer i )
		{
		mark = i;
		setUnsaved();
		}
		
	}
