/**
 * 
 */
package org.springblade.etl.connector.transform;

import org.springblade.etl.connector.base.SeatunnelConnector;
import org.springblade.etl.connector.transform.config.SeatunnelPrimaryKeyAddTransformConfig;
import org.springblade.etl.util.EtlJsonUtil;
import org.springblade.etl.util.ValidateUtil;
import org.springframework.stereotype.Component;

/**
 * @author wookvn
 *
 */
@Component
public class PlatomixPrimaryKeyAddTransform implements SeatunnelConnector<SeatunnelPrimaryKeyAddTransformConfig> {

	@Override
	public SeatunnelPrimaryKeyAddTransformConfig buildConfig(String configJson) {
		return (SeatunnelPrimaryKeyAddTransformConfig)validate(configJson);
	}

	@Override
	public Object validate(String configJson) {
		SeatunnelPrimaryKeyAddTransformConfig config = EtlJsonUtil.parseJsonString(configJson, SeatunnelPrimaryKeyAddTransformConfig.class);
		ValidateUtil.validate(config);
		return config;
	}

}
