Holger's
Java API

com.antelmann.sql
Class DBDocumentStore.Mapper<T extends DBDocument>

java.lang.Object
  extended by com.antelmann.sql.BaseRowMapper<T>
      extended by com.antelmann.sql.BaseDocumentMapper<T>
          extended by com.antelmann.sql.DBDocumentStore.Mapper<T>
All Implemented Interfaces:
TransactionRequired, MappingInfo, ObjectRowMapper<T>, Converter<RowItem,T>
Enclosing class:
DBDocumentStore<T extends DBDocument>

public static class DBDocumentStore.Mapper<T extends DBDocument>
extends BaseDocumentMapper<T>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.antelmann.sql.BaseDocumentMapper
BaseDocumentMapper.Column
 
Nested classes/interfaces inherited from interface com.antelmann.util.Converter
Converter.Adapter<T1,T2>
 
Field Summary
protected  String filenameColumn
           
protected  String imageColumn
           
protected  String imageFormat
           
protected  boolean preloadStream
           
protected  String streamColumn
           
 
Fields inherited from class com.antelmann.sql.BaseDocumentMapper
beginColumn, descriptionColumn, endColumn, locationColumn, notesColumn, titleColumn
 
Fields inherited from class com.antelmann.sql.BaseRowMapper
db, helper
 
Constructor Summary
DBDocumentStore.Mapper(Database<Connection> db, String tableName, String idColumn, String displayColumn, IDFactory idFactory, Class<T> type, String query)
           
 
Method Summary
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)
          requires a constructor of the kind DBDocument.DBDocument(Object, com.antelmann.db.DBClassStore, boolean)
 
Methods inherited from class com.antelmann.sql.BaseDocumentMapper
getRelationshipManager, initInstance, initKeys, setRelationshipManager, verifyBeforeDelete
 
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, verifyBeforeStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

streamColumn

protected String streamColumn

filenameColumn

protected String filenameColumn

imageColumn

protected String imageColumn

imageFormat

protected String imageFormat

preloadStream

protected boolean preloadStream
Constructor Detail

DBDocumentStore.Mapper

public DBDocumentStore.Mapper(Database<Connection> db,
                              String tableName,
                              String idColumn,
                              String displayColumn,
                              IDFactory idFactory,
                              Class<T> type,
                              String query)
                       throws DatabaseException
Throws:
DatabaseException
Method Detail

instantiate

public T instantiate(RowItem row)
                                 throws Exception
requires a constructor of the kind DBDocument.DBDocument(Object, com.antelmann.db.DBClassStore, boolean)

Specified by:
instantiate in interface ObjectRowMapper<T extends DBDocument>
Overrides:
instantiate in class BaseDocumentMapper<T extends DBDocument>
Throws:
Exception
See Also:
DBDocument.createDocument(Object, DBClassStore, boolean)

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.

Overrides:
generateRowProperties in class BaseDocumentMapper<T extends DBDocument>
Throws:
WrongDataException


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