All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.util.rdb.RdbForeignKeyColumn Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package cdc.util.rdb;

/**
 * Foreign key column description.
 * 

* Its parent is a Foreign key.
* Its name must be unique.
* Its is a leaf. * * @author Damien Carbonne * */ public final class RdbForeignKeyColumn extends RdbElement { private short ordinal; private String refColumnName; protected RdbForeignKeyColumn(String name, RdbForeignKey parent) { super(name, parent, false); } @Override public RdbElementKind getKind() { return RdbElementKind.FOREIGN_KEY_COLUMN; } @Override public RdbForeignKey getParent() { return (RdbForeignKey) super.getParent(); } public short getOrdinal() { return ordinal; } public void setOrdinal(short ordinal) { this.ordinal = ordinal; } public String getRefColumnName() { return refColumnName; } public void setRefColumnName(String refColumnName) { this.refColumnName = refColumnName; } public RdbPrimaryKeyColumn getRefColumn() { final RdbTable refTable = getParent().getRefTable(); return refTable == null ? null : refTable.getOptionalPrimaryKey().getOptionalColumn(refColumnName); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy