Skip to content
Snippets Groups Projects
Commit 265766cb authored by tjc's avatar tjc
Browse files

collapse featureloc updating into single statement

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@5242 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent e3dfb97e
No related branches found
No related tags found
No related merge requests found
......@@ -346,6 +346,24 @@ public class ChadoTransactionManager
if(feature.getSegmentRangeStore() != null)
feature.getSegmentRangeStore().put(seg_id, range_new);
if(sql.size() > 0)
{
// collapse updating featureloc into one statement
ChadoTransaction lastTsn = (ChadoTransaction)sql.lastElement();
if(lastTsn.getGff_feature() != null &&
lastTsn.getType() == ChadoTransaction.UPDATE &&
lastTsn.getFeatureKey().equals( feature.getKey().getKeyString() ) &&
lastTsn.getFeatureObject() instanceof FeatureLoc)
{
FeatureLoc floc = (FeatureLoc)lastTsn.getFeatureObject();
if(floc.getFeatureByFeatureId().getUniqueName().equals(seg_id))
{
Splash.logger4j.debug("Removing last FeatureLoc ChadoTransaction");
sql.remove(sql.size()-1);
}
}
}
FeatureLoc featureloc = getFeatureLoc(feature, seg_id, range_new);
tsn = new ChadoTransaction(ChadoTransaction.UPDATE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment