forked from Coded/SIPRP
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.
460 lines
11 KiB
460 lines
11 KiB
/*
|
|
* TrbEstadoCivil.java
|
|
*
|
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
|
*
|
|
* Use but DON'T TOUCH
|
|
* -> (can't touch this)
|
|
*/
|
|
package shst.medicina.fichasclinicas.data.inner;
|
|
|
|
import java.sql.Timestamp;
|
|
|
|
public class TrbEstadoCivil 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( TrbEstadoCivil.ID, TrbEstadoCivil.ID_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.ID_FULL, TrbEstadoCivil.ID_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.CREATED_STAMP, TrbEstadoCivil.CREATED_STAMP_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.CREATED_STAMP_FULL, TrbEstadoCivil.CREATED_STAMP_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.DELETED_STAMP, TrbEstadoCivil.DELETED_STAMP_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.DELETED_STAMP_FULL, TrbEstadoCivil.DELETED_STAMP_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.CODIGO, TrbEstadoCivil.CODIGO_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.CODIGO_FULL, TrbEstadoCivil.CODIGO_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.DESCRICAO, TrbEstadoCivil.DESCRICAO_INDEX );
|
|
FIELD_INDEXES.put( TrbEstadoCivil.DESCRICAO_FULL, TrbEstadoCivil.DESCRICAO_INDEX );
|
|
}
|
|
|
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
|
|
|
|
|
public static final String TABLENAME = "trb_estado_civil";
|
|
|
|
|
|
public static final String CLASS_IDENTIFIER = "shst.medicina.fichasclinicas.data.inner.trb_estado_civil";
|
|
|
|
public static final int _INVALID__INDEX = -1;
|
|
public static final String ID = "id";
|
|
public static final String ID_FULL = "trb_estado_civil.id";
|
|
public static final int ID_INDEX = 0;
|
|
public static final String CREATED_STAMP = "created_stamp";
|
|
public static final String CREATED_STAMP_FULL = "trb_estado_civil.created_stamp";
|
|
public static final int CREATED_STAMP_INDEX = 1;
|
|
public static final String DELETED_STAMP = "deleted_stamp";
|
|
public static final String DELETED_STAMP_FULL = "trb_estado_civil.deleted_stamp";
|
|
public static final int DELETED_STAMP_INDEX = 2;
|
|
public static final String CODIGO = "codigo";
|
|
public static final String CODIGO_FULL = "trb_estado_civil.codigo";
|
|
public static final int CODIGO_INDEX = 3;
|
|
public static final String DESCRICAO = "descricao";
|
|
public static final String DESCRICAO_FULL = "trb_estado_civil.descricao";
|
|
public static final int DESCRICAO_INDEX = 4;
|
|
|
|
public static final String FIELD_NAMES[] = new String[]{
|
|
CREATED_STAMP, DELETED_STAMP, CODIGO, DESCRICAO, };
|
|
|
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
|
TABLENAME + "." + CREATED_STAMP, TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, };
|
|
|
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
|
ID, CREATED_STAMP, DELETED_STAMP, CODIGO, DESCRICAO, };
|
|
|
|
|
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
|
ID, };
|
|
|
|
|
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
|
ID, CREATED_STAMP, DELETED_STAMP, CODIGO, DESCRICAO, };
|
|
|
|
private Integer id;
|
|
private Timestamp created_stamp;
|
|
private Timestamp deleted_stamp;
|
|
private String codigo;
|
|
private String descricao;
|
|
|
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
|
|
|
public TrbEstadoCivil()
|
|
{
|
|
super();
|
|
dirtyProperties = new boolean[]{ false, 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 java.util.List<shst.medicina.fichasclinicas.data.FcFichaData>fromFcFicha_trabalhador_estado_civil_id()
|
|
{
|
|
java.util.List<shst.medicina.fichasclinicas.data.FcFichaData> result = new java.util.LinkedList< shst.medicina.fichasclinicas.data.FcFichaData >();
|
|
if ( getPrimaryKey() != null )
|
|
{
|
|
try
|
|
{
|
|
result = fromReference( shst.medicina.fichasclinicas.data.FcFichaData.class , getPrimaryKey().getMap().get("id"), "trabalhador_estado_civil_id" );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public Timestamp getCreated_stamp()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( CREATED_STAMP );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.created_stamp;
|
|
}
|
|
|
|
public void setCreated_stamp( Timestamp created_stamp )
|
|
{
|
|
try
|
|
{
|
|
preProcess( CREATED_STAMP, created_stamp );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.created_stamp = created_stamp;
|
|
LAZY_LOADED_OBJECTS.put( CREATED_STAMP, Boolean.TRUE );
|
|
}
|
|
|
|
public Timestamp getDeleted_stamp()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( DELETED_STAMP );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.deleted_stamp;
|
|
}
|
|
|
|
public void setDeleted_stamp( Timestamp deleted_stamp )
|
|
{
|
|
try
|
|
{
|
|
preProcess( DELETED_STAMP, deleted_stamp );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.deleted_stamp = deleted_stamp;
|
|
LAZY_LOADED_OBJECTS.put( DELETED_STAMP, 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
|
|
{
|
|
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
|
|
{
|
|
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 Object get( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case TrbEstadoCivil.ID_INDEX:
|
|
value = getId();
|
|
break;
|
|
case TrbEstadoCivil.CREATED_STAMP_INDEX:
|
|
value = getCreated_stamp();
|
|
break;
|
|
case TrbEstadoCivil.DELETED_STAMP_INDEX:
|
|
value = getDeleted_stamp();
|
|
break;
|
|
case TrbEstadoCivil.CODIGO_INDEX:
|
|
value = getCodigo();
|
|
break;
|
|
case TrbEstadoCivil.DESCRICAO_INDEX:
|
|
value = getDescricao();
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public Object rawGet( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case TrbEstadoCivil.ID_INDEX:
|
|
value = this.id;
|
|
break;
|
|
case TrbEstadoCivil.CREATED_STAMP_INDEX:
|
|
value = this.created_stamp;
|
|
break;
|
|
case TrbEstadoCivil.DELETED_STAMP_INDEX:
|
|
value = this.deleted_stamp;
|
|
break;
|
|
case TrbEstadoCivil.CODIGO_INDEX:
|
|
value = this.codigo;
|
|
break;
|
|
case TrbEstadoCivil.DESCRICAO_INDEX:
|
|
value = this.descricao;
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public void set( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case TrbEstadoCivil.ID_INDEX:
|
|
setId( ( Integer ) value );
|
|
break;
|
|
case TrbEstadoCivil.CREATED_STAMP_INDEX:
|
|
setCreated_stamp( ( Timestamp ) value );
|
|
break;
|
|
case TrbEstadoCivil.DELETED_STAMP_INDEX:
|
|
setDeleted_stamp( ( Timestamp ) value );
|
|
break;
|
|
case TrbEstadoCivil.CODIGO_INDEX:
|
|
setCodigo( ( String ) value );
|
|
break;
|
|
case TrbEstadoCivil.DESCRICAO_INDEX:
|
|
setDescricao( ( String ) value );
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void rawSet( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case TrbEstadoCivil.ID_INDEX:
|
|
this.id = ( Integer ) value;
|
|
break;
|
|
case TrbEstadoCivil.CREATED_STAMP_INDEX:
|
|
this.created_stamp = ( Timestamp ) value;
|
|
break;
|
|
case TrbEstadoCivil.DELETED_STAMP_INDEX:
|
|
this.deleted_stamp = ( Timestamp ) value;
|
|
break;
|
|
case TrbEstadoCivil.CODIGO_INDEX:
|
|
this.codigo = ( String ) value;
|
|
break;
|
|
case TrbEstadoCivil.DESCRICAO_INDEX:
|
|
this.descricao = ( 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 TrbEstadoCivil.ID_INDEX:
|
|
theClass = Integer.class;
|
|
break;
|
|
case TrbEstadoCivil.CREATED_STAMP_INDEX:
|
|
theClass = Timestamp.class;
|
|
break;
|
|
case TrbEstadoCivil.DELETED_STAMP_INDEX:
|
|
theClass = Timestamp.class;
|
|
break;
|
|
case TrbEstadoCivil.CODIGO_INDEX:
|
|
theClass = String.class;
|
|
break;
|
|
case TrbEstadoCivil.DESCRICAO_INDEX:
|
|
theClass = String.class;
|
|
break;
|
|
}
|
|
return theClass;
|
|
}
|
|
|
|
public Integer getFieldIndex( String fieldName )
|
|
{
|
|
Integer index = FIELD_INDEXES.get( fieldName );
|
|
return index != null ? index : TrbEstadoCivil._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, TrbEstadoCivil.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 );
|
|
}
|
|
}
|
|
}
|