org.jooq.impl
Class UpdatableRecordImpl<R extends UpdatableRecord<R>>

java.lang.Object
  extended by org.jooq.impl.TableRecordImpl<R>
      extended by org.jooq.impl.UpdatableRecordImpl<R>
All Implemented Interfaces:
Serializable, Adapter, Attachable, AttachableInternal, FieldProvider, Record, Store<Object>, TableRecord<R>, Updatable<R>, UpdatableRecord<R>

public class UpdatableRecordImpl<R extends UpdatableRecord<R>>
extends TableRecordImpl<R>
implements UpdatableRecord<R>

A record implementation for a record holding a primary key

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

Author:
Lukas Eder
See Also:
Serialized Form

Constructor Summary
UpdatableRecordImpl(UpdatableTable<R> table)
           
 
Method Summary
 void attach(Configuration configuration)
          Attach this object to a new Configuration
 R copy()
          Duplicate this record (in memory) and reset all fields from the primary key or main unique key, such that a subsequent call to UpdatableRecord.store() will result in an INSERT statement.
protected  Factory create()
          This method is used in generated code!
 int delete()
          Deletes this record from the database, based on the value of the primary key or main unique key.
 boolean equals(Object obj)
           
 void from(Object source)
          Load data into this record from a source.
protected  void from(Record source)
          This method was implemented with [#799].
 List<Attachable> getAttachables()
          Get the list of dependent Attachables This method is for JOOQ INTERNAL USE only.
 Configuration getConfiguration()
          Get the underlying configuration
<T> Field<T>
getField(Field<T> field)
          Get a specific field from this field provider.
 Field<?> getField(int index)
          Get a specific field from this field provider.
 Field<?> getField(String name)
          Get a specific field from this field provider.
 List<Field<?>> getFields()
           
 int getIndex(Field<?> field)
          Get a fields index from this field provider
 UpdatableTable<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)
          Get a converted value from this record, providing a field.
<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,U> converter)
          Get a converted value from this Record, providing a field.
<T,U> U
getValue(Field<T> field, Converter<? super T,U> converter, U defaultValue)
          Get a converted value from this record, providing a field.
<T> T
getValue(Field<T> field, T defaultValue)
          Get a value from this record, providing a field.
 Object getValue(int index)
          Get a value from this Store, providing a field index.
<Z> Z
getValue(int index, Class<? extends Z> type)
          Get a converted value from this Store, providing a field index.
<Z> Z
getValue(int index, Class<? extends Z> type, Z defaultValue)
          Get a converted value from this Store, providing a field index.
<U> U
getValue(int index, Converter<?,U> converter)
          Get a converted value from this Store, providing a field index.
<U> U
getValue(int index, Converter<?,U> converter, U defaultValue)
          Get a converted value from this Store, providing a field index.
 T getValue(int index, T defaultValue)
          Get a value from this Store, providing a field index.
 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.
<Z> Z
getValue(String fieldName, Class<? extends Z> type, Z defaultValue)
          Get a converted value from this record, providing a field name.
<U> U
getValue(String fieldName, Converter<?,U> converter)
          Get a converted value from this Record, providing a field name.
<U> U
getValue(String fieldName, Converter<?,U> converter, U defaultValue)
          Get a converted value from this record, providing a field name.
 Object getValue(String fieldName, Object defaultValue)
          Get a value from this record, providing a field name.
<A extends ArrayRecord<T>,T>
T[]
getValueAsArray(Field<A> field)
          Get an array value from this Record, providing an ArrayRecord field.
<A extends ArrayRecord<T>,T>
T[]
getValueAsArray(Field<A> field, T[] defaultValue)
          Get an array value from this Record, providing an ArrayRecord field.
 BigDecimal getValueAsBigDecimal(Field<?> field)
          Get a value from this Record, providing a field.
 BigDecimal getValueAsBigDecimal(Field<?> field, BigDecimal defaultValue)
          Get a value from this record, providing a field.
 BigDecimal getValueAsBigDecimal(int index)
          Get a value from this Store, providing a field index.
 BigDecimal getValueAsBigDecimal(int index, BigDecimal defaultValue)
          Get a value from this Store, providing a field index.
 BigDecimal getValueAsBigDecimal(String fieldName)
          Get a value from this Record, providing a field name.
 BigDecimal getValueAsBigDecimal(String fieldName, BigDecimal defaultValue)
          Get a value from this record, providing a field name.
 BigInteger getValueAsBigInteger(Field<?> field)
          Get a value from this Record, providing a field.
 BigInteger getValueAsBigInteger(Field<?> field, BigInteger defaultValue)
          Get a value from this record, providing a field.
 BigInteger getValueAsBigInteger(int index)
          Get a value from this Store, providing a field index.
 BigInteger getValueAsBigInteger(int index, BigInteger defaultValue)
          Get a value from this Store, providing a field index.
 BigInteger getValueAsBigInteger(String fieldName)
          Get a value from this Record, providing a field name.
 BigInteger getValueAsBigInteger(String fieldName, BigInteger defaultValue)
          Get a value from this record, providing a field name.
 Boolean getValueAsBoolean(Field<?> field)
          Get a value from this Record, providing a field.
 Boolean getValueAsBoolean(Field<?> field, Boolean defaultValue)
          Get a value from this record, providing a field.
 Boolean getValueAsBoolean(int index)
          Get a value from this Store, providing a field index.
 Boolean getValueAsBoolean(int index, Boolean defaultValue)
          Get a value from this Store, providing a field index.
 Boolean getValueAsBoolean(String fieldName)
          Get a value from this Record, providing a field name.
 Boolean getValueAsBoolean(String fieldName, Boolean defaultValue)
          Get a value from this record, providing a field name.
 Byte getValueAsByte(Field<?> field)
          Get a value from this Record, providing a field.
 Byte getValueAsByte(Field<?> field, Byte defaultValue)
          Get a value from this record, providing a field.
 Byte getValueAsByte(int index)
          Get a value from this Store, providing a field index.
 Byte getValueAsByte(int index, Byte defaultValue)
          Get a value from this Store, providing a field index.
 Byte getValueAsByte(String fieldName)
          Get a value from this Record, providing a field name.
 Byte getValueAsByte(String fieldName, Byte defaultValue)
          Get a value from this record, providing a field name.
 Date getValueAsDate(Field<?> field)
          Get a value from this Record, providing a field.
 Date getValueAsDate(Field<?> field, Date defaultValue)
          Get a value from this record, providing a field.
 Date getValueAsDate(int index)
          Get a value from this Store, providing a field index.
 Date getValueAsDate(int index, Date defaultValue)
          Get a value from this Store, providing a field index.
 Date getValueAsDate(String fieldName)
          Get a value from this Record, providing a field name.
 Date getValueAsDate(String fieldName, Date defaultValue)
          Get a value from this record, providing a field name.
 Double getValueAsDouble(Field<?> field)
          Get a value from this Record, providing a field.
 Double getValueAsDouble(Field<?> field, Double defaultValue)
          Get a value from this record, providing a field.
 Double getValueAsDouble(int index)
          Get a value from this Store, providing a field index.
 Double getValueAsDouble(int index, Double defaultValue)
          Get a value from this Store, providing a field index.
 Double getValueAsDouble(String fieldName)
          Get a value from this Record, providing a field name.
 Double getValueAsDouble(String fieldName, Double defaultValue)
          Get a value from this record, providing a field name.
 Float getValueAsFloat(Field<?> field)
          Get a value from this Record, providing a field.
 Float getValueAsFloat(Field<?> field, Float defaultValue)
          Get a value from this record, providing a field.
 Float getValueAsFloat(int index)
          Get a value from this Store, providing a field index.
 Float getValueAsFloat(int index, Float defaultValue)
          Get a value from this Store, providing a field index.
 Float getValueAsFloat(String fieldName)
          Get a value from this Record, providing a field name.
 Float getValueAsFloat(String fieldName, Float defaultValue)
          Get a value from this record, providing a field name.
 Integer getValueAsInteger(Field<?> field)
          Get a value from this Record, providing a field.
 Integer getValueAsInteger(Field<?> field, Integer defaultValue)
          Get a value from this record, providing a field.
 Integer getValueAsInteger(int index)
          Get a value from this Store, providing a field index.
 Integer getValueAsInteger(int index, Integer defaultValue)
          Get a value from this Store, providing a field index.
 Integer getValueAsInteger(String fieldName)
          Get a value from this Record, providing a field name.
 Integer getValueAsInteger(String fieldName, Integer defaultValue)
          Get a value from this record, providing a field name.
 Long getValueAsLong(Field<?> field)
          Get a value from this Record, providing a field.
 Long getValueAsLong(Field<?> field, Long defaultValue)
          Get a value from this record, providing a field.
 Long getValueAsLong(int index)
          Get a value from this Store, providing a field index.
 Long getValueAsLong(int index, Long defaultValue)
          Get a value from this Store, providing a field index.
 Long getValueAsLong(String fieldName)
          Get a value from this Record, providing a field name.
 Long getValueAsLong(String fieldName, Long defaultValue)
          Get a value from this record, providing a field name.
 Short getValueAsShort(Field<?> field)
          Get a value from this Record, providing a field.
 Short getValueAsShort(Field<?> field, Short defaultValue)
          Get a value from this record, providing a field.
 Short getValueAsShort(int index)
          Get a value from this Store, providing a field index.
 Short getValueAsShort(int index, Short defaultValue)
          Get a value from this Store, providing a field index.
 Short getValueAsShort(String fieldName)
          Get a value from this Record, providing a field name.
 Short getValueAsShort(String fieldName, Short defaultValue)
          Get a value from this record, providing a field name.
 String getValueAsString(Field<?> field)
          Get a value from this Record, providing a field.
 String getValueAsString(Field<?> field, String defaultValue)
          Get a value from this record, providing a field.
 String getValueAsString(int index)
          Get a value from this Store, providing a field index.
 String getValueAsString(int index, String defaultValue)
          Get a value from this Store, providing a field index.
 String getValueAsString(String fieldName)
          Get a value from this Record, providing a field name.
 String getValueAsString(String fieldName, String defaultValue)
          Get a value from this record, providing a field name.
 Time getValueAsTime(Field<?> field)
          Get a value from this Record, providing a field.
 Time getValueAsTime(Field<?> field, Time defaultValue)
          Get a value from this record, providing a field.
 Time getValueAsTime(int index)
          Get a value from this Store, providing a field index.
 Time getValueAsTime(int index, Time defaultValue)
          Get a value from this Store, providing a field index.
 Time getValueAsTime(String fieldName)
          Get a value from this Record, providing a field name.
 Time getValueAsTime(String fieldName, Time defaultValue)
          Get a value from this record, providing a field name.
 Timestamp getValueAsTimestamp(Field<?> field)
          Get a value from this Record, providing a field.
 Timestamp getValueAsTimestamp(Field<?> field, Timestamp defaultValue)
          Get a value from this record, providing a field.
 Timestamp getValueAsTimestamp(int index)
          Get a value from this Store, providing a field index.
 Timestamp getValueAsTimestamp(int index, Timestamp defaultValue)
          Get a value from this Store, providing a field index.
 Timestamp getValueAsTimestamp(String fieldName)
          Get a value from this Record, providing a field name.
 Timestamp getValueAsTimestamp(String fieldName, Timestamp defaultValue)
          Get a value from this record, providing a field name.
 int hashCode()
           
