クラス DefaultColumnFieldMapper
- java.lang.Object
-
- org.nkjmlab.sorm4j.extension.DefaultColumnFieldMapper
-
- すべての実装されたインタフェース:
ColumnFieldMapper
public class DefaultColumnFieldMapper extends Object implements ColumnFieldMapper
Default implementation ofColumnFieldMapper- 作成者:
- nkjm
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DefaultColumnFieldMapper()DefaultColumnFieldMapper(LoggerContext loggerContext)
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Map<String,Accessor>createAccessors(Class<?> objectClass)Creates accessors by guessing column names from the object class forColumnsMappingMap<String,Accessor>createAccessors(Class<?> objectClass, List<ColumnName> columnNames)Creates accessors by guessing column names from the object class forTableMappingList<ColumnName>getAutoGeneratedColumns(DatabaseMetaData metaData, String tableName)Retrieves a list of auto-generated columns of the given table name from the database metadata.List<ColumnName>getColumns(DatabaseMetaData metaData, String tableName)Gets column names of the given table name of the database metadata.List<ColumnName>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<ColumnName>guessColumnNameCandidates(FieldName fieldName)Guesses candidates of column name from the given field name.protected booleanisMatch(ColumnName columnName, FieldName fieldName)Gets field name corresponding to the column name.
-
-
-
コンストラクタの詳細
-
DefaultColumnFieldMapper
public DefaultColumnFieldMapper()
-
DefaultColumnFieldMapper
public DefaultColumnFieldMapper(LoggerContext loggerContext)
-
-
メソッドの詳細
-
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<ColumnName> columnNames)
インタフェースからコピーされた説明:ColumnFieldMapperCreates accessors by guessing column names from the object class forTableMapping- 定義:
createAccessorsインタフェース内ColumnFieldMapper- 戻り値:
-
isMatch
protected boolean isMatch(ColumnName columnName, 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.- パラメータ:
columnName-fieldName-- 戻り値:
-
getAutoGeneratedColumns
public List<ColumnName> 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<ColumnName> 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<ColumnName> 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
-
guessColumnNameCandidates
protected List<ColumnName> guessColumnNameCandidates(FieldName fieldName)
Guesses candidates of column name from the given field name.- パラメータ:
fieldName-- 戻り値:
-
-