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

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

class DepartamentosDataAuto extends JDOObject
{

	public static final String TABLENAME = "departamentos";

	public static final String ID = "id";
	public static final String ID_FULL = "departamentos.id";
	public static final String DESCRICAO = "descricao";
	public static final String DESCRICAO_FULL = "departamentos.descricao";
	public static final String ACTIVO = "activo";
	public static final String ACTIVO_FULL = "departamentos.activo";

	public static final String FIELD_NAMES[] = new String[]{
		DESCRICAO, ACTIVO, };


	protected static final String ALL_FIELD_NAMES[] = new String[]{
		ID, DESCRICAO, ACTIVO, };

	private Map<String, Object> dataHash;

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

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

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

	public String getDescricao()
	{
		return (String) get(DESCRICAO);
	}

	public void setDescricao(String descricaoValue )
	{
		this.set(DESCRICAO, descricaoValue );
	}

	public String getActivo()
	{
		return (String) get(ACTIVO);
	}

	public void setActivo(String activoValue )
	{
		this.set(ACTIVO, activoValue );
	}

	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<Departamentos> getInnerClass()
	{
		return Departamentos.class;
	}

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