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

br.com.anteros.spring.config.SQLSessionFactoryConfiguration Maven / Gradle / Ivy

There is a newer version: 2.0.12
Show newest version
package br.com.anteros.spring.config;

import java.util.ArrayList;
import java.util.List;

import br.com.anteros.persistence.session.configuration.PackageScanEntity;
import br.com.anteros.persistence.session.query.ShowSQLType;

public class SQLSessionFactoryConfiguration {

	private List> entitySourceClasses = new ArrayList>();
	private PackageScanEntity packageScanEntity = null;
	private boolean includeSecurityModel = true;
	private String dialect;
	private ShowSQLType[] showSql = { ShowSQLType.NONE };
	private boolean formatSql = true;
	private String jdbcSchema = "";
	private String databaseDdlGeneration = "none";
	private String ddlOutputMode = "none";

	private SQLSessionFactoryConfiguration() {

	}

	public static SQLSessionFactoryConfiguration create() {
		return new SQLSessionFactoryConfiguration();
	}

	public List> getEntitySourceClasses() {
		return entitySourceClasses;
	}

	public SQLSessionFactoryConfiguration addEntitySourceClass(Class entitySourceClass) {
		this.entitySourceClasses.add(entitySourceClass);
		return this;
	}

	public PackageScanEntity getPackageScanEntity() {
		return packageScanEntity;
	}

	public SQLSessionFactoryConfiguration packageScanEntity(PackageScanEntity packageScanEntity) {
		this.packageScanEntity = packageScanEntity;
		return this;
	}

	public boolean isIncludeSecurityModel() {
		return includeSecurityModel;
	}

	public SQLSessionFactoryConfiguration includeSecurityModel(boolean includeSecurityModel) {
		this.includeSecurityModel = includeSecurityModel;
		return this;
	}

	public String getDialect() {
		return dialect;
	}

	public SQLSessionFactoryConfiguration dialect(String dialect) {
		this.dialect = dialect;
		return this;
	}

	public ShowSQLType[] getShowSql() {
		return showSql;
	}

	public SQLSessionFactoryConfiguration showSql(ShowSQLType... showSql) {
		this.showSql = showSql;
		return this;
	}

	public boolean isFormatSql() {
		return formatSql;
	}

	public SQLSessionFactoryConfiguration formatSql(boolean formatSql) {
		this.formatSql = formatSql;
		return this;
	}

	public String getJdbcSchema() {
		return jdbcSchema;
	}

	public SQLSessionFactoryConfiguration jdbcSchema(String jdbcSchema) {
		this.jdbcSchema = jdbcSchema;
		return this;
	}

	public String getDatabaseDdlGeneration() {
		return databaseDdlGeneration;
	}

	public SQLSessionFactoryConfiguration databaseDdlGeneration(String databaseDdlGeneration) {
		this.databaseDdlGeneration = databaseDdlGeneration;
		return this;
	}

	public String getDdlOutputMode() {
		return ddlOutputMode;
	}

	public SQLSessionFactoryConfiguration ddlOutputMode(String ddlOutputMode) {
		this.ddlOutputMode = ddlOutputMode;
		return this;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy