org.jooq
Interface UpdatableTable<R extends Record>

Type Parameters:
R - The record type of the table
All Superinterfaces:
Adapter, AliasProvider<Table<R>>, Attachable, Comparable<NamedQueryPart>, FieldProvider, NamedQueryPart, QueryPart, SchemaProvider, Serializable, Table<R>, TableLike<R>, Type<R>, Updatable<R>
All Known Implementing Classes:
UpdatableTableImpl

public interface UpdatableTable<R extends Record>
extends Updatable<R>, Table<R>

A common interface for tables whose records can be stored back to the database again.

Author:
Lukas Eder
See Also:
UpdatableRecord

Method Summary
 List<UniqueKey<R>> getKeys()
          Retrieve all of the table's unique keys.
 UniqueKey<R> getMainKey()
          Retrieve the table's main unique key.
<O extends Record>
List<ForeignKey<O,R>>
getReferencesFrom(Table<O> other)
          Get a list of FOREIGN KEY's of a specific table, referencing a this table.
 
Methods inherited from interface org.jooq.Table
crossJoin, crossJoin, crossJoin, divideBy, fullOuterJoin, fullOuterJoin, fullOuterJoin, getIdentity, getReferences, getReferencesTo, join, join, join, leftOuterJoin, leftOuterJoin, leftOuterJoin, naturalJoin, naturalJoin, naturalJoin, naturalLeftOuterJoin, naturalLeftOuterJoin, naturalLeftOuterJoin, naturalRightOuterJoin, naturalRightOuterJoin, naturalRightOuterJoin, pivot, pivot, rightOuterJoin, rightOuterJoin, rightOuterJoin
 
Methods inherited from interface org.jooq.Type
getRecordType
 
Methods inherited from interface org.jooq.NamedQueryPart
getName
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.jooq.FieldProvider
getField, getField, getField, getFields, getIndex
 
Methods inherited from interface org.jooq.SchemaProvider
getSchema
 
Methods inherited from interface org.jooq.AliasProvider
as
 
Methods inherited from interface org.jooq.TableLike
asTable, asTable
 

Method Detail

getMainKey

UniqueKey<R> getMainKey()
Retrieve the table's main unique key. If there exists a PRIMARY KEY in the table, the PRIMARY KEY is returned. Otherwise, the most suitable UNIQUE KEY is returned.

Returns:
The main key. This is never null because UpdatableTable's always have at least one key.

getKeys

List<UniqueKey<R>> getKeys()
Retrieve all of the table's unique keys.

Returns:
All keys. This is never null or empty, because UpdatableTable's always have at least one key. This method returns an unmodifiable list.

getReferencesFrom

<O extends Record> List<ForeignKey<O,R>> getReferencesFrom(Table<O> other)
Get a list of FOREIGN KEY's of a specific table, referencing a this table.

Type Parameters:
O - The other table's record type
Parameters:
other - The other table of the foreign key relationship
Returns:
Some other table's FOREIGN KEY's towards an this table. This is never null. This method returns an unmodifiable list.


Copyright © 2012. All Rights Reserved.