apollo.editor
Class UpdateTransaction

java.lang.Object
  extended by apollo.editor.Transaction
      extended by apollo.editor.UpdateTransaction
All Implemented Interfaces:
java.io.Serializable

public class UpdateTransaction
extends Transaction

Transaction class for updating.

Author:
wgm
See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class apollo.editor.Transaction
author, date, NEW, newProperties, OLD, oldProperties
 
Constructor Summary
UpdateTransaction()
           
UpdateTransaction(java.lang.Object source, SeqFeatureI feat, TransactionSubpart ts, java.lang.Object oldValue, java.lang.Object newValue)
           
UpdateTransaction(SeqFeatureI feature, TransactionSubpart part)
          An overloaded constructor
UpdateTransaction(SeqFeatureI feat, TransactionSubpart ts, java.lang.Object oldValue, java.lang.Object newValue)
           
 
Method Summary
 void editModel()
           
protected  java.lang.String getOperationString()
           
 SeqFeatureI getUpdatedSeqFeature()
          Get the updated SeqFeatureI
 SeqFeatureI getUpdatedSeqFeatureClone()
           
 boolean isUpdate()
           
 java.lang.String oneLineSummary()
          Short (one-line) summary of the object; concise alternative to toString() that displays every instance variable set in one of the constructors, plus date and author.
 void setNameAdapter(ApolloNameAdapterI nameAdapter)
          This is to undo id changes (caused by type change at the moment).
 
Methods inherited from class apollo.editor.Transaction
addProperty, generateAnnotationChangeEvent, generateUndoChangeEvent, getAuthor, getClassString, getDate, getDeletedFeature, getLeafTransactions, getNewId, getNewSplitFeature, getNewSubpartValue, getObjectClass, getOldComment, getOldId, getOldString, getOldSubpartValue, getOperation, getParentFeature, getParentFeatureClone, getParentTransaction, getProperty, getRank, getSeqFeature, getSeqFeatureClone, getSubpart, getSubpartRank, getSubpartString, getTransaction, hasKids, hasParentTransaction, isAdd, isAddPeptide, isCompound, isDelete, isMerge, isSplit, isUpdateParent, setAuthor, setDate, setDate, setNewId, setNewSubpartValue, setObjectClass, setOldId, setOldSubpartValue, setOperation, setOperation, setParentFeature, setRank, setSeqFeature, setSource, setSubpart, setSubpartRank, size, subpartIsString, toString, toString, updateClonedTranscriptIdsAndNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

UpdateTransaction

public UpdateTransaction()

UpdateTransaction

public UpdateTransaction(SeqFeatureI feature,
                         TransactionSubpart part)
An overloaded constructor

Parameters:
feature - the updated SeqFeatureI object
part - the updated part (It is more like a name thing, not the actual value) - phase this constructor out for the other one?

UpdateTransaction

public UpdateTransaction(SeqFeatureI feat,
                         TransactionSubpart ts,
                         java.lang.Object oldValue,
                         java.lang.Object newValue)

UpdateTransaction

public UpdateTransaction(java.lang.Object source,
                         SeqFeatureI feat,
                         TransactionSubpart ts,
                         java.lang.Object oldValue,
                         java.lang.Object newValue)
Method Detail

getUpdatedSeqFeature

public SeqFeatureI getUpdatedSeqFeature()
Get the updated SeqFeatureI

Returns:

getUpdatedSeqFeatureClone

public SeqFeatureI getUpdatedSeqFeatureClone()

isUpdate

public boolean isUpdate()
Overrides:
isUpdate in class Transaction

editModel

public void editModel()

setNameAdapter

public void setNameAdapter(ApolloNameAdapterI nameAdapter)
This is to undo id changes (caused by type change at the moment). all the id changes dont get transmitted so need name adapter to do all of the id changes needed. at some point this should be ammended where all the id & name changes do get sent out as transactions. this will do for now.


getOperationString

protected java.lang.String getOperationString()
Overrides:
getOperationString in class Transaction

oneLineSummary

public java.lang.String oneLineSummary()
Short (one-line) summary of the object; concise alternative to toString() that displays every instance variable set in one of the constructors, plus date and author.

Overrides:
oneLineSummary in class Transaction