Package io.permazen.core
Class InvalidReferenceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
io.permazen.core.InvalidReferenceException
- All Implemented Interfaces:
Serializable
Thrown when attempting to set a reference field to a disallowed object type.
-
Constructor Summary
ConstructorDescriptionInvalidReferenceException
(ObjId id, String typeName, Set<String> objectTypes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the set of object types that are allowed to be referenced by the reference field.getObjId()
Get theObjId
of the object that could not be assigned to the reference field due to disallowed object type.Get the name of the object type that could not be assigned to the reference field due to disallowed object type.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidReferenceException
Constructor.- Parameters:
id
- offending object's IDtypeName
- offending object's typeobjectTypes
- allowed object types- Throws:
IllegalArgumentException
- if any parameter is null
-
-
Method Details
-
getObjId
Get theObjId
of the object that could not be assigned to the reference field due to disallowed object type.- Returns:
- the object having disallowed type
-
getTypeName
Get the name of the object type that could not be assigned to the reference field due to disallowed object type.- Returns:
- offending type name
-
getObjectTypes
Get the set of object types that are allowed to be referenced by the reference field.- Returns:
- set of allowed object type names
-