B - The Bean value typeD - The DB value typepublic class BeanToDbMap<B,D> extends Object
Useful for building Enum converters where you want to map the DB values an Enum gets converter to.
| Constructor and Description |
|---|
BeanToDbMap()
Construct with allowNulls defaulting to false.
|
BeanToDbMap(boolean allowNulls)
Construct with allowNulls setting.
|
| Modifier and Type | Method and Description |
|---|---|
BeanToDbMap<B,D> |
add(B beanValue,
D dbValue)
Add a bean value and DB value pair.
|
B |
getBeanValue(D dbValue)
Return the Bean value given the DB value.
|
D |
getDbValue(B beanValue)
Return the DB value given the bean value.
|
public BeanToDbMap()
public BeanToDbMap(boolean allowNulls)
If allowNulls is false then an IllegalArgumentException is thrown by either the getDBValue or getBeanValue methods if not matching Bean or DB value is found.
Copyright © 2014. All Rights Reserved.