|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dellroad.stuff.pobj.PersistentFileTransaction
public class PersistentFileTransaction
Represents an open "transaction" on a PersistentObject's persistent file.
This class is used by PersistentObjectSchemaUpdater and would normally not be used directly.
| Constructor Summary | |
|---|---|
PersistentFileTransaction(File file)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addUpdate(String name)
Add an update to the list associated with this transaction. |
void |
commit()
Commit this transaction. |
byte[] |
getData()
Get the current XML data. |
List<String> |
getUpdates()
Get the updates list associated with this transaction. |
void |
rollback()
Cancel this transaction. |
void |
setData(byte[] data)
Set the current XML data. |
void |
transform(Transformer transformer)
Apply an XSLT transform to the current XML object in this transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentFileTransaction(File file)
throws IOException,
XMLStreamException
file - persistent file
PersistentObjectException - if no updates are found
IOException
XMLStreamException| Method Detail |
|---|
public byte[] getData()
public void setData(byte[] data)
public void commit()
throws IOException,
XMLStreamException
IOException
XMLStreamExceptionpublic void rollback()
public List<String> getUpdates()
public void addUpdate(String name)
public void transform(Transformer transformer)
throws TransformerException
IllegalStateException - if the current root object is null
PersistentObjectException - if an error occurs
TransformerException - if the transformation fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||