Uses of Class
io.permazen.core.ObjId
Package
Description
Abstraction layer allowing access to a
Database
using normal Java objects.Permazen parsing related classes.
Core classes for the Permazen Java persistence layer.
Permazen core API utility classes.
Classes associated with
Jsck
, the Permazen key/value database consistency checker.-
Uses of ObjId in io.permazen
Modifier and TypeMethodDescriptionGet the object ID for the copy of the given source object.PermazenObject.getObjId()
Get this instance's unique Permazen object identifier.UpgradeConversionException.getObjId()
Get the ID of the object containing the field whose value could not be converted.Modifier and TypeMethodDescriptionFind all objects reachable through the specified reference cascades.PermazenReferenceField.getConverter
(PermazenTransaction ptx) ExportContext.getJObjectMap()
Get the mapping from already exported database object to the corresponding POJO.CopyState.getObjectIdMap()
Get the mapping from object ID in the source transaction to object ID to use in the destination transaction.ImportContext.getObjectMap()
Get the mapping from already imported POJO's to their corresponding database objects.Modifier and TypeMethodDescriptionFind all objects reachable through the specified reference cascades.boolean
Determine whether the object with the given object ID exists in this transaction.ExportContext.exportPlain
(ObjId id) Export thePermazenObject
with the givenObjId
as a plain Java object, along with all other objects reachable from it via copied reference fields.Get the Java model object that is associated with this transaction and has the given ID.<T> T
Get the Java model object that is associated with this transaction and has the given ID, cast to the given type.Get the object ID for the copy of the given source object.Permazen.getPermazenClass
(ObjId id) Get thePermazenClass
associated with the object ID.boolean
Determine if an object has been marked as copied.boolean
CopyState.markCopied
(ObjId srcId) Determine if an object has already been copied, and if not mark it so.PermazenTransaction.readCounterField
(ObjId id, String fieldName, boolean migrateSchema) Read a counter field.List<?>
PermazenTransaction.readListField
(ObjId id, String fieldName, boolean migrateSchema) Read a list field.NavigableMap<?,
?> PermazenTransaction.readMapField
(ObjId id, String fieldName, boolean migrateSchema) Read a map field.NavigableSet<?>
PermazenTransaction.readSetField
(ObjId id, String fieldName, boolean migrateSchema) Read a set field.PermazenTransaction.readSimpleField
(ObjId id, String fieldName, boolean migrateSchema) Read a simple field.void
PermazenTransaction.revalidate
(ObjId id, Class<?>... groups) Add the given instance to the validation queue for validation, which will occur either atPermazenTransaction.commit()
time or at the next invocation ofPermazenTransaction.validate()
, whichever occurs first.ModifierConstructorDescriptionUpgradeConversionException
(ObjId id, String fieldName, String message) Constructor.UpgradeConversionException
(ObjId id, String fieldName, String message, Throwable cause) Constructor.ModifierConstructorDescriptionDefault remapping constructor.Primary constructor.ExportContext
(PermazenTransaction ptx, Function<ObjId, Object> objectMapper) Constructor.ImportContext
(PermazenTransaction ptx, Function<Object, ObjId> objectIdMapper) Constructor. -
Uses of ObjId in io.permazen.cli.parse
Modifier and TypeMethodDescriptionstatic ObjInfo
ObjInfo.getObjInfo
(Session session, ObjId id) Get object meta-data.static Field<?>
ParseUtil.resolveField
(Session session, ObjId id, String fieldName) Locate the field with the given name in the specified object.static PermazenField
ParseUtil.resolveJField
(Session session, ObjId id, String name) Locate thePermazenField
with the given name in the specified object. -
Uses of ObjId in io.permazen.core
Modifier and TypeMethodDescriptionReferenceEncoding.checkAllowed
(ObjId id) Verify the reference target is permitted by this instance.<S> ObjId
ObjType.create
(Transaction tx) Create a new database object of this type in the given transaction.Create a new object with a randomly assigned object ID and having the given type.Create a new object with a randomly assigned object ID and having the given type and schema.ObjIdEncoding.fromString
(String string) Transaction.generateId
(String typeName) Generate a random, unusedObjId
for the given object type.DeletedObjectException.getId()
Get the ID of the object that could not be accessed.InvalidObjectVersionException.getId()
Get the ID of the object containing the invalid schema index.ReferencedObjectException.getId()
Get the ID of the object that could not be deleted because it was referenced.static ObjId
ObjId.getMax
(int storageId) Get the largest (i.e., last) instance having the given storage ID.static ObjId
ObjId.getMin
(int storageId) Get the smallest (i.e., first) instance having the given storage ID.InvalidReferenceException.getObjId()
Get theObjId
of the object that could not be assigned to the reference field due to disallowed object type.TypeNotInSchemaException.getObjId()
Get theObjId
of the object that could not be migrated.ReferencedObjectException.getReferrer()
Get the ID of the object that still refers to the object that was to be deleted.ObjIdEncoding.read
(ByteReader reader) protected ObjId
ReferenceField.remapObjectId
(ObjIdMap<ObjId> objectIdMap, ObjId srcId) Modifier and TypeMethodDescriptionTransaction.followReferencePath
(Stream<? extends ObjId> startObjects, int[] path, KeyRanges[] filters) Find all objects referred to by any object in the given start set through the specified path of references.Transaction.getAll()
Get all objects in the database.Get all objects whose object type has the specified name.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) static CoreIndex1<Integer,
ObjId> Layout.getSchemaIndex
(KVStore kv) Get aCoreIndex1
view of the object schema index in a key/value database.MapValueIndex.getValueIndex
(Transaction tx) Get this index's view of the given transaction, including entry key.Transaction.invertReferencePath
(int[] path, KeyRanges[] filters, Stream<? extends ObjId> targetObjects) Find all objects that refer to any object in the given target set through the specified path of references.CoreIndex2<?,
?, ObjId> Transaction.queryCompositeIndex2
(int storageId) Query aCompositeIndex
on two fields to find all value tuples stored in the corresponding field tuple and, for each value tuple, the set of all objects having those values in those fields.CoreIndex3<?,
?, ?, ObjId> Transaction.queryCompositeIndex3
(int storageId) Query aCompositeIndex
on three fields to find all value tuples stored in the corresponding field tuple and, for each value tuple, the set of all objects having those values in those fields.CoreIndex4<?,
?, ?, ?, ObjId> Transaction.queryCompositeIndex4
(int storageId) Query aCompositeIndex
on four fields to find all value tuples stored in the corresponding field tuple and, for each value tuple, the set of all objects having those values in those fields.Transaction.queryIndex
(int storageId) Query any simple or composite index.Transaction.queryListElementIndex
(int storageId) Query aListElementIndex
to find all values stored in some list field and, for each value, the set of all objects having that value as an element in the list and the corresponding list index.CoreIndex2<?,
ObjId, ?> Transaction.queryMapValueIndex
(int storageId) Query aMapValueIndex
to find all values stored in some map field and, for each value, the set of all objects having that value as a value in the map and the corresponding key.Transaction.querySchemaIndex()
Query objects by schema.CoreIndex1<?,
ObjId> Transaction.querySimpleIndex
(int storageId) Query aSimpleIndex
to find all values stored in some field and, for each value, the set of all objects having that value in the field.Modifier and TypeMethodDescriptionvoid
Transaction.adjustCounterField
(ObjId id, String name, long offset, boolean migrateSchema) Adjust the value of aCounterField
in an object by some amount, optionally updating the object's schema.static byte[]
Layout.buildSchemaIndexKey
(ObjId id, int schemaIndex) Build the key for an object schema index entry.ReferenceEncoding.checkAllowed
(ObjId id) Verify the reference target is permitted by this instance.int
int
boolean
Transaction.copy
(ObjId source, Transaction dest, boolean migrateSchema, boolean notifyListeners, ObjIdMap<ReferenceField> deletedAssignments, ObjIdMap<ObjId> objectIdMap) Copy an object into a (possibly different) transaction.boolean
Create a new object with the given object ID, if it doesn't already exist.boolean
Create a new object with the given object ID, if it doesn't already exist.boolean
Delete an object.boolean
Determine if an object exists.Transaction.getFieldDescription
(ObjId id, String name) Get a description of the given object field.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to this field in the specified object.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to the given value tuple and target object in this index.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to this field in the specified object and the specified list index.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to this field in the specified object and the specified map key.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to this field in the specified object and the specified element.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to the given value and target object in this index.byte[]
Get thebyte[]
key prefix in the underlying key/value store corresponding to the specified object.Transaction.getObjDescription
(ObjId id) Get a description of the given object.Transaction.getObjType
(ObjId id) Get the given object'sObjType
.Transaction.getTypeDescription
(ObjId id) Get a description of the given object's type.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) 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) boolean
Transaction.migrateSchema
(ObjId id) Migrate the specified object, if necessary, to the schema associated with this transaction.void
CreateListener.onCreate
(Transaction tx, ObjId id) Receive notification of a new object being created.void
DeleteListener.onDelete
(Transaction tx, ObjId id) Receive notification of an object being 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.long
Transaction.readCounterField
(ObjId id, String name, boolean migrateSchema) Read the value of aCounterField
from an object, optionally updating the object's schema.List<?>
Transaction.readListField
(ObjId id, String name, boolean migrateSchema) Access aListField
associated with an object, optionally updating the object's schema.NavigableMap<?,
?> Transaction.readMapField
(ObjId id, String name, boolean migrateSchema) Access aMapField
associated with an object, optionally updating the object's schema.NavigableSet<?>
Transaction.readSetField
(ObjId id, String name, boolean migrateSchema) Access aSetField
associated with an object, optionally updating the object's schema.Transaction.readSimpleField
(ObjId id, String name, boolean migrateSchema) Read the value of aSimpleField
from an object, optionally migrating the object's schema.protected ObjId
ReferenceField.remapObjectId
(ObjIdMap<ObjId> objectIdMap, ObjId srcId) void
SimpleField.setValue
(Transaction tx, ObjId id, T value) Set the value of this field in the given object.void
ObjIdEncoding.write
(ByteWriter writer, ObjId id) void
ReferenceEncoding.write
(ByteWriter writer, ObjId id) void
Transaction.writeCounterField
(ObjId id, String name, long value, boolean migrateSchema) Set the value of aCounterField
in an object, optionally updating the object's schema.void
Transaction.writeSimpleField
(ObjId id, String name, Object value, boolean migrateSchema) Change the value of aSimpleField
in an object, optionally updating the object's schema.Modifier and TypeMethodDescriptionTransaction.followReferencePath
(Stream<? extends ObjId> startObjects, int[] path, KeyRanges[] filters) Find all objects referred to by any object in the given start set through the specified path of references.Transaction.invertReferencePath
(int[] path, KeyRanges[] filters, Stream<? extends ObjId> targetObjects) Find all objects that refer to any object in the given target set through the specified path of references.<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
.<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.protected ObjId
ReferenceField.remapObjectId
(ObjIdMap<ObjId> objectIdMap, ObjId srcId) protected T
SimpleField.remapObjectId
(ObjIdMap<ObjId> objectIdMap, T value) ModifierConstructorDescriptionConstructor.DeletedObjectException
(ObjId id, String message) Constructor.DeletedObjectException
(Transaction tx, ObjId id) Constructor.InvalidReferenceException
(ObjId id, String typeName, Set<String> objectTypes) Constructor.TypeNotInSchemaException
(ObjId id, String typeName, Schema schema) Constructor. -
Uses of ObjId in io.permazen.core.util
Modifier and TypeMethodDescriptionGeneratedIdCache.getGeneratedId
(Transaction tx, String typeName, String string) Generate an object ID for the given object type name and string.ObjIdQueue.next()
Remove and return the nextObjId
from this queue.ObjIdSet.removeOne()
Remove a single, arbitraryObjId
from this instance and return it.ObjId[]
ObjIdSet.toArray()
Modifier and TypeMethodDescriptionObjIdMap.entrySet()
ObjIdSet.iterator()
ObjIdMap.removeOne()
Remove a single, arbitrary entry from this instance and return it.ObjIdSet.sortedSnapshot()
Create a sorted, immutable snapshot of this instance.Modifier and TypeMethodDescriptionboolean
Add an association.void
Add anObjId
to this queue.boolean
boolean
Add multiple associations with a given source.boolean
ObjIdBiMultiMap.containsSource
(ObjId source) Determine if this instance has any targets associated with the specified source.boolean
ObjIdBiMultiMap.containsTarget
(ObjId target) Determine if this instance has any sources associated with the specified target.ObjIdBiMultiMap.getSources
(ObjId target) Get the sources associated with the given target, if any.ObjIdBiMultiMap.getTargets
(ObjId source) Get the targets associated with the given source, if any.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.boolean
Remove an association.boolean
Remove multiple associations with a given source.boolean
ObjIdBiMultiMap.removeSource
(ObjId source) Remove all associations involving the specified source.boolean
ObjIdBiMultiMap.removeTarget
(ObjId target) Remove all associations involving the specified target.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 TypeMethodDescriptionboolean
Add multiple associations with a given source.boolean
Remove multiple associations with a given source.int
XMLObjectSerializer.write
(XMLStreamWriter writer, boolean customFormat, Stream<? extends ObjId> objIds) Export the specified objects from theTransaction
associated with this instance to the given XML output. -
Uses of ObjId in io.permazen.jsck