Top Description Fields Constructors Methods
org.jooq.impl

public Class TableRecordImpl<R extends org.jooq.TableRecord<R>>

extends AbstractQualifiedRecord<R extends TableRecord<R>>
implements TableRecord<R extends TableRecord<R>>
Class Inheritance
All Implemented Interfaces
org.jooq.TableRecord, org.jooq.QualifiedRecord, java.sql.SQLData, org.jooq.Record, org.jooq.Formattable, java.lang.Comparable, org.jooq.Attachable, java.io.Serializable, org.jooq.Fields
Known Direct Subclasses
org.jooq.impl.CustomRecord, org.jooq.impl.UpdatableRecordImpl
Annotations
@Internal
Static Imports
java.lang.Boolean.FALSE, .Boolean.TRUE, java.util.Arrays.asList, org.jooq.SQLDialect.DERBY, .SQLDialect.H2, .SQLDialect.HSQLDB, .SQLDialect.MARIADB, .SQLDialect.MYSQL, org.jooq.conf.SettingsTools.returnAnyNonIdentityOnUpdatableRecord, .SettingsTools.returnAnyOnUpdatableRecord, .SettingsTools.updatablePrimaryKeys, .WriteIfReadonly.IGNORE, .WriteIfReadonly.THROW, .WriteIfReadonly.WRITE, org.jooq.impl.RecordDelegate.delegate, .RecordDelegate.RecordLifecycleType.INSERT, .Tools.EMPTY_FIELD, .Tools.collect, .Tools.filter, .Tools.indexOrFail, .Tools.isEmpty, .Tools.let, .Tools.settings, org.jooq.tools.StringUtils.defaultIfNull

A record implementation for a record originating from a single table

