Holger's Java API

## com.antelmann.image
Class ThumbnailMapper<T extends ImageURLEntry.Thumbnail<?>>

    java.lang.Object
      com.antelmann.sql.BaseRowMapper<T>
          com.antelmann.image.ThumbnailMapper<T>

All Implemented Interfaces:
  TransactionRequired, MappingInfo, ObjectRowMapper<T>, Converter<RowItem,T>

    public class ThumbnailMapper<T extends ImageURLEntry.Thumbnail<?>>

extends BaseRowMapper<T>

Since:
  29.08.2009, 18:23:15
Author:
  holger
See Also:
  `ImageURLEntrySQLStore.createThumbnailMapper(Class)`

Nested Class Summary

Nested classes/interfaces inherited from interface com.antelmann.util.Converter
`Converter.Adapter<T1,T2>`

Field Summary

Fields inherited from class com.antelmann.sql.BaseRowMapper
`db, helper`

Constructor Summary
`ThumbnailMapper(Database<Connection> db, Class<T> thumbnailType, Class<? extends ImageURLEntry> imageEntryType, String tableName, String idColumn, String thumbnailColumn, String urlColumn, String displayColumn)`

Method Summary

`static

`<T extends ImageURLEntry.Thumbnail<?>> JDBCRowStore<T>`

`

`createStore(Database<Connection> db, Class<T> thumbnailType, Class<? extends ImageURLEntry> imageEntryType, String tableName, String idColumn, String thumbnailColumn, String urlColumn, String displayColumn)`

`protected Map<String,Object>` `generateRowProperties(T entry)` generates a map that contains all columns mapped to their values, so that the map can be used to store the object into a row.
`T` `instantiate(RowItem row)` uses reflection; requires a constructor equivalent to `ImageURLEntry.Thumbnail#Thumbnail(Class, Object, Image, URL, String)`

Methods inherited from class com.antelmann.sql.BaseRowMapper

`addColumnsForTopic, applyFromMapping, checkExistence, convert, convertBack, convertTopicFilter, emptyStringsToNull, extractReference, extractStub, extractStub, generateNewID, getAll, getColumnDisplayMapping, getColumnNames, getColumnsForTopic, getColumnSize, getConnection, getConnectionHelper, getDisplayColumn, getDisplayNameForColumn, getEntryClass, getEntryClassMapper, getIDColumn, getIDFactory, getMappedValue, getMappingForTopic, getNextIntID, getNextIntIDFactory, getNextIntIDFactory, getPreStoreFilter, getReadOnlyColumns, getRestrictMappedColumns, getResultSet, getSQLTypeforColumn, getStubColumns, getStubQuery, getStubResultSet, getSupportedTopicColumns, getTableColumnNames, getTableName, getTableQuery, getTableQueryForComboFilter, getTransactionCounter, getUniqueRandomString, handleAfterStore, initMapping, isMappedTopic, isTranslate, javaToSql, javaToSql, lockTable, mapReference, mapReference, mapToRow, removeColumnTopic, setColumnsForTopic, setDisplayColumn, setEntryClass, setEntryClassMapper, setIDFactory, setMappedValue, setNextIntIdAsFactory, setPreStoreFilter, setReadOnlyColumns, setRestrictedMappedColumns, setStubQuery, setTableQuery, setTableQuery, setTopic, setTranslate, sqlToJava, toSQLMap, verifyBeforeDelete, verifyBeforeStore`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ThumbnailMapper

    public ThumbnailMapper(Database<Connection> db,
                           Class<T> thumbnailType,
                           Class<? extends ImageURLEntry> imageEntryType,
                           String tableName,
                           String idColumn,
                           String thumbnailColumn,
                           String urlColumn,
                           String displayColumn)
                    throws DatabaseException

Throws:
  `DatabaseException`

Method Detail

### createStore

    public static <T extends ImageURLEntry.Thumbnail<?>> JDBCRowStore<T> createStore(Database<Connection> db,
                                                                                     Class<T> thumbnailType,
                                                                                     Class<? extends ImageURLEntry> imageEntryType,
                                                                                     String tableName,
                                                                                     String idColumn,
                                                                                     String thumbnailColumn,
                                                                                     String urlColumn,
                                                                                     String displayColumn)
                                                                          throws DatabaseException

  Throws:
    `DatabaseException`

### generateRowProperties

    protected Map<String,Object> generateRowProperties(T entry)
                                                throws WrongDataException

  Description copied from class: `BaseRowMapper`
  generates a map that contains all columns mapped to their values, so that the map can be used to store the object into a row. The ID column and the corresponding ID should not be put in there, as this will happen automatically later.

  Specified by:
    `generateRowProperties` in class `BaseRowMapper<T extends ImageURLEntry.Thumbnail<?>>`
  Throws:
    `WrongDataException`

### instantiate

    public T instantiate(RowItem row)
                                                     throws Exception

  uses reflection; requires a constructor equivalent to `ImageURLEntry.Thumbnail#Thumbnail(Class, Object, Image, URL, String)`

  Throws:
    `Exception`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads