public class TableRecordImpl<R extends TableRecord<R>> extends Object implements TableRecord<R>
This type is for JOOQ INTERNAL USE only. Do not reference directly
| Constructor and Description |
|---|
TableRecordImpl(Table<R> table) |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(Configuration c)
Attach this object to a new
Configuration. |
boolean |
changed()
Check if this record has been changed from its original as fetched from
the database.
|
void |
changed(boolean c)
Set all of this record's internal changed flags to the supplied value.
|
boolean |
changed(Field<?> field)
Check if a field's value has been changed from its original as fetched
from the database.
|
void |
changed(Field<?> field,
boolean c)
Set this record's internal changed flag to the supplied value for a given
field.
|
boolean |
changed(int fieldIndex)
Check if a field's value has been changed from its original as fetched
from the database.
|
void |
changed(int fieldIndex,
boolean c)
Set this record's internal changed flag to the supplied value for a given
field.
|
boolean |
changed(Name fieldName)
Check if a field's value has been changed from its original as fetched
from the database.
|
void |
changed(Name fieldName,
boolean c)
Set this record's internal changed flag to the supplied value for a given
field.
|
boolean |
changed(String fieldName)
Check if a field's value has been changed from its original as fetched
from the database.
|
void |
changed(String fieldName,
boolean c)
Set this record's internal changed flag to the supplied value for a given
field.
|
int |
compareTo(Record that)
Compares this
Record with another Record
according to their natural ordering. |
Configuration |
configuration()
|
protected DSLContext |
create()
Deprecated.
- 3.11.0 - [#6720] [#6721] - Use
Attachable.configuration() and
Configuration.dsl() instead. |
void |
detach()
Detach this object from its current
Configuration. |
boolean |
equals(Object obj) |
<O extends UpdatableRecord<O>> |
fetchParent(ForeignKey<R,O> key)
Fetch a parent record of this record, given a foreign key.
|
<T> Field<T> |
field(Field<T> field)
Get a specific field from this Record.
|
Field<?> |
field(int index)
Get a specific field from this Record.
|
Field<?> |
field(Name name)
Get a specific qualified field from this Record.
|
Field<?> |
field(String name)
Get a specific field from this Record.
|
Field<?>[] |
fields()
Get all fields from this Record.
|
Field<?>[] |
fields(Field<?>... f)
Get all fields from this Record, providing some fields.
|
Field<?>[] |
fields(int... fieldIndexes)
Get all fields from this Record, providing some field indexes.
|
Field<?>[] |
fields(Name... fieldNames)
Get all fields from this Record, providing some field names.
|
Field<?>[] |
fields(String... fieldNames)
Get all fields from this Record, providing some field names.
|
Row |
fieldsRow()
Get this record's fields as a
Row. |
String |
format()
Get a simple formatted representation of this result as a text table.
|
void |
format(OutputStream stream)
Like
Record.format(), but the data is output onto an OutputStream. |
void |
format(OutputStream stream,
TXTFormat format)
Like
Record.format(TXTFormat), but the data is output onto an OutputStream. |
String |
format(TXTFormat format)
Get a simple formatted representation of this result as a text data
structure, according to the format.
|
void |
format(Writer writer)
Like
Record.format(), but the data is output onto a Writer. |
void |
format(Writer writer,
TXTFormat format)
Like
Record.format(TXTFormat), but the data is output onto a Writer. |
String |
formatJSON()
Get a simple formatted representation of this result as a JSON array.
|
String |
formatJSON(JSONFormat format)
Get a simple formatted representation of this result as a JSON data
structure, according to the format.
|
void |
formatJSON(OutputStream stream)
Like
Record.formatJSON(), but the data is output onto an OutputStream. |
void |
formatJSON(OutputStream stream,
JSONFormat format)
Like
Record.formatJSON(JSONFormat), but the data is output onto an OutputStream. |
void |
formatJSON(Writer writer)
Like
Record.formatJSON(), but the data is output onto a Writer. |
void |
formatJSON(Writer writer,
JSONFormat format)
Like
Record.formatJSON(JSONFormat), but the data is output onto a Writer. |
String |
formatXML()
Get this record formatted as XML.
|
void |
formatXML(OutputStream stream)
Like
Record.formatXML(), but the data is output onto an OutputStream. |
void |
formatXML(OutputStream stream,
XMLFormat format)
Like
Record.formatXML(XMLFormat), but the data is output onto an OutputStream. |
void |
formatXML(Writer writer)
Like
Record.formatXML(), but the data is output onto a Writer. |
void |
formatXML(Writer writer,
XMLFormat format)
Like
Record.formatXML(XMLFormat), but the data is output onto a Writer. |
String |
formatXML(XMLFormat format)
Get this record formatted as XML.
|
void |
from(Object source)
Load data into this record from a source.
|
void |
from(Object source,
Field<?>... f)
Load data into this record from a source, providing some fields.
|
void |
from(Object source,
int... fieldIndexes)
Load data into this record from a source, providing some field indexes.
|
void |
from(Object source,
Name... fieldNames)
Load data into this record from a source, providing some field names.
|
void |
from(Object source,
String... fieldNames)
Load data into this record from a source, providing some field names.
|
protected void |
from(Record source)
This method was implemented with [#799].
|
void |
fromArray(Object... array)
Load data from an array into this record.
|
void |
fromArray(Object[] array,
Field<?>... f)
Load data from an array into this record, providing some fields.
|
void |
fromArray(Object[] array,
int... fieldIndexes)
Load data from an array into this record, providing some fields indexes.
|
void |
fromArray(Object[] array,
Name... fieldNames)
Load data from an array into this record, providing some fields names.
|
void |
fromArray(Object[] array,
String... fieldNames)
Load data from an array into this record, providing some fields names.
|
void |
fromMap(Map<String,?> map)
Load data from a map into this record.
|
void |
fromMap(Map<String,?> map,
Field<?>... f)
Load data from a map into this record, providing some fields.
|
void |
fromMap(Map<String,?> map,
int... fieldIndexes)
Load data from a map into this record, providing some field indexes.
|
void |
fromMap(Map<String,?> map,
Name... fieldNames)
Load data from a map into this record, providing some field names.
|
void |
fromMap(Map<String,?> map,
String... fieldNames)
Load data from a map into this record, providing some field names.
|
<T> T |
get(Field<?> field,
Class<? extends T> type)
Get a converted value from this Record, providing a field.
|
<T> T |
get(Field<T> field)
Get a value from this Record, providing a field.
|
<T,U> U |
get(Field<T> field,
Converter<? super T,? extends U> converter)
Get a converted value from this Record, providing a field.
|
Object |
get(int index)
This method coincides with
Record.get(int) and
ArrayRecordImpl.getValue(int) |
<T> T |
get(int index,
Class<? extends T> type)
Get a converted value from this record, providing a field index.
|
<U> U |
get(int index,
Converter<?,? extends U> converter)
Get a converted value from this record, providing a field index.
|
Object |
get(Name fieldName)
Get a value from this Record, providing a field name.
|
<T> T |
get(Name fieldName,
Class<? extends T> type)
Get a converted value from this Record, providing a field name.
|
<U> U |
get(Name fieldName,
Converter<?,? extends U> converter)
Get a converted value from this Record, providing a field name.
|
Object |
get(String fieldName)
Get a value from this Record, providing a field name.
|
<T> T |
get(String fieldName,
Class<? extends T> type)
Get a converted value from this Record, providing a field name.
|
<U> U |
get(String fieldName,
Converter<?,? extends U> converter)
Get a converted value from this Record, providing a field name.
|
Table<R> |
getTable()
The table from which this record was read.
|
<T> T |
getValue(Field<?> field,
Class<? extends T> type)
Get a converted value from this Record, providing a field.
|
<T> T |
getValue(Field<?> field,
Class<? extends T> type,
T defaultValue)
Deprecated.
|
<T> T |
getValue(Field<T> field)
Get a value from this Record, providing a field.
|
<T,U> U |
getValue(Field<T> field,
Converter<? super T,? extends U> converter)
Get a converted value from this Record, providing a field.
|
<T,U> U |
getValue(Field<T> field,
Converter<? super T,? extends U> converter,
U defaultValue)
Deprecated.
|
<T> T |
getValue(Field<T> field,
T defaultValue)
Deprecated.
|
Object |
getValue(int index)
Get a value from this record, providing a field index.
|
<T> T |
getValue(int index,
Class<? extends T> type)
Get a converted value from this record, providing a field index.
|
<T> T |
getValue(int index,
Class<? extends T> type,
T defaultValue)
Deprecated.
|
<U> U |
getValue(int index,
Converter<?,? extends U> converter)
Get a converted value from this record, providing a field index.
|
<U> U |
getValue(int index,
Converter<?,? extends U> converter,
U defaultValue)
Deprecated.
|
Object |
getValue(int index,
Object defaultValue)
Deprecated.
|
Object |
getValue(Name fieldName)
Get a value from this Record, providing a field name.
|
<T> T |
getValue(Name fieldName,
Class<? extends T> type)
Get a converted value from this Record, providing a field name.
|
<U> U |
getValue(Name fieldName,
Converter<?,? extends U> converter)
Get a converted value from this Record, providing a field name.
|
Object |
getValue(String fieldName)
Get a value from this Record, providing a field name.
|
<T> T |
getValue(String fieldName,
Class<? extends T> type)
Get a converted value from this Record, providing a field name.
|
<T> T |
getValue(String fieldName,
Class<? extends T> type,
T defaultValue)
Deprecated.
|
<U> U |
getValue(String fieldName,
Converter<?,? extends U> converter)
Get a converted value from this Record, providing a field name.
|
<U> U |
getValue(String fieldName,
Converter<?,? extends U> converter,
U defaultValue)
Deprecated.
|
Object |
getValue(String fieldName,
Object defaultValue)
Deprecated.
|
int |
hashCode() |
int |
insert()
Store this record to the database using an
INSERT
statement. |
int |
insert(Collection<? extends Field<?>> storeFields)
Store parts of this record to the database using an
INSERT
statement. |
int |
insert(Field<?>... storeFields)
Store parts of this record to the database using an
INSERT
statement. |
<E> E |
into(Class<? extends E> type)
Map resulting records onto a custom type.
|
<E> E |
into(E object)
Map resulting records onto a custom type.
|
Record |
into(Field<?>... f)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1> Record1<T1> |
into(Field<T1> field1)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2> Record2<T1,T2> |
into(Field<T1> field1,
Field<T2> field2)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3> Record3<T1,T2,T3> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16,
Field<T17> field17)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16,
Field<T17> field17,
Field<T18> field18)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16,
Field<T17> field17,
Field<T18> field18,
Field<T19> field19)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16,
Field<T17> field17,
Field<T18> field18,
Field<T19> field19,
Field<T20> field20)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16,
Field<T17> field17,
Field<T18> field18,
Field<T19> field19,
Field<T20> field20,
Field<T21> field21)
Copy this record into a new record holding only a subset of the previous
fields.
|
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> |
into(Field<T1> field1,
Field<T2> field2,
Field<T3> field3,
Field<T4> field4,
Field<T5> field5,
Field<T6> field6,
Field<T7> field7,
Field<T8> field8,
Field<T9> field9,
Field<T10> field10,
Field<T11> field11,
Field<T12> field12,
Field<T13> field13,
Field<T14> field14,
Field<T15> field15,
Field<T16> field16,
Field<T17> field17,
Field<T18> field18,
Field<T19> field19,
Field<T20> field20,
Field<T21> field21,
Field<T22> field22)
Copy this record into a new record holding only a subset of the previous
fields.
|
<R extends Record> |
into(Table<R> table)
Map resulting records onto a custom record type.
|
Object[] |
intoArray()
Convert this record into an array.
|
List<Object> |
intoList()
Convert this record into a list.
|
Map<String,Object> |
intoMap()
Return this record as a name/value map.
|
ResultSet |
intoResultSet()
Generate an in-memory JDBC
ResultSet containing the data of this
Record. |
Stream<Object> |
intoStream()
Convert this record into a stream.
|
<E> E |
map(RecordMapper<Record,E> mapper)
Map this record into a custom mapper callback.
|
R |
original()
Get this record containing the original values as fetched from the
database.
|
<T> T |
original(Field<T> field)
Get an original value from this record as fetched from the database.
|
Object |
original(int fieldIndex)
Get an original value from this record as fetched from the database.
|
Object |
original(Name fieldName)
Get an original value from this record as fetched from the database.
|
Object |
original(String fieldName)
Get an original value from this record as fetched from the database.
|
void |
reset()
|
void |
reset(Field<?> field)
Reset a given value to its
Record.original(Field) value and its
Record.changed(Field) flag to false. |
void |
reset(int fieldIndex)
|
void |
reset(Name fieldName)
|
void |
reset(String fieldName)
Reset a given value to its
Record.original(String) value and its
Record.changed(String) flag to false. |
<T> void |
set(Field<T> field,
T value)
Set a value into this record.
|
<T,U> void |
set(Field<T> field,
U value,
Converter<? extends T,? super U> converter)
Set a value into this record.
|
protected void |
set(int index,
Object value) |
<T> void |
setValue(Field<T> field,
T value)
Set a value into this record.
|
<T,U> void |
setValue(Field<T> field,
U value,
Converter<? extends T,? super U> converter)
Set a value into this record.
|
protected void |
setValue(int index,
Object value)
Deprecated.
- Use
AbstractRecord.set(int, Object) instead |
int |
size()
This method coincides with
Record.size() and
List.size() |
String |
toString() |
Row |
valuesRow()
Get this record's values as a
Row. |
<T> R |
with(Field<T> field,
T value)
Set a value into this record.
|
<T,U> R |
with(Field<T> field,
U value,
Converter<? extends T,? super U> converter)
Set a value into this record.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitchanged, changed, changed, changed, changed, changed, changed, changed, changed, changed, compareTo, equals, field, field, field, field, fields, fields, fields, fields, fields, format, format, format, format, format, format, formatJSON, formatJSON, formatJSON, formatJSON, formatJSON, formatJSON, formatXML, formatXML, formatXML, formatXML, formatXML, formatXML, from, from, from, from, from, fromArray, fromArray, fromArray, fromArray, fromArray, fromMap, fromMap, fromMap, fromMap, fromMap, get, get, get, get, get, get, get, get, get, get, get, get, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, hashCode, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, into, intoArray, intoList, intoMap, intoResultSet, intoStream, map, original, original, original, original, reset, reset, reset, reset, reset, set, set, setValue, setValue, sizeattach, configuration, detachpublic final <T> R with(Field<T> field, T value)
Record
Like Record.set(Field, Object) but returning this for
fluent setting of multiple values.
with in interface Recordwith in interface TableRecord<R extends TableRecord<R>>public final <T,U> R with(Field<T> field, U value, Converter<? extends T,? super U> converter)
Record
Like Record.set(Field, Object, Converter) but returning
this for fluent setting of multiple values.
with in interface Recordwith in interface TableRecord<R extends TableRecord<R>>public final Table<R> getTable()
TableRecordgetTable in interface TableRecord<R extends TableRecord<R>>public Row fieldsRow()
RecordRow.public Row valuesRow()
RecordRow.public final R original()
RecordRecord 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.
original in interface Recordoriginal in interface TableRecord<R extends TableRecord<R>>Record.original(Field),
Record.original(int),
Record.original(String)public final <O extends UpdatableRecord<O>> O fetchParent(ForeignKey<R,O> key)
TableRecord
This returns a parent record referenced by this record through a given
foreign key. If no parent record was found, this returns
null
fetchParent in interface TableRecord<R extends TableRecord<R>>ForeignKey.fetchParent(Record),
ForeignKey.fetchParents(java.util.Collection),
ForeignKey.fetchParents(Record...)public final int insert()
TableRecordINSERT
statement.
If you want to enforce statement execution, regardless if the values in
this record were changed, you can explicitly set the changed flags for
all values with Record.changed(boolean) or for single values with
Record.changed(Field, boolean), prior to insertion.
insert in interface TableRecord<R extends TableRecord<R>>1 if the record was stored to the database. 0
if storing was not necessary.public final int insert(Field<?>... storeFields)
TableRecordINSERT
statement.insert in interface TableRecord<R extends TableRecord<R>>1 if the record was stored to the database. 0
if storing was not necessary.TableRecord.insert()public final int insert(Collection<? extends Field<?>> storeFields)
TableRecordINSERT
statement.insert in interface TableRecord<R extends TableRecord<R>>1 if the record was stored to the database. 0
if storing was not necessary.TableRecord.insert()public final <T> Field<T> field(Field<T> field)
RecordThis will return:
null otherwise.
field in interface RecordRow.field(Field)public final Field<?> field(String name)
Recordfield in interface RecordRow.field(String)public final Field<?> field(Name name)
Recordfield in interface RecordRow.field(Name)public final Field<?> field(int index)
Recordfield in interface RecordRow.field(int)public final Field<?>[] fields()
Recordfields in interface RecordRow.fields()public final Field<?>[] fields(Field<?>... f)
Recordfields in interface RecordRow.fields(Field...)public final Field<?>[] fields(String... fieldNames)
Recordfields in interface RecordRow.fields(String...)public final Field<?>[] fields(Name... fieldNames)
Recordfields in interface RecordRow.fields(Name...)public final Field<?>[] fields(int... fieldIndexes)
Recordfields in interface RecordRow.fields(int...)public final int size()
Record.size() and
List.size()public final <T> T get(Field<T> field)
Record
If this record contains a field with the same Field.getName() as
the argument field, that value is retrieved.
public final <T> T get(Field<?> field, Class<? extends T> type)
Record
If this record contains a field with the same Field.getName() as
the argument field, that value is retrieved.
get in interface RecordT - The conversion type parameterfield - The fieldtype - The conversion typeConvert.convert(Object, Class)public final <T,U> U get(Field<T> field, Converter<? super T,? extends U> converter)
Record
If this record contains a field with the same Field.getName() as
the argument field, that value is retrieved.
get in interface RecordT - The database type parameterU - The conversion type parameterfield - The fieldconverter - The data type converterConvert.convert(Object, Converter)public final Object get(int index)
Record.get(int) and
ArrayRecordImpl.getValue(int)public final <T> T get(int index,
Class<? extends T> type)
Recordget in interface RecordT - The conversion type parameterindex - The field's indextype - The conversion typeConvert.convert(Object, Class)public final <U> U get(int index,
Converter<?,? extends U> converter)
Recordget in interface RecordU - The conversion type parameterindex - The field's indexconverter - The data type converterConvert.convert(Object, Converter)public final Object get(String fieldName)
Recordpublic final <T> T get(String fieldName, Class<? extends T> type)
Recordget in interface RecordT - The conversion type parameterfieldName - The field's nametype - The conversion typeConvert.convert(Object, Class)public final <U> U get(String fieldName, Converter<?,? extends U> converter)
Recordget in interface RecordU - The conversion type parameterfieldName - The field's nameconverter - The data type converterConvert.convert(Object, Converter)public final Object get(Name fieldName)
Recordpublic final <T> T get(Name fieldName, Class<? extends T> type)
Recordget in interface RecordT - The conversion type parameterfieldName - The field's nametype - The conversion typeConvert.convert(Object, Class)public final <U> U get(Name fieldName, Converter<?,? extends U> converter)
Recordget in interface RecordU - The conversion type parameterfieldName - The field's nameconverter - The data type converterConvert.convert(Object, Converter)@Deprecated protected final void setValue(int index, Object value)
AbstractRecord.set(int, Object) insteadprotected final void set(int index,
Object value)
public final <T> void set(Field<T> field, T value)
Record
This will always set the Record.changed(Field) flag for the given
field, no matter if setting the value actually changes the
value.
Changing Table.getPrimaryKey() values will set all
Record.changed() flags to true, in order to produce complete
INSERT statements on subsequent
UpdatableRecord.store() operations.
public final <T,U> void set(Field<T> field, U value, Converter<? extends T,? super U> converter)
Record
This will always set the Record.changed(Field) flag for the given
field, no matter if setting the value actually changes the
value.
Changing Table.getPrimaryKey() values will set all
Record.changed() flags to true, in order to produce complete
INSERT statements on subsequent
UpdatableRecord.store() operations.
public final <T> T original(Field<T> field)
RecordRecord values can be freely modified after having fetched a record from the database. Every record also references the originally fetched values. This method returns such an original value for a field.
original in interface RecordRecord.original()public final Object original(int fieldIndex)
RecordRecord values can be freely modified after having fetched a record from the database. Every record also references the originally fetched values. This method returns such an original value for a field.
original in interface RecordRecord.original()public final Object original(String fieldName)
RecordRecord values can be freely modified after having fetched a record from the database. Every record also references the originally fetched values. This method returns such an original value for a field.
original in interface RecordRecord.original()public final Object original(Name fieldName)
RecordRecord values can be freely modified after having fetched a record from the database. Every record also references the originally fetched values. This method returns such an original value for a field.
original in interface RecordRecord.original()public final boolean changed()
Record
If this returns false, then it can be said that
record.equals(record.original()) is true.
changed in interface RecordRecord.original(),
Record.changed(Field),
Record.changed(int),
Record.changed(String)public final boolean changed(Field<?> field)
Recordchanged in interface RecordRecord.changed(),
Record.original(Field)public final boolean changed(int fieldIndex)
Recordchanged in interface RecordRecord.changed(),
Record.original(int)public final boolean changed(String fieldName)
Recordchanged in interface RecordRecord.changed(),
Record.original(String)public final boolean changed(Name fieldName)
Recordchanged in interface RecordRecord.changed(),
Record.original(Name)public final void changed(boolean c)
Record
If the changed argument is false, the
Record.original() values will be reset to the corresponding "current"
values as well
changed in interface RecordRecord.changed(),
Record.changed(Field, boolean),
Record.changed(int, boolean),
Record.changed(String, boolean)public final void changed(Field<?> field, boolean c)
Record
If the changed argument is false, the
Record.original(Field) value will be reset to the corresponding
"current" value as well
changed in interface RecordRecord.changed(),
Record.changed(Field)public final void changed(int fieldIndex,
boolean c)
Record
If the changed argument is false, the
Record.original(int) value will be reset to the corresponding "current"
value as well
changed in interface RecordRecord.changed(),
Record.changed(int)public final void changed(String fieldName, boolean c)
Record
If the changed argument is false, the
Record.original(String) value will be reset to the corresponding
"current" value as well
changed in interface RecordRecord.changed(),
Record.changed(String)public final void changed(Name fieldName, boolean c)
Record
If the changed argument is false, the
Record.original(Name) value will be reset to the corresponding
"current" value as well
changed in interface RecordRecord.changed(),
Record.changed(Name)public final void reset()
Recordpublic final void reset(Field<?> field)
RecordRecord.original(Field) value and its
Record.changed(Field) flag to false.public final void reset(int fieldIndex)
Recordpublic final void reset(String fieldName)
RecordRecord.original(String) value and its
Record.changed(String) flag to false.public final Object[] intoArray()
RecordThe resulting array has the same number of elements as this record has fields. The resulting array contains data as such:
// For arbitrary values of i
record.getValue(i) == record.intoArray()[i]
This is the same as calling into(Object[].class)
intoArray in interface RecordRecord.fromArray(Object...)public final List<Object> intoList()
RecordThe resulting list has the same number of elements as this record has fields. The resulting array contains data as such:
// For arbitrary values of i
record.getValue(i) == record.intoList().get(i)
This is the same as calling Arrays.asList(intoArray())
public final Stream<Object> intoStream()
RecordThe resulting stream has the same number of elements as this record has fields. The resulting stream contains data as such:
This is the same as calling into(Stream.class)
intoStream in interface Recordpublic final Map<String,Object> intoMap()
Record
This is the inverse operation to Record.fromMap(Map)
intoMap in interface RecordRecord.fromMap(Map)public final Record into(Field<?>... f)
Recordpublic final <T1> Record1<T1> into(Field<T1> field1)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2> Record2<T1,T2> into(Field<T1> field1, Field<T2> field2)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3> Record3<T1,T2,T3> into(Field<T1> field1, Field<T2> field2, Field<T3> field3)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4> Record4<T1,T2,T3,T4> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5> Record5<T1,T2,T3,T4,T5> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6> Record6<T1,T2,T3,T4,T5,T6> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7> Record7<T1,T2,T3,T4,T5,T6,T7> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8> Record8<T1,T2,T3,T4,T5,T6,T7,T8> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9> Record9<T1,T2,T3,T4,T5,T6,T7,T8,T9> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> Record10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> Record11<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> Record12<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> Record13<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> Record14<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> Record15<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> Record16<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> Record17<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> Record18<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> Record19<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> Record20<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> Record21<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21)
Recordinto in interface RecordRecord.into(Table)public final <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> Record22<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> into(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21, Field<T22> field22)
Recordinto in interface RecordRecord.into(Table)public final <E> E into(Class<? extends E> type)
Record
This will map this record onto your custom type using a
RecordMapper as provided by
Configuration.recordMapperProvider(). If no custom provider is
specified, the DefaultRecordMapperProvider is used.
into in interface RecordE - The generic entity type.type - The entity type.Record.from(Object),
DefaultRecordMapperpublic final <E> E into(E object)
Record
This is the same as Record.into(Class), except that no new object is
instantiated as a result. Instead, you can provide your own custom POJO
instance.
into in interface RecordE - The generic entity type.object - The receiving bean.Record.from(Object)public final <R extends Record> R into(Table<R> table)
RecordThe mapping algorithm is this:
Record values by equal field names:
table argument with
Field.getName() "MY_field" (case-sensitive!), a
corresponding field with the same name in this record will be searched.Field.getName(), then the first one returning true on
Field.equals(Object) will be returned. (e.g. qualified field
names match)
Table.getRecordType() must return a class of type
TableRecord, which must provide a default constructor. Non-public
default constructors are made accessible using
AccessibleObject.setAccessible(boolean)public final ResultSet intoResultSet()
RecordResultSet containing the data of this
Record.
Use this as an adapter for JDBC-compliant code that expects a
ResultSet to operate on, rather than a jOOQ Result. The
returned ResultSet allows for the following behaviour
according to the JDBC specification:
ResultSet.CLOSE_CURSORS_AT_COMMIT: The cursors (i.e.
Statement object) are no longer availableResultSet.CONCUR_READ_ONLY: You cannot update the database
through this ResultSet, as the underlying Result
object does not hold any open database refences anymoreResultSet.FETCH_FORWARD: The fetch direction is forward only,
and cannot be changedResultSet.TYPE_SCROLL_INSENSITIVE: You can use any of the
ResultSet's scrolling methods, e.g. ResultSet.next()
or ResultSet.previous(), etc.
You may use DSLContext.fetch(ResultSet) to unwind this wrapper
again.
This is the same as creating a new Result with this
Record only, and then calling Result.intoResultSet()
on that Result
intoResultSet in interface RecordResultSetpublic final <E> E map(RecordMapper<Record,E> mapper)
Recordpublic final void from(Object source)
RecordThe mapping algorithm is this:
source is an array
Loading of data is delegated to Record.fromArray(Object...)
source is a Map
Loading of data is delegated to Record.fromMap(Map)
Column annotations are found on the Class
of the provided source, only those are used. Matching
candidates are:
ColumngetXXX
or isXXX, if there exists a matching public single-argument
setXXX() instance method that is annotated with
ColumnColumnColumn.name() must match Field.getName(). All other
annotation attributes are ignored
Column annotations, or jOOQ can't
find the javax.persistence API on the classpath, jOOQ will
map members by naming convention:
If Field.getName() is MY_field (case-sensitive!),
then this field's value will be fetched from the first of these:
MY_field()myField()getMY_field()getMyField()MY_fieldmyField
The resulting record will have its internal "changed" flags set to true
for all values. This means that UpdatableRecord.store() will
perform an INSERT statement. If you wish to store the record
using an UPDATE statement, use
DSLContext.executeUpdate(UpdatableRecord) instead.
This is the same as calling
record.from(source, record.fields())
from in interface Recordsource - The source object to copy data fromRecord.into(Class),
Record.from(Object, Field...)public final void from(Object source, Field<?>... f)
Record
This is the same as Record.from(Object), except that only fields
contained in the fields argument will be mapped.
from in interface Recordsource - The source object to copy data fromf - The record's fields to use for mappingRecord.into(Class),
Record.from(Object)public final void from(Object source, String... fieldNames)
Record
This is the same as Record.from(Object), except that only fields
contained in the fieldNames argument will be mapped.
from in interface Recordsource - The source object to copy data fromfieldNames - The record's fields names to use for mappingRecord.into(Class),
Record.from(Object)public final void from(Object source, Name... fieldNames)
Record
This is the same as Record.from(Object), except that only fields
contained in the fieldNames argument will be mapped.
from in interface Recordsource - The source object to copy data fromfieldNames - The record's fields names to use for mappingRecord.into(Class),
Record.from(Object)public final void from(Object source, int... fieldIndexes)
Record
This is the same as Record.from(Object), except that only fields
contained in the fieldIndexes argument will be mapped.
from in interface Recordsource - The source object to copy data fromfieldIndexes - The record's fields indexes to use for mappingRecord.into(Class),
Record.from(Object)public final void fromMap(Map<String,?> map)
Record
The argument map is expected to hold field-name / value pairs where
field-names correspond to actual field names as provided by
Record.field(String). Missing fields will be left untouched. Excess
fields will be ignored.
This is the inverse operation to Record.intoMap(). This is the same as
calling record.fromMap(map, record.fields())
fromMap in interface RecordRecord.intoMap(),
Record.fromMap(Map, Field...)public final void fromMap(Map<String,?> map, Field<?>... f)
Record
The argument map is expected to hold field-name / value pairs where
field-names correspond to actual field names as provided by
Record.field(String). Missing fields will be left untouched. Excess
fields will be ignored.
This is the same as Record.fromMap(Map), except that only fields
contained in the fields argument will be mapped.
fromMap in interface RecordRecord.intoMap(),
Record.fromMap(Map)public final void fromMap(Map<String,?> map, String... fieldNames)
Record
The argument map is expected to hold field-name / value pairs where
field-names correspond to actual field names as provided by
Record.field(String). Missing fields will be left untouched. Excess
fields will be ignored.
This is the same as Record.fromMap(Map), except that only fields
contained in the fieldNames argument will be mapped.
fromMap in interface RecordRecord.intoMap(),
Record.fromMap(Map)public final void fromMap(Map<String,?> map, Name... fieldNames)
Record
The argument map is expected to hold field-name / value pairs where
field-names correspond to actual field names as provided by
Record.field(Name). Missing fields will be left untouched. Excess
fields will be ignored.
This is the same as Record.fromMap(Map), except that only fields
contained in the fieldNames argument will be mapped.
fromMap in interface RecordRecord.intoMap(),
Record.fromMap(Map)public final void fromMap(Map<String,?> map, int... fieldIndexes)
Record
The argument map is expected to hold field-name / value pairs where
field-names correspond to actual field names as provided by
Record.field(String). Missing fields will be left untouched. Excess
fields will be ignored.
This is the same as Record.fromMap(Map), except that only fields
contained in the fieldIndexes argument will be mapped.
fromMap in interface RecordRecord.intoMap(),
Record.fromMap(Map)public final void fromArray(Object... array)
RecordThe argument array is expected to hold values for this record's field indexes. Missing values will be left untouched. Excess values will be ignored.
This is the inverse operation to Record.intoArray()
fromArray in interface RecordRecord.intoArray(),
Record.fromArray(Object[], Field...)public final void fromArray(Object[] array, Field<?>... f)
RecordThe argument array is expected to hold values for this record's field indexes. Missing values will be left untouched. Excess values will be ignored.
This is the same as Record.fromArray(Object...), except that only
fields contained in the fields argument will be mapped.
fromArray in interface RecordRecord.intoArray(),
Record.fromArray(Object...)public final void fromArray(Object[] array, String... fieldNames)
RecordThe argument array is expected to hold values for this record's field indexes. Missing values will be left untouched. Excess values will be ignored.
This is the same as Record.fromArray(Object...), except that only
fields contained in the fieldNames argument will be mapped.
fromArray in interface RecordRecord.intoArray(),
Record.fromArray(Object...)public final void fromArray(Object[] array, Name... fieldNames)
RecordThe argument array is expected to hold values for this record's field indexes. Missing values will be left untouched. Excess values will be ignored.
This is the same as Record.fromArray(Object...), except that only
fields contained in the fieldNames argument will be mapped.
fromArray in interface RecordRecord.intoArray(),
Record.fromArray(Object...)public final void fromArray(Object[] array, int... fieldIndexes)
RecordThe argument array is expected to hold values for this record's field indexes. Missing values will be left untouched. Excess values will be ignored.
This is the same as Record.fromArray(Object...), except that only
fields contained in the fieldIndexes argument will be
mapped.
fromArray in interface RecordRecord.intoArray(),
Record.fromArray(Object...)protected final void from(Record source)
public final String format()
RecordThe format is the following:
+------+------+------+
| COL1 | COL2 | COL3 |
+------+------+------+
| VAL1 | VAL2 | VAL3 |
+------+------+------+
public final String format(TXTFormat format)
Recordpublic final void format(OutputStream stream)
RecordRecord.format(), but the data is output onto an OutputStream.public final void format(OutputStream stream, TXTFormat format)
RecordRecord.format(TXTFormat), but the data is output onto an OutputStream.public final void format(Writer writer)
RecordRecord.format(), but the data is output onto a Writer.public final void format(Writer writer, TXTFormat format)
RecordRecord.format(TXTFormat), but the data is output onto a Writer.public final String formatJSON()
Record
The format is the following:
[value-2-1,value-2-2,...,value-2-n]
formatJSON in interface Recordpublic final String formatJSON(JSONFormat format)
RecordformatJSON in interface RecordJSONFormatpublic final void formatJSON(OutputStream stream)
RecordRecord.formatJSON(), but the data is output onto an OutputStream.formatJSON in interface Recordpublic final void formatJSON(OutputStream stream, JSONFormat format)
RecordRecord.formatJSON(JSONFormat), but the data is output onto an OutputStream.formatJSON in interface Recordpublic final void formatJSON(Writer writer)
RecordRecord.formatJSON(), but the data is output onto a Writer.formatJSON in interface Recordpublic final void formatJSON(Writer writer, JSONFormat format)
RecordRecord.formatJSON(JSONFormat), but the data is output onto a Writer.formatJSON in interface Recordpublic final String formatXML()
RecordformatXML in interface RecordFormattable.formatXML()public final String formatXML(XMLFormat format)
RecordformatXML in interface RecordFormattable.formatXML(XMLFormat)public final void formatXML(OutputStream stream)
RecordRecord.formatXML(), but the data is output onto an OutputStream.public final void formatXML(OutputStream stream, XMLFormat format)
RecordRecord.formatXML(XMLFormat), but the data is output onto an OutputStream.public final void formatXML(Writer writer)
RecordRecord.formatXML(), but the data is output onto a Writer.public final void formatXML(Writer writer, XMLFormat format)
RecordRecord.formatXML(XMLFormat), but the data is output onto a Writer.public int compareTo(Record that)
RecordRecord with another Record
according to their natural ordering.
jOOQ Records implement Comparable to allow for naturally ordering
Records in a "SQL way", i.e. according to the following rules:
Two Records are comparable if and only if they have the same
ROW type, i.e. if their fieldsRow() methods return fields of the same type and degree.
Assume the following notations:
X[i] means X.getValue(i)X = Y means X.compareTo(Y) == 0X < Y means X.compareTo(Y) < 0X[i] = Y[i] means
(X[i] == null && Y[i] == null) || X[i].compareTo(Y[i]) == 0
X[i] < Y[i] means
Y[i] == null || X[i].compareTo(Y[i]) < 0. This
corresponds to the SQL NULLS LAST clause.r1 and r2,
x = r1.compareTo(r2) yields:
x = -1: if
(r1[0] < r2[0])
OR (r1[0] = r2[0] AND r1[1] < r2[1])
OR ...
OR (r1[0] = r2[0] AND ... AND r1[N-1] = r2[N-1] AND r1[N] < r2[N])
x = 0: if
OR (r1[0] = r2[0] AND ... AND r1[N-1] = r2[N-1] AND r1[N] = r2[N])
x = 1: if
(r1[0] > r2[0])
OR (r1[0] = r2[0] AND r1[1] > r2[1])
OR ...
OR (r1[0] = r2[0] AND ... AND r1[N-1] = r2[N-1] AND r1[N] > r2[N])
Note, that the above rules correspond to the SQL ordering behaviour as
illustrated in the following examples:
-- A SQL ORDER BY clause, ordering all records by columns in their order
SELECT a, b, c
FROM my_table
ORDER BY 1, 2, 3
-- A row value expression comparison predicate
SELECT *
FROM my_table
WHERE (a, b, c) < (1, 2, 3)
See Row1.lessThan(Row1), Row2.lessThan(Row2), ...,
Row22.lessThan(Row22) for more details about row value expression
comparison predicates
Alternative sorting behaviour can be achieved through
Result.sortAsc(java.util.Comparator) and similar methods.
compareTo in interface Comparable<Record>compareTo in interface Recordpublic final <T> T getValue(Field<T> field)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(Field) instead.
getValue in interface RecordRecord.get(Field)@Deprecated public final <T> T getValue(Field<T> field, T defaultValue)
Recordpublic final <T> T getValue(Field<?> field, Class<? extends T> type)
Record
[#2211] Future versions of jOOQ might remove tthis method. It is
recommended to use Record.get(Field, Class) instead.
getValue in interface RecordRecord.get(Field, Class)@Deprecated public final <T> T getValue(Field<?> field, Class<? extends T> type, T defaultValue)
RecordgetValue in interface RecordT - The conversion type parameterfield - The fieldtype - The conversion typedefaultValue - The default value instead of nullnullConvert.convert(Object, Class)public final <T,U> U getValue(Field<T> field, Converter<? super T,? extends U> converter)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(Field, Converter) instead.
getValue in interface RecordRecord.get(Field, Converter)@Deprecated public final <T,U> U getValue(Field<T> field, Converter<? super T,? extends U> converter, U defaultValue)
RecordgetValue in interface RecordT - The database type parameterU - The conversion type parameterfield - The fieldconverter - The data type converterdefaultValue - The default value instead of nullnullConvert.convert(Object, Converter)public final Object getValue(int index)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(int) instead.
getValue in interface RecordRecord.get(int)@Deprecated public final Object getValue(int index, Object defaultValue)
Recordpublic final <T> T getValue(int index,
Class<? extends T> type)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(int, Class) instead.
getValue in interface RecordRecord.get(int, Class)@Deprecated public final <T> T getValue(int index, Class<? extends T> type, T defaultValue)
RecordgetValue in interface RecordT - The conversion type parameterindex - The field's indextype - The conversion typedefaultValue - The default value instead of nullnullConvert.convert(Object, Class)public final <U> U getValue(int index,
Converter<?,? extends U> converter)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(int, Converter) instead.
getValue in interface RecordRecord.get(int, Converter)@Deprecated public final <U> U getValue(int index, Converter<?,? extends U> converter, U defaultValue)
RecordgetValue in interface RecordU - The conversion type parameterindex - The field's indexconverter - The data type converterdefaultValue - The default value instead of nullnullConvert.convert(Object, Converter)public final Object getValue(String fieldName)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(String) instead.
getValue in interface RecordRecord.get(String)@Deprecated public final Object getValue(String fieldName, Object defaultValue)
Recordpublic final <T> T getValue(String fieldName, Class<? extends T> type)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(String, Class) instead.
getValue in interface RecordRecord.get(String, Class)@Deprecated public final <T> T getValue(String fieldName, Class<? extends T> type, T defaultValue)
RecordgetValue in interface RecordT - The conversion type parameterfieldName - The field's nametype - The conversion typedefaultValue - The default value instead of nullnullConvert.convert(Object, Class)public final <U> U getValue(String fieldName, Converter<?,? extends U> converter)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(String, Converter) instead.
getValue in interface RecordRecord.get(String, Converter)@Deprecated public final <U> U getValue(String fieldName, Converter<?,? extends U> converter, U defaultValue)
RecordgetValue in interface RecordU - The conversion type parameterfieldName - The field's nameconverter - The data type converterdefaultValue - The default value instead of nullnullConvert.convert(Object, Converter)public final Object getValue(Name fieldName)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(Name) instead.
getValue in interface RecordRecord.get(Name)public final <T> T getValue(Name fieldName, Class<? extends T> type)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(Name, Class) instead.
getValue in interface RecordRecord.get(Name, Class)public final <U> U getValue(Name fieldName, Converter<?,? extends U> converter)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.get(Name, Converter) instead.
getValue in interface RecordRecord.get(Name, Converter)public final <T> void setValue(Field<T> field, T value)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.set(Field, Object) instead.
setValue in interface RecordRecord.set(Field, Object)public final <T,U> void setValue(Field<T> field, U value, Converter<? extends T,? super U> converter)
Record
[#2211] Future versions of jOOQ might remove this method. It is
recommended to use Record.set(Field, Object, Converter) instead.
setValue in interface RecordRecord.set(Field, Object, Converter)public final void attach(Configuration c)
AttachableConfiguration.attach in interface Attachablec - A configuration or null, if you wish to
detach this Attachable from its previous
configuration.public final void detach()
AttachableConfiguration.
This is the same as calling attach(null).
detach in interface Attachablepublic final Configuration configuration()
Attachableconfiguration in interface Attachable@Deprecated protected final DSLContext create()
Attachable.configuration() and
Configuration.dsl() instead.Copyright © 2019. All rights reserved.