/*
* ImageDataAuto.java
*
* Generated by com.evutils.codegen.JDOObjectGenerator
*
* Use but DON'T TOUCH
*/
package com.evolute.siprp.server.db.data.siprp_local3;

import com.evolute.utils.jdo.*;
import java.util.HashMap;
import java.util.Map;

class ImageDataAuto extends JDOObject
{

	public static final String TABLENAME = "image";

	public static final String ID = "id";
	public static final String ID_FULL = "image.id";
	public static final String NAME = "name";
	public static final String NAME_FULL = "image.name";
	public static final String IMAGE_DATA = "image_data";
	public static final String IMAGE_DATA_FULL = "image.image_data";

	public static final String FIELD_NAMES[] = new String[]{
		NAME, IMAGE_DATA, };


	protected static final String ALL_FIELD_NAMES[] = new String[]{
		ID, NAME, IMAGE_DATA, };

	private Map<String, Object> dataHash;

	public ImageDataAuto()
	{
		dataHash = new HashMap<String, Object>();
	}

	public Integer getId()
	{
		return (Integer) get(ID);
	}

	public void setId(Integer idValue )
	{
		this.set(ID, idValue );
	}

	public String getName()
	{
		return (String) get(NAME);
	}

	public void setName(String nameValue )
	{
		this.set(NAME, nameValue );
	}

	public byte[] getImage_data()
	{
		return (byte[]) get(IMAGE_DATA);
	}

	public void setImage_data(byte[] image_dataValue )
	{
		this.set(IMAGE_DATA, image_dataValue );
	}

	protected Object innerGet( String fieldName )
		throws Exception
	{
		Object value = null;
		value = dataHash.get( fieldName );
		return value;
	}

	protected void innerSet( String fieldName, Object value )
		throws Exception
	{
		dataHash.put( fieldName, value );
	}

	public String []getFieldNames()
	{
		return FIELD_NAMES;
	}

	protected String []getAllFieldNames()
	{
		return ALL_FIELD_NAMES;
	}

	public Class<Image> getInnerClass()
	{
		return Image.class;
	}

	public Integer getJDOPrimaryKey()
	{
		Object obj = this.getId();
		if(obj instanceof JDOObject){
			 obj = ((JDOObject) obj).getInnerObject();
		}
		return (Integer) obj;
	}
}
