All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.akquinet.jbosscc.guttenbase.mapping.BigIntLongToBigDecimalColumnDataMapper Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package de.akquinet.jbosscc.guttenbase.mapping;

import java.math.BigDecimal;
import java.sql.SQLException;

import de.akquinet.jbosscc.guttenbase.meta.ColumnMetaData;

/**
 * Map Long/Bigint to BigDecimal
 * 
 * 

* © 2012 akquinet tech@spree *

* * @author M. Dahm */ public class BigIntLongToBigDecimalColumnDataMapper implements ColumnDataMapper { @Override public Object map(final ColumnMetaData sourceColumnMetaData, final ColumnMetaData targetColumnMetaData, final Object value) throws SQLException { return value == null ? null : new BigDecimal(value.toString()); } @Override public boolean isApplicable(final ColumnMetaData sourceColumnMetaData, final ColumnMetaData targetColumnMetaData) throws SQLException { return true; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy