You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

394 lines
9.3 KiB

/*
* Recomendacoes.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Recomendacoes extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Recomendacoes.ID, Recomendacoes.ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.ID_FULL, Recomendacoes.ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Recomendacoes.CLASS_IDENTIFIER, Recomendacoes.ANALISE_ID, Recomendacoes.TO_ANALISE_ID );
FIELD_INDEXES.put( Recomendacoes.ANALISE_ID, Recomendacoes.ANALISE_ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.ANALISE_ID_FULL, Recomendacoes.ANALISE_ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.TO_ANALISE_ID, Recomendacoes.TO_ANALISE_ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO, Recomendacoes.RECOMENDACAO_INDEX );
FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO_FULL, Recomendacoes.RECOMENDACAO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes =
new com.evolute.entity.ForeignKey( Recomendacoes.class, Recomendacoes.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID );
public static final String TABLENAME = "recomendacoes";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.recomendacoes";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "recomendacoes.id";
public static final int ID_INDEX = 0;
public static final String ANALISE_ID = "analise_id";
public static final String ANALISE_ID_FULL = "recomendacoes.analise_id";
public static final int ANALISE_ID_INDEX = 1;
public static final String TO_ANALISE_ID = "to_analise_id";
public static final String TO_ANALISE_ID_FULL = "recomendacoes.to_analise_id";
public static final int TO_ANALISE_ID_INDEX = 2;
public static final String RECOMENDACAO = "recomendacao";
public static final String RECOMENDACAO_FULL = "recomendacoes.recomendacao";
public static final int RECOMENDACAO_INDEX = 3;
public static final String FIELD_NAMES[] = new String[]{
ANALISE_ID, TO_ANALISE_ID, RECOMENDACAO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + RECOMENDACAO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, ANALISE_ID, RECOMENDACAO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, ANALISE_ID, RECOMENDACAO, };
private Integer id;
private Integer analise_id;
private db.data.siprp.outer.AnalisesAcidentesData to_analise_id;
private String recomendacao;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Recomendacoes()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false };
}
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
{
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 Integer getAnalise_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ANALISE_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.analise_id;
}
public void setAnalise_id( Integer analise_id )
{
try
{
preProcess( ANALISE_ID, analise_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.analise_id = analise_id;
LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE );
}
public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id()
{
try
{
prepare( TO_ANALISE_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_analise_id;
}
public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id )
{
try
{
preProcess( TO_ANALISE_ID, to_analise_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_analise_id = to_analise_id;
}
public String getRecomendacao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( RECOMENDACAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.recomendacao;
}
public void setRecomendacao( String recomendacao )
{
try
{
preProcess( RECOMENDACAO, recomendacao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.recomendacao = recomendacao;
LAZY_LOADED_OBJECTS.put( RECOMENDACAO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
value = getId();
break;
case Recomendacoes.ANALISE_ID_INDEX:
value = getAnalise_id();
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
value = toAnalise_id();
break;
case Recomendacoes.RECOMENDACAO_INDEX:
value = getRecomendacao();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
value = this.id;
break;
case Recomendacoes.ANALISE_ID_INDEX:
value = this.analise_id;
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
value = this.to_analise_id;
break;
case Recomendacoes.RECOMENDACAO_INDEX:
value = this.recomendacao;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
setId( ( Integer ) value );
break;
case Recomendacoes.ANALISE_ID_INDEX:
setAnalise_id( ( Integer ) value );
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value );
break;
case Recomendacoes.RECOMENDACAO_INDEX:
setRecomendacao( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
this.id = ( Integer ) value;
break;
case Recomendacoes.ANALISE_ID_INDEX:
this.analise_id = ( Integer ) value;
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value;
break;
case Recomendacoes.RECOMENDACAO_INDEX:
this.recomendacao = ( String ) 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 Recomendacoes.ID_INDEX:
theClass = Integer.class;
break;
case Recomendacoes.ANALISE_ID_INDEX:
theClass = Integer.class;
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
theClass = db.data.siprp.outer.AnalisesAcidentesData.class;
break;
case Recomendacoes.RECOMENDACAO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Recomendacoes._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, Recomendacoes.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@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 );
}
}
}