Interface ForeignKeyProperty

  • All Superinterfaces:

    public interface ForeignKeyProperty
    extends Property<Entity>
    A property that represents a reference to another entity, typically but not necessarily based on a foreign key.
    • Method Detail

      • attribute

        ForeignKey attribute()
        Description copied from interface: Property
        The Attribute this property is based on, should be unique within an Entity. By default, the serves as column name for database properties.
        Specified by:
        attribute in interface Property<Entity>
        the foreign key attribute this property is based on.
      • referencedType

        EntityType referencedType()
        the type of the entity referenced by this foreign key
      • fetchDepth

        int fetchDepth()
        the default query fetch depth for this foreign key
      • isSoftReference

        boolean isSoftReference()
        true if this foreign key is not based on a physical (table) foreign key and should not prevent deletion
      • isReadOnly

        boolean isReadOnly​(Attribute<?> referenceAttribute)
        Returns true if the given foreign key reference attribute as read-only, as in, not updated when the foreign key value is set.
        referenceAttribute - the reference attribute
        true if the given foreign key reference attribute as read-only
      • selectAttributes

        List<Attribute<?>> selectAttributes()
        the attributes to select when fetching entities referenced via this foreign key, an empty list in case of all attributes