|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eobjects.metamodel.convert.Converters
public final class Converters
This class consists of static methods for decorating DataContexts
with TypeConverters, which allows for automatic conversion of values
on data read and write operations.
| Method Summary | ||
|---|---|---|
static DataContext |
addTypeConverter(DataContext dataContext,
Column column,
TypeConverter<?,?> converter)
Adds a type converter to a specific column in the DataContext. |
|
static UpdateableDataContext |
addTypeConverter(UpdateableDataContext dataContext,
Column column,
TypeConverter<?,?> converter)
Adds a type converter to a specific column in the DataContext. |
|
static DataContext |
addTypeConverters(DataContext dataContext,
Map<Column,TypeConverter<?,?>> converters)
Adds a collection of type converters to specific columns in the DataContext |
|
static UpdateableDataContext |
addTypeConverters(UpdateableDataContext dataContext,
Map<Column,TypeConverter<?,?>> converters)
Adds a collection of type converters to specific columns in the DataContext |
|
static Map<Column,TypeConverter<?,?>> |
autoDetectConverters(DataContext dataContext,
Column[] columns,
int sampleSize)
Auto-detects / guesses the type converters to be applied on set of columns. |
|
static Map<Column,TypeConverter<?,?>> |
autoDetectConverters(DataContext dataContext,
Table table,
int sampleSize)
Auto-detects / guesses the type converters to be applied on a table. |
|
protected static
|
convertRow(RB rowBuilder,
Map<Column,TypeConverter<?,?>> converters)
Converts values in a RowBuilder. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static UpdateableDataContext addTypeConverter(UpdateableDataContext dataContext,
Column column,
TypeConverter<?,?> converter)
DataContext.
dataContext - the DataContext to decoratecolumn - the column which holds values to convertconverter - the converter to use on the specified column
public static DataContext addTypeConverter(DataContext dataContext,
Column column,
TypeConverter<?,?> converter)
DataContext.
dataContext - the DataContext to decoratecolumn - the column which holds values to convertconverter - the converter to use on the specified column
public static UpdateableDataContext addTypeConverters(UpdateableDataContext dataContext,
Map<Column,TypeConverter<?,?>> converters)
DataContext
dataContext - the DataContext to decorateconverters - a map containing columns and mapped type converters.
public static DataContext addTypeConverters(DataContext dataContext,
Map<Column,TypeConverter<?,?>> converters)
DataContext
dataContext - the DataContext to decorateconverters - a map containing columns and mapped type converters.
public static Map<Column,TypeConverter<?,?>> autoDetectConverters(DataContext dataContext,
Column[] columns,
int sampleSize)
dataContext - the DataContext that holds the data.columns - the columns to inspect to find type conversion candidates.sampleSize - the max amount of rows to query for doing auto-detection. Use
Integer.MAX_VALUE if no constraint should be put on
the number of records to sample.
Columns and TypeConverters which can be
used (eg. with the addTypeConverters(DataContext, Map)
method) to decorate the DataContext with type converters.
public static Map<Column,TypeConverter<?,?>> autoDetectConverters(DataContext dataContext,
Table table,
int sampleSize)
dataContext - the DataContext that holds the data.table - the table to inspect to find type conversion candidates. This
table will hold all columns of the result.sampleSize - the max amount of rows to query for doing auto-detection. Use
Integer.MAX_VALUE if no constraint should be put on
the number of records to sample.
Columns and TypeConverters which can be
used (eg. with the addTypeConverters(DataContext, Map)
method) to decorate the DataContext with type converters.
protected static <RB extends RowBuilder<?>> RB convertRow(RB rowBuilder,
Map<Column,TypeConverter<?,?>> converters)
RowBuilder.
rowBuilder - converters -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||