diff --git a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRelatorioRisco.java b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRelatorioRisco.java index cfa5374b..e99b04c0 100644 --- a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRelatorioRisco.java +++ b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRelatorioRisco.java @@ -8,6 +8,7 @@ */ package db.data.siprp_local.inner; +import java.sql.Timestamp; public class HsRelatorioRisco extends com.evolute.entity.evo.EvoDataObject { @@ -82,13 +83,13 @@ public class HsRelatorioRisco extends com.evolute.entity.evo.EvoDataObjectfromHsRelatorioPostoRiscoApagado_risco_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoRiscoApagadoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.HsRelatorioPostoRiscoApagadoData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + public Integer getRelatorio_id() { try @@ -182,7 +199,6 @@ public class HsRelatorioRisco extends com.evolute.entity.evo.EvoDataObject { @@ -19,6 +20,8 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.ID_FULL, HsRelatorioRiscoValorQualitativo.ID_INDEX ); FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.DESCRIPTION, HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX ); FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.DESCRIPTION_FULL, HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.DELETED_STAMP, HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.DELETED_STAMP_FULL, HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX ); } private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); @@ -36,15 +39,18 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo public static final String DESCRIPTION = "description"; public static final String DESCRIPTION_FULL = "hs_relatorio_risco_valor_qualitativo.description"; public static final int DESCRIPTION_INDEX = 1; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "hs_relatorio_risco_valor_qualitativo.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 2; public static final String FIELD_NAMES[] = new String[]{ - DESCRIPTION, }; + DESCRIPTION, DELETED_STAMP, }; public static final String FIELD_NAMES_FULL[] = new String[]{ - TABLENAME + "." + DESCRIPTION, }; + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_STAMP, }; protected static final String DB_FIELD_NAMES[] = new String[]{ - ID, DESCRIPTION, }; + ID, DESCRIPTION, DELETED_STAMP, }; protected static final String PK_FIELD_NAMES[] = new String[]{ @@ -52,17 +58,18 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo public static final String DEFAULT_LOAD_SET[] = new String[] { - ID, DESCRIPTION, }; + ID, DESCRIPTION, DELETED_STAMP, }; private Integer id; private String description; + private Timestamp deleted_stamp; protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; public HsRelatorioRiscoValorQualitativo() { super(); - dirtyProperties = new boolean[]{ false, false }; + dirtyProperties = new boolean[]{ false, false, false }; } public Integer getId() @@ -83,7 +90,6 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo { try { - setLockedForRefresh( true ); preProcess( ID, id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -128,6 +134,23 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo return result; } + public java.util.ListfromHsRelatorioPostoRiscoApagado_valor_qualitativo_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoRiscoApagadoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.HsRelatorioPostoRiscoApagadoData.class , getPrimaryKey().getMap().get("id"), "valor_qualitativo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + public String getDescription() { try @@ -146,7 +169,6 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo { try { - setLockedForRefresh( true ); preProcess( DESCRIPTION, description ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -157,6 +179,34 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo LAZY_LOADED_OBJECTS.put( DESCRIPTION, 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 Object get( String fieldName ) { Object value = null; @@ -169,6 +219,9 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: value = getDescription(); break; + case HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; } return value; } @@ -185,6 +238,9 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: value = this.description; break; + case HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; } return value; } @@ -200,6 +256,9 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: setDescription( ( String ) value ); break; + case HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX: + setDeleted_stamp( ( Timestamp ) value ); + break; } } @@ -214,6 +273,9 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: this.description = ( String ) value; break; + case HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX: + this.deleted_stamp = ( Timestamp ) value; + break; } } @@ -259,6 +321,9 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: theClass = String.class; break; + case HsRelatorioRiscoValorQualitativo.DELETED_STAMP_INDEX: + theClass = Timestamp.class; + break; } return theClass; } @@ -285,9 +350,24 @@ public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.Evo if( primaryKey == null ) { primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, HsRelatorioRiscoValorQualitativo.PK_FIELD_NAMES ); - primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + 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; + } + } } - setId( ( Integer ) array.get( row, col + 0 ) ); } @Override diff --git a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRisco.java b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRisco.java index 186b1c86..68d3e7b8 100644 --- a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRisco.java +++ b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/HsRisco.java @@ -8,6 +8,7 @@ */ package db.data.siprp_local.inner; +import java.sql.Timestamp; public class HsRisco extends com.evolute.entity.evo.EvoDataObject { @@ -75,13 +76,13 @@ public class HsRisco extends com.evolute.entity.evo.EvoDataObject { @@ -61,7 +62,7 @@ public class HsRiscoTema extends com.evolute.entity.evo.EvoDataObject { @@ -75,6 +77,8 @@ public class Lembretes extends com.evolute.entity.evo.EvoDataObject LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); @@ -203,6 +207,9 @@ public class Lembretes extends com.evolute.entity.evo.EvoDataObject { @@ -75,10 +76,10 @@ public class MarcacoesEmpresa extends com.evolute.entity.evo.EvoDataObject { @@ -41,6 +43,12 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje FIELD_INDEXES.put( MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX ); FIELD_INDEXES.put( MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_FULL, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX ); FIELD_INDEXES.put( MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST, MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.DELETED_STAMP, MarcacoesEstabelecimento.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.DELETED_STAMP_FULL, MarcacoesEstabelecimento.DELETED_STAMP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesEstabelecimento.CLASS_IDENTIFIER, MarcacoesEstabelecimento.TIPO_EVENTO_ID, MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TIPO_EVENTO_ID, MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TIPO_EVENTO_ID_FULL, MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID, MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID_INDEX ); } private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); @@ -55,6 +63,9 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje public static final com.evolute.entity.ForeignKey ForeignKeytecnico_superior_hstTomarcacoes_tecnicos_hst = new com.evolute.entity.ForeignKey( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST, db.data.siprp_local.outer.MarcacoesTecnicosHstData.class, db.data.siprp_local.outer.MarcacoesTecnicosHstData.ID ); + public static final com.evolute.entity.ForeignKey ForeignKeytipo_evento_idTomarcacoes_estabelecimento_tipos_eventos = + new com.evolute.entity.ForeignKey( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.TIPO_EVENTO_ID, db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData.class, db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData.ID ); + public static final String TABLENAME = "marcacoes_estabelecimento"; @@ -100,20 +111,31 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje public static final String TO_TECNICO_SUPERIOR_HST = "to_tecnico_superior_hst"; public static final String TO_TECNICO_SUPERIOR_HST_FULL = "marcacoes_estabelecimento.to_tecnico_superior_hst"; public static final int TO_TECNICO_SUPERIOR_HST_INDEX = 12; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "marcacoes_estabelecimento.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 13; + public static final String TIPO_EVENTO_ID = "tipo_evento_id"; + public static final String TIPO_EVENTO_ID_FULL = "marcacoes_estabelecimento.tipo_evento_id"; + public static final int TIPO_EVENTO_ID_INDEX = 14; + public static final String TO_TIPO_EVENTO_ID = "to_tipo_evento_id"; + public static final String TO_TIPO_EVENTO_ID_FULL = "marcacoes_estabelecimento.to_tipo_evento_id"; + public static final int TO_TIPO_EVENTO_ID_INDEX = 15; public static final String FIELD_NAMES[] = new String[]{ DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, ESTADO, TECNICO_HST, TO_TECNICO_HST, OBSERVACOES, - TECNICO_SUPERIOR_HST, TO_TECNICO_SUPERIOR_HST, }; + TECNICO_SUPERIOR_HST, TO_TECNICO_SUPERIOR_HST, DELETED_STAMP, TIPO_EVENTO_ID, + TO_TIPO_EVENTO_ID, }; public static final String FIELD_NAMES_FULL[] = new String[]{ TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + ESTADO, TABLENAME + "." + TECNICO_HST, TABLENAME + "." + TO_TECNICO_HST, TABLENAME + "." + OBSERVACOES, - TABLENAME + "." + TECNICO_SUPERIOR_HST, TABLENAME + "." + TO_TECNICO_SUPERIOR_HST, }; + TABLENAME + "." + TECNICO_SUPERIOR_HST, TABLENAME + "." + TO_TECNICO_SUPERIOR_HST, TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + TIPO_EVENTO_ID, + TABLENAME + "." + TO_TIPO_EVENTO_ID, }; protected static final String DB_FIELD_NAMES[] = new String[]{ ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, ESTADO, - TECNICO_HST, OBSERVACOES, TECNICO_SUPERIOR_HST, }; + TECNICO_HST, OBSERVACOES, TECNICO_SUPERIOR_HST, DELETED_STAMP, TIPO_EVENTO_ID, }; protected static final String PK_FIELD_NAMES[] = new String[]{ @@ -122,13 +144,13 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje public static final String DEFAULT_LOAD_SET[] = new String[] { ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, ESTADO, - TECNICO_HST, OBSERVACOES, TECNICO_SUPERIOR_HST, }; + TECNICO_HST, OBSERVACOES, TECNICO_SUPERIOR_HST, DELETED_STAMP, TIPO_EVENTO_ID, }; private Integer id; - private java.util.Date data; + private Date data; private String realizada; - private java.util.Date data_email; - private java.util.Date data_relatorio; + private Date data_email; + private Date data_relatorio; private Integer estabelecimento_id; private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; private Integer estado; @@ -137,6 +159,9 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje private String observacoes; private Integer tecnico_superior_hst; private db.data.siprp_local.outer.MarcacoesTecnicosHstData to_tecnico_superior_hst; + private Timestamp deleted_stamp; + private Integer tipo_evento_id; + private db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData to_tipo_evento_id; protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; @@ -145,7 +170,7 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje super(); dirtyProperties = new boolean[]{ false, false, false, false, false, false, false, false, false, false, false, - false, false }; + false, false, false, false, false }; } public Integer getId() @@ -166,7 +191,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( ID, id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -228,7 +252,7 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje return result; } - public java.util.Date getData() + public Date getData() { try { @@ -242,11 +266,10 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje return this.data; } - public void setData( java.util.Date data ) + public void setData( Date data ) { try { - setLockedForRefresh( true ); preProcess( DATA, data ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -275,7 +298,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( REALIZADA, realizada ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -286,7 +308,7 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje LAZY_LOADED_OBJECTS.put( REALIZADA, Boolean.TRUE ); } - public java.util.Date getData_email() + public Date getData_email() { try { @@ -300,11 +322,10 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje return this.data_email; } - public void setData_email( java.util.Date data_email ) + public void setData_email( Date data_email ) { try { - setLockedForRefresh( true ); preProcess( DATA_EMAIL, data_email ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -315,7 +336,7 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje LAZY_LOADED_OBJECTS.put( DATA_EMAIL, Boolean.TRUE ); } - public java.util.Date getData_relatorio() + public Date getData_relatorio() { try { @@ -329,11 +350,10 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje return this.data_relatorio; } - public void setData_relatorio( java.util.Date data_relatorio ) + public void setData_relatorio( Date data_relatorio ) { try { - setLockedForRefresh( true ); preProcess( DATA_RELATORIO, data_relatorio ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -362,7 +382,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( ESTABELECIMENTO_ID, estabelecimento_id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -417,7 +436,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( ESTADO, estado ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -446,7 +464,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( TECNICO_HST, tecnico_hst ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -501,7 +518,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( OBSERVACOES, observacoes ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -530,7 +546,6 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje { try { - setLockedForRefresh( true ); preProcess( TECNICO_SUPERIOR_HST, tecnico_superior_hst ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -567,6 +582,88 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje this.to_tecnico_superior_hst = to_tecnico_superior_hst; } + 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 Integer getTipo_evento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_EVENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_evento_id; + } + + public void setTipo_evento_id( Integer tipo_evento_id ) + { + try + { + preProcess( TIPO_EVENTO_ID, tipo_evento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_evento_id = tipo_evento_id; + LAZY_LOADED_OBJECTS.put( TIPO_EVENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData toTipo_evento_id() + { + try + { + prepare( TO_TIPO_EVENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo_evento_id; + } + + public void setToTipo_evento_id( db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData to_tipo_evento_id ) + { + try + { + preProcess( TO_TIPO_EVENTO_ID, to_tipo_evento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tipo_evento_id = to_tipo_evento_id; + } + public Object get( String fieldName ) { Object value = null; @@ -612,6 +709,15 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: value = toTecnico_superior_hst(); break; + case MarcacoesEstabelecimento.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX: + value = getTipo_evento_id(); + break; + case MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID_INDEX: + value = toTipo_evento_id(); + break; } return value; } @@ -661,6 +767,15 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: value = this.to_tecnico_superior_hst; break; + case MarcacoesEstabelecimento.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX: + value = this.tipo_evento_id; + break; + case MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID_INDEX: + value = this.to_tipo_evento_id; + break; } return value; } @@ -674,16 +789,16 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje setId( ( Integer ) value ); break; case MarcacoesEstabelecimento.DATA_INDEX: - setData( ( java.util.Date ) value ); + setData( ( Date ) value ); break; case MarcacoesEstabelecimento.REALIZADA_INDEX: setRealizada( ( String ) value ); break; case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: - setData_email( ( java.util.Date ) value ); + setData_email( ( Date ) value ); break; case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: - setData_relatorio( ( java.util.Date ) value ); + setData_relatorio( ( Date ) value ); break; case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: setEstabelecimento_id( ( Integer ) value ); @@ -709,6 +824,15 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: setToTecnico_superior_hst( ( db.data.siprp_local.outer.MarcacoesTecnicosHstData ) value ); break; + case MarcacoesEstabelecimento.DELETED_STAMP_INDEX: + setDeleted_stamp( ( Timestamp ) value ); + break; + case MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX: + setTipo_evento_id( ( Integer ) value ); + break; + case MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID_INDEX: + setToTipo_evento_id( ( db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData ) value ); + break; } } @@ -721,16 +845,16 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje this.id = ( Integer ) value; break; case MarcacoesEstabelecimento.DATA_INDEX: - this.data = ( java.util.Date ) value; + this.data = ( Date ) value; break; case MarcacoesEstabelecimento.REALIZADA_INDEX: this.realizada = ( String ) value; break; case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: - this.data_email = ( java.util.Date ) value; + this.data_email = ( Date ) value; break; case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: - this.data_relatorio = ( java.util.Date ) value; + this.data_relatorio = ( Date ) value; break; case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: this.estabelecimento_id = ( Integer ) value; @@ -756,6 +880,15 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: this.to_tecnico_superior_hst = ( db.data.siprp_local.outer.MarcacoesTecnicosHstData ) value; break; + case MarcacoesEstabelecimento.DELETED_STAMP_INDEX: + this.deleted_stamp = ( Timestamp ) value; + break; + case MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX: + this.tipo_evento_id = ( Integer ) value; + break; + case MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID_INDEX: + this.to_tipo_evento_id = ( db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData ) value; + break; } } @@ -799,16 +932,16 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje theClass = Integer.class; break; case MarcacoesEstabelecimento.DATA_INDEX: - theClass = java.util.Date.class; + theClass = Date.class; break; case MarcacoesEstabelecimento.REALIZADA_INDEX: theClass = String.class; break; case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: - theClass = java.util.Date.class; + theClass = Date.class; break; case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: - theClass = java.util.Date.class; + theClass = Date.class; break; case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: theClass = Integer.class; @@ -834,6 +967,15 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: theClass = db.data.siprp_local.outer.MarcacoesTecnicosHstData.class; break; + case MarcacoesEstabelecimento.DELETED_STAMP_INDEX: + theClass = Timestamp.class; + break; + case MarcacoesEstabelecimento.TIPO_EVENTO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimento.TO_TIPO_EVENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.MarcacoesEstabelecimentoTiposEventosData.class; + break; } return theClass; } @@ -860,9 +1002,24 @@ public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObje if( primaryKey == null ) { primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEstabelecimento.PK_FIELD_NAMES ); - primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + 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; + } + } } - setId( ( Integer ) array.get( row, col + 0 ) ); } @Override diff --git a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesEstabelecimentoTiposEventos.java b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesEstabelecimentoTiposEventos.java new file mode 100644 index 00000000..4ada0d17 --- /dev/null +++ b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesEstabelecimentoTiposEventos.java @@ -0,0 +1,360 @@ +/* +* MarcacoesEstabelecimentoTiposEventos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + +import java.sql.Timestamp; + +public class MarcacoesEstabelecimentoTiposEventos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.ID, MarcacoesEstabelecimentoTiposEventos.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.ID_FULL, MarcacoesEstabelecimentoTiposEventos.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DESCRICAO, MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DESCRICAO_FULL, MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP, MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_FULL, MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "marcacoes_estabelecimento_tipos_eventos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_estabelecimento_tipos_eventos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_estabelecimento_tipos_eventos.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "marcacoes_estabelecimento_tipos_eventos.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "marcacoes_estabelecimento_tipos_eventos.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, DELETED_STAMP, }; + + private Integer id; + private String descricao; + private Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesEstabelecimentoTiposEventos() + { + super(); + dirtyProperties = new boolean[]{ 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.ListfromMarcacoesEstabelecimento_tipo_evento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "tipo_evento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: + value = getId(); + break; + case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: + value = this.id; + break; + case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: + value = this.descricao; + break; + case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: + setDeleted_stamp( ( Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: + this.deleted_stamp = ( Timestamp ) 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 MarcacoesEstabelecimentoTiposEventos.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: + theClass = String.class; + break; + case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: + theClass = Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesEstabelecimentoTiposEventos._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, MarcacoesEstabelecimentoTiposEventos.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 ); + } + } +} diff --git a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesGruposRealizados.java b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesGruposRealizados.java index 1f95dc3c..3a06aef7 100644 --- a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesGruposRealizados.java +++ b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesGruposRealizados.java @@ -129,7 +129,6 @@ public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObj { try { - setLockedForRefresh( true ); preProcess( ID, id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -158,7 +157,6 @@ public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObj { try { - setLockedForRefresh( true ); preProcess( MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -213,7 +211,6 @@ public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObj { try { - setLockedForRefresh( true ); preProcess( GRUPO_PROTOCOLO_ID, grupo_protocolo_id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -268,7 +265,6 @@ public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObj { try { - setLockedForRefresh( true ); preProcess( MARCACOES_TRABALHADOR_ESTADO_ID, marcacoes_trabalhador_estado_id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -508,9 +504,24 @@ public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObj if( primaryKey == null ) { primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesGruposRealizados.PK_FIELD_NAMES ); - primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + 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; + } + } } - setId( ( Integer ) array.get( row, col + 0 ) ); } @Override diff --git a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesTecnicosHst.java b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesTecnicosHst.java index d7628ac5..23dbc671 100644 --- a/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesTecnicosHst.java +++ b/trunk/PlanosActuacao/src/db/data/siprp_local/inner/MarcacoesTecnicosHst.java @@ -145,7 +145,6 @@ public class MarcacoesTecnicosHst extends com.evolute.entity.evo.EvoDataObject { @@ -47,6 +49,8 @@ public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); @@ -112,20 +116,23 @@ public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject { @@ -86,7 +87,7 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO ID, DATA, ESTADO, MARCACAO_ID, PRESTADOR_ID, }; private Integer id; - private java.util.Date data; + private Date data; private Integer estado; private Integer marcacao_id; private db.data.siprp_local.outer.MarcacoesTrabalhadorData to_marcacao_id; @@ -120,7 +121,6 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO { try { - setLockedForRefresh( true ); preProcess( ID, id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -148,7 +148,7 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO return result; } - public java.util.Date getData() + public Date getData() { try { @@ -162,11 +162,10 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO return this.data; } - public void setData( java.util.Date data ) + public void setData( Date data ) { try { - setLockedForRefresh( true ); preProcess( DATA, data ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -195,7 +194,6 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO { try { - setLockedForRefresh( true ); preProcess( ESTADO, estado ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -224,7 +222,6 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO { try { - setLockedForRefresh( true ); preProcess( MARCACAO_ID, marcacao_id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -279,7 +276,6 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO { try { - setLockedForRefresh( true ); preProcess( PRESTADOR_ID, prestador_id ); } catch( com.evolute.entity.evo.EvoDataException edex ) @@ -387,7 +383,7 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO setId( ( Integer ) value ); break; case MarcacoesTrabalhadorEstados.DATA_INDEX: - setData( ( java.util.Date ) value ); + setData( ( Date ) value ); break; case MarcacoesTrabalhadorEstados.ESTADO_INDEX: setEstado( ( Integer ) value ); @@ -416,7 +412,7 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO this.id = ( Integer ) value; break; case MarcacoesTrabalhadorEstados.DATA_INDEX: - this.data = ( java.util.Date ) value; + this.data = ( Date ) value; break; case MarcacoesTrabalhadorEstados.ESTADO_INDEX: this.estado = ( Integer ) value; @@ -476,7 +472,7 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO theClass = Integer.class; break; case MarcacoesTrabalhadorEstados.DATA_INDEX: - theClass = java.util.Date.class; + theClass = Date.class; break; case MarcacoesTrabalhadorEstados.ESTADO_INDEX: theClass = Integer.class; @@ -519,9 +515,24 @@ public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataO if( primaryKey == null ) { primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesTrabalhadorEstados.PK_FIELD_NAMES ); - primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + 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; + } + } } - setId( ( Integer ) array.get( row, col + 0 ) ); } @Override