if((ownIdentities && mLastOwnIdentityFetchID == 0) || (!ownIdentities && mLastIdentityFetchID == 0))
return;
long acceptID = ownIdentities ? mLastOwnIdentityFetchID : mLastIdentityFetchID;
Query q = db.query();
if(ownIdentities)
q.constrain(WoTOwnIdentity.class);
else {
q.constrain(WoTIdentity.class);
q.constrain(WoTOwnIdentity.class).not();
}
q.descend("mLastReceivedFromWoT").constrain(acceptID).not();
ObjectSet<WoTIdentity> result = q.execute();
for(WoTIdentity identity : result) {
identity.initializeTransient(mFreetalk);
if(logDEBUG) Logger.debug(this, "Garbage collecting identity " + identity);
deleteIdentity(identity, messageManager, taskManager);