This type is for JOOQ INTERNAL USE only. Do not reference directly

Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
private static final JooqLogger
private static final Set<SQLDialect>
private static final Set<SQLDialect>
private static final long[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv final List<Field<?>>
addChangedValues(Field<?>[] storeFields, StoreQuery<R> query, boolean forUpdate)

Deprecated as a consequence of Field being deprecated.
Set all changed values of this record to a store query.
pack-priv final Timestamp
addRecordTimestamp(StoreQuery<?> store, boolean forUpdate)

Set an updated timestamp value to a store query

pack-priv final BigInteger
addRecordVersion(StoreQuery<?> store, boolean forUpdate)

Set an updated version value to a store query

pack-priv final <T> void
addValue(StoreQuery<?> store, Field<T> field, Object value, boolean forUpdate)

Deprecated as a consequence of Field being deprecated.
Extracted method to ensure generic type safety.
pack-priv final <T> void
addValue(StoreQuery<?> store, Field<T> field, boolean forUpdate)

Deprecated as a consequence of Field being deprecated.
Extracted method to ensure generic type safety.
public final <O extends UpdatableRecord<O>> O
fetchParent(ForeignKey<R, O> key)

Implements org.jooq.TableRecord.fetchParent.

Fetch a parent record of this record, given a foreign key.
pack-priv final Object
pack-priv final Object
pack-priv final Collection<Field<?>>
pack-priv final void
public final Table<R>
getTable()

Implements org.jooq.TableRecord.getTable.

The table from which this record was read.
public final int
insert()

Implements org.jooq.TableRecord.insert.

Store this record to the database using an INSERT statement.
public final int
insert(Field<?>... storeFields)

Implements org.jooq.TableRecord.insert.

Deprecated as a consequence of Field being deprecated.
Store parts of this record to the database using an INSERT statement.
public final int
insert(Collection<? extends Field<?>> storeFields)

Implements org.jooq.TableRecord.insert.

Store parts of this record to the database using an INSERT statement.
pack-priv final boolean
pack-priv final boolean
pack-priv final boolean
public final R
original()

Overrides org.jooq.impl.AbstractRecord.original.

Implements org.jooq.TableRecord.original, org.jooq.Record.original.

Get this record containing the original values as fetched from the database.
public final <O extends UpdatableRecord<O>> Table<O>
parent(ForeignKey<R, O> key)

Implements org.jooq.TableRecord.parent.

Get a table expression representing the parent of this record, given a foreign key.
pack-priv final void
setRecordVersionAndTimestamp(BigInteger version, Timestamp timestamp)

Set a generated version and timestamp value onto this record after successfully storing the record.

pack-priv final Collection<Field<?>>
pack-priv final int
storeInsert(final Field<?>[] storeFields)

Deprecated as a consequence of Field being deprecated.
pack-priv final int
storeInsert0(Field<?>[] storeFields)

Deprecated as a consequence of Field being deprecated.
private static final Timestamp
pack-priv final boolean
writable(Field<?> field, boolean forUpdate)

Deprecated as a consequence of Field being deprecated.
Inherited from org.jooq.impl.AbstractQualifiedRecord:
fieldsRowgetQualifiergetSQLTypeNamereadSQLvaluesRowwithwithwriteSQL

Field Detail

logback to summary
private static final JooqLogger log
REFRESH_GENERATED_KEYSback to summary
private static final Set<SQLDialect> REFRESH_GENERATED_KEYS
REFRESH_GENERATED_KEYS_ON_UPDATEback to summary
private static final Set<SQLDialect> REFRESH_GENERATED_KEYS_ON_UPDATE
TRUNCATEback to summary
private static final long[] TRUNCATE

Constructor Detail

TableRecordImplback to summary
public TableRecordImpl(Table<R> table)

Method Detail

addChangedValuesback to summary
pack-priv final List<Field<?>> addChangedValues(Field<?>[] storeFields, StoreQuery<R> query, boolean forUpdate)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Set all changed values of this record to a store query.

addRecordTimestampback to summary
pack-priv final Timestamp addRecordTimestamp(StoreQuery<?> store, boolean forUpdate)

Set an updated timestamp value to a store query

addRecordVersionback to summary
pack-priv final BigInteger addRecordVersion(StoreQuery<?> store, boolean forUpdate)

Set an updated version value to a store query

addValueback to summary
pack-priv final <T> void addValue(StoreQuery<?> store, Field<T> field, Object value, boolean forUpdate)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Extracted method to ensure generic type safety.

addValueback to summary
pack-priv final <T> void addValue(StoreQuery<?> store, Field<T> field, boolean forUpdate)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Extracted method to ensure generic type safety.

fetchParentback to summary
public final <O extends UpdatableRecord<O>> O fetchParent(ForeignKey<R, O> key)

Implements org.jooq.TableRecord.fetchParent.

Doc from org.jooq.TableRecord.fetchParent.

Fetch a parent record of this record, given a foreign key.

This returns a parent record referenced by this record through a given foreign key, as if fetching from parent(ForeignKey). If no parent record was found, this returns null.

A separate roundtrip is created by this operation. It is often much better to include parent records using ordinary JOIN mechanisms in a single query, or using nested records, see https://www.jooq.org/doc/latest/manual/sql-building/column-expressions/nested-records/.

Annotations
@SuppressWarnings:unchecked
@Override
getRecordTimestampback to summary
pack-priv final Object getRecordTimestamp()
getRecordVersionback to summary
pack-priv final Object getRecordVersion()
getReturningback to summary
pack-priv final Collection<Field<?>> getReturning(StoreQuery<R> query)
getReturningIfNeededback to summary
pack-priv final void getReturningIfNeeded(StoreQuery<R> query, Collection<Field<?>> key)
getTableback to summary
public final Table<R> getTable()

Implements org.jooq.TableRecord.getTable.

Doc from org.jooq.TableRecord.getTable.

The table from which this record was read.

Annotations
@Override
insertback to summary
public final int insert()

Implements org.jooq.TableRecord.insert.

Doc from org.jooq.TableRecord.insert.

Store this record to the database using an INSERT statement.

If you want to enforce re-insertion this record's values, regardless if the values in this record were changed, you can explicitly set the changed flags for all values with changed(boolean) or for single values with changed(Field, boolean), prior to insertion.

Returns:int

1 if the record was stored to the database. 0 if storing was not necessary and Settings#isInsertUnchangedRecords() is set to false.

Annotations
@Override
insertback to summary
public final int insert(Field<?>... storeFields)

Implements org.jooq.TableRecord.insert.

Doc from org.jooq.TableRecord.insert.

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Store parts of this record to the database using an INSERT statement.

Returns:int

1 if the record was stored to the database. 0 if storing was not necessary.

Annotations
@Override
insertback to summary
public final int insert(Collection<? extends Field<?>> storeFields)

Implements org.jooq.TableRecord.insert.

Doc from org.jooq.TableRecord.insert.

Store parts of this record to the database using an INSERT statement.

Returns:int

1 if the record was stored to the database. 0 if storing was not necessary.

Annotations
@Override
isTimestampOrVersionAvailableback to summary
pack-priv final boolean isTimestampOrVersionAvailable()
isUpdateRecordTimestampback to summary
pack-priv final boolean isUpdateRecordTimestamp()
isUpdateRecordVersionback to summary
pack-priv final boolean isUpdateRecordVersion()
originalback to summary
public final R original()

Overrides org.jooq.impl.AbstractRecord.original.

Implements org.jooq.TableRecord.original, org.jooq.Record.original.

Doc from org.jooq.Record.original.

Get this record containing the original values as fetched from the database.

Record values can be freely modified after having fetched a record from the database. Every record also references the originally fetched values. This method returns a new record containing those original values.

Annotations
@SuppressWarnings:unchecked
@Override
parentback to summary
public final <O extends UpdatableRecord<O>> Table<O> parent(ForeignKey<R, O> key)

Implements org.jooq.TableRecord.parent.

Doc from org.jooq.TableRecord.parent.

Get a table expression representing the parent of this record, given a foreign key.

Annotations
@SuppressWarnings:unchecked
@Override
setRecordVersionAndTimestampback to summary
pack-priv final void setRecordVersionAndTimestamp(BigInteger version, Timestamp timestamp)

Set a generated version and timestamp value onto this record after successfully storing the record.

setReturningIfNeededback to summary
pack-priv final Collection<Field<?>> setReturningIfNeeded(StoreQuery<R> query)
storeInsertback to summary
pack-priv final int storeInsert(final Field<?>[] storeFields)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

storeInsert0back to summary
pack-priv final int storeInsert0(Field<?>[] storeFields)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

truncateback to summary
private static final Timestamp truncate(Timestamp ts, DataType<?> type)
writableback to summary
pack-priv final boolean writable(Field<?> field, boolean forUpdate)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.