forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@2060 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
e604c32daa
commit
aaa5397670
@ -0,0 +1,427 @@
|
||||
/*
|
||||
* Cargos.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 Cargos 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( Cargos.ID, Cargos.ID_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.ID_FULL, Cargos.ID_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.DESCRICAO, Cargos.DESCRICAO_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.DESCRICAO_FULL, Cargos.DESCRICAO_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.CODIGO, Cargos.CODIGO_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.CODIGO_FULL, Cargos.CODIGO_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.DELETED_STAMP, Cargos.DELETED_STAMP_INDEX );
|
||||
FIELD_INDEXES.put( Cargos.DELETED_STAMP_FULL, Cargos.DELETED_STAMP_INDEX );
|
||||
}
|
||||
|
||||
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||
|
||||
|
||||
public static final String TABLENAME = "cargos";
|
||||
|
||||
|
||||
public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cargos";
|
||||
|
||||
public static final int _INVALID__INDEX = -1;
|
||||
public static final String ID = "id";
|
||||
public static final String ID_FULL = "cargos.id";
|
||||
public static final int ID_INDEX = 0;
|
||||
public static final String DESCRICAO = "descricao";
|
||||
public static final String DESCRICAO_FULL = "cargos.descricao";
|
||||
public static final int DESCRICAO_INDEX = 1;
|
||||
public static final String CODIGO = "codigo";
|
||||
public static final String CODIGO_FULL = "cargos.codigo";
|
||||
public static final int CODIGO_INDEX = 2;
|
||||
public static final String DELETED_STAMP = "deleted_stamp";
|
||||
public static final String DELETED_STAMP_FULL = "cargos.deleted_stamp";
|
||||
public static final int DELETED_STAMP_INDEX = 3;
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DESCRICAO, CODIGO, DELETED_STAMP, };
|
||||
|
||||
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||
TABLENAME + "." + DESCRICAO, TABLENAME + "." + CODIGO, TABLENAME + "." + DELETED_STAMP, };
|
||||
|
||||
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||
ID, DESCRICAO, CODIGO, DELETED_STAMP, };
|
||||
|
||||
|
||||
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||
ID, };
|
||||
|
||||
|
||||
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||
ID, DESCRICAO, CODIGO, DELETED_STAMP, };
|
||||
|
||||
private Integer id;
|
||||
private String descricao;
|
||||
private String codigo;
|
||||
private Timestamp deleted_stamp;
|
||||
|
||||
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||
|
||||
public Cargos()
|
||||
{
|
||||
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 java.util.List<db.data.siprp_local.outer.ContactosEmpresasData>fromContactosEmpresas_cargo_id()
|
||||
{
|
||||
java.util.List<db.data.siprp_local.outer.ContactosEmpresasData> result = new java.util.LinkedList< db.data.siprp_local.outer.ContactosEmpresasData >();
|
||||
if ( getPrimaryKey() != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
result = fromReference( db.data.siprp_local.outer.ContactosEmpresasData.class , getPrimaryKey().getMap().get("id"), "cargo_id" );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public java.util.List<db.data.siprp_local.outer.ContactosEstabelecimentosData>fromContactosEstabelecimentos_cargo_id()
|
||||
{
|
||||
java.util.List<db.data.siprp_local.outer.ContactosEstabelecimentosData> result = new java.util.LinkedList< db.data.siprp_local.outer.ContactosEstabelecimentosData >();
|
||||
if ( getPrimaryKey() != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
result = fromReference( db.data.siprp_local.outer.ContactosEstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "cargo_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 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 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 Cargos.ID_INDEX:
|
||||
value = getId();
|
||||
break;
|
||||
case Cargos.DESCRICAO_INDEX:
|
||||
value = getDescricao();
|
||||
break;
|
||||
case Cargos.CODIGO_INDEX:
|
||||
value = getCodigo();
|
||||
break;
|
||||
case Cargos.DELETED_STAMP_INDEX:
|
||||
value = getDeleted_stamp();
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object rawGet( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Cargos.ID_INDEX:
|
||||
value = this.id;
|
||||
break;
|
||||
case Cargos.DESCRICAO_INDEX:
|
||||
value = this.descricao;
|
||||
break;
|
||||
case Cargos.CODIGO_INDEX:
|
||||
value = this.codigo;
|
||||
break;
|
||||
case Cargos.DELETED_STAMP_INDEX:
|
||||
value = this.deleted_stamp;
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public void set( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Cargos.ID_INDEX:
|
||||
setId( ( Integer ) value );
|
||||
break;
|
||||
case Cargos.DESCRICAO_INDEX:
|
||||
setDescricao( ( String ) value );
|
||||
break;
|
||||
case Cargos.CODIGO_INDEX:
|
||||
setCodigo( ( String ) value );
|
||||
break;
|
||||
case Cargos.DELETED_STAMP_INDEX:
|
||||
setDeleted_stamp( ( Timestamp ) value );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void rawSet( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Cargos.ID_INDEX:
|
||||
this.id = ( Integer ) value;
|
||||
break;
|
||||
case Cargos.DESCRICAO_INDEX:
|
||||
this.descricao = ( String ) value;
|
||||
break;
|
||||
case Cargos.CODIGO_INDEX:
|
||||
this.codigo = ( String ) value;
|
||||
break;
|
||||
case Cargos.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 Cargos.ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case Cargos.DESCRICAO_INDEX:
|
||||
theClass = String.class;
|
||||
break;
|
||||
case Cargos.CODIGO_INDEX:
|
||||
theClass = String.class;
|
||||
break;
|
||||
case Cargos.DELETED_STAMP_INDEX:
|
||||
theClass = Timestamp.class;
|
||||
break;
|
||||
}
|
||||
return theClass;
|
||||
}
|
||||
|
||||
public Integer getFieldIndex( String fieldName )
|
||||
{
|
||||
Integer index = FIELD_INDEXES.get( fieldName );
|
||||
return index != null ? index : Cargos._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, Cargos.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,359 @@
|
||||
/*
|
||||
* Comerciais.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
* -> (can't touch this)
|
||||
*/
|
||||
package db.data.siprp_local.inner;
|
||||
|
||||
|
||||
public class Comerciais 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( Comerciais.ID, Comerciais.ID_INDEX );
|
||||
FIELD_INDEXES.put( Comerciais.ID_FULL, Comerciais.ID_INDEX );
|
||||
FIELD_INDEXES.put( Comerciais.NOME, Comerciais.NOME_INDEX );
|
||||
FIELD_INDEXES.put( Comerciais.NOME_FULL, Comerciais.NOME_INDEX );
|
||||
FIELD_INDEXES.put( Comerciais.ACTIVO, Comerciais.ACTIVO_INDEX );
|
||||
FIELD_INDEXES.put( Comerciais.ACTIVO_FULL, Comerciais.ACTIVO_INDEX );
|
||||
}
|
||||
|
||||
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||
|
||||
|
||||
public static final String TABLENAME = "comerciais";
|
||||
|
||||
|
||||
public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.comerciais";
|
||||
|
||||
public static final int _INVALID__INDEX = -1;
|
||||
public static final String ID = "id";
|
||||
public static final String ID_FULL = "comerciais.id";
|
||||
public static final int ID_INDEX = 0;
|
||||
public static final String NOME = "nome";
|
||||
public static final String NOME_FULL = "comerciais.nome";
|
||||
public static final int NOME_INDEX = 1;
|
||||
public static final String ACTIVO = "activo";
|
||||
public static final String ACTIVO_FULL = "comerciais.activo";
|
||||
public static final int ACTIVO_INDEX = 2;
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
NOME, ACTIVO, };
|
||||
|
||||
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||
TABLENAME + "." + NOME, TABLENAME + "." + ACTIVO, };
|
||||
|
||||
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||
ID, NOME, ACTIVO, };
|
||||
|
||||
|
||||
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||
ID, };
|
||||
|
||||
|
||||
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||
ID, NOME, ACTIVO, };
|
||||
|
||||
private Integer id;
|
||||
private String nome;
|
||||
private Boolean activo;
|
||||
|
||||
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||
|
||||
public Comerciais()
|
||||
{
|
||||
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.List<db.data.siprp_local.outer.EstabelecimentosData>fromEstabelecimentos_comercial_id()
|
||||
{
|
||||
java.util.List<db.data.siprp_local.outer.EstabelecimentosData> result = new java.util.LinkedList< db.data.siprp_local.outer.EstabelecimentosData >();
|
||||
if ( getPrimaryKey() != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
result = fromReference( db.data.siprp_local.outer.EstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "comercial_id" );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getNome()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( NOME );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.nome;
|
||||
}
|
||||
|
||||
public void setNome( String nome )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( NOME, nome );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.nome = nome;
|
||||
LAZY_LOADED_OBJECTS.put( NOME, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public Boolean getActivo()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( ACTIVO );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.activo;
|
||||
}
|
||||
|
||||
public void setActivo( Boolean activo )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( ACTIVO, activo );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.activo = activo;
|
||||
LAZY_LOADED_OBJECTS.put( ACTIVO, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public Object get( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Comerciais.ID_INDEX:
|
||||
value = getId();
|
||||
break;
|
||||
case Comerciais.NOME_INDEX:
|
||||
value = getNome();
|
||||
break;
|
||||
case Comerciais.ACTIVO_INDEX:
|
||||
value = getActivo();
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object rawGet( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Comerciais.ID_INDEX:
|
||||
value = this.id;
|
||||
break;
|
||||
case Comerciais.NOME_INDEX:
|
||||
value = this.nome;
|
||||
break;
|
||||
case Comerciais.ACTIVO_INDEX:
|
||||
value = this.activo;
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public void set( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Comerciais.ID_INDEX:
|
||||
setId( ( Integer ) value );
|
||||
break;
|
||||
case Comerciais.NOME_INDEX:
|
||||
setNome( ( String ) value );
|
||||
break;
|
||||
case Comerciais.ACTIVO_INDEX:
|
||||
setActivo( ( Boolean ) value );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void rawSet( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case Comerciais.ID_INDEX:
|
||||
this.id = ( Integer ) value;
|
||||
break;
|
||||
case Comerciais.NOME_INDEX:
|
||||
this.nome = ( String ) value;
|
||||
break;
|
||||
case Comerciais.ACTIVO_INDEX:
|
||||
this.activo = ( Boolean ) 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 Comerciais.ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case Comerciais.NOME_INDEX:
|
||||
theClass = String.class;
|
||||
break;
|
||||
case Comerciais.ACTIVO_INDEX:
|
||||
theClass = Boolean.class;
|
||||
break;
|
||||
}
|
||||
return theClass;
|
||||
}
|
||||
|
||||
public Integer getFieldIndex( String fieldName )
|
||||
{
|
||||
Integer index = FIELD_INDEXES.get( fieldName );
|
||||
return index != null ? index : Comerciais._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, Comerciais.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,593 @@
|
||||
/*
|
||||
* ContactosEmpresas.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
* -> (can't touch this)
|
||||
*/
|
||||
package db.data.siprp_local.inner;
|
||||
|
||||
|
||||
public class ContactosEmpresas 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( ContactosEmpresas.ID, ContactosEmpresas.ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.ID_FULL, ContactosEmpresas.ID_INDEX );
|
||||
com.evolute.entity.evo.EvoDataObject.register( ContactosEmpresas.CLASS_IDENTIFIER, ContactosEmpresas.EMPRESA_ID, ContactosEmpresas.TO_EMPRESA_ID );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.EMPRESA_ID, ContactosEmpresas.EMPRESA_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.EMPRESA_ID_FULL, ContactosEmpresas.EMPRESA_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.TO_EMPRESA_ID, ContactosEmpresas.TO_EMPRESA_ID_INDEX );
|
||||
com.evolute.entity.evo.EvoDataObject.register( ContactosEmpresas.CLASS_IDENTIFIER, ContactosEmpresas.CONTACTO_ID, ContactosEmpresas.TO_CONTACTO_ID );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.CONTACTO_ID, ContactosEmpresas.CONTACTO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.CONTACTO_ID_FULL, ContactosEmpresas.CONTACTO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.TO_CONTACTO_ID, ContactosEmpresas.TO_CONTACTO_ID_INDEX );
|
||||
com.evolute.entity.evo.EvoDataObject.register( ContactosEmpresas.CLASS_IDENTIFIER, ContactosEmpresas.CARGO_ID, ContactosEmpresas.TO_CARGO_ID );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.CARGO_ID, ContactosEmpresas.CARGO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.CARGO_ID_FULL, ContactosEmpresas.CARGO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.TO_CARGO_ID, ContactosEmpresas.TO_CARGO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.ENVIAR_PLANO, ContactosEmpresas.ENVIAR_PLANO_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEmpresas.ENVIAR_PLANO_FULL, ContactosEmpresas.ENVIAR_PLANO_INDEX );
|
||||
}
|
||||
|
||||
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||
|
||||
|
||||
public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas =
|
||||
new com.evolute.entity.ForeignKey( ContactosEmpresas.class, ContactosEmpresas.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID );
|
||||
|
||||
public static final com.evolute.entity.ForeignKey ForeignKeycontacto_idTocontactos =
|
||||
new com.evolute.entity.ForeignKey( ContactosEmpresas.class, ContactosEmpresas.CONTACTO_ID, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID );
|
||||
|
||||
public static final com.evolute.entity.ForeignKey ForeignKeycargo_idTocargos =
|
||||
new com.evolute.entity.ForeignKey( ContactosEmpresas.class, ContactosEmpresas.CARGO_ID, db.data.siprp_local.outer.CargosData.class, db.data.siprp_local.outer.CargosData.ID );
|
||||
|
||||
public static final String TABLENAME = "contactos_empresas";
|
||||
|
||||
|
||||
public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.contactos_empresas";
|
||||
|
||||
public static final int _INVALID__INDEX = -1;
|
||||
public static final String ID = "id";
|
||||
public static final String ID_FULL = "contactos_empresas.id";
|
||||
public static final int ID_INDEX = 0;
|
||||
public static final String EMPRESA_ID = "empresa_id";
|
||||
public static final String EMPRESA_ID_FULL = "contactos_empresas.empresa_id";
|
||||
public static final int EMPRESA_ID_INDEX = 1;
|
||||
public static final String TO_EMPRESA_ID = "to_empresa_id";
|
||||
public static final String TO_EMPRESA_ID_FULL = "contactos_empresas.to_empresa_id";
|
||||
public static final int TO_EMPRESA_ID_INDEX = 2;
|
||||
public static final String CONTACTO_ID = "contacto_id";
|
||||
public static final String CONTACTO_ID_FULL = "contactos_empresas.contacto_id";
|
||||
public static final int CONTACTO_ID_INDEX = 3;
|
||||
public static final String TO_CONTACTO_ID = "to_contacto_id";
|
||||
public static final String TO_CONTACTO_ID_FULL = "contactos_empresas.to_contacto_id";
|
||||
public static final int TO_CONTACTO_ID_INDEX = 4;
|
||||
public static final String CARGO_ID = "cargo_id";
|
||||
public static final String CARGO_ID_FULL = "contactos_empresas.cargo_id";
|
||||
public static final int CARGO_ID_INDEX = 5;
|
||||
public static final String TO_CARGO_ID = "to_cargo_id";
|
||||
public static final String TO_CARGO_ID_FULL = "contactos_empresas.to_cargo_id";
|
||||
public static final int TO_CARGO_ID_INDEX = 6;
|
||||
public static final String ENVIAR_PLANO = "enviar_plano";
|
||||
public static final String ENVIAR_PLANO_FULL = "contactos_empresas.enviar_plano";
|
||||
public static final int ENVIAR_PLANO_INDEX = 7;
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
EMPRESA_ID, TO_EMPRESA_ID, CONTACTO_ID, TO_CONTACTO_ID, CARGO_ID, TO_CARGO_ID,
|
||||
ENVIAR_PLANO, };
|
||||
|
||||
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||
TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + CONTACTO_ID, TABLENAME + "." + TO_CONTACTO_ID, TABLENAME + "." + CARGO_ID, TABLENAME + "." + TO_CARGO_ID,
|
||||
TABLENAME + "." + ENVIAR_PLANO, };
|
||||
|
||||
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||
ID, EMPRESA_ID, CONTACTO_ID, CARGO_ID, ENVIAR_PLANO, };
|
||||
|
||||
|
||||
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||
ID, };
|
||||
|
||||
|
||||
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||
ID, EMPRESA_ID, CONTACTO_ID, CARGO_ID, ENVIAR_PLANO, };
|
||||
|
||||
private Integer id;
|
||||
private Integer empresa_id;
|
||||
private db.data.siprp_local.outer.EmpresasData to_empresa_id;
|
||||
private Integer contacto_id;
|
||||
private db.data.siprp_local.outer.ContactosData to_contacto_id;
|
||||
private Integer cargo_id;
|
||||
private db.data.siprp_local.outer.CargosData to_cargo_id;
|
||||
private Boolean enviar_plano;
|
||||
|
||||
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||
|
||||
public ContactosEmpresas()
|
||||
{
|
||||
super();
|
||||
dirtyProperties = new boolean[]{ false, false, false,
|
||||
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 Integer getEmpresa_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( EMPRESA_ID );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.empresa_id;
|
||||
}
|
||||
|
||||
public void setEmpresa_id( Integer empresa_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( EMPRESA_ID, empresa_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.empresa_id = empresa_id;
|
||||
LAZY_LOADED_OBJECTS.put( EMPRESA_ID, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public db.data.siprp_local.outer.EmpresasData toEmpresa_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
prepare( TO_EMPRESA_ID );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
return this.to_empresa_id;
|
||||
}
|
||||
|
||||
public void setToEmpresa_id( db.data.siprp_local.outer.EmpresasData to_empresa_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( TO_EMPRESA_ID, to_empresa_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.to_empresa_id = to_empresa_id;
|
||||
}
|
||||
|
||||
public Integer getContacto_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( CONTACTO_ID );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.contacto_id;
|
||||
}
|
||||
|
||||
public void setContacto_id( Integer contacto_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( CONTACTO_ID, contacto_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.contacto_id = contacto_id;
|
||||
LAZY_LOADED_OBJECTS.put( CONTACTO_ID, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public db.data.siprp_local.outer.ContactosData toContacto_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
prepare( TO_CONTACTO_ID );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
return this.to_contacto_id;
|
||||
}
|
||||
|
||||
public void setToContacto_id( db.data.siprp_local.outer.ContactosData to_contacto_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( TO_CONTACTO_ID, to_contacto_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.to_contacto_id = to_contacto_id;
|
||||
}
|
||||
|
||||
public Integer getCargo_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( CARGO_ID );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.cargo_id;
|
||||
}
|
||||
|
||||
public void setCargo_id( Integer cargo_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( CARGO_ID, cargo_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.cargo_id = cargo_id;
|
||||
LAZY_LOADED_OBJECTS.put( CARGO_ID, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public db.data.siprp_local.outer.CargosData toCargo_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
prepare( TO_CARGO_ID );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
return this.to_cargo_id;
|
||||
}
|
||||
|
||||
public void setToCargo_id( db.data.siprp_local.outer.CargosData to_cargo_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( TO_CARGO_ID, to_cargo_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.to_cargo_id = to_cargo_id;
|
||||
}
|
||||
|
||||
public Boolean getEnviar_plano()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( ENVIAR_PLANO );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.enviar_plano;
|
||||
}
|
||||
|
||||
public void setEnviar_plano( Boolean enviar_plano )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( ENVIAR_PLANO, enviar_plano );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.enviar_plano = enviar_plano;
|
||||
LAZY_LOADED_OBJECTS.put( ENVIAR_PLANO, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public Object get( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEmpresas.ID_INDEX:
|
||||
value = getId();
|
||||
break;
|
||||
case ContactosEmpresas.EMPRESA_ID_INDEX:
|
||||
value = getEmpresa_id();
|
||||
break;
|
||||
case ContactosEmpresas.TO_EMPRESA_ID_INDEX:
|
||||
value = toEmpresa_id();
|
||||
break;
|
||||
case ContactosEmpresas.CONTACTO_ID_INDEX:
|
||||
value = getContacto_id();
|
||||
break;
|
||||
case ContactosEmpresas.TO_CONTACTO_ID_INDEX:
|
||||
value = toContacto_id();
|
||||
break;
|
||||
case ContactosEmpresas.CARGO_ID_INDEX:
|
||||
value = getCargo_id();
|
||||
break;
|
||||
case ContactosEmpresas.TO_CARGO_ID_INDEX:
|
||||
value = toCargo_id();
|
||||
break;
|
||||
case ContactosEmpresas.ENVIAR_PLANO_INDEX:
|
||||
value = getEnviar_plano();
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object rawGet( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEmpresas.ID_INDEX:
|
||||
value = this.id;
|
||||
break;
|
||||
case ContactosEmpresas.EMPRESA_ID_INDEX:
|
||||
value = this.empresa_id;
|
||||
break;
|
||||
case ContactosEmpresas.TO_EMPRESA_ID_INDEX:
|
||||
value = this.to_empresa_id;
|
||||
break;
|
||||
case ContactosEmpresas.CONTACTO_ID_INDEX:
|
||||
value = this.contacto_id;
|
||||
break;
|
||||
case ContactosEmpresas.TO_CONTACTO_ID_INDEX:
|
||||
value = this.to_contacto_id;
|
||||
break;
|
||||
case ContactosEmpresas.CARGO_ID_INDEX:
|
||||
value = this.cargo_id;
|
||||
break;
|
||||
case ContactosEmpresas.TO_CARGO_ID_INDEX:
|
||||
value = this.to_cargo_id;
|
||||
break;
|
||||
case ContactosEmpresas.ENVIAR_PLANO_INDEX:
|
||||
value = this.enviar_plano;
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public void set( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEmpresas.ID_INDEX:
|
||||
setId( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEmpresas.EMPRESA_ID_INDEX:
|
||||
setEmpresa_id( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEmpresas.TO_EMPRESA_ID_INDEX:
|
||||
setToEmpresa_id( ( db.data.siprp_local.outer.EmpresasData ) value );
|
||||
break;
|
||||
case ContactosEmpresas.CONTACTO_ID_INDEX:
|
||||
setContacto_id( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEmpresas.TO_CONTACTO_ID_INDEX:
|
||||
setToContacto_id( ( db.data.siprp_local.outer.ContactosData ) value );
|
||||
break;
|
||||
case ContactosEmpresas.CARGO_ID_INDEX:
|
||||
setCargo_id( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEmpresas.TO_CARGO_ID_INDEX:
|
||||
setToCargo_id( ( db.data.siprp_local.outer.CargosData ) value );
|
||||
break;
|
||||
case ContactosEmpresas.ENVIAR_PLANO_INDEX:
|
||||
setEnviar_plano( ( Boolean ) value );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void rawSet( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEmpresas.ID_INDEX:
|
||||
this.id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEmpresas.EMPRESA_ID_INDEX:
|
||||
this.empresa_id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEmpresas.TO_EMPRESA_ID_INDEX:
|
||||
this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value;
|
||||
break;
|
||||
case ContactosEmpresas.CONTACTO_ID_INDEX:
|
||||
this.contacto_id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEmpresas.TO_CONTACTO_ID_INDEX:
|
||||
this.to_contacto_id = ( db.data.siprp_local.outer.ContactosData ) value;
|
||||
break;
|
||||
case ContactosEmpresas.CARGO_ID_INDEX:
|
||||
this.cargo_id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEmpresas.TO_CARGO_ID_INDEX:
|
||||
this.to_cargo_id = ( db.data.siprp_local.outer.CargosData ) value;
|
||||
break;
|
||||
case ContactosEmpresas.ENVIAR_PLANO_INDEX:
|
||||
this.enviar_plano = ( Boolean ) 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 ContactosEmpresas.ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEmpresas.EMPRESA_ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEmpresas.TO_EMPRESA_ID_INDEX:
|
||||
theClass = db.data.siprp_local.outer.EmpresasData.class;
|
||||
break;
|
||||
case ContactosEmpresas.CONTACTO_ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEmpresas.TO_CONTACTO_ID_INDEX:
|
||||
theClass = db.data.siprp_local.outer.ContactosData.class;
|
||||
break;
|
||||
case ContactosEmpresas.CARGO_ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEmpresas.TO_CARGO_ID_INDEX:
|
||||
theClass = db.data.siprp_local.outer.CargosData.class;
|
||||
break;
|
||||
case ContactosEmpresas.ENVIAR_PLANO_INDEX:
|
||||
theClass = Boolean.class;
|
||||
break;
|
||||
}
|
||||
return theClass;
|
||||
}
|
||||
|
||||
public Integer getFieldIndex( String fieldName )
|
||||
{
|
||||
Integer index = FIELD_INDEXES.get( fieldName );
|
||||
return index != null ? index : ContactosEmpresas._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, ContactosEmpresas.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,593 @@
|
||||
/*
|
||||
* ContactosEstabelecimentos.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
* -> (can't touch this)
|
||||
*/
|
||||
package db.data.siprp_local.inner;
|
||||
|
||||
|
||||
public class ContactosEstabelecimentos 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( ContactosEstabelecimentos.ID, ContactosEstabelecimentos.ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.ID_FULL, ContactosEstabelecimentos.ID_INDEX );
|
||||
com.evolute.entity.evo.EvoDataObject.register( ContactosEstabelecimentos.CLASS_IDENTIFIER, ContactosEstabelecimentos.ESTABELECIMENTO_ID, ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.ESTABELECIMENTO_ID, ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.ESTABELECIMENTO_ID_FULL, ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID, ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID_INDEX );
|
||||
com.evolute.entity.evo.EvoDataObject.register( ContactosEstabelecimentos.CLASS_IDENTIFIER, ContactosEstabelecimentos.CONTACTO_ID, ContactosEstabelecimentos.TO_CONTACTO_ID );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.CONTACTO_ID, ContactosEstabelecimentos.CONTACTO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.CONTACTO_ID_FULL, ContactosEstabelecimentos.CONTACTO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.TO_CONTACTO_ID, ContactosEstabelecimentos.TO_CONTACTO_ID_INDEX );
|
||||
com.evolute.entity.evo.EvoDataObject.register( ContactosEstabelecimentos.CLASS_IDENTIFIER, ContactosEstabelecimentos.CARGO_ID, ContactosEstabelecimentos.TO_CARGO_ID );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.CARGO_ID, ContactosEstabelecimentos.CARGO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.CARGO_ID_FULL, ContactosEstabelecimentos.CARGO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.TO_CARGO_ID, ContactosEstabelecimentos.TO_CARGO_ID_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.ENVIAR_PLANO, ContactosEstabelecimentos.ENVIAR_PLANO_INDEX );
|
||||
FIELD_INDEXES.put( ContactosEstabelecimentos.ENVIAR_PLANO_FULL, ContactosEstabelecimentos.ENVIAR_PLANO_INDEX );
|
||||
}
|
||||
|
||||
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||
|
||||
|
||||
public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos =
|
||||
new com.evolute.entity.ForeignKey( ContactosEstabelecimentos.class, ContactosEstabelecimentos.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID );
|
||||
|
||||
public static final com.evolute.entity.ForeignKey ForeignKeycontacto_idTocontactos =
|
||||
new com.evolute.entity.ForeignKey( ContactosEstabelecimentos.class, ContactosEstabelecimentos.CONTACTO_ID, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID );
|
||||
|
||||
public static final com.evolute.entity.ForeignKey ForeignKeycargo_idTocargos =
|
||||
new com.evolute.entity.ForeignKey( ContactosEstabelecimentos.class, ContactosEstabelecimentos.CARGO_ID, db.data.siprp_local.outer.CargosData.class, db.data.siprp_local.outer.CargosData.ID );
|
||||
|
||||
public static final String TABLENAME = "contactos_estabelecimentos";
|
||||
|
||||
|
||||
public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.contactos_estabelecimentos";
|
||||
|
||||
public static final int _INVALID__INDEX = -1;
|
||||
public static final String ID = "id";
|
||||
public static final String ID_FULL = "contactos_estabelecimentos.id";
|
||||
public static final int ID_INDEX = 0;
|
||||
public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
|
||||
public static final String ESTABELECIMENTO_ID_FULL = "contactos_estabelecimentos.estabelecimento_id";
|
||||
public static final int ESTABELECIMENTO_ID_INDEX = 1;
|
||||
public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id";
|
||||
public static final String TO_ESTABELECIMENTO_ID_FULL = "contactos_estabelecimentos.to_estabelecimento_id";
|
||||
public static final int TO_ESTABELECIMENTO_ID_INDEX = 2;
|
||||
public static final String CONTACTO_ID = "contacto_id";
|
||||
public static final String CONTACTO_ID_FULL = "contactos_estabelecimentos.contacto_id";
|
||||
public static final int CONTACTO_ID_INDEX = 3;
|
||||
public static final String TO_CONTACTO_ID = "to_contacto_id";
|
||||
public static final String TO_CONTACTO_ID_FULL = "contactos_estabelecimentos.to_contacto_id";
|
||||
public static final int TO_CONTACTO_ID_INDEX = 4;
|
||||
public static final String CARGO_ID = "cargo_id";
|
||||
public static final String CARGO_ID_FULL = "contactos_estabelecimentos.cargo_id";
|
||||
public static final int CARGO_ID_INDEX = 5;
|
||||
public static final String TO_CARGO_ID = "to_cargo_id";
|
||||
public static final String TO_CARGO_ID_FULL = "contactos_estabelecimentos.to_cargo_id";
|
||||
public static final int TO_CARGO_ID_INDEX = 6;
|
||||
public static final String ENVIAR_PLANO = "enviar_plano";
|
||||
public static final String ENVIAR_PLANO_FULL = "contactos_estabelecimentos.enviar_plano";
|
||||
public static final int ENVIAR_PLANO_INDEX = 7;
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, CONTACTO_ID, TO_CONTACTO_ID,
|
||||
CARGO_ID, TO_CARGO_ID, ENVIAR_PLANO, };
|
||||
|
||||
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||
TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + CONTACTO_ID, TABLENAME + "." + TO_CONTACTO_ID,
|
||||
TABLENAME + "." + CARGO_ID, TABLENAME + "." + TO_CARGO_ID, TABLENAME + "." + ENVIAR_PLANO, };
|
||||
|
||||
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||
ID, ESTABELECIMENTO_ID, CONTACTO_ID, CARGO_ID, ENVIAR_PLANO, };
|
||||
|
||||
|
||||
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||
ID, };
|
||||
|
||||
|
||||
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||
ID, ESTABELECIMENTO_ID, CONTACTO_ID, CARGO_ID, ENVIAR_PLANO, };
|
||||
|
||||
private Integer id;
|
||||
private Integer estabelecimento_id;
|
||||
private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id;
|
||||
private Integer contacto_id;
|
||||
private db.data.siprp_local.outer.ContactosData to_contacto_id;
|
||||
private Integer cargo_id;
|
||||
private db.data.siprp_local.outer.CargosData to_cargo_id;
|
||||
private Boolean enviar_plano;
|
||||
|
||||
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||
|
||||
public ContactosEstabelecimentos()
|
||||
{
|
||||
super();
|
||||
dirtyProperties = new boolean[]{ false, false, false,
|
||||
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 Integer getEstabelecimento_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( ESTABELECIMENTO_ID );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.estabelecimento_id;
|
||||
}
|
||||
|
||||
public void setEstabelecimento_id( Integer estabelecimento_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( ESTABELECIMENTO_ID, estabelecimento_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.estabelecimento_id = estabelecimento_id;
|
||||
LAZY_LOADED_OBJECTS.put( ESTABELECIMENTO_ID, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
prepare( TO_ESTABELECIMENTO_ID );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
return this.to_estabelecimento_id;
|
||||
}
|
||||
|
||||
public void setToEstabelecimento_id( db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.to_estabelecimento_id = to_estabelecimento_id;
|
||||
}
|
||||
|
||||
public Integer getContacto_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( CONTACTO_ID );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.contacto_id;
|
||||
}
|
||||
|
||||
public void setContacto_id( Integer contacto_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( CONTACTO_ID, contacto_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.contacto_id = contacto_id;
|
||||
LAZY_LOADED_OBJECTS.put( CONTACTO_ID, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public db.data.siprp_local.outer.ContactosData toContacto_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
prepare( TO_CONTACTO_ID );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
return this.to_contacto_id;
|
||||
}
|
||||
|
||||
public void setToContacto_id( db.data.siprp_local.outer.ContactosData to_contacto_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( TO_CONTACTO_ID, to_contacto_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.to_contacto_id = to_contacto_id;
|
||||
}
|
||||
|
||||
public Integer getCargo_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( CARGO_ID );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.cargo_id;
|
||||
}
|
||||
|
||||
public void setCargo_id( Integer cargo_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( CARGO_ID, cargo_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.cargo_id = cargo_id;
|
||||
LAZY_LOADED_OBJECTS.put( CARGO_ID, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public db.data.siprp_local.outer.CargosData toCargo_id()
|
||||
{
|
||||
try
|
||||
{
|
||||
prepare( TO_CARGO_ID );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
return this.to_cargo_id;
|
||||
}
|
||||
|
||||
public void setToCargo_id( db.data.siprp_local.outer.CargosData to_cargo_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( TO_CARGO_ID, to_cargo_id );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.to_cargo_id = to_cargo_id;
|
||||
}
|
||||
|
||||
public Boolean getEnviar_plano()
|
||||
{
|
||||
try
|
||||
{
|
||||
setLastAccess( System.currentTimeMillis() );
|
||||
prepare( ENVIAR_PLANO );
|
||||
}
|
||||
catch( java.lang.Exception ex )
|
||||
{
|
||||
throw new RuntimeException( ex );
|
||||
}
|
||||
return this.enviar_plano;
|
||||
}
|
||||
|
||||
public void setEnviar_plano( Boolean enviar_plano )
|
||||
{
|
||||
try
|
||||
{
|
||||
preProcess( ENVIAR_PLANO, enviar_plano );
|
||||
}
|
||||
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||
{
|
||||
throw new RuntimeException( edex );
|
||||
}
|
||||
this.enviar_plano = enviar_plano;
|
||||
LAZY_LOADED_OBJECTS.put( ENVIAR_PLANO, Boolean.TRUE );
|
||||
}
|
||||
|
||||
public Object get( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEstabelecimentos.ID_INDEX:
|
||||
value = getId();
|
||||
break;
|
||||
case ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX:
|
||||
value = getEstabelecimento_id();
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID_INDEX:
|
||||
value = toEstabelecimento_id();
|
||||
break;
|
||||
case ContactosEstabelecimentos.CONTACTO_ID_INDEX:
|
||||
value = getContacto_id();
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CONTACTO_ID_INDEX:
|
||||
value = toContacto_id();
|
||||
break;
|
||||
case ContactosEstabelecimentos.CARGO_ID_INDEX:
|
||||
value = getCargo_id();
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CARGO_ID_INDEX:
|
||||
value = toCargo_id();
|
||||
break;
|
||||
case ContactosEstabelecimentos.ENVIAR_PLANO_INDEX:
|
||||
value = getEnviar_plano();
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object rawGet( String fieldName )
|
||||
{
|
||||
Object value = null;
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEstabelecimentos.ID_INDEX:
|
||||
value = this.id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX:
|
||||
value = this.estabelecimento_id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID_INDEX:
|
||||
value = this.to_estabelecimento_id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.CONTACTO_ID_INDEX:
|
||||
value = this.contacto_id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CONTACTO_ID_INDEX:
|
||||
value = this.to_contacto_id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.CARGO_ID_INDEX:
|
||||
value = this.cargo_id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CARGO_ID_INDEX:
|
||||
value = this.to_cargo_id;
|
||||
break;
|
||||
case ContactosEstabelecimentos.ENVIAR_PLANO_INDEX:
|
||||
value = this.enviar_plano;
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public void set( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEstabelecimentos.ID_INDEX:
|
||||
setId( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX:
|
||||
setEstabelecimento_id( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID_INDEX:
|
||||
setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.CONTACTO_ID_INDEX:
|
||||
setContacto_id( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CONTACTO_ID_INDEX:
|
||||
setToContacto_id( ( db.data.siprp_local.outer.ContactosData ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.CARGO_ID_INDEX:
|
||||
setCargo_id( ( Integer ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CARGO_ID_INDEX:
|
||||
setToCargo_id( ( db.data.siprp_local.outer.CargosData ) value );
|
||||
break;
|
||||
case ContactosEstabelecimentos.ENVIAR_PLANO_INDEX:
|
||||
setEnviar_plano( ( Boolean ) value );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void rawSet( String fieldName, Object value )
|
||||
{
|
||||
Integer index = getFieldIndex( fieldName );
|
||||
switch( index )
|
||||
{
|
||||
case ContactosEstabelecimentos.ID_INDEX:
|
||||
this.id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX:
|
||||
this.estabelecimento_id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID_INDEX:
|
||||
this.to_estabelecimento_id = ( db.data.siprp_local.outer.EstabelecimentosData ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.CONTACTO_ID_INDEX:
|
||||
this.contacto_id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CONTACTO_ID_INDEX:
|
||||
this.to_contacto_id = ( db.data.siprp_local.outer.ContactosData ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.CARGO_ID_INDEX:
|
||||
this.cargo_id = ( Integer ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CARGO_ID_INDEX:
|
||||
this.to_cargo_id = ( db.data.siprp_local.outer.CargosData ) value;
|
||||
break;
|
||||
case ContactosEstabelecimentos.ENVIAR_PLANO_INDEX:
|
||||
this.enviar_plano = ( Boolean ) 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 ContactosEstabelecimentos.ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.ESTABELECIMENTO_ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_ESTABELECIMENTO_ID_INDEX:
|
||||
theClass = db.data.siprp_local.outer.EstabelecimentosData.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.CONTACTO_ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CONTACTO_ID_INDEX:
|
||||
theClass = db.data.siprp_local.outer.ContactosData.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.CARGO_ID_INDEX:
|
||||
theClass = Integer.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.TO_CARGO_ID_INDEX:
|
||||
theClass = db.data.siprp_local.outer.CargosData.class;
|
||||
break;
|
||||
case ContactosEstabelecimentos.ENVIAR_PLANO_INDEX:
|
||||
theClass = Boolean.class;
|
||||
break;
|
||||
}
|
||||
return theClass;
|
||||
}
|
||||
|
||||
public Integer getFieldIndex( String fieldName )
|
||||
{
|
||||
Integer index = FIELD_INDEXES.get( fieldName );
|
||||
return index != null ? index : ContactosEstabelecimentos._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, ContactosEstabelecimentos.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue