Package com.storedobject.core
Class TransactionControl
java.lang.Object
com.storedobject.common.HTMLText
com.storedobject.common.ErrorText
com.storedobject.core.TransactionControl
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.storedobject.common.StyledBuilder
StyledBuilder.Style
-
Field Summary
Fields inherited from class com.storedobject.common.HTMLText
ALLOW_TOP_LEVEL, value
Fields inherited from interface com.storedobject.common.StyledBuilder
EMPTY_STRINGS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addLink
(StoredObject parent, Id linkId) boolean
addLink
(StoredObject parent, Id linkId, int linkType) boolean
addLink
(StoredObject parent, StoredObject link) boolean
addLink
(StoredObject parent, StoredObject link, int linkType) void
addListener
(TransactionControl.CommitListener listener) clear()
Clear the content.boolean
commit()
boolean
delete
(StoredObject object) User the currently active transaction or a new transaction if none exists.boolean
isActive()
See if this Transaction Control is active or not.boolean
isError()
final boolean
isPseudo()
boolean
removeAllLinks
(StoredObject parent, Class<? extends StoredObject> linkClass) boolean
removeAllLinks
(StoredObject parent, Class<? extends StoredObject> linkClass, int linkType) boolean
removeLink
(StoredObject parent, Id linkId) boolean
removeLink
(StoredObject parent, Id linkId, int linkType) boolean
removeLink
(StoredObject parent, StoredObject link) boolean
removeLink
(StoredObject parent, StoredObject link, int linkType) void
void
rollback()
void
void
boolean
save
(StoredObject object) void
void
setTransaction
(Transaction transaction) User the currently active transaction.Methods inherited from class com.storedobject.common.ErrorText
generateError, getError, getErrorObject, setErrorObject, throwError
Methods inherited from class com.storedobject.common.HTMLText
append, append, append, append, appendHTML, clearContent, drawLine, encode, getText, isAllowTopLevelHTML, isEmpty, isNewLine, newLine, newLine, setAllowTopLevelHTML, setText, space, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.storedobject.common.StyledBuilder
setValue, setValue, setValue, update
-
Constructor Details
-
TransactionControl
-
TransactionControl
-
-
Method Details
-
isPseudo
public final boolean isPseudo() -
addListener
-
removeListener
-
getManager
-
useTransaction
User the currently active transaction. No new transaction will be created if none exists.- Returns:
- Currently active transaction or null.
-
setTransaction
-
getTransaction
User the currently active transaction or a new transaction if none exists.- Returns:
- Currently active transaction or a newly created one.
-
isError
-
setError
-
rollback
-
rollback
-
rollback
public void rollback() -
commit
public boolean commit() -
isActive
public boolean isActive()See if this Transaction Control is active or not.- Returns:
- True if active. False if already committed, rolled back or no transaction in progress.
-
clear
Description copied from class:HTMLText
Clear the content. -
save
-
addLink
-
addLink
-
addLink
-
addLink
-
removeLink
-
removeLink
-
removeLink
-
removeAllLinks
-
removeAllLinks
public boolean removeAllLinks(StoredObject parent, Class<? extends StoredObject> linkClass, int linkType) -
removeLink
-
delete
-