<I> I
internalAPI(Class<I> internalType)
          Adapt to an internal type assuming its functionality This is for JOOQ INTERNAL USE only.
<T> T
into(Class<? extends T> type)
          Map resulting records onto a custom type.
<R extends Record>
R
into(Table<R> table)
          Map resulting records onto a custom record type.
 Object[] intoArray()
          Convert this record into an array.
 void refresh()
          Refresh this record from the database, based on the value of the primary key or main unique key.
<T> void
setValue(Field<T> field, T value)
          Set a value into this record.
<T,U> void
setValue(Field<T> field, U value, Converter<T,? super U> converter)
          Set a value into this record.
 int size()
          Get the size of this Store.
 int store()
          Store this record back to the database.
 String toString()
           
 
Methods inherited from class org.jooq.impl.TableRecordImpl
deleteUsing, refreshUsing, storeUsing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jooq.TableRecord
deleteUsing, refreshUsing, storeUsing
 
Methods inherited from interface org.jooq.Record
from, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueAsArray, getValueAsArray, getValueAsBigDecimal, getValueAsBigDecimal, getValueAsBigDecimal, getValueAsBigDecimal, getValueAsBigInteger, getValueAsBigInteger, getValueAsBigInteger, getValueAsBigInteger, getValueAsBoolean, getValueAsBoolean, getValueAsBoolean, getValueAsBoolean, getValueAsByte, getValueAsByte, getValueAsByte, getValueAsByte, getValueAsDate, getValueAsDate, getValueAsDate, getValueAsDate, getValueAsDouble, getValueAsDouble, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong, getValueAsLong, getValueAsLong, getValueAsShort, getValueAsShort, getValueAsShort, getValueAsShort, getValueAsString, getValueAsString, getValueAsString, getValueAsString, getValueAsTime, getValueAsTime, getValueAsTime, getValueAsTime, getValueAsTimestamp, getValueAsTimestamp, getValueAsTimestamp, getValueAsTimestamp, into, into, intoArray, setValue, setValue
 
Methods inherited from interface org.jooq.FieldProvider
getField, getField, getField, getFields, getIndex
 
