forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@753 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
ac5bed0a3f
commit
fae6aae398
@ -1,13 +1,53 @@
|
|||||||
package siprp.database.cayenne.objects;
|
package siprp.database.cayenne.objects;
|
||||||
|
|
||||||
|
import com.evolute.utils.strings.UnicodeChecker;
|
||||||
|
|
||||||
import siprp.database.cayenne.objects.auto._Medida;
|
import siprp.database.cayenne.objects.auto._Medida;
|
||||||
|
|
||||||
public class Medida extends _Medida {
|
public class Medida extends _Medida {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String description = null;
|
||||||
|
|
||||||
|
private String convertedDescription = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return getDescription() == null ? "" : getDescription();
|
return getDescription() == null ? "" : getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
String currentName = super.getDescription();
|
||||||
|
if( description == null || !description.equals( currentName ))
|
||||||
|
{
|
||||||
|
description = currentName;
|
||||||
|
convertedDescription = null;
|
||||||
|
}
|
||||||
|
return convertName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDescription( String nome )
|
||||||
|
{
|
||||||
|
super.setDescription( nome != null ? UnicodeChecker.parseToUnicode( nome ).replaceAll( "\\\\\\\\", "\\\\" ) : null );
|
||||||
|
getDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String convertName()
|
||||||
|
{
|
||||||
|
if( description == null )
|
||||||
|
{
|
||||||
|
convertedDescription = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
convertedDescription = UnicodeChecker.parseFromUnicode( description );
|
||||||
|
}
|
||||||
|
return convertedDescription;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,53 @@
|
|||||||
package siprp.database.cayenne.objects;
|
package siprp.database.cayenne.objects;
|
||||||
|
|
||||||
|
import com.evolute.utils.strings.UnicodeChecker;
|
||||||
|
|
||||||
import siprp.database.cayenne.objects.auto._PostoDeTrabalho;
|
import siprp.database.cayenne.objects.auto._PostoDeTrabalho;
|
||||||
|
|
||||||
public class PostoDeTrabalho extends _PostoDeTrabalho {
|
public class PostoDeTrabalho extends _PostoDeTrabalho {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String description = null;
|
||||||
|
|
||||||
|
private String convertedDescription = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return getDescription() == null ? "" : getDescription();
|
return getDescription() == null ? "" : getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
String currentName = super.getDescription();
|
||||||
|
if( description == null || !description.equals( currentName ))
|
||||||
|
{
|
||||||
|
description = currentName;
|
||||||
|
convertedDescription = null;
|
||||||
|
}
|
||||||
|
return convertName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDescription( String nome )
|
||||||
|
{
|
||||||
|
super.setDescription( nome != null ? UnicodeChecker.parseToUnicode( nome ).replaceAll( "\\\\\\\\", "\\\\" ) : null );
|
||||||
|
getDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String convertName()
|
||||||
|
{
|
||||||
|
if( description == null )
|
||||||
|
{
|
||||||
|
convertedDescription = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
convertedDescription = UnicodeChecker.parseFromUnicode( description );
|
||||||
|
}
|
||||||
|
return convertedDescription;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue