Package com.kenshoo.pl.entity.internal
Class EmptyVirtualEntityFieldDbAdapter<T>
- java.lang.Object
-
- com.kenshoo.pl.entity.internal.EmptyVirtualEntityFieldDbAdapter<T>
-
- All Implemented Interfaces:
EntityFieldDbAdapter<T>
public class EmptyVirtualEntityFieldDbAdapter<T> extends java.lang.Object implements EntityFieldDbAdapter<T>
-
-
Constructor Summary
Constructors Constructor Description EmptyVirtualEntityFieldDbAdapter(DataTable table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.stream.Stream<java.lang.Object>getDbValues(T value)java.lang.ObjectgetFirstDbValue(T value)TgetFromRecord(java.util.Iterator<java.lang.Object> valuesIterator)Composes the value of the entity field out of values of individual table fields.DataTablegetTable()java.util.stream.Stream<org.jooq.TableField<org.jooq.Record,?>>getTableFields()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.kenshoo.pl.entity.EntityFieldDbAdapter
getFirstTableField, isIdentityField
-
-
-
-
Constructor Detail
-
EmptyVirtualEntityFieldDbAdapter
public EmptyVirtualEntityFieldDbAdapter(DataTable table)
-
-
Method Detail
-
getTable
public DataTable getTable()
- Specified by:
getTablein interfaceEntityFieldDbAdapter<T>- Returns:
- the table this entity fields maps to
-
getTableFields
public java.util.stream.Stream<org.jooq.TableField<org.jooq.Record,?>> getTableFields()
- Specified by:
getTableFieldsin interfaceEntityFieldDbAdapter<T>- Returns:
- the table fields this entity field maps to
-
getDbValues
public java.util.stream.Stream<java.lang.Object> getDbValues(T value)
- Specified by:
getDbValuesin interfaceEntityFieldDbAdapter<T>- Parameters:
value- value of entity field to translate- Returns:
- the values for the fields returned by
EntityFieldDbAdapter.getTableFields(), in the same order
-
getFirstDbValue
public java.lang.Object getFirstDbValue(T value)
- Specified by:
getFirstDbValuein interfaceEntityFieldDbAdapter<T>- Parameters:
value- value of entity field to translate- Returns:
- the first value for the fields returned by
EntityFieldDbAdapter.getTableFields(), in field order
-
getFromRecord
public T getFromRecord(java.util.Iterator<java.lang.Object> valuesIterator)
Description copied from interface:EntityFieldDbAdapterComposes the value of the entity field out of values of individual table fields. The iterator passed to this method is positioned at the value of the first field returned byEntityFieldDbAdapter.getTableFields()and the following values correspond to the rest of the fields in the same order.- Specified by:
getFromRecordin interfaceEntityFieldDbAdapter<T>- Parameters:
valuesIterator- iterator positioned at the start of values forEntityFieldDbAdapter.getTableFields()- Returns:
- the value of entity field composed out of DB values taken from the supplied iterator
-
-