Class InvalidReferenceException

All Implemented Interfaces:
Serializable

public class InvalidReferenceException extends IllegalArgumentException
Thrown when attempting to set a reference field to a disallowed object type.
See Also:
  • Constructor Details

    • InvalidReferenceException

      public InvalidReferenceException(ObjId id, String typeName, Set<String> objectTypes)
      Constructor.
      Parameters:
      id - offending object's ID
      typeName - offending object's type
      objectTypes - allowed object types
      Throws:
      IllegalArgumentException - if any parameter is null
  • Method Details

    • getObjId

      public ObjId getObjId()
      Get the ObjId of the object that could not be assigned to the reference field due to disallowed object type.
      Returns:
      the object having disallowed type
    • getTypeName

      public String 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

      public Set<String> getObjectTypes()
      Get the set of object types that are allowed to be referenced by the reference field.
      Returns:
      set of allowed object type names