I have implemented the very same thing via a custom RowReader. I just extended the
default RowReader, and read in the value from that super. After that, I just my
criteria to see if I should avoid it, and return based on that.
Here is my method that I implemnted that extended RowReaderDefaultImpl
public Object readObjectFrom(Map row) throws PersistenceBrokerException
{
Object o = super.readObjectFrom(row);
if (o instanceof AuditableBusinessObject)
{
if (((AuditableBusinessObject)o).getDeletedDate() != null)
return null;
}
return o;
}
Hope this helps.
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Tino Sch�llhorn
Sent: Tuesday, March 23, 2004 6:21 AM
To: [EMAIL PROTECTED]
Subject: soft-deleting objects
Hi,
I want to implement something like a soft-delete:
Objects should be marked as "deleted" in its corresponing table and OJB should just
ignore them when it is materializing or querying them.
Where would be the best point to start when I want to implement this feature? I just
played around with the RowReader-Concept - but I have the feeling that this is not the
right place to start, because I think I have to modify the queries OJB is submitting
to the database.
Any ideas?
Regards
Tino
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]