forked from Coded/SIPRP
				
			git-svn-id: https://svn.coded.pt/svn/SIPRP@2063 bb69d46d-e84e-40c8-a05a-06db0d633741
	
		
	
				
					
				
			
							parent
							
								
									e9f228a24b
								
							
						
					
					
						commit
						7c2d284493
					
				| @ -0,0 +1,360 @@ | ||||
| /* | ||||
| * MarcacoesEstabelecimentoTiposEventos.java | ||||
| * | ||||
| * Generated by com.evutils.codegen.EntityObjectGenerator | ||||
| * | ||||
| * Use but DON'T TOUCH | ||||
| * -> (can't touch this) | ||||
| */ | ||||
| package db.data.siprp_local.inner; | ||||
| 
 | ||||
| import java.sql.Timestamp; | ||||
| 
 | ||||
| public class MarcacoesEstabelecimentoTiposEventos extends com.evolute.entity.evo.EvoDataObject<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( MarcacoesEstabelecimentoTiposEventos.ID, MarcacoesEstabelecimentoTiposEventos.ID_INDEX ); | ||||
| 		FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.ID_FULL, MarcacoesEstabelecimentoTiposEventos.ID_INDEX ); | ||||
| 		FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DESCRICAO, MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX ); | ||||
| 		FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DESCRICAO_FULL, MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX ); | ||||
| 		FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP, MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX ); | ||||
| 		FIELD_INDEXES.put( MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_FULL, MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX ); | ||||
| 	} | ||||
| 
 | ||||
| 	private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); | ||||
| 
 | ||||
| 
 | ||||
| 	public static final String TABLENAME = "marcacoes_estabelecimento_tipos_eventos"; | ||||
| 
 | ||||
| 
 | ||||
| 	public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_estabelecimento_tipos_eventos"; | ||||
| 
 | ||||
| 	public static final int _INVALID__INDEX = -1; | ||||
| 	public static final String ID = "id"; | ||||
| 	public static final String ID_FULL = "marcacoes_estabelecimento_tipos_eventos.id"; | ||||
| 	public static final int ID_INDEX = 0; | ||||
| 	public static final String DESCRICAO = "descricao"; | ||||
| 	public static final String DESCRICAO_FULL = "marcacoes_estabelecimento_tipos_eventos.descricao"; | ||||
| 	public static final int DESCRICAO_INDEX = 1; | ||||
| 	public static final String DELETED_STAMP = "deleted_stamp"; | ||||
| 	public static final String DELETED_STAMP_FULL = "marcacoes_estabelecimento_tipos_eventos.deleted_stamp"; | ||||
| 	public static final int DELETED_STAMP_INDEX = 2; | ||||
| 
 | ||||
| 	public static final String FIELD_NAMES[] = new String[]{ | ||||
| 		DESCRICAO, DELETED_STAMP, }; | ||||
| 
 | ||||
| 	public static final String FIELD_NAMES_FULL[] = new String[]{ | ||||
| 		TABLENAME + "." + DESCRICAO, TABLENAME + "." + DELETED_STAMP, }; | ||||
| 
 | ||||
| 	protected static final String DB_FIELD_NAMES[] = new String[]{ | ||||
| 		ID, DESCRICAO, DELETED_STAMP, }; | ||||
| 
 | ||||
| 
 | ||||
| 	protected static final String PK_FIELD_NAMES[] = new String[]{ | ||||
| 		ID, }; | ||||
| 
 | ||||
| 
 | ||||
| 	public static final String DEFAULT_LOAD_SET[] = new String[] { | ||||
| 		ID, DESCRICAO, DELETED_STAMP, }; | ||||
| 
 | ||||
| 	private Integer id; | ||||
| 	private String descricao; | ||||
| 	private Timestamp deleted_stamp; | ||||
| 
 | ||||
| 	protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; | ||||
| 
 | ||||
| 	public MarcacoesEstabelecimentoTiposEventos() | ||||
| 	{ | ||||
| 		super(); | ||||
| 		dirtyProperties = new boolean[]{ false, false, false }; | ||||
| 	} | ||||
| 
 | ||||
| 	public Integer getId() | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			setLastAccess( System.currentTimeMillis() ); | ||||
| 			prepare( ID ); | ||||
| 		} | ||||
| 		catch( java.lang.Exception ex ) | ||||
| 		{ | ||||
| 			throw new RuntimeException( ex ); | ||||
| 		} | ||||
| 		return this.id; | ||||
| 	} | ||||
| 
 | ||||
