Uses of Class
io.permazen.core.Transaction
Package
Description
Abstraction layer allowing access to a
Database
using normal Java objects.Components that support integrating Permazen into a Java Console Toolkit console.
Permazen CLI
Command
related classes, including pre-defined commands.Permazen parsing related classes.
Core classes for the Permazen Java persistence layer.
Permazen core API utility classes.
-
Uses of Transaction in io.permazen
Modifier and TypeMethodDescriptionPermazenTransaction.getTransaction()
Get theTransaction
associated with this instance. -
Uses of Transaction in io.permazen.cli
Modifier and TypeMethodDescriptionSession.getTransaction()
Get theTransaction
currently associated with this instance.Session.TxInfo.getTransaction()
Get the associatedTransaction
, if any. -
Uses of Transaction in io.permazen.cli.cmd
Modifier and TypeMethodDescriptionstatic String
DecodeKeyCommand.decode
(Transaction tx, ByteData key) Decode a key/value in the context of aTransaction
. -
Uses of Transaction in io.permazen.cli.parse
-
Uses of Transaction in io.permazen.core
Modifier and TypeClassDescriptionclass
ATransaction
that is not actually connected to a persistent database, but instead exists just to hold objects in memory.Modifier and TypeMethodDescriptionDatabase.createTransaction
(TransactionConfig txConfig) Create a newTransaction
on this database using the specific configuration.Database.createTransaction
(KVTransaction kvt, TransactionConfig txConfig) Create a newTransaction
on this database using an already-openedKVTransaction
and specified configuration.Database.createTransaction
(SchemaModel schemaModel) Create a newTransaction
on this database using the givenSchemaModel
and the defaults for all otherTransactionConfig
items.TransactionException.getTransaction()
Get the associated transaction.TransactionConfig.newTransaction
(Database db) Convenience method that uses this instance to create a new transaction in the given database.Modifier and TypeMethodDescriptionboolean
Transaction.copy
(ObjId source, Transaction dest, boolean migrateSchema, boolean notifyListeners, ObjIdMap<ReferenceField> deletedAssignments, ObjIdMap<ObjId> objectIdMap) Copy an object into a (possibly different) transaction.ObjType.create
(Transaction tx) Create a new database object of this type in the given transaction.ListElementIndex.getElementIndex
(Transaction tx) Get this index's view of the given transaction, including list index.final CoreIndex1<T,
ObjId> ComplexSubFieldIndex.getIndex
(Transaction tx) CompositeIndex.getIndex
(Transaction tx) abstract AbstractCoreIndex<ObjId>
Index.getIndex
(Transaction tx) Get this index's view of the given transaction.SimpleFieldIndex.getIndex
(Transaction tx) abstract CoreIndex1<T,
ObjId> SimpleIndex.getIndex
(Transaction tx) abstract C
CollectionField.getValue
(Transaction tx, ObjId id) CounterField.getValue
(Transaction tx, ObjId id) abstract T
Field.getValue
(Transaction tx, ObjId id) Get the value of this field in the given object.ListField.getValue
(Transaction tx, ObjId id) MapField.getValue
(Transaction tx, ObjId id) SetField.getValue
(Transaction tx, ObjId id) SimpleField.getValue
(Transaction tx, ObjId id) MapValueIndex.getValueIndex
(Transaction tx) Get this index's view of the given transaction, including entry key.boolean
CollectionField.hasDefaultValue
(Transaction tx, ObjId id) boolean
CounterField.hasDefaultValue
(Transaction tx, ObjId id) abstract boolean
Field.hasDefaultValue
(Transaction tx, ObjId id) Determine if this field in the specified object has its default value in the specifiedTransaction
.boolean
MapField.hasDefaultValue
(Transaction tx, ObjId id) boolean
SimpleField.hasDefaultValue
(Transaction tx, ObjId id) void
CreateListener.onCreate
(Transaction tx, ObjId id) Receive notification of a new object being created.void
DeleteListener.onDelete
(Transaction tx, ObjId id, int[] path, NavigableSet<ObjId> referrers) Receive notification of an object about to be deleted.<E> void
ListFieldChangeListener.onListFieldAdd
(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E value) Receive notification of the addition (or insertion) of an element to aListField
.void
ListFieldChangeListener.onListFieldClear
(Transaction tx, ObjId id, ListField<?> field, int[] path, NavigableSet<ObjId> referrers) Receive notification of the clearing of aListField
.<E> void
ListFieldChangeListener.onListFieldRemove
(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E value) Receive notification of a removal of an element from aListField
.<E> void
ListFieldChangeListener.onListFieldReplace
(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E oldValue, E newValue) Receive notification of the change in element at a specific position in aListField
.<K,
V> void MapFieldChangeListener.onMapFieldAdd
(Transaction tx, ObjId id, MapField<K, V> field, int[] path, NavigableSet<ObjId> referrers, K key, V value) Receive notification of the addition of a new key/value pair into aMapField
.void
MapFieldChangeListener.onMapFieldClear
(Transaction tx, ObjId id, MapField<?, ?> field, int[] path, NavigableSet<ObjId> referrers) Receive notification of the clearing of aMapField
.<K,
V> void MapFieldChangeListener.onMapFieldRemove
(Transaction tx, ObjId id, MapField<K, V> field, int[] path, NavigableSet<ObjId> referrers, K key, V value) Receive notification of the removal of an entry from aMapField
.<K,
V> void MapFieldChangeListener.onMapFieldReplace
(Transaction tx, ObjId id, MapField<K, V> field, int[] path, NavigableSet<ObjId> referrers, K key, V oldValue, V newValue) Receive notification of the change in value of an existing entry in aMapField
.void
SchemaChangeListener.onSchemaChange
(Transaction tx, ObjId id, SchemaId oldVersion, SchemaId newVersion, Map<String, Object> oldFieldValues) Receive notification of an object schema change.<E> void
SetFieldChangeListener.onSetFieldAdd
(Transaction tx, ObjId id, SetField<E> field, int[] path, NavigableSet<ObjId> referrers, E value) Receive notification of the addition of a new element to aSetField
.void
SetFieldChangeListener.onSetFieldClear
(Transaction tx, ObjId id, SetField<?> field, int[] path, NavigableSet<ObjId> referrers) Receive notification of the clearing of aSetField
.<E> void
SetFieldChangeListener.onSetFieldRemove
(Transaction tx, ObjId id, SetField<E> field, int[] path, NavigableSet<ObjId> referrers, E value) Receive notification of the removal of an element from aSetField
.<V> void
SimpleFieldChangeListener.onSimpleFieldChange
(Transaction tx, ObjId id, SimpleField<V> field, int[] path, NavigableSet<ObjId> referrers, V oldValue, V newValue) Receive notification of a change in the value of aSimpleField
in an object.void
SimpleField.setValue
(Transaction tx, ObjId id, T value) Set the value of this field in the given object.ModifierConstructorDescriptionDeletedObjectException
(Transaction tx, ObjId id) Constructor.Constructor.Constructor.StaleTransactionException
(Transaction tx, String message) Constructor.TransactionException
(Transaction tx, String message) Constructor. -
Uses of Transaction in io.permazen.core.util
Modifier and TypeMethodDescriptionFunction<? super Transaction,
? extends Stream<? extends ObjId>> XMLObjectSerializer.OutputOptions.objectGenerator()
Get the function that streams the objects to include in the output (identified byObjId
).Function<? super Transaction,
? extends Stream<? extends SchemaModel>> XMLObjectSerializer.OutputOptions.schemaGenerator()
Get the function that streams theSchemaModel
s to include in the output.Modifier and TypeMethodDescriptionGeneratedIdCache.getGeneratedId
(Transaction tx, String typeName, String string) Generate an object ID for the given object type name and string.static void
ObjDumper.print
(PrintWriter writer, Transaction tx, ObjId id, int maxCollectionEntries) Print the content of the given object's fields in a human readable format.static String
ObjDumper.toString
(Transaction tx, ObjId id, int maxCollectionEntries) Helper for Java model objectObject.toString()
methods that wish to display all fields in the object.Modifier and TypeMethodDescriptionXMLObjectSerializer.OutputOptions.Builder.objectGenerator
(Function<? super Transaction, ? extends Stream<? extends ObjId>> objectGenerator) Configure a custom function that streams the objects to include in the output (identified byObjId
).XMLObjectSerializer.OutputOptions.Builder.schemaGenerator
(Function<? super Transaction, ? extends Stream<? extends SchemaModel>> schemaGenerator) Configure a custom function that streams theSchemaModel
s to include in the output.