org.jooq
Interface FieldProvider

All Known Subinterfaces:
Cursor<R>, Record, Result<R>, Select<R>, SelectConditionStep, SelectConnectByConditionStep, SelectConnectByStep, SelectFinalStep, SelectForUpdateOfStep, SelectForUpdateStep, SelectForUpdateWaitStep, SelectFromStep, SelectGroupByStep, SelectHavingConditionStep, SelectHavingStep, SelectJoinStep, SelectLimitStep, SelectOffsetStep, SelectOnConditionStep, SelectOrderByStep, SelectQuery, SelectSelectStep, SelectStartWithStep, SelectWhereStep, SimpleSelectConditionStep<R>, SimpleSelectFinalStep<R>, SimpleSelectForUpdateOfStep<R>, SimpleSelectForUpdateStep<R>, SimpleSelectForUpdateWaitStep<R>, SimpleSelectLimitStep<R>, SimpleSelectOffsetStep<R>, SimpleSelectOrderByStep<R>, SimpleSelectQuery<R>, SimpleSelectWhereStep<R>, Table<R>, TableOnConditionStep, TableRecord<R>, Type<R>, UDT<R>, UDTRecord<R>, UpdatableRecord<R>, UpdatableTable<R>
All Known Implementing Classes:
CustomRecord, CustomTable, TableImpl, TableRecordImpl, UDTImpl, UDTRecordImpl, UpdatableRecordImpl, UpdatableTableImpl

public interface FieldProvider

An object (not necessarily a QueryPart) that holds a list of Fields. Especially the getField(Field) method is interesting, as it may return an aliased version of the given field

Author:
Lukas Eder

Method Summary
<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
 

Method Detail

getField

<T> Field<T> getField(Field<T> field)
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.

Type Parameters:
T - The generic field type
Parameters:
field - The field to fetch
Returns:
The field itself or an aliased field

getField

Field<?> getField(String name)
Get a specific field from this field provider.

Parameters:
name - The field to fetch
Returns:
The field with the given name

getField

Field<?> getField(int index)
Get a specific field from this field provider.

Parameters:
index - The field's index of the field to fetch
Returns:
The field with the given name

getFields

List<Field<?>> getFields()
Returns:
All available fields

getIndex

int getIndex(Field<?> field)
             throws IllegalArgumentException
Get a fields index from this field provider

Parameters:
field - The field to look for
Returns:
The field's index
Throws:
IllegalArgumentException - if the field is not contained in this provider.


Copyright © 2012. All Rights Reserved.