| 	public void setId( Integer id ) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			preProcess( ID, id ); | ||||
| 		} | ||||
| 		catch( com.evolute.entity.evo.EvoDataException edex ) | ||||
| 		{ | ||||
| 			throw new RuntimeException( edex ); | ||||
| 		} | ||||
| 		this.id = id; | ||||
| 		LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE ); | ||||
| 	} | ||||
| 
 | ||||
| 	public java.util.List<db.data.siprp_local.outer.MarcacoesEstabelecimentoData>fromMarcacoesEstabelecimento_tipo_evento_id() | ||||
| 	{ | ||||
| 		java.util.List<db.data.siprp_local.outer.MarcacoesEstabelecimentoData> result = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesEstabelecimentoData >(); | ||||
| 		if ( getPrimaryKey() != null )  | ||||
| 		{ | ||||
| 			try | ||||
| 			{ | ||||
| 				result = fromReference( db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "tipo_evento_id" ); | ||||
| 			} | ||||
| 			catch( com.evolute.entity.evo.EvoDataException edex ) | ||||
| 			{ | ||||
| 				throw new RuntimeException( edex ); | ||||
| 			} | ||||
| 		} | ||||
| 		return result; | ||||
| 	} | ||||
| 
 | ||||
| 	public String getDescricao() | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			setLastAccess( System.currentTimeMillis() ); | ||||
| 			prepare( DESCRICAO ); | ||||
| 		} | ||||
| 		catch( java.lang.Exception ex ) | ||||
| 		{ | ||||
| 			throw new RuntimeException( ex ); | ||||
| 		} | ||||
| 		return this.descricao; | ||||
| 	} | ||||
| 
 | ||||
| 	public void setDescricao( String descricao ) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			preProcess( DESCRICAO, descricao ); | ||||
| 		} | ||||
| 		catch( com.evolute.entity.evo.EvoDataException edex ) | ||||
| 		{ | ||||
| 			throw new RuntimeException( edex ); | ||||
| 		} | ||||
| 		this.descricao = descricao; | ||||
| 		LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE ); | ||||
| 	} | ||||
| 
 | ||||
| 	public Timestamp getDeleted_stamp() | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			setLastAccess( System.currentTimeMillis() ); | ||||
| 			prepare( DELETED_STAMP ); | ||||
| 		} | ||||
| 		catch( java.lang.Exception ex ) | ||||
| 		{ | ||||
| 			throw new RuntimeException( ex ); | ||||
| 		} | ||||
| 		return this.deleted_stamp; | ||||
| 	} | ||||
| 
 | ||||
| 	public void setDeleted_stamp( Timestamp deleted_stamp ) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			preProcess( DELETED_STAMP, deleted_stamp ); | ||||
| 		} | ||||
| 		catch( com.evolute.entity.evo.EvoDataException edex ) | ||||
| 		{ | ||||
| 			throw new RuntimeException( edex ); | ||||
| 		} | ||||
| 		this.deleted_stamp = deleted_stamp; | ||||
| 		LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); | ||||
| 	} | ||||
| 
 | ||||
| 	public Object get( String fieldName ) | ||||
| 	{ | ||||
| 		Object value = null; | ||||
| 		Integer index = getFieldIndex( fieldName ); | ||||
| 		switch( index ) | ||||
| 		{ | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: | ||||
| 				value = getId(); | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: | ||||
| 				value = getDescricao(); | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: | ||||
| 				value = getDeleted_stamp(); | ||||
| 				break; | ||||
| 		} | ||||
| 		return value; | ||||
| 	} | ||||
| 
 | ||||
| 	public Object rawGet( String fieldName ) | ||||
| 	{ | ||||
| 		Object value = null; | ||||
| 		Integer index = getFieldIndex( fieldName ); | ||||
| 		switch( index ) | ||||
| 		{ | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: | ||||
| 				value = this.id; | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: | ||||
| 				value = this.descricao; | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: | ||||
| 				value = this.deleted_stamp; | ||||
| 				break; | ||||
| 		} | ||||
| 		return value; | ||||
| 	} | ||||
| 
 | ||||
| 	public void set( String fieldName, Object value ) | ||||
| 	{ | ||||
| 		Integer index = getFieldIndex( fieldName ); | ||||
| 		switch( index ) | ||||
| 		{ | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: | ||||
| 				setId( ( Integer ) value ); | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: | ||||
| 				setDescricao( ( String ) value ); | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: | ||||
| 				setDeleted_stamp( ( Timestamp ) value ); | ||||
| 				break; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	public void rawSet( String fieldName, Object value ) | ||||
| 	{ | ||||
| 		Integer index = getFieldIndex( fieldName ); | ||||
| 		switch( index ) | ||||
| 		{ | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: | ||||
| 				this.id = ( Integer ) value; | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: | ||||
| 				this.descricao = ( String ) value; | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: | ||||
| 				this.deleted_stamp = ( Timestamp ) value; | ||||
| 				break; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	public String []getFieldNames() | ||||
| 	{ | ||||
| 		return FIELD_NAMES; | ||||
| 	} | ||||
| 
 | ||||
| 	public String []getFieldNamesFull() | ||||
| 	{ | ||||
| 		return FIELD_NAMES_FULL; | ||||
| 	} | ||||
| 
 | ||||
| 	public String []getDBFieldNames() | ||||
| 	{ | ||||
| 		return DB_FIELD_NAMES; | ||||
| 	} | ||||
| 
 | ||||
| 	public String []getPrimaryKeyNames() | ||||
| 	{ | ||||
| 		return PK_FIELD_NAMES; | ||||
| 	} | ||||
| 
 | ||||
| 	public String []getDefaultLoadSet() | ||||
| 	{ | ||||
| 		return DEFAULT_LOAD_SET; | ||||
| 	} | ||||
| 
 | ||||
| 	public String getPrimaryKeyName() | ||||
| 	{ | ||||
| 		return PK_FIELD_NAMES[ 0 ]; | ||||
| 	} | ||||
| 
 | ||||
| 	public Class<?> getFieldClass( String fieldName ) | ||||
| 	{ | ||||
| 		Integer index = getFieldIndex( fieldName ); | ||||
| 		Class<?> theClass = null; | ||||
| 		switch( index ) | ||||
| 		{ | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.ID_INDEX: | ||||
| 				theClass = Integer.class; | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DESCRICAO_INDEX: | ||||
| 				theClass = String.class; | ||||
| 				break; | ||||
| 			case MarcacoesEstabelecimentoTiposEventos.DELETED_STAMP_INDEX: | ||||
| 				theClass = Timestamp.class; | ||||
| 				break; | ||||
| 		} | ||||
| 		return theClass; | ||||
| 	} | ||||
| 
 | ||||
| 	public Integer getFieldIndex( String fieldName ) | ||||
| 	{ | ||||
| 		Integer index = FIELD_INDEXES.get( fieldName ); | ||||
| 		return index != null ? index : MarcacoesEstabelecimentoTiposEventos._INVALID__INDEX; | ||||
| 	} | ||||
| 
 | ||||
| 	public String getTableName() | ||||
| 	{ | ||||
| 		return TABLENAME; | ||||
| 	} | ||||
| 
 | ||||
| 	public String getClassIdentifier() | ||||
| 	{ | ||||
| 		return CLASS_IDENTIFIER; | ||||
| 	} | ||||
| 
 | ||||
| 	@Override | ||||
| 	protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) | ||||
| 	{ | ||||
| 		if( primaryKey == null ) | ||||
| 		{ | ||||
| 			primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEstabelecimentoTiposEventos.PK_FIELD_NAMES ); | ||||
| 			Object idObject = array.get( row, col + 0 ); | ||||
| 			try | ||||
| 			{ | ||||
| 				primaryKey.set( 0, ( Integer ) idObject ); | ||||
| 				setId( ( Integer ) idObject ); | ||||
| 			} | ||||
| 			catch( ClassCastException ex ) | ||||
| 			{ | ||||
| 				if( idObject instanceof Number ) | ||||
| 				{ | ||||
| 					primaryKey.set( 0, ((Number)idObject).intValue() ); | ||||
| 					setId( ((Number)idObject).intValue() ); | ||||
| 				} | ||||
| 				else { | ||||
| 					throw ex; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	@Override | ||||
| 	public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() | ||||
| 	{ | ||||
| 		return primaryKey; | ||||
| 	} | ||||
| 
 | ||||
| 	public void initLazyLoadFields() | ||||
| 	{ | ||||
| 	} | ||||
| 
 | ||||
| 	public boolean isPropertyLoaded( String fieldName ) | ||||
| 	{ | ||||
| 		if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) | ||||
| 		{ | ||||
| 			return true; | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return LAZY_LOADED_OBJECTS.get( fieldName ); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
					Loading…
					
					
				
		Reference in new issue