クラス DefaultColumnFieldMapper
- java.lang.Object
-
- org.nkjmlab.sorm4j.extension.DefaultColumnFieldMapper
-
- すべての実装されたインタフェース:
ColumnFieldMapper
public class DefaultColumnFieldMapper extends Object implements ColumnFieldMapper
Default implementation ofColumnFieldMapper- 作成者:
- nkjm
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DefaultColumnFieldMapper()
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Map<String,Accessor>createAccessors(Class<?> objectClass)Creates accessors by guessing column names from the object class forColumnsMappingMap<String,Accessor>createAccessors(Class<?> objectClass, List<Column> columns)Creates accessors by guessing column names from the object class forTableMappingList<Column>getAutoGeneratedColumns(DatabaseMetaData metaData, String tableName)Retrieves a list of auto-generated columns of the given table name from the database metadata.List<Column>getColumns(DatabaseMetaData metaData, String tableName)Gets column names of the given table name of the database metadata.List<Column>getPrimaryKeys(DatabaseMetaData metaData, String tableName)Retrieves a list of primary keys columns of the given table name from the database metadata.protected StringgetSchemaPattern(DatabaseMetaData metaData)Gets schema pattern for accessingDatabaseMetaData.protected List<Column>guessColumnNameCandidates(FieldName fieldName)Guesses candidates of column name from the given field name.protected booleanisMatch(Column column, FieldName fieldName)Gets field name corresponding to the column name.
-
-
-
メソッドの詳細
-
createAccessors
public Map<String,Accessor> createAccessors(Class<?> objectClass)
インタフェースからコピーされた説明:ColumnFieldMapperCreates accessors by guessing column names from the object class forColumnsMapping- 定義:
createAccessorsインタフェース内ColumnFieldMapper- 戻り値:
-
createAccessors
public Map<String,Accessor> createAccessors(Class<?> objectClass, List<Column> columns)
インタフェースからコピーされた説明:ColumnFieldMapperCreates accessors by guessing column names from the object class forTableMapping- 定義:
createAccessorsインタフェース内ColumnFieldMapper- 戻り値:
-
isMatch
protected boolean isMatch(Column column, FieldName fieldName)
Gets field name corresponding to the column name. If the set of column name candidates guessed from a field contains the given column name, the field is mapped to the column. Capital case is ignored for the mapping.- パラメータ:
column-fieldName-- 戻り値:
-
getAutoGeneratedColumns
public List<Column> getAutoGeneratedColumns(DatabaseMetaData metaData, String tableName) throws SQLException
インタフェースからコピーされた説明:ColumnFieldMapperRetrieves a list of auto-generated columns of the given table name from the database metadata.- 定義:
getAutoGeneratedColumnsインタフェース内ColumnFieldMapper- 戻り値:
- 例外:
SQLException
-
getColumns
public List<Column> getColumns(DatabaseMetaData metaData, String tableName) throws SQLException
インタフェースからコピーされた説明:ColumnFieldMapperGets column names of the given table name of the database metadata.- 定義:
getColumnsインタフェース内ColumnFieldMapper- 戻り値:
- 例外:
SQLException
-
getPrimaryKeys
public List<Column> getPrimaryKeys(DatabaseMetaData metaData, String tableName) throws SQLException
インタフェースからコピーされた説明:ColumnFieldMapperRetrieves a list of primary keys columns of the given table name from the database metadata.- 定義:
getPrimaryKeysインタフェース内ColumnFieldMapper- 戻り値:
- 例外:
SQLException
-
getSchemaPattern
protected String getSchemaPattern(DatabaseMetaData metaData) throws SQLException
Gets schema pattern for accessingDatabaseMetaData.- パラメータ:
metaData-- 戻り値:
- 例外:
SQLException
-
-