クラス DefaultColumnFieldMapper
- java.lang.Object
-
- org.nkjmlab.sorm4j.extension.DefaultColumnFieldMapper
-
- すべての実装されたインタフェース:
ColumnFieldMapper
public class DefaultColumnFieldMapper extends Object implements ColumnFieldMapper
Default implementation ofColumnFieldMapper- 作成者:
- nkjm
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DefaultColumnFieldMapper()
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 List<Column>getAutoGeneratedColumns(DatabaseMetaData metaData, String tableName)Retrieves a list of auto-generated columns of the given table name from the database metadata.List<Column>getColumnNameCandidates(List<FieldName> fieldNames)Gets column name candidates based the field names.List<Column>getColumns(DatabaseMetaData metaData, String tableName)Gets column names of the given table name of the database metadata.Optional<FieldName>getFieldNameByColumnName(Column column, List<FieldName> fieldNames)Gets field name corresponding to the column name.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.protected List<Column>guessColumnNameCandidates(FieldName fieldName)Guesses candidates of column name from the given field name.
-
-
-
メソッドの詳細
-
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.- パラメータ:
metaData-- 戻り値:
- 例外:
SQLException
-
getColumnNameCandidates
public List<Column> getColumnNameCandidates(List<FieldName> fieldNames)
インタフェースからコピーされた説明:ColumnFieldMapperGets column name candidates based the field names.- 定義:
getColumnNameCandidatesインタフェース内ColumnFieldMapper- 戻り値:
-
guessColumnNameCandidates
protected List<Column> guessColumnNameCandidates(FieldName fieldName)
Guesses candidates of column name from the given field name.- パラメータ:
fieldName-- 戻り値:
-
getFieldNameByColumnName
public Optional<FieldName> getFieldNameByColumnName(Column column, List<FieldName> fieldNames)
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.- 定義:
getFieldNameByColumnNameインタフェース内ColumnFieldMapper- パラメータ:
column- column namefieldNames- fieldNames exists in mapped object.- 戻り値:
-
-