Methods inherited from interface org.jooq.Store
getValue, getValue, getValue, getValue, getValueAsBigDecimal, getValueAsBigDecimal, getValueAsBigInteger, getValueAsBigInteger, getValueAsBoolean, getValueAsBoolean, getValueAsByte, getValueAsByte, getValueAsDate, getValueAsDate, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong, getValueAsShort, getValueAsShort, getValueAsString, getValueAsString, getValueAsTime, getValueAsTime, getValueAsTimestamp, getValueAsTimestamp, size
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 

Constructor Detail

UpdatableRecordImpl

public UpdatableRecordImpl(UpdatableTable<R> table)
Method Detail

getTable

public final UpdatableTable<R> getTable()
Description copied from interface: TableRecord
The table from which this record was read

Specified by:
getTable in interface TableRecord<R extends UpdatableRecord<R>>
Specified by:
getTable in interface UpdatableRecord<R extends UpdatableRecord<R>>
Overrides:
getTable in class TableRecordImpl<R extends UpdatableRecord<R>>

store

public final int store()
Description copied from interface: UpdatableRecord
Store this record back to the database.

Depending on the state of the primary key's or main unique key's value, an INSERT or an UPDATE statement is executed.

In either statement, only those fields are inserted/updated, which had been explicitly set by client code, in order to allow for DEFAULT values to be applied by the underlying RDBMS. If no fields were modified, neither an UPDATE nor an INSERT will be executed. Possible statements are

This is in fact the same as calling store(getTable().getMainKey().getFieldsArray())

Specified by:
store in interface UpdatableRecord<R extends UpdatableRecord<R>>
Returns:
1 if the record was stored to the database. 0 if storing was not necessary.
See Also:
TableRecord.storeUsing(TableField...)

delete

public final int delete()
Description copied from interface: UpdatableRecord
Deletes this record from the database, based on the value of the primary key or main unique key.

The executed statement is

 DELETE FROM [table]
 WHERE [main key fields = main key values]

This is in fact the same as calling delete(getTable().getMainKey().getFieldsArray())

Specified by:
delete in interface UpdatableRecord<R extends UpdatableRecord<R>>
Returns:
1 if the record was deleted from the database. 0 if deletion was not necessary.
See Also:
TableRecord.deleteUsing(TableField...)

refresh

public final void refresh()
Description copied from interface: UpdatableRecord
Refresh this record from the database, based on the value of the primary key or main unique key.

This is in fact the same as calling refresh(getTable().getMainKey().getFieldsArray())

The executed statement is

 SELECT * FROM [table]
 WHERE [main key fields = main key values]

Specified by:
refresh in interface UpdatableRecord<R extends UpdatableRecord<R>>
See Also:
TableRecord.refreshUsing(TableField...)

copy

public final R copy()
Description copied from interface: UpdatableRecord
Duplicate this record (in memory) and reset all fields from the primary key or main unique key, such that a subsequent call to UpdatableRecord.store() will result in an INSERT statement.

Specified by:
copy in interface UpdatableRecord<R extends UpdatableRecord<R>>
Returns:
A new record, distinct from this record.

getAttachables

public final List<Attachable> getAttachables()
Description copied from interface: AttachableInternal
Get the list of dependent Attachables

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

Specified by:
getAttachables in interface AttachableInternal

getFields

public final List<Field<?>> getFields()
Specified by:
getFields in interface FieldProvider
Returns:
All available fields

getField

public final <T> Field<T> getField(Field<T> field)
Description copied from interface: FieldProvider
Get a specific field from this field provider.

Usually, this will return the field itself. However, if this is an aliased table, the field will be aliased accordingly.

Specified by:
getField in interface FieldProvider
Type Parameters:
T - The generic field type
Parameters:
field - The field to fetch
Returns:
The field itself or an aliased field

getField

public final Field<?> getField(String name)
Description copied from interface: FieldProvider
Get a specific field from this field provider.

Specified by:
getField in interface FieldProvider
Parameters:
name - The field to fetch
Returns:
The field with the given name

getField

public final Field<?> getField(int index)
Description copied from interface: FieldProvider
Get a specific field from this field provider.

Specified by:
getField in interface FieldProvider
Parameters:
index - The field's index of the field to fetch
Returns:
The field with the given name

size

public final int size()
Description copied from interface: Store
Get the size of this Store.

If this is an ArrayRecord, then the array size is returned. If this is a Record, then the number of fields is returned.

It can be said that getValue(size() - 1) will return a value, if size > 0

Specified by:
size in interface Store<Object>

getIndex

public final int getIndex(Field<?> field)
Description copied from interface: FieldProvider
Get a fields index from this field provider

Specified by:
getIndex in interface FieldProvider
Parameters:
field - The field to look for
Returns:
The field's index

getValue

public final <T> T getValue(Field<T> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValue in interface Record
Type Parameters:
T - The generic field parameter
Parameters:
field - The field
Returns:
The value of a field contained in this record

getValue

public final <T> T getValue(Field<T> field,
                            T defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValue in interface Record
Type Parameters:
T - The generic field parameter
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The value of a field contained in this record, or defaultValue, if null

setValue

public final <T> void setValue(Field<T> field,
                               T value)
Description copied from interface: Record
Set a value into this record.

Specified by:
setValue in interface Record
Type Parameters:
T - The generic field parameter
Parameters:
field - The field
value - The value

setValue

public final <T,U> void setValue(Field<T> field,
                                 U value,
                                 Converter<T,? super U> converter)
Description copied from interface: Record
Set a value into this record.

Specified by:
setValue in interface Record
Type Parameters:
T - The generic field parameter
U - The conversion type parameter
Parameters:
field - The field
value - The value
converter - The converter used to convert value into an appropriate type

toString

public String toString()
Overrides:
toString in class Object

getValueAsString

public final String getValueAsString(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsString in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsString

public final String getValueAsString(Field<?> field,
                                     String defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsString in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsByte

public final Byte getValueAsByte(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsByte in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsByte

public final Byte getValueAsByte(Field<?> field,
                                 Byte defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsByte in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsShort

public final Short getValueAsShort(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsShort in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsShort

public final Short getValueAsShort(Field<?> field,
                                   Short defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsShort in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsInteger

public final Integer getValueAsInteger(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsInteger in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsInteger

public final Integer getValueAsInteger(Field<?> field,
                                       Integer defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsInteger in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsLong

public final Long getValueAsLong(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsLong in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsLong

public final Long getValueAsLong(Field<?> field,
                                 Long defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsLong in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsBigInteger

public final BigInteger getValueAsBigInteger(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsBigInteger in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsBigInteger

public final BigInteger getValueAsBigInteger(Field<?> field,
                                             BigInteger defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsBigInteger in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsFloat

public final Float getValueAsFloat(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsFloat in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsFloat

public final Float getValueAsFloat(Field<?> field,
                                   Float defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsFloat in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsDouble

public final Double getValueAsDouble(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsDouble in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsDouble

public final Double getValueAsDouble(Field<?> field,
                                     Double defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsDouble in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsBigDecimal

public final BigDecimal getValueAsBigDecimal(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsBigDecimal in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsBigDecimal

public final BigDecimal getValueAsBigDecimal(Field<?> field,
                                             BigDecimal defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsBigDecimal in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsBoolean

public final Boolean getValueAsBoolean(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Specified by:
getValueAsBoolean in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsBoolean

public final Boolean getValueAsBoolean(Field<?> field,
                                       Boolean defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Specified by:
getValueAsBoolean in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsTimestamp

public final Timestamp getValueAsTimestamp(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsTimestamp in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsTimestamp

public final Timestamp getValueAsTimestamp(Field<?> field,
                                           Timestamp defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsTimestamp in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsDate

public final Date getValueAsDate(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsDate in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsDate

public final Date getValueAsDate(Field<?> field,
                                 Date defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsDate in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValueAsTime

public final Time getValueAsTime(Field<?> field)
Description copied from interface: Record
Get a value from this Record, providing a field.

Specified by:
getValueAsTime in interface Record
Parameters:
field - The field
Returns:
The converted value of a field contained in this record

getValueAsTime

public final Time getValueAsTime(Field<?> field,
                                 Time defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field.

Specified by:
getValueAsTime in interface Record
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null

getValue

public final Object getValue(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValue in interface Store<Object>
Parameters:
index - The field's index
Returns:
The value of a field's index contained in this Store

getValue

public final Object getValue(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValue in interface Record
Parameters:
fieldName - The field's name
Returns:
The value of a field's name contained in this record

getValue

public final Object getValue(String fieldName,
                             Object defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValue in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The value of a field's name contained in this record, or defaultValue, if null

getValueAsArray

public final <A extends ArrayRecord<T>,T> T[] getValueAsArray(Field<A> field)
Description copied from interface: Record
Get an array value from this Record, providing an ArrayRecord field.

Specified by:
getValueAsArray in interface Record
Type Parameters:
A - The generic field parameter
T - The ArrayRecord type parameter
Parameters:
field - The field
Returns:
The value of a field contained in this record

getValueAsArray

public final <A extends ArrayRecord<T>,T> T[] getValueAsArray(Field<A> field,
                                                              T[] defaultValue)
Description copied from interface: Record
Get an array value from this Record, providing an ArrayRecord field.

Specified by:
getValueAsArray in interface Record
Type Parameters:
A - The generic field parameter
T - The ArrayRecord type parameter
Parameters:
field - The field
defaultValue - The default value instead of null
Returns:
The value of a field contained in this record

getValueAsString

public final String getValueAsString(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsString in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsString

public final String getValueAsString(String fieldName,
                                     String defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsString in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsByte

public final Byte getValueAsByte(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsByte in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsByte

public final Byte getValueAsByte(String fieldName,
                                 Byte defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsByte in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsShort

public final Short getValueAsShort(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsShort in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsShort

public final Short getValueAsShort(String fieldName,
                                   Short defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsShort in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsInteger

public final Integer getValueAsInteger(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsInteger in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsInteger

public final Integer getValueAsInteger(String fieldName,
                                       Integer defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsInteger in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsLong

public final Long getValueAsLong(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsLong in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsLong

public final Long getValueAsLong(String fieldName,
                                 Long defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsLong in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsBigInteger

public final BigInteger getValueAsBigInteger(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsBigInteger in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsBigInteger

public final BigInteger getValueAsBigInteger(String fieldName,
                                             BigInteger defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsBigInteger in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsFloat

public final Float getValueAsFloat(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsFloat in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsFloat

public final Float getValueAsFloat(String fieldName,
                                   Float defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsFloat in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsDouble

public final Double getValueAsDouble(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsDouble in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsDouble

public final Double getValueAsDouble(String fieldName,
                                     Double defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsDouble in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsBigDecimal

public final BigDecimal getValueAsBigDecimal(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsBigDecimal in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsBigDecimal

public final BigDecimal getValueAsBigDecimal(String fieldName,
                                             BigDecimal defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsBigDecimal in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsBoolean

public final Boolean getValueAsBoolean(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Specified by:
getValueAsBoolean in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsBoolean

public final Boolean getValueAsBoolean(String fieldName,
                                       Boolean defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Specified by:
getValueAsBoolean in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsTimestamp

public final Timestamp getValueAsTimestamp(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsTimestamp in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsTimestamp

public final Timestamp getValueAsTimestamp(String fieldName,
                                           Timestamp defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsTimestamp in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsDate

public final Date getValueAsDate(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsDate in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsDate

public final Date getValueAsDate(String fieldName,
                                 Date defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsDate in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValueAsTime

public final Time getValueAsTime(String fieldName)
Description copied from interface: Record
Get a value from this Record, providing a field name.

Specified by:
getValueAsTime in interface Record
Parameters:
fieldName - The field's name
Returns:
The converted value of a field's index contained in this record

getValueAsTime

public final Time getValueAsTime(String fieldName,
                                 Time defaultValue)
Description copied from interface: Record
Get a value from this record, providing a field name.

Specified by:
getValueAsTime in interface Record
Parameters:
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null

getValue

public final <T> T getValue(Field<?> field,
                            Class<? extends T> type)
Description copied from interface: Record
Get a converted value from this Record, providing a field.

Specified by:
getValue in interface Record
Type Parameters:
T - The conversion type parameter
Parameters:
field - The field
type - The conversion type
Returns:
The value of a field contained in this record
See Also:
Convert.convert(Object, Class)

getValue

public final <T> T getValue(Field<?> field,
                            Class<? extends T> type,
                            T defaultValue)
Description copied from interface: Record
Get a converted value from this record, providing a field.

Specified by:
getValue in interface Record
Type Parameters:
T - The conversion type parameter
Parameters:
field - The field
type - The conversion type
defaultValue - The default value instead of null
Returns:
The value of a field contained in this record, or defaultValue, if null
See Also:
Convert.convert(Object, Class)

getValue

public final <T> T getValue(String fieldName,
                            Class<? extends T> type)
Description copied from interface: Record
Get a converted value from this Record, providing a field name.

Specified by:
getValue in interface Record
Type Parameters:
T - The conversion type parameter
Parameters:
fieldName - The field's name
type - The conversion type
Returns:
The value of a field's name contained in this record
See Also:
Convert.convert(Object, Class)

getValue

public final <Z> Z getValue(String fieldName,
                            Class<? extends Z> type,
                            Z defaultValue)
Description copied from interface: Record
Get a converted value from this record, providing a field name.

Specified by:
getValue in interface Record
Type Parameters:
Z - The conversion type parameter
Parameters:
fieldName - The field's name
type - The conversion type
defaultValue - The default value instead of null
Returns:
The value of a field's name contained in this record, or defaultValue, if null
See Also:
Convert.convert(Object, Class)

getValue

public final <T,U> U getValue(Field<T> field,
                              Converter<? super T,U> converter)
Description copied from interface: Record
Get a converted value from this Record, providing a field.

Specified by:
getValue in interface Record
Type Parameters:
T - The database type parameter
U - The conversion type parameter
Parameters:
field - The field
converter - The data type converter
Returns:
The value of a field contained in this record
See Also:
Convert.convert(Object, Converter)

getValue

public final <T,U> U getValue(Field<T> field,
                              Converter<? super T,U> converter,
                              U defaultValue)
Description copied from interface: Record
Get a converted value from this record, providing a field.

Specified by:
getValue in interface Record
Type Parameters:
T - The database type parameter
U - The conversion type parameter
Parameters:
field - The field
converter - The data type converter
defaultValue - The default value instead of null
Returns:
The value of a field contained in this record, or defaultValue, if null
See Also:
Convert.convert(Object, Converter)

getValue

public final <U> U getValue(int index,
                            Converter<?,U> converter)
Description copied from interface: Record
Get a converted value from this Store, providing a field index.

Specified by:
getValue in interface Record
Type Parameters:
U - The conversion type parameter
Parameters:
index - The field's index
converter - The data type converter
Returns:
The value of a field's index contained in this Store
See Also:
Convert.convert(Object, Converter)

getValue

public final <U> U getValue(int index,
                            Converter<?,U> converter,
                            U defaultValue)
Description copied from interface: Record
Get a converted value from this Store, providing a field index.

Specified by:
getValue in interface Record
Type Parameters:
U - The conversion type parameter
Parameters:
index - The field's index
converter - The data type converter
defaultValue - The default value instead of null
Returns:
The value of a field's index contained in this Store, or defaultValue, if null
See Also:
Convert.convert(Object, Converter)

getValue

public final <U> U getValue(String fieldName,
                            Converter<?,U> converter)
Description copied from interface: Record
Get a converted value from this Record, providing a field name.

Specified by:
getValue in interface Record
Type Parameters:
U - The conversion type parameter
Parameters:
fieldName - The field's name
converter - The data type converter
Returns:
The value of a field's name contained in this record
See Also:
Convert.convert(Object, Converter)

getValue

public final <U> U getValue(String fieldName,
                            Converter<?,U> converter,
                            U defaultValue)
Description copied from interface: Record
Get a converted value from this record, providing a field name.

Specified by:
getValue in interface Record
Type Parameters:
U - The conversion type parameter
Parameters:
fieldName - The field's name
converter - The data type converter
defaultValue - The default value instead of null
Returns:
The value of a field's name contained in this record, or defaultValue, if null
See Also:
Convert.convert(Object, Converter)

intoArray

public final Object[] intoArray()
Description copied from interface: Record
Convert this record into an array.

The 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)

Specified by:
intoArray in interface Record
Returns:
This record as an array

into

public final <T> T into(Class<? extends T> type)
Description copied from interface: Record
Map resulting records onto a custom type. The mapping algorithm is this:

If type is an array:

The resulting array is of the nature described in Record.intoArray(). Arrays more specific than Object[] can be specified as well, e.g. String[]. If conversion fails, a MappingException is thrown, wrapping conversion exceptions.

If any JPA Column annotations are found on the provided type, only those are used:

Additional rules:

If there are no JPA Column annotations, or jOOQ can't find the javax.persistence API on the classpath, jOOQ will map Record values by naming convention:

If Field.getName() is MY_field (case-sensitive!), then this field's value will be set on all of these:

Other restrictions

Specified by:
into in interface Record
Type Parameters:
T - The generic entity type.
Parameters:
type - The entity type.
See Also:
Record.from(Object)

into

public final <R extends Record> R into(Table<R> table)
Description copied from interface: Record
Map resulting records onto a custom record type. The mapping algorithm is this:

jOOQ will map Record values by equal field names:

If a field's value for Field.getName() is MY_field (case-sensitive!), then there must be a field in table with the exact same name.

Other restrictions

Specified by:
into in interface Record
Type Parameters:
R - The generic table record type.
Parameters:
table - The table type.

from

public final void from(Object source)
Description copied from interface: Record
Load data into this record from a source. The mapping algorithm is this:

If any JPA Column annotations are found on the Class of the provided source, only those are used. Matching candidates are:

Additional matching rules:

If there are no JPA 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:

Other restrictions

Specified by:
from in interface Record
Parameters:
source - The source object to copy data from
See Also:
Record.into(Class)

from

protected final void from(Record source)
This method was implemented with [#799]. It may be useful to make it public for broader use...?


internalAPI

public final <I> I internalAPI(Class<I> internalType)
Description copied from interface: Adapter
Adapt to an internal type assuming its functionality

This is for JOOQ INTERNAL USE only. If you need to access the internal API, these are the known possible interfaces:

Be aware though, that the internal API may change even between minor releases.

Specified by:
internalAPI in interface Adapter
Type Parameters:
I - The internal type's generic type parameter.
Parameters:
internalType - The internal type
Returns:
This object wrapped by or cast to an internal type

attach

public final void attach(Configuration configuration)
Description copied from interface: Attachable
Attach this object to a new Configuration

Specified by:
attach in interface Attachable

getConfiguration

public final Configuration getConfiguration()
Description copied from interface: AttachableInternal
Get the underlying configuration

Specified by:
getConfiguration in interface AttachableInternal

create

protected final Factory create()
This method is used in generated code!


getValue

public final T getValue(int index,
                        T defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValue in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The value of a field's index contained in this Store, or defaultValue, if null

getValueAsBigDecimal

public final BigDecimal getValueAsBigDecimal(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsBigDecimal in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsBigDecimal

public final BigDecimal getValueAsBigDecimal(int index,
                                             BigDecimal defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsBigDecimal in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsBoolean

public final Boolean getValueAsBoolean(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Specified by:
getValueAsBoolean in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsBoolean

public final Boolean getValueAsBoolean(int index,
                                       Boolean defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Specified by:
getValueAsBoolean in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsBigInteger

public final BigInteger getValueAsBigInteger(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsBigInteger in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsBigInteger

public final BigInteger getValueAsBigInteger(int index,
                                             BigInteger defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsBigInteger in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsByte

public final Byte getValueAsByte(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsByte in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsByte

public final Byte getValueAsByte(int index,
                                 Byte defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsByte in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsDate

public final Date getValueAsDate(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsDate in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsDate

public final Date getValueAsDate(int index,
                                 Date defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsDate in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsDouble

public final Double getValueAsDouble(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsDouble in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsDouble

public final Double getValueAsDouble(int index,
                                     Double defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsDouble in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsFloat

public final Float getValueAsFloat(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsFloat in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsFloat

public final Float getValueAsFloat(int index,
                                   Float defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsFloat in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsInteger

public final Integer getValueAsInteger(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsInteger in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsInteger

public final Integer getValueAsInteger(int index,
                                       Integer defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsInteger in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsLong

public final Long getValueAsLong(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsLong in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsLong

public final Long getValueAsLong(int index,
                                 Long defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsLong in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsShort

public final Short getValueAsShort(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsShort in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsShort

public final Short getValueAsShort(int index,
                                   Short defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsShort in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsString

public final String getValueAsString(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsString in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsString

public final String getValueAsString(int index,
                                     String defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsString in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsTime

public final Time getValueAsTime(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsTime in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsTime

public final Time getValueAsTime(int index,
                                 Time defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsTime in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValueAsTimestamp

public final Timestamp getValueAsTimestamp(int index)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsTimestamp in interface Store<T>
Parameters:
index - The field's index
Returns:
The converted value of a field's index contained in this Store

getValueAsTimestamp

public final Timestamp getValueAsTimestamp(int index,
                                           Timestamp defaultValue)
Description copied from interface: Store
Get a value from this Store, providing a field index.

Specified by:
getValueAsTimestamp in interface Store<T>
Parameters:
index - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this Store, or defaultValue, if null

getValue

public final <Z> Z getValue(int index,
                            Class<? extends Z> type)
Description copied from interface: Store
Get a converted value from this Store, providing a field index.

Specified by:
getValue in interface Store<T>
Type Parameters:
Z - The conversion type parameter
Parameters:
index - The field's index
type - The conversion type
Returns:
The value of a field's index contained in this Store
See Also:
Convert.convert(Object, Class)

getValue

public final <Z> Z getValue(int index,
                            Class<? extends Z> type,
                            Z defaultValue)
Description copied from interface: Store
Get a converted value from this Store, providing a field index.

Specified by:
getValue in interface Store<T>
Type Parameters:
Z - The conversion type parameter
Parameters:
index - The field's index
type - The conversion type
defaultValue - The default value instead of null
Returns:
The value of a field's index contained in this Store, or defaultValue, if null
See Also:
Convert.convert(Object, Class)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.