Class PrimaryKey

    • Constructor Detail

      • PrimaryKey

        public PrimaryKey()
    • Method Detail

      • getContainingObjects

        public DatabaseObject[] getContainingObjects()
      • getName

        public String getName()
      • setName

        public PrimaryKey setName​(String name)
        Description copied from interface: DatabaseObject
        Sets the name for the database object.
        name - the new name for the database object
        a reference to the same object (implementing classes are expected to return a reference to the same object).
      • getSchema

        public Schema getSchema()
      • getColumnNames

        public String getColumnNames()
      • addColumn

        public PrimaryKey addColumn​(int position,
                                    Column column)
        Adds a new column to the column list of this PrimaryKey. The first column has the position 0. If you specify a position that is greater than the number of columns present, undefined columns (NULL expressions) will be added as padding. If a position that is already occupied by a column is specified, that column will be replaced.
        position - the position where to insert or replace the column
        column - the new column
        a reference to the updated PrimaryKey object.
      • getTable

        public Table getTable()
        Returns the Table object this PrimaryKey belongs to.
        the Table object, or null if not initialized yet.
      • setTable

        public PrimaryKey setTable​(Table table)
        Sets the Table object this PrimaryKey belongs to.
        table - the table object to set as the container for this PrimaryKey
        the updated object
      • hashCode

        public int hashCode()
        hashCode in class Object
      • getColumnNamesAsList

        public List<String> getColumnNamesAsList()
      • isCertainName

        public boolean isCertainName()
      • setCertainName

        public PrimaryKey setCertainName​(boolean certainName)
      • getTablespace

        public String getTablespace()
      • getBackingIndex

        public Index getBackingIndex()
      • setBackingIndex

        public PrimaryKey setBackingIndex​(Index backingIndex)
      • setShouldValidate

        public PrimaryKey setShouldValidate​(boolean shouldValidate)
        shouldValidate - - if shouldValidate is set to FALSE then the constraint will be created with the 'ENABLE NOVALIDATE' mode. This means the constraint would be created, but that no check will be done to ensure old data has valid primary keys - only new data would be checked to see if it complies with the constraint logic. The default state for primary keys is to have 'ENABLE VALIDATE' set.