/*
* HsRelatorioNormalizacao.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package siprp.data.inner;


public class HsRelatorioNormalizacao extends siprp.data.BaseObject
{
	private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();

	static
	{
		com.evolute.entity.evo.EvoDataObject.register( HsRelatorioNormalizacao.CLASS_IDENTIFIER, HsRelatorioNormalizacao.HS_RELATORIO_ID, HsRelatorioNormalizacao.TO_HS_RELATORIO_ID ); 
		FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_RELATORIO_ID, HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_RELATORIO_ID_FULL, HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.TO_HS_RELATORIO_ID, HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_NORMALIZACAO_ID, HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_FULL, HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.ID, HsRelatorioNormalizacao.ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.ID_FULL, HsRelatorioNormalizacao.ID_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.CODIGO, HsRelatorioNormalizacao.CODIGO_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.CODIGO_FULL, HsRelatorioNormalizacao.CODIGO_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.DESCRICAO, HsRelatorioNormalizacao.DESCRICAO_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.DESCRICAO_FULL, HsRelatorioNormalizacao.DESCRICAO_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.PORTUGUESA, HsRelatorioNormalizacao.PORTUGUESA_INDEX );
		FIELD_INDEXES.put( HsRelatorioNormalizacao.PORTUGUESA_FULL, HsRelatorioNormalizacao.PORTUGUESA_INDEX );
	}

	private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();


	public static final com.evolute.entity.ForeignKey ForeignKeyhs_relatorio_idTohs_relatorio = 
		new com.evolute.entity.ForeignKey( HsRelatorioNormalizacao.class, HsRelatorioNormalizacao.HS_RELATORIO_ID, siprp.data.outer.HsRelatorioData.class, siprp.data.outer.HsRelatorioData.ID );

	public static final String TABLENAME = "hs_relatorio_normalizacao";


	public static final String CLASS_IDENTIFIER = "hs_relatorio_normalizacao1277401737169";

	public static final int _INVALID__INDEX = -1;
	public static final String HS_RELATORIO_ID = "hs_relatorio_id";
	public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_normalizacao.hs_relatorio_id";
	public static final int HS_RELATORIO_ID_INDEX = 0;
	public static final String TO_HS_RELATORIO_ID = "to_hs_relatorio_id";
	public static final int TO_HS_RELATORIO_ID_INDEX = 1;
	public static final String HS_NORMALIZACAO_ID = "hs_normalizacao_id";
	public static final String HS_NORMALIZACAO_ID_FULL = "hs_relatorio_normalizacao.hs_normalizacao_id";
	public static final int HS_NORMALIZACAO_ID_INDEX = 2;
	public static final String ID = "id";
	public static final String ID_FULL = "hs_relatorio_normalizacao.id";
	public static final int ID_INDEX = 3;
	public static final String CODIGO = "codigo";
	public static final String CODIGO_FULL = "hs_relatorio_normalizacao.codigo";
	public static final int CODIGO_INDEX = 4;
	public static final String DESCRICAO = "descricao";
	public static final String DESCRICAO_FULL = "hs_relatorio_normalizacao.descricao";
	public static final int DESCRICAO_INDEX = 5;
	public static final String PORTUGUESA = "portuguesa";
	public static final String PORTUGUESA_FULL = "hs_relatorio_normalizacao.portuguesa";
	public static final int PORTUGUESA_INDEX = 6;

	public static final String FIELD_NAMES[] = new String[]{
		HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_NORMALIZACAO_ID, CODIGO, DESCRICAO, 
		PORTUGUESA, };

	public static final String FIELD_NAMES_FULL[] = new String[]{
		TABLENAME + "." + HS_RELATORIO_ID, TABLENAME + "." + TO_HS_RELATORIO_ID, TABLENAME + "." + HS_NORMALIZACAO_ID, TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, 
		TABLENAME + "." + PORTUGUESA, };

	protected static final String DB_FIELD_NAMES[] = new String[]{
		HS_RELATORIO_ID, HS_NORMALIZACAO_ID, ID, CODIGO, DESCRICAO, PORTUGUESA, };


	protected static final String PK_FIELD_NAMES[] = new String[]{
		ID, };


	public static final String DEFAULT_LOAD_SET[] = new String[] {
		HS_RELATORIO_ID, HS_NORMALIZACAO_ID, ID, CODIGO, DESCRICAO, PORTUGUESA, };

	private Integer hs_relatorio_id;
	private siprp.data.outer.HsRelatorioData to_hs_relatorio_id;
	private Integer hs_normalizacao_id;
	private Integer id;
	private String codigo;
	private String descricao;
	private Boolean portuguesa;

	protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;

	public HsRelatorioNormalizacao()
	{
		super();
		dirtyProperties = new boolean[]{ false, false, false, 
			false, false, false, false };
	}

	public Integer getHs_relatorio_id()
	{
		try
		{
			setLastAccess( System.currentTimeMillis() );
			prepare( HS_RELATORIO_ID );
		}
		catch( java.lang.Exception ex )
		{
			throw new RuntimeException( ex );
		}
		return this.hs_relatorio_id;
	}

	public void setHs_relatorio_id( Integer hs_relatorio_id )
	{
		try
		{
			setLockedForRefresh( true );
			preProcess( HS_RELATORIO_ID, hs_relatorio_id );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.hs_relatorio_id = hs_relatorio_id;
		LAZY_LOADED_OBJECTS.put( HS_RELATORIO_ID, Boolean.TRUE );
	}

	public siprp.data.outer.HsRelatorioData toHs_relatorio_id()
	{
		try
		{
			prepare( TO_HS_RELATORIO_ID );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		return this.to_hs_relatorio_id;
	}

	public void setToHs_relatorio_id( siprp.data.outer.HsRelatorioData to_hs_relatorio_id )
	{
		try
		{
			preProcess( TO_HS_RELATORIO_ID, to_hs_relatorio_id );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.to_hs_relatorio_id = to_hs_relatorio_id;
	}

	public Integer getHs_normalizacao_id()
	{
		try
		{
			setLastAccess( System.currentTimeMillis() );
			prepare( HS_NORMALIZACAO_ID );
		}
		catch( java.lang.Exception ex )
		{
			throw new RuntimeException( ex );
		}
		return this.hs_normalizacao_id;
	}

	public void setHs_normalizacao_id( Integer hs_normalizacao_id )
	{
		try
		{
			setLockedForRefresh( true );
			preProcess( HS_NORMALIZACAO_ID, hs_normalizacao_id );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.hs_normalizacao_id = hs_normalizacao_id;
		LAZY_LOADED_OBJECTS.put( HS_NORMALIZACAO_ID, Boolean.TRUE );
	}

	public Integer getId()
	{
		try
		{
			setLastAccess( System.currentTimeMillis() );
			prepare( ID );
		}
		catch( java.lang.Exception ex )
		{
			throw new RuntimeException( ex );
		}
		return this.id;
	}

	public void setId( Integer id )
	{
		try
		{
			setLockedForRefresh( true );
			preProcess( ID, id );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.id = id;
		LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
	}

	public String getCodigo()
	{
		try
		{
			setLastAccess( System.currentTimeMillis() );
			prepare( CODIGO );
		}
		catch( java.lang.Exception ex )
		{
			throw new RuntimeException( ex );
		}
		return this.codigo;
	}

	public void setCodigo( String codigo )
	{
		try
		{
			setLockedForRefresh( true );
			preProcess( CODIGO, codigo );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.codigo = codigo;
		LAZY_LOADED_OBJECTS.put( CODIGO, Boolean.TRUE );
	}

	public String getDescricao()
	{
		try
		{
			setLastAccess( System.currentTimeMillis() );
			prepare( DESCRICAO );
		}
		catch( java.lang.Exception ex )
		{
			throw new RuntimeException( ex );
		}
		return this.descricao;
	}

	public void setDescricao( String descricao )
	{
		try
		{
			setLockedForRefresh( true );
			preProcess( DESCRICAO, descricao );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.descricao = descricao;
		LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
	}

	public Boolean getPortuguesa()
	{
		try
		{
			setLastAccess( System.currentTimeMillis() );
			prepare( PORTUGUESA );
		}
		catch( java.lang.Exception ex )
		{
			throw new RuntimeException( ex );
		}
		return this.portuguesa;
	}

	public void setPortuguesa( Boolean portuguesa )
	{
		try
		{
			setLockedForRefresh( true );
			preProcess( PORTUGUESA, portuguesa );
		}
		catch( com.evolute.entity.evo.EvoDataException edex )
		{
			throw new RuntimeException( edex );
		}
		this.portuguesa = portuguesa;
		LAZY_LOADED_OBJECTS.put( PORTUGUESA, Boolean.TRUE );
	}

	public Object get( String fieldName )
	{
		Object value = null;
		Integer index = getFieldIndex( fieldName );
		switch( index )
		{
			case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX:
				value = getHs_relatorio_id();
				break;
			case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX:
				value = toHs_relatorio_id();
				break;
			case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX:
				value = getHs_normalizacao_id();
				break;
			case HsRelatorioNormalizacao.ID_INDEX:
				value = getId();
				break;
			case HsRelatorioNormalizacao.CODIGO_INDEX:
				value = getCodigo();
				break;
			case HsRelatorioNormalizacao.DESCRICAO_INDEX:
				value = getDescricao();
				break;
			case HsRelatorioNormalizacao.PORTUGUESA_INDEX:
				value = getPortuguesa();
				break;
		}
		return value;
	}

	public Object rawGet( String fieldName )
	{
		Object value = null;
		Integer index = getFieldIndex( fieldName );
		switch( index )
		{
			case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX:
				value = this.hs_relatorio_id;
				break;
			case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX:
				value = this.to_hs_relatorio_id;
				break;
			case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX:
				value = this.hs_normalizacao_id;
				break;
			case HsRelatorioNormalizacao.ID_INDEX:
				value = this.id;
				break;
			case HsRelatorioNormalizacao.CODIGO_INDEX:
				value = this.codigo;
				break;
			case HsRelatorioNormalizacao.DESCRICAO_INDEX:
				value = this.descricao;
				break;
			case HsRelatorioNormalizacao.PORTUGUESA_INDEX:
				value = this.portuguesa;
				break;
		}
		return value;
	}

	public void set( String fieldName, Object value )
	{
		Integer index = getFieldIndex( fieldName );
		switch( index )
		{
			case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX:
				setHs_relatorio_id( ( Integer ) value );
				break;
			case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX:
				setToHs_relatorio_id( ( siprp.data.outer.HsRelatorioData ) value );
				break;
			case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX:
				setHs_normalizacao_id( ( Integer ) value );
				break;
			case HsRelatorioNormalizacao.ID_INDEX:
				setId( ( Integer ) value );
				break;
			case HsRelatorioNormalizacao.CODIGO_INDEX:
				setCodigo( ( String ) value );
				break;
			case HsRelatorioNormalizacao.DESCRICAO_INDEX:
				setDescricao( ( String ) value );
				break;
			case HsRelatorioNormalizacao.PORTUGUESA_INDEX:
				setPortuguesa( ( Boolean ) value );
				break;
		}
	}

	public void rawSet( String fieldName, Object value )
	{
		Integer index = getFieldIndex( fieldName );
		switch( index )
		{
			case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX:
				this.hs_relatorio_id = ( Integer ) value;
				break;
			case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX:
				this.to_hs_relatorio_id = ( siprp.data.outer.HsRelatorioData ) value;
				break;
			case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX:
				this.hs_normalizacao_id = ( Integer ) value;
				break;
			case HsRelatorioNormalizacao.ID_INDEX:
				this.id = ( Integer ) value;
				break;
			case HsRelatorioNormalizacao.CODIGO_INDEX:
				this.codigo = ( String ) value;
				break;
			case HsRelatorioNormalizacao.DESCRICAO_INDEX:
				this.descricao = ( String ) value;
				break;
			case HsRelatorioNormalizacao.PORTUGUESA_INDEX:
				this.portuguesa = ( Boolean ) value;
				break;
		}
	}

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

	public String []getFieldNamesFull()
	{
		return FIELD_NAMES_FULL;
	}

	public String []getDBFieldNames()
	{
		return DB_FIELD_NAMES;
	}

	public String []getPrimaryKeyNames()
	{
		return PK_FIELD_NAMES;
	}

	public String []getDefaultLoadSet()
	{
		return DEFAULT_LOAD_SET;
	}

	public String getPrimaryKeyName()
	{
		return PK_FIELD_NAMES[ 0 ];
	}

	public Class<?> getFieldClass( String fieldName )
	{
		Integer index = getFieldIndex( fieldName );
		Class<?> theClass = null;
		switch( index )
		{
			case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX:
				theClass = Integer.class;
				break;
			case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX:
				theClass = siprp.data.outer.HsRelatorioData.class;
				break;
			case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX:
				theClass = Integer.class;
				break;
			case HsRelatorioNormalizacao.ID_INDEX:
				theClass = Integer.class;
				break;
			case HsRelatorioNormalizacao.CODIGO_INDEX:
				theClass = String.class;
				break;
			case HsRelatorioNormalizacao.DESCRICAO_INDEX:
				theClass = String.class;
				break;
			case HsRelatorioNormalizacao.PORTUGUESA_INDEX:
				theClass = Boolean.class;
				break;
		}
		return theClass;
	}

	public Integer getFieldIndex( String fieldName )
	{
		Integer index = FIELD_INDEXES.get( fieldName );
		return index != null ? index : HsRelatorioNormalizacao._INVALID__INDEX;
	}

	public String getTableName()
	{
		return TABLENAME;
	}

	public String getClassIdentifier()
	{
		return CLASS_IDENTIFIER;
	}

	@Override
	protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
	{
		if( primaryKey == null )
		{
			primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, HsRelatorioNormalizacao.PK_FIELD_NAMES );
			primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) );
		}
		setId( ( Integer ) array.get( row, col + 0 ) );
	}

	@Override
	public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
	{
		return primaryKey;
	}

	public void initLazyLoadFields()
	{
	}

	public boolean isPropertyLoaded( String fieldName )
	{
		if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
		{
			return true;
		}
		else
		{
			return LAZY_LOADED_OBJECTS.get( fieldName );
		}
	}
}
