Package io.permazen
Class PermazenClass<T>
java.lang.Object
io.permazen.PermazenSchemaItem
io.permazen.PermazenClass<T>
- Type Parameters:
T
- the Java type that represents instances of this database object type
Represents a specific Permazen object type in a
Permazen
database.-
Method Summary
Modifier and TypeMethodDescriptionGet allPermazenCompositeIndex
's defined on thisPermazenClass
, indexed by name.<T extends PermazenField>
TGet the specifiedPermazenField
in this database object type, cast to the given Java type.Get allPermazenField
's associated with this instance, indexed by name.Get allPermazenField
's associated with this instance, indexed by storage ID.Get the corresonding core API database instance.getType()
Get the Java model object type associated with this instance.Methods inherited from class io.permazen.PermazenSchemaItem
getName, getSchemaId, getStorageId, toString
-
Method Details
-
getType
Get the Java model object type associated with this instance.- Returns:
- associated Java type
-
getFieldsByName
Get allPermazenField
's associated with this instance, indexed by name.The returned map does not include sub-fields of complex fields.
- Returns:
- read-only mapping from name to
PermazenField
-
getFieldsByStorageId
Get allPermazenField
's associated with this instance, indexed by storage ID.The returned map does not include sub-fields of complex fields.
- Returns:
- read-only mapping from storage ID to
PermazenField
-
getCompositeIndexesByName
Get allPermazenCompositeIndex
's defined on thisPermazenClass
, indexed by name.- Returns:
- read-only mapping from name to
PermazenCompositeIndex
-
getField
Get the specifiedPermazenField
in this database object type, cast to the given Java type.- Type Parameters:
T
- expected encoding- Parameters:
fieldName
- field nametype
- required type- Returns:
- corresponding
PermazenField
in this instance - Throws:
UnknownFieldException
- iffieldName
is not foundUnknownFieldException
- if the field is not an instance of oftype
IllegalArgumentException
- if either parameter is null
-
getSchemaItem
Description copied from class:PermazenSchemaItem
Get the corresonding core API database instance.- Overrides:
getSchemaItem
in classPermazenSchemaItem
- Returns:
- this instance's correpsonding
SchemaItem
-