/*
 * Created on March 3, 2004
 *
 * RecordImpl.java is used to test the J2EE Connector
 * as implemented by JOnAS. This class implements the Record
 * (cci) classes.
 *  
 */
package ersatz.resourceadapter;

import javax.resource.cci.Record;
/**
 * @author Bob Kruse
 *
 * Jtest Resource Adapter
 *
 * used to test the J2EE Connector as implemented by JOnAS.
 * 
 */
public class RecordImpl 
        implements Record
{

    private String Record_Name;
    private String shortDescription;
    String Id="RecordImpl";  // used in hashcode()
    String cName = "RecordImpl";
    
    public RecordImpl() {
        Utility.log(cName+".constructor");
    }
    public String getRecordName()
    {
        //Utility.log(cName+".getRecordName");
        return Record_Name;
    }
    public void setRecordName(String rn)
    {
        //Utility.log(cName+".setRecordName");
        Record_Name=rn;
    }
    public String getRecordShortDescription() 
    {
        return shortDescription;
    }
    public void setRecordShortDescription(String rsd) 
    {
        shortDescription=rsd;
    }
    public boolean equals(Object obj) {
        boolean match = false;
        if (obj==null) return match;
        RecordImpl other = (RecordImpl)obj;
        if (this.Id.equals(other.Id)) match = true;
        return match;
    }
    public int hashCode() {
        int hash = 1;
        hash = Id.hashCode();
        return hash;
    }
    public Object clone() throws CloneNotSupportedException
    {
        CloneNotSupportedException nse = new CloneNotSupportedException(
                  "RecordImpl.clone is not currently supported");
        throw nse;
    }
}
