phenote.edit
Class CompoundTransaction
java.lang.Object
phenote.edit.CompoundTransaction
- All Implemented Interfaces:
- TransactionI
public class CompoundTransaction
- extends java.lang.Object
- implements TransactionI
used for bulk updating (see TermCompList)
|
Method Summary |
(package private) void |
addTransaction(TransactionI trans)
|
void |
editModel()
just call editModel on kids |
java.util.List<CharacterI> |
getCharacters()
|
java.util.List<CharacterI> |
getDeletedAnnotations()
|
org.obo.datamodel.OBOClass |
getNewTerm()
|
java.lang.String |
getNewValueString()
|
(package private) java.util.List<TransactionI> |
getTransactions()
|
boolean |
isAdd()
|
boolean |
isUpdate()
returns true if first child is update, assumes kids are homogenous
which currently is a true assumption, change this if that becomes untrue |
boolean |
isUpdateForCharField(CharField cf)
queries 1st child for this. |
static CompoundTransaction |
makeCopyTrans(java.util.List<CharacterI> charsToCopy,
CharacterListManager clManager)
|
static CompoundTransaction |
makeDelTrans(java.util.List<CharacterI> delChars,
CharacterListManager clManager)
|
static CompoundTransaction |
makeUpdate(java.util.List<CharacterI> l,
CharField c,
CharFieldValue v)
|
static CompoundTransaction |
makeUpdate(java.util.List<CharacterI> l,
CharField c,
org.obo.datamodel.OBOClass o)
|
static CompoundTransaction |
makeUpdate(java.util.List<CharacterI> crs,
CharField cf,
java.lang.String v)
|
void |
undo()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
childTransactions
java.util.List<TransactionI> childTransactions
CompoundTransaction
CompoundTransaction()
makeUpdate
public static CompoundTransaction makeUpdate(java.util.List<CharacterI> crs,
CharField cf,
java.lang.String v)
makeUpdate
public static CompoundTransaction makeUpdate(java.util.List<CharacterI> l,
CharField c,
org.obo.datamodel.OBOClass o)
makeUpdate
public static CompoundTransaction makeUpdate(java.util.List<CharacterI> l,
CharField c,
CharFieldValue v)
getDeletedAnnotations
public java.util.List<CharacterI> getDeletedAnnotations()
- Specified by:
getDeletedAnnotations in interface TransactionI
addTransaction
void addTransaction(TransactionI trans)
makeCopyTrans
public static CompoundTransaction makeCopyTrans(java.util.List<CharacterI> charsToCopy,
CharacterListManager clManager)
makeDelTrans
public static CompoundTransaction makeDelTrans(java.util.List<CharacterI> delChars,
CharacterListManager clManager)
editModel
public void editModel()
- just call editModel on kids
- Specified by:
editModel in interface TransactionI
undo
public void undo()
- Specified by:
undo in interface TransactionI
getTransactions
java.util.List<TransactionI> getTransactions()
getCharacters
public java.util.List<CharacterI> getCharacters()
- Specified by:
getCharacters in interface TransactionI
isAdd
public boolean isAdd()
- Specified by:
isAdd in interface TransactionI
isUpdate
public boolean isUpdate()
- returns true if first child is update, assumes kids are homogenous
which currently is a true assumption, change this if that becomes untrue
- Specified by:
isUpdate in interface TransactionI
isUpdateForCharField
public boolean isUpdateForCharField(CharField cf)
- queries 1st child for this. assumes all transactions have same charfield/update
status which is true at moment (change if need)
- Specified by:
isUpdateForCharField in interface TransactionI
getNewTerm
public org.obo.datamodel.OBOClass getNewTerm()
- Specified by:
getNewTerm in interface TransactionI
getNewValueString
public java.lang.String getNewValueString()