Class PrimaryKeyRecognisor

  • Direct Known Subclasses:
    UIDBasedPKRecognisor

    public class PrimaryKeyRecognisor
    extends java.lang.Object
    A Helper class to capture naming conventions of databases.

    While databases have a mechanism to identify Primary Keys, some don't use it.

    However there is often a naming convention that makes it obvious that a column is a PK.

    Extend the methods of this class to help DBvolution automatically recognize the PKs within your schema.

    Support DBvolution at Patreon

    Author:
    Gregory Graham
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isPrimaryKeyColumn​(java.lang.String tableName, java.lang.String columnName)
      Default implementation, returns FALSE
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrimaryKeyRecognisor

        public PrimaryKeyRecognisor()
    • Method Detail

      • isPrimaryKeyColumn

        public boolean isPrimaryKeyColumn​(java.lang.String tableName,
                                          java.lang.String columnName)
        Default implementation, returns FALSE
        Parameters:
        tableName - tableName
        columnName - columnName

        Support DBvolution at Patreon

        Returns:
        TRUE if the column is a PRimary Key, otherwise FALSE.