package siprp.database.cayenne.objects; import siprp.database.cayenne.objects.auto._TrabalhadoresEcd; public class TrabalhadoresEcd extends _TrabalhadoresEcd { private static final long serialVersionUID = 1L; @Override public String toString() { PrtTiposElementosProtocolo exame = getToPrtTiposElementosProtocolo(); String exameNome = exame == null ? null : exame.getDescricao(); EcdOficial exameOficial = getToEcdOficial(); String exameOficialNome = exameOficial == null ? null : exameOficial.getDescricao(); String result = ""; if(exameNome == null && exameOficialNome != null) { result = exameOficialNome + " [oficial]"; }else if( exameNome != null ) { result = exameNome; } return result; } }