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

de.sekmi.histream.etl.config.IntegerColumn Maven / Gradle / Ivy

There is a newer version: 0.13.3
Show newest version
package de.sekmi.histream.etl.config;

import javax.xml.bind.annotation.XmlType;

import de.sekmi.histream.etl.ParseException;

@XmlType(name="integer")
public class IntegerColumn extends Column {

	@Override
	public Long valueOf(Object input) throws ParseException {
		if( input instanceof Integer ){
			return new Long((Integer)input);
		}else if( input instanceof Long ){
			return (Long)input;
		}else{
			throw new ParseException("Unsupported input type "+input.getClass().getName());
		}
	}

	@Override
	public Long valueFromString(String input) throws ParseException {
		return Long.parseLong(input);
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy