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.

43 lines
1.1 KiB

package siprp.data;
import java.text.DateFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import com.evolute.entity.evo.EvoDataException;
import com.evolute.entity.evo.EvoDataObject;
import com.evolute.utils.strings.UnicodeChecker;
public abstract class BaseObject extends EvoDataObject
{
static
{
UnicodeChecker.setUseDoubleSlash( true );
}
private static final long serialVersionUID = 1L;
public static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.SHORT, new Locale( "pt", "PT" ) );
protected static final String isNewMessage = " ";
@Override
protected List fromReference(Class clazz, Integer id, String referingProperty, String... order) throws EvoDataException
{
List result = new LinkedList();
for( Object o : super.fromReference(clazz, id, referingProperty, order) )
{
Object inactivoString = ((EvoDataObject)o).get("inactivo");
Object deletedDateValue = ((EvoDataObject)o).get("deleted_date");
if( deletedDateValue == null && !"y".equals( inactivoString ) )
{
result.add( o );
}
}
return result;
}
}