Class ReferenceDataType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<DataType>

    public class ReferenceDataType
    extends DataType
    A ReferenceDataType specifies a particular concrete document type that a ReferenceFieldValue instance binds to.
    Author:
    vekterli
    See Also:
    Serialized Form
    • Field Detail

      • classId

        public static final int classId
    • Constructor Detail

      • ReferenceDataType

        public ReferenceDataType​(DocumentType targetType,
                                 int id)
      • ReferenceDataType

        public ReferenceDataType​(TemporaryStructuredDataType temporaryTargetType,
                                 int id)
        Constructor used when building a multi document type model where the concrete instance of the target document type might not yet be known. The temporary data type should be replaced later using setTargetType().
    • Method Detail

      • createWithInferredId

        public static ReferenceDataType createWithInferredId​(DocumentType targetType)
        Creates a new type where the numeric ID is based on the hash of targetType
      • setTargetType

        public void setTargetType​(StructuredDataType targetType)
        Overrides the stored temporary data type with a concrete StructuredDataType instance. Should only be invoked from configuration or model code when resolving temporary types.
        Throws:
        java.lang.IllegalStateException - if the previously stored target type is already a concrete instance (not TemporaryStructuredDataType).
      • equals

        public boolean equals​(java.lang.Object rhs)
        Overrides:
        equals in class DataType