站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

Mapper (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb.plugins.cmp.jdbc
Interface Mapper


public interface Mapper

Generally, implementations of this interface map instances of one Java type into instances of another Java type. Mappers are used in cases when instances of "enum" types are used as CMP field values. In this case, a mapper represents a mediator and translates instances of "enum" to some id when that can be stored in a column when storing data and back from id to "enum" instance when data is loaded.

Author:
Alex Loubyansky

Method Summary
 Object toColumnValue(Object fieldValue)
          This method is called when CMP field is stored.
 Object toFieldValue(Object columnValue)
          This method is called when CMP field is loaded.
 

Method Detail

toColumnValue

public Object toColumnValue(Object fieldValue)
This method is called when CMP field is stored.

Parameters:
fieldValue - - CMP field value
Returns:
column value.

toFieldValue

public Object toFieldValue(Object columnValue)
This method is called when CMP field is loaded.

Parameters:
columnValue - - loaded column value.
Returns:
CMP field value.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.