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

net.wicp.tams.common.callback.impl.convertvalue.obj.CreateDbCallBackOds Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package net.wicp.tams.common.callback.impl.convertvalue.obj;

import org.apache.commons.lang3.tuple.Pair;

import net.wicp.tams.common.callback.ICreateDbCallBack;

/***
 * 数据仓库命名规范,一般用于ods的迁移
 * 
 * @author Andy
 *
 */
public abstract class CreateDbCallBackOds implements ICreateDbCallBack {

	private final String region;

	public CreateDbCallBackOds(String region) {
		this.region = region;
	}

	@Override
	public String getDbAndTb(Pair keyObj) {
		String dbstr = keyObj.getLeft().toLowerCase();
		dbstr = dbstr.replace("-", "_");

		String tbstr = keyObj.getRight().toLowerCase();
		tbstr = tbstr.replace("-", "_");
		return String.format("%s.ods_%s_%s", this.region, dbstr, tbstr);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy