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.
SIPRP/trunk/common/src/siprp/database/cayenne/objects/TrabalhadoresFichasAptidao....

57 lines
1.0 KiB

package siprp.database.cayenne.objects;
import java.util.Date;
import siprp.database.cayenne.objects.auto._TrabalhadoresFichasAptidao;
public class TrabalhadoresFichasAptidao extends _TrabalhadoresFichasAptidao {
private static final long serialVersionUID = 1L;
@Override
public String toString()
{
String result = "";
Exames exame = getToExames();
if( exame != null )
{
Date data = exame.getProximoExame();
if( data != null )
{
result = sdf.format( data );
}
}
return result + ": " + getEstadoString();
}
private String getEstadoString()
{
String result = "";
Exames exame = getToExames();
if( exame != null )
{
Integer resultadoCodigo = exame.getResultado();
if( resultadoCodigo != null )
{
switch( resultadoCodigo.intValue() )
{
case 1:
result += "Apto";
break;
case 2:
result += "Apto (cond)";
break;
case 3:
result += "Inapto (temp)";
break;
case 4:
result += "Inapto (def)";
break;
}
}
}
return result;
}
}