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.
56 lines
999 B
56 lines
999 B
package siprp.database.cayenne.objects;
|
|
|
|
import com.evolute.utils.strings.UnicodeChecker;
|
|
|
|
import siprp.database.cayenne.objects.auto._PrtGruposProtocolo;
|
|
|
|
public class PrtGruposProtocolo extends _PrtGruposProtocolo {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String name = null;
|
|
|
|
private String convertedName = null;
|
|
|
|
@Override
|
|
public String getDescricao()
|
|
{
|
|
String currentName = super.getDescricao();
|
|
if( name == null || !name.equals( currentName ))
|
|
{
|
|
name = currentName;
|
|
convertedName = null;
|
|
}
|
|
return convertName();
|
|
}
|
|
|
|
@Override
|
|
public void setDescricao( String nome )
|
|
{
|
|
super.setDescricao( UnicodeChecker.parseToUnicode( name ) );
|
|
getDescricao();
|
|
}
|
|
|
|
private String convertName()
|
|
{
|
|
if( name == null )
|
|
{
|
|
convertedName = null;
|
|
}
|
|
else
|
|
{
|
|
convertedName = UnicodeChecker.parseFromUnicode( name );
|
|
}
|
|
return convertedName;
|
|
}
|
|
|
|
@Override
|
|
public String toString()
|
|
{
|
|
return getDescricao() == null ? "" : getDescricao();
|
|
}
|
|
}
|
|
|
|
|
|
|