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.
443 lines
9.7 KiB
443 lines
9.7 KiB
/*
|
|
* NotNoticias.java
|
|
*
|
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
|
*
|
|
* Use but DON'T TOUCH
|
|
* -> (can't touch this)
|
|
*/
|
|
package db.data.siprp.inner;
|
|
|
|
|
|
public class NotNoticias 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( NotNoticias.ID, NotNoticias.ID_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.ID_FULL, NotNoticias.ID_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.DATA, NotNoticias.DATA_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.DATA_FULL, NotNoticias.DATA_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.STAMP, NotNoticias.STAMP_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.STAMP_FULL, NotNoticias.STAMP_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.UTILIZADOR, NotNoticias.UTILIZADOR_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.UTILIZADOR_FULL, NotNoticias.UTILIZADOR_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.NOTICIA, NotNoticias.NOTICIA_INDEX );
|
|
FIELD_INDEXES.put( NotNoticias.NOTICIA_FULL, NotNoticias.NOTICIA_INDEX );
|
|
}
|
|
|
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
|
|
|
|
|
public static final String TABLENAME = "not_noticias";
|
|
|
|
|
|
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.not_noticias";
|
|
|
|
public static final int _INVALID__INDEX = -1;
|
|
public static final String ID = "id";
|
|
public static final String ID_FULL = "not_noticias.id";
|
|
public static final int ID_INDEX = 0;
|
|
public static final String DATA = "data";
|
|
public static final String DATA_FULL = "not_noticias.data";
|
|
public static final int DATA_INDEX = 1;
|
|
public static final String STAMP = "stamp";
|
|
public static final String STAMP_FULL = "not_noticias.stamp";
|
|
public static final int STAMP_INDEX = 2;
|
|
public static final String UTILIZADOR = "utilizador";
|
|
public static final String UTILIZADOR_FULL = "not_noticias.utilizador";
|
|
public static final int UTILIZADOR_INDEX = 3;
|
|
public static final String NOTICIA = "noticia";
|
|
public static final String NOTICIA_FULL = "not_noticias.noticia";
|
|
public static final int NOTICIA_INDEX = 4;
|
|
|
|
public static final String FIELD_NAMES[] = new String[]{
|
|
DATA, STAMP, UTILIZADOR, NOTICIA, };
|
|
|
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
|
TABLENAME + "." + DATA, TABLENAME + "." + STAMP, TABLENAME + "." + UTILIZADOR, TABLENAME + "." + NOTICIA, };
|
|
|
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
|
ID, DATA, STAMP, UTILIZADOR, NOTICIA, };
|
|
|
|
|
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
|
ID, };
|
|
|
|
|
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
|
ID, DATA, STAMP, UTILIZADOR, NOTICIA, };
|
|
|
|
private Integer id;
|
|
private java.util.Date data;
|
|
private java.sql.Timestamp stamp;
|
|
private String utilizador;
|
|
private String noticia;
|
|
|
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
|
|
|
public NotNoticias()
|
|
{
|
|
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.Date getData()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( DATA );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.data;
|
|
}
|
|
|
|
public void setData( java.util.Date data )
|
|
{
|
|
try
|
|
{
|
|
preProcess( DATA, data );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.data = data;
|
|
LAZY_LOADED_OBJECTS.put( DATA, Boolean.TRUE );
|
|
}
|
|
|
|
public java.sql.Timestamp getStamp()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( STAMP );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.stamp;
|
|
}
|
|
|
|
public void setStamp( java.sql.Timestamp stamp )
|
|
{
|
|
try
|
|
{
|
|
preProcess( STAMP, stamp );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.stamp = stamp;
|
|
LAZY_LOADED_OBJECTS.put( STAMP, Boolean.TRUE );
|
|
}
|
|
|
|
public String getUtilizador()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( UTILIZADOR );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.utilizador;
|
|
}
|
|
|
|
public void setUtilizador( String utilizador )
|
|
{
|
|
try
|
|
{
|
|
preProcess( UTILIZADOR, utilizador );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.utilizador = utilizador;
|
|
LAZY_LOADED_OBJECTS.put( UTILIZADOR, Boolean.TRUE );
|
|
}
|
|
|
|
public String getNoticia()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( NOTICIA );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.noticia;
|
|
}
|
|
|
|
public void setNoticia( String noticia )
|
|
{
|
|
try
|
|
{
|
|
preProcess( NOTICIA, noticia );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.noticia = noticia;
|
|
LAZY_LOADED_OBJECTS.put( NOTICIA, Boolean.TRUE );
|
|
}
|
|
|
|
public Object get( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case NotNoticias.ID_INDEX:
|
|
value = getId();
|
|
break;
|
|
case NotNoticias.DATA_INDEX:
|
|
value = getData();
|
|
break;
|
|
case NotNoticias.STAMP_INDEX:
|
|
value = getStamp();
|
|
break;
|
|
case NotNoticias.UTILIZADOR_INDEX:
|
|
value = getUtilizador();
|
|
break;
|
|
case NotNoticias.NOTICIA_INDEX:
|
|
value = getNoticia();
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public Object rawGet( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case NotNoticias.ID_INDEX:
|
|
value = this.id;
|
|
break;
|
|
case NotNoticias.DATA_INDEX:
|
|
value = this.data;
|
|
break;
|
|
case NotNoticias.STAMP_INDEX:
|
|
value = this.stamp;
|
|
break;
|
|
case NotNoticias.UTILIZADOR_INDEX:
|
|
value = this.utilizador;
|
|
break;
|
|
case NotNoticias.NOTICIA_INDEX:
|
|
value = this.noticia;
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public void set( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case NotNoticias.ID_INDEX:
|
|
setId( ( Integer ) value );
|
|
break;
|
|
case NotNoticias.DATA_INDEX:
|
|
setData( ( java.util.Date ) value );
|
|
break;
|
|
case NotNoticias.STAMP_INDEX:
|
|
setStamp( ( java.sql.Timestamp ) value );
|
|
break;
|
|
case NotNoticias.UTILIZADOR_INDEX:
|
|
setUtilizador( ( String ) value );
|
|
break;
|
|
case NotNoticias.NOTICIA_INDEX:
|
|
setNoticia( ( String ) value );
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void rawSet( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case NotNoticias.ID_INDEX:
|
|
this.id = ( Integer ) value;
|
|
break;
|
|
case NotNoticias.DATA_INDEX:
|
|
this.data = ( java.util.Date ) value;
|
|
break;
|
|
case NotNoticias.STAMP_INDEX:
|
|
this.stamp = ( java.sql.Timestamp ) value;
|
|
break;
|
|
case NotNoticias.UTILIZADOR_INDEX:
|
|
this.utilizador = ( String ) value;
|
|
break;
|
|
case NotNoticias.NOTICIA_INDEX:
|
|
this.noticia = ( 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 NotNoticias.ID_INDEX:
|
|
theClass = Integer.class;
|
|
break;
|
|
case NotNoticias.DATA_INDEX:
|
|
theClass = java.util.Date.class;
|
|
break;
|
|
case NotNoticias.STAMP_INDEX:
|
|
theClass = java.sql.Timestamp.class;
|
|
break;
|
|
case NotNoticias.UTILIZADOR_INDEX:
|
|
theClass = String.class;
|
|
break;
|
|
case NotNoticias.NOTICIA_INDEX:
|
|
theClass = String.class;
|
|
break;
|
|
}
|
|
return theClass;
|
|
}
|
|
|
|
public Integer getFieldIndex( String fieldName )
|
|
{
|
|
Integer index = FIELD_INDEXES.get( fieldName );
|
|
return index != null ? index : NotNoticias._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 )
|
|
{
|
|
Object idObject = null;
|
|
if( primaryKey == null )
|
|
{
|
|
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, NotNoticias.PK_FIELD_NAMES );
|
|
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 );
|
|
}
|
|
}
|
|
}
|