Class ForeignKey

    • Constructor Detail

      • ForeignKey

        public ForeignKey()
    • Method Detail

      • getExportIdentifier

        public java.lang.String getExportIdentifier()
        Description copied from interface: Exportable
        Get a unique identifier to make sure we are not exporting the same database structure multiple times.
        The exporting identifier.
      • disableCreation

        public void disableCreation()
      • isCreationEnabled

        public boolean isCreationEnabled()
      • setName

        public void setName​(java.lang.String name)
        setName in class Constraint
      • sqlConstraintString

        public java.lang.String sqlConstraintString​(Dialect dialect,
                                                    java.lang.String constraintName,
                                                    java.lang.String defaultCatalog,
                                                    java.lang.String defaultSchema)
        Specified by:
        sqlConstraintString in class Constraint
      • getReferencedTable

        public Table getReferencedTable()
      • alignColumns

        public void alignColumns()
        Validates that columnspan of the foreignkey and the primarykey is the same.

        Furthermore it aligns the length of the underlying tables columns.

      • getReferencedEntityName

        public java.lang.String getReferencedEntityName()
      • setReferencedEntityName

        public void setReferencedEntityName​(java.lang.String referencedEntityName)
      • getKeyDefinition

        public java.lang.String getKeyDefinition()
      • setKeyDefinition

        public void setKeyDefinition​(java.lang.String keyDefinition)
      • isCascadeDeleteEnabled

        public boolean isCascadeDeleteEnabled()
      • setCascadeDeleteEnabled

        public void setCascadeDeleteEnabled​(boolean cascadeDeleteEnabled)
      • isPhysicalConstraint

        public boolean isPhysicalConstraint()
      • getReferencedColumns

        public java.util.List getReferencedColumns()
        Returns the referenced columns if the foreignkey does not refer to the primary key
      • isReferenceToPrimaryKey

        public boolean isReferenceToPrimaryKey()
        Does this foreignkey reference the primary key of the reference table
      • addReferencedColumns

        public void addReferencedColumns​(java.util.Iterator referencedColumnsIterator)
      • generatedConstraintNamePrefix

        public java.lang.String generatedConstraintNamePrefix()
        Specified by:
        generatedConstraintNamePrefix in class Constraint
        String The prefix to use in generated constraint names. Examples: "UK_", "FK_", and "PK_".