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.
380 lines
9.8 KiB
380 lines
9.8 KiB
/*
|
|
* HsLegislacaoEmpresa.java
|
|
*
|
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
|
*
|
|
* Use but DON'T TOUCH
|
|
* -> (can't touch this)
|
|
*/
|
|
package siprp.data.inner;
|
|
|
|
|
|
public class HsLegislacaoEmpresa extends siprp.data.BaseObject
|
|
{
|
|
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
|
|
|
|
static
|
|
{
|
|
com.evolute.entity.evo.EvoDataObject.register( HsLegislacaoEmpresa.CLASS_IDENTIFIER, HsLegislacaoEmpresa.LEGISLACAO_ID, HsLegislacaoEmpresa.TO_LEGISLACAO_ID );
|
|
FIELD_INDEXES.put( HsLegislacaoEmpresa.LEGISLACAO_ID, HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX );
|
|
FIELD_INDEXES.put( HsLegislacaoEmpresa.LEGISLACAO_ID_FULL, HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX );
|
|
FIELD_INDEXES.put( HsLegislacaoEmpresa.TO_LEGISLACAO_ID, HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX );
|
|
com.evolute.entity.evo.EvoDataObject.register( HsLegislacaoEmpresa.CLASS_IDENTIFIER, HsLegislacaoEmpresa.EMPRESA_ID, HsLegislacaoEmpresa.TO_EMPRESA_ID );
|
|
FIELD_INDEXES.put( HsLegislacaoEmpresa.EMPRESA_ID, HsLegislacaoEmpresa.EMPRESA_ID_INDEX );
|
|
FIELD_INDEXES.put( HsLegislacaoEmpresa.EMPRESA_ID_FULL, HsLegislacaoEmpresa.EMPRESA_ID_INDEX );
|
|
FIELD_INDEXES.put( HsLegislacaoEmpresa.TO_EMPRESA_ID, HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX );
|
|
}
|
|
|
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
|
|
|
|
|
public static final com.evolute.entity.ForeignKey ForeignKeylegislacao_idTohs_legislacao =
|
|
new com.evolute.entity.ForeignKey( HsLegislacaoEmpresa.class, HsLegislacaoEmpresa.LEGISLACAO_ID, siprp.data.outer.HsLegislacaoData.class, siprp.data.outer.HsLegislacaoData.ID );
|
|
|
|
public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas =
|
|
new com.evolute.entity.ForeignKey( HsLegislacaoEmpresa.class, HsLegislacaoEmpresa.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID );
|
|
|
|
public static final String TABLENAME = "hs_legislacao_empresa";
|
|
|
|
|
|
public static final String CLASS_IDENTIFIER = "siprp.data.inner.hs_legislacao_empresa";
|
|
|
|
public static final int _INVALID__INDEX = -1;
|
|
public static final String LEGISLACAO_ID = "legislacao_id";
|
|
public static final String LEGISLACAO_ID_FULL = "hs_legislacao_empresa.legislacao_id";
|
|
public static final int LEGISLACAO_ID_INDEX = 0;
|
|
public static final String TO_LEGISLACAO_ID = "to_legislacao_id";
|
|
public static final int TO_LEGISLACAO_ID_INDEX = 1;
|
|
public static final String EMPRESA_ID = "empresa_id";
|
|
public static final String EMPRESA_ID_FULL = "hs_legislacao_empresa.empresa_id";
|
|
public static final int EMPRESA_ID_INDEX = 2;
|
|
public static final String TO_EMPRESA_ID = "to_empresa_id";
|
|
public static final int TO_EMPRESA_ID_INDEX = 3;
|
|
|
|
public static final String FIELD_NAMES[] = new String[]{
|
|
};
|
|
|
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
|
};
|
|
|
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
|
LEGISLACAO_ID, EMPRESA_ID, };
|
|
|
|
|
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
|
LEGISLACAO_ID, EMPRESA_ID, };
|
|
|
|
|
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
|
LEGISLACAO_ID, EMPRESA_ID, };
|
|
|
|
private Integer legislacao_id;
|
|
private siprp.data.outer.HsLegislacaoData to_legislacao_id;
|
|
private Integer empresa_id;
|
|
private siprp.data.outer.EmpresasData to_empresa_id;
|
|
|
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
|
|
|
public HsLegislacaoEmpresa()
|
|
{
|
|
super();
|
|
dirtyProperties = new boolean[]{ false, false, false
|
|
, false };
|
|
}
|
|
|
|
public Integer getLegislacao_id()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( LEGISLACAO_ID );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.legislacao_id;
|
|
}
|
|
|
|
public void setLegislacao_id( Integer legislacao_id )
|
|
{
|
|
try
|
|
{
|
|
setLockedForRefresh( true );
|
|
preProcess( LEGISLACAO_ID, legislacao_id );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.legislacao_id = legislacao_id;
|
|
LAZY_LOADED_OBJECTS.put( LEGISLACAO_ID, Boolean.TRUE );
|
|
}
|
|
|
|
public siprp.data.outer.HsLegislacaoData toLegislacao_id()
|
|
{
|
|
try
|
|
{
|
|
prepare( TO_LEGISLACAO_ID );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
return this.to_legislacao_id;
|
|
}
|
|
|
|
public void setToLegislacao_id( siprp.data.outer.HsLegislacaoData to_legislacao_id )
|
|
{
|
|
try
|
|
{
|
|
preProcess( TO_LEGISLACAO_ID, to_legislacao_id );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.to_legislacao_id = to_legislacao_id;
|
|
}
|
|
|
|
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
|
|
{
|
|
setLockedForRefresh( true );
|
|
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 siprp.data.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( siprp.data.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 Object get( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX:
|
|
value = getLegislacao_id();
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX:
|
|
value = toLegislacao_id();
|
|
break;
|
|
case HsLegislacaoEmpresa.EMPRESA_ID_INDEX:
|
|
value = getEmpresa_id();
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX:
|
|
value = toEmpresa_id();
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public Object rawGet( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX:
|
|
value = this.legislacao_id;
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX:
|
|
value = this.to_legislacao_id;
|
|
break;
|
|
case HsLegislacaoEmpresa.EMPRESA_ID_INDEX:
|
|
value = this.empresa_id;
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX:
|
|
value = this.to_empresa_id;
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public void set( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX:
|
|
setLegislacao_id( ( Integer ) value );
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX:
|
|
setToLegislacao_id( ( siprp.data.outer.HsLegislacaoData ) value );
|
|
break;
|
|
case HsLegislacaoEmpresa.EMPRESA_ID_INDEX:
|
|
setEmpresa_id( ( Integer ) value );
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX:
|
|
setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value );
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void rawSet( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX:
|
|
this.legislacao_id = ( Integer ) value;
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX:
|
|
this.to_legislacao_id = ( siprp.data.outer.HsLegislacaoData ) value;
|
|
break;
|
|
case HsLegislacaoEmpresa.EMPRESA_ID_INDEX:
|
|
this.empresa_id = ( Integer ) value;
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX:
|
|
this.to_empresa_id = ( siprp.data.outer.EmpresasData ) 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()
|
|
{
|
|
throw new RuntimeException( "getPrimaryKeyName on HsLegislacaoEmpresa is invalid" );
|
|
}
|
|
|
|
public Class<?> getFieldClass( String fieldName )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
Class<?> theClass = null;
|
|
switch( index )
|
|
{
|
|
case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX:
|
|
theClass = Integer.class;
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX:
|
|
theClass = siprp.data.outer.HsLegislacaoData.class;
|
|
break;
|
|
case HsLegislacaoEmpresa.EMPRESA_ID_INDEX:
|
|
theClass = Integer.class;
|
|
break;
|
|
case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX:
|
|
theClass = siprp.data.outer.EmpresasData.class;
|
|
break;
|
|
}
|
|
return theClass;
|
|
}
|
|
|
|
public Integer getFieldIndex( String fieldName )
|
|
{
|
|
Integer index = FIELD_INDEXES.get( fieldName );
|
|
return index != null ? index : HsLegislacaoEmpresa._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, HsLegislacaoEmpresa.PK_FIELD_NAMES );
|
|
primaryKey.set( 0, getLegislacao_id() );
|
|
primaryKey.set( 1, getEmpresa_id() );
|
|
}
|
|
}
|
|
|
|
@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 );
|
|
}
|
|
}
|
|
}
|