Package io.permazen
Class PermazenReferenceField
java.lang.Object
io.permazen.PermazenSchemaItem
io.permazen.PermazenField
io.permazen.PermazenSimpleField
io.permazen.PermazenReferenceField
Represents a reference field in a
PermazenClass or a reference sub-field of a complex field in a PermazenClass.-
Method Summary
Modifier and TypeMethodDescriptionGet aConverterthat converts this field's value from what the core database returns to what the Java application expects, or null if no conversion is needed.String[]Get this field's forward copy/find cascades.String[]Get this field's inverse copy/find cascades.Get the inverseDeleteActionconfigured for this field.Set<PermazenClass<?>>Get the database object types which this field is allowed to reference.Get the corresonding core API database instance.getValue(PermazenObject pobj) Get the Java value of this field in the given Java model object.booleanDetermine whether this field allows assignment to deleted objects in normal transactions.booleanDetermine whether the referred-to object should be deleted when an object containing this field is deleted.<R> Rvisit(PermazenFieldSwitch<R> target) Apply visitor pattern.Methods inherited from class io.permazen.PermazenSimpleField
getDeclaringAnnotation, getEncoding, getFullName, getIndex, getParentField, getSetter, getTypeToken, isIndexed, isSubField, setValueMethods inherited from class io.permazen.PermazenField
getGetter, getKey, getPermazenClassMethods inherited from class io.permazen.PermazenSchemaItem
getName, getSchemaId, getStorageId, toString
-
Method Details
-
getValue
Description copied from class:PermazenFieldGet the Java value of this field in the given Java model object. Does not alter the schema of the object.- Overrides:
getValuein classPermazenSimpleField- Parameters:
pobj- object containing this field- Returns:
- this field's value in
pobj
-
visit
Description copied from class:PermazenFieldApply visitor pattern.- Overrides:
visitin classPermazenSimpleField- Type Parameters:
R- visit return type- Parameters:
target- target to invoke- Returns:
- value from the method of
targetcorresponding to this instance's type
-
getConverter
Description copied from class:PermazenFieldGet aConverterthat converts this field's value from what the core database returns to what the Java application expects, or null if no conversion is needed.- Overrides:
getConverterin classPermazenSimpleField- Parameters:
ptx- transaction- Returns:
Converterfrom core API to Java, or null if no conversion is required
-
getInverseDelete
Get the inverseDeleteActionconfigured for this field.- Returns:
- this field's
DeleteAction
-
isForwardDelete
public boolean isForwardDelete()Determine whether the referred-to object should be deleted when an object containing this field is deleted.- Returns:
- this field's delete cascade setting
-
isAllowDeleted
public boolean isAllowDeleted()Determine whether this field allows assignment to deleted objects in normal transactions.- Returns:
- this field's deleted assignment setting for normal transactions
-
getForwardCascades
Get this field's forward copy/find cascades.The returned array is a copy; modifications to it have no effect.
- Returns:
- zero or more forward copy cascade names
-
getInverseCascades
Get this field's inverse copy/find cascades.The returned array is a copy; modifications to it have no effect.
- Returns:
- zero or more inverse copy cascade names
-
getObjectTypes
Get the database object types which this field is allowed to reference.- Returns:
- allowed object types to reference, or null if there is no restriction
-
getSchemaItem
Description copied from class:PermazenSchemaItemGet the corresonding core API database instance.- Overrides:
getSchemaItemin classPermazenSimpleField- Returns:
- this instance's correpsonding
SchemaItem
-