forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@1758 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
784478601c
commit
02ffe69033
@ -1,294 +0,0 @@
|
||||
/*
|
||||
* PlanoRiscosQualitativo.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
* -> (can't touch this)
|
||||
*/
|
||||
package db.data.siprp.inner;
|
||||
|
||||
|
||||
public class PlanoRiscosQualitativo 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( PlanoRiscosQualitativo.ID, PlanoRiscosQualitativo.ID_INDEX );
|
||||
FIELD_INDEXES.put( PlanoRiscosQualitativo.ID_FULL, PlanoRiscosQualitativo.ID_INDEX );
|
||||
FIELD_INDEXES.put( PlanoRiscosQualitativo.DESCRIPTION, PlanoRiscosQualitativo.DESCRIPTION_INDEX );
|
||||
FIELD_INDEXES.put( PlanoRiscosQualitativo.DESCRIPTION_FULL, PlanoRiscosQualitativo.DESCRIPTION_INDEX );
|
||||
}
|
||||
|
||||
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||
|
||||
|
||||
public static final String TABLENAME = "plano_riscos_qualitativo";
|
||||
|
||||
|
||||
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_riscos_qualitativo";
|
||||
|
||||
public static final int _INVALID__INDEX = -1;
|
||||
public static final String ID = "id";
|
||||
public static final String ID_FULL = "plano_riscos_qualitativo.id";
|
||||
public static final int ID_INDEX = 0;
|
||||
public static final String DESCRIPTION = "description";
|
||||
public static final String DESCRIPTION_FULL = "plano_riscos_qualitativo.description";
|
||||
public static final int DESCRIPTION_INDEX = 1;
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DESCRIPTION, };
|
||||
|
||||
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||
TABLENAME + "." + DESCRIPTION, };
|
||||
|
||||
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||
ID, DESCRIPTION, };
|
||||
|
||||
|
||||
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||
ID, };
|
||||
|
||||
|
||||
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||
ID, DESCRIPTION, };
|
||||
|
||||
private Integer id;
|
||||
private String description;
|
||||
|
||||
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||
|
||||
public PlanoRiscosQualitativo()
|
||||
{
|
||||
super();
|
||||
dirtyProperties = new boolean[]{ 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 String getDescription()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( DESCRIPTION );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public void setDescription( String description )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( DESCRIPTION, description );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.description = description;
|
||||
LAZY_LOADED_OBJECTS.put( DESCRIPTION, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public Object get( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case PlanoRiscosQualitativo.ID_INDEX:
|
||||
value = getId();
|
||||
break;
|
||||
case PlanoRiscosQualitativo.DESCRIPTION_INDEX:
|
||||
value = getDescription();
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object rawGet( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case PlanoRiscosQualitativo.ID_INDEX:
|
||||
value = this.id;
|
||||
break;
|
||||
case PlanoRiscosQualitativo.DESCRIPTION_INDEX:
|
||||
value = this.description;
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public void set( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case PlanoRiscosQualitativo.ID_INDEX:
|
||||
setId( ( Integer ) value );
|
||||
break;
|
||||
case PlanoRiscosQualitativo.DESCRIPTION_INDEX:
|
||||
setDescription( ( String ) value );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void rawSet( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case PlanoRiscosQualitativo.ID_INDEX:
|
||||
this.id = ( Integer ) value;
|
||||
break;
|
||||
case PlanoRiscosQualitativo.DESCRIPTION_INDEX:
|
||||
this.description = ( 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 PlanoRiscosQualitativo.ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case PlanoRiscosQualitativo.DESCRIPTION_INDEX:
|
||||
theClass = String.class;
|
||||
break;
|
||||
}
|
||||
return theClass;
|
||||
}
|
||||
|
||||
public Integer getFieldIndex( String fieldName )
|
||||
{
|
||||
Integer index = FIELD_INDEXES.get( fieldName );
|
||||
return index != null ? index : PlanoRiscosQualitativo._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, PlanoRiscosQualitativo.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue