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.
42 lines
1012 B
42 lines
1012 B
package siprp.database.cayenne.objects;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import siprp.database.cayenne.objects.auto._TrabalhadoresEcds;
|
|
import siprp.medicina.MedicinaConstants;
|
|
|
|
public class TrabalhadoresEcds extends _TrabalhadoresEcds implements MedicinaConstants
|
|
{
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
public String getDataString()
|
|
{
|
|
return getData() == null ? "(sem data definida)" : sdf.format( getData() );
|
|
}
|
|
|
|
public String getEstadoString()
|
|
{
|
|
return isNew() ? isNewMessage : (getEstado() == null || getEstado() >= ESTADOS_EXAME_STR.length ? "" : ESTADOS_EXAME_STR[getEstado()]);
|
|
}
|
|
|
|
public HashMap<Integer, String> getEstados()
|
|
{
|
|
HashMap<Integer, String> result = new HashMap<Integer, String>();
|
|
for( int i = 0; i < ESTADOS_EXAME_STR.length; ++i )
|
|
{
|
|
if( ESTADOS_EXAME_STR[i] != null )
|
|
{
|
|
result.put( new Integer( i ), ESTADOS_EXAME_STR[i] );
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
@Override
|
|
public String toString()
|
|
{
|
|
return getDataString() + ": " + getEstadoString();
|
|
}
|
|
|
|
}
|