Package de.bytefish.pgbulkinsert.mapping
Class AbstractMapping<TEntity>
java.lang.Object
de.bytefish.pgbulkinsert.mapping.AbstractMapping<TEntity>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ColumnDefinition<TEntity>> protected final IValueHandlerProviderprotected final TableDefinitionprotected boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMapping(IValueHandlerProvider provider, String schemaName, String tableName, boolean usePostgresQuoting) protectedAbstractMapping(String schemaName, String tableName) protectedAbstractMapping(String schemaName, String tableName, boolean usePostgresQuoting) -
Method Summary
Modifier and TypeMethodDescriptionprotected <TProperty>
voidprotected <TProperty>
voidmap(String columnName, IValueHandler<TProperty> valueHandler, Function<TEntity, TProperty> propertyGetter) protected voidmapBoolean(String columnName, Function<TEntity, Boolean> propertyGetter) protected voidmapBooleanArray(String columnName, Function<TEntity, Collection<Boolean>> propertyGetter) protected voidmapBooleanPrimitive(String columnName, ToBooleanFunction<TEntity> propertyGetter) protected voidprotected voidprotected voidmapByteArray(String columnName, Function<TEntity, byte[]> propertyGetter) protected voidmapBytePrimitive(String columnName, ToIntFunction<TEntity> propertyGetter) protected voidprotected <TElementType,TCollectionType extends Collection<TElementType>>
voidmapCollection(String columnName, DataType dataType, Function<TEntity, TCollectionType> propertyGetter) protected voidprotected voidprotected voidprotected <T extends Number>
voidmapDoubleArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) protected voidmapDoublePrimitive(String columnName, ToDoubleFunction<TEntity> propertyGetter) protected voidprotected <T extends Number>
voidmapFloatArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) protected voidmapFloatPrimitive(String columnName, ToFloatFunction<TEntity> propertyGetter) protected voidprotected voidmapInet4Addr(String columnName, Function<TEntity, Inet4Address> propertyGetter) protected voidmapInet4Array(String columnName, Function<TEntity, Collection<Inet4Address>> propertyGetter) protected voidmapInet6Addr(String columnName, Function<TEntity, Inet6Address> propertyGetter) protected voidmapInet6Array(String columnName, Function<TEntity, Collection<Inet6Address>> propertyGetter) protected voidprotected voidprotected voidmapInteger(String columnName, Function<TEntity, Number> propertyGetter) protected <T extends Number>
voidmapIntegerArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) protected voidmapIntegerPrimitive(String columnName, ToIntFunction<TEntity> propertyGetter) protected voidmapInterval(String columnName, Function<TEntity, Interval> propertyGetter) protected voidprotected voidprotected voidmapLineSegment(String columnName, Function<TEntity, LineSegment> propertyGetter) protected voidprotected <T extends Number>
voidmapLongArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) protected voidmapLongPrimitive(String columnName, ToLongFunction<TEntity> propertyGetter) protected voidmapMacAddress(String columnName, Function<TEntity, MacAddress> propertyGetter) protected voidmapNumeric(String columnName, Function<TEntity, Number> propertyGetter) protected <T extends Number>
voidmapNumericArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) protected voidprotected voidprotected voidprotected voidmapPolygon(String columnName, Function<TEntity, Polygon> propertyGetter) protected <TElementType>
voidmapRange(String columnName, DataType dataType, Function<TEntity, Range<TElementType>> propertyGetter) protected voidprotected <T extends Number>
voidmapShortArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) protected voidmapShortPrimitive(String columnName, ToIntFunction<TEntity> propertyGetter) protected voidprotected voidmapTextArray(String columnName, Function<TEntity, Collection<String>> propertyGetter) protected voidprotected voidmapTimeStamp(String columnName, Function<TEntity, LocalDateTime> propertyGetter) protected voidmapTimeStampTz(String columnName, Function<TEntity, ZonedDateTime> propertyGetter) protected voidmapTsRange(String columnName, Function<TEntity, Range<LocalDateTime>> propertyGetter) protected voidmapTsTzRange(String columnName, Function<TEntity, Range<ZonedDateTime>> propertyGetter) protected voidprotected voidmapUUIDArray(String columnName, Function<TEntity, Collection<UUID>> propertyGetter) protected voidmapVarChar(String columnName, Function<TEntity, String> propertyGetter) protected voidmapVarCharArray(String columnName, Function<TEntity, Collection<String>> propertyGetter) protected voidusePostgresQuoting(boolean enabled)
-
Field Details
-
usePostgresQuoting
protected boolean usePostgresQuoting -
provider
-
table
-
columns
-
-
Constructor Details
-
AbstractMapping
-
AbstractMapping
-
AbstractMapping
protected AbstractMapping(IValueHandlerProvider provider, String schemaName, String tableName, boolean usePostgresQuoting)
-
-
Method Details
-
usePostgresQuoting
protected void usePostgresQuoting(boolean enabled) -
mapCollection
protected <TElementType,TCollectionType extends Collection<TElementType>> void mapCollection(String columnName, DataType dataType, Function<TEntity, TCollectionType> propertyGetter) -
map
-
map
protected <TProperty> void map(String columnName, IValueHandler<TProperty> valueHandler, Function<TEntity, TProperty> propertyGetter) -
mapBoolean
-
mapBooleanPrimitive
-
mapByte
-
mapBytePrimitive
-
mapShort
-
mapShortPrimitive
-
mapInteger
-
mapIntegerPrimitive
-
mapNumeric
-
mapLong
-
mapLongPrimitive
-
mapFloat
-
mapFloatPrimitive
-
mapDouble
-
mapDoublePrimitive
-
mapInet4Addr
-
mapInet6Addr
-
mapMacAddress
-
mapInterval
-
mapDate
-
mapTime
-
mapTimeStamp
-
mapTimeStampTz
-
mapText
-
mapVarChar
-
mapUUID
-
mapJsonb
-
mapHstore
-
mapPoint
-
mapBox
-
mapPath
-
mapPolygon
-
mapLine
-
mapLineSegment
-
mapCircle
-
mapBooleanArray
protected void mapBooleanArray(String columnName, Function<TEntity, Collection<Boolean>> propertyGetter) -
mapByteArray
-
mapShortArray
protected <T extends Number> void mapShortArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) -
mapIntegerArray
protected <T extends Number> void mapIntegerArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) -
mapLongArray
protected <T extends Number> void mapLongArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) -
mapTextArray
-
mapVarCharArray
protected void mapVarCharArray(String columnName, Function<TEntity, Collection<String>> propertyGetter) -
mapFloatArray
protected <T extends Number> void mapFloatArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) -
mapDoubleArray
protected <T extends Number> void mapDoubleArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) -
mapNumericArray
protected <T extends Number> void mapNumericArray(String columnName, Function<TEntity, Collection<T>> propertyGetter) -
mapUUIDArray
-
mapInet4Array
protected void mapInet4Array(String columnName, Function<TEntity, Collection<Inet4Address>> propertyGetter) -
mapInet6Array
protected void mapInet6Array(String columnName, Function<TEntity, Collection<Inet6Address>> propertyGetter) -
mapRange
-
mapTsRange
-
mapTsTzRange
protected void mapTsTzRange(String columnName, Function<TEntity, Range<ZonedDateTime>> propertyGetter) -
mapInt4Range
-
mapInt8Range
-
mapNumRange
-
mapDateRange
-
getColumns
-
getCopyCommand
-