Map table name at runtime

Hi all,

is it possible to give table name at session level?
My goal is to create one table for each type of measurement we need as they can contains million of records.

package statistic.database.mapping;

import org.hibernate.cfg.DefaultNamingStrategy;

import lt.LTPlugin;

public class MyNamingStrategy extends DefaultNamingStrategy {

private static final long serialVersionUID = 212398963781421143L;

private String measurementName;

public MyNamingStrategy() {}

public MyNamingStrategy(String measurementName) {
	this.measurementName = measurementName;

public String tableName(String tableName) {
	if(measurementName != null && !measurementName.isBlank())
		return tableName + "_" + measurementName;
		return tableName;

public String getMeasurementName() {
	return measurementName;

public void setMeasurementName(String measurementName) {
	this.measurementName = measurementName;


Is it possible to decide whenever activate this NamingSpecs (as happens for the Filter?).
Thank you in advance.