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

com.xdev.jadoth.sqlengine.dbms.DbmsConfiguration Maven / Gradle / Ivy

/*
 * XDEV Application Framework - XDEV Application Framework
 * Copyright © 2003 XDEV Software (https://xdev.software)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see .
 */
package com.xdev.jadoth.sqlengine.dbms;

/**
 * @author Thomas Muenz
 *
 */
public class DbmsConfiguration>
{
	///////////////////////////////////////////////////////////////////////////
	// static methods //
	///////////////////
	
	public static final > DbmsConfiguration config(
		final Class dbmsAdaptorType,
		final boolean  delimitTableIdentifiers,
		final boolean  delimitColumnIdentifiers,
		final boolean  delimitAliases,
		final boolean  autoEscapeReservedWords
	)
	{
		return new DbmsConfiguration()
			.setDelimitTableIdentifiers(delimitTableIdentifiers)
			.setDelimitColumnIdentifiers(delimitTableIdentifiers)
			.setDelimitAliases(delimitTableIdentifiers)
			.setAutoDelimitReservedWords(autoEscapeReservedWords)
		;
	}
	
	
	///////////////////////////////////////////////////////////////////////////
	// instance fields //
	////////////////////
	
	private boolean delimitTableIdentifiers = false;
	private boolean delimitColumnIdentifiers = false;
	private boolean delimitAliases = false;
	private boolean autoEscapeReservedWords = false;

	
	
	///////////////////////////////////////////////////////////////////////////
	// getters          //
	/////////////////////
	
	/**
	 * @return the delimitTableIdentifiers
	 */
	public boolean isDelimitTableIdentifiers()
	{
		return delimitTableIdentifiers;
	}
	/**
	 * @return the delimitColumnIdentifiers
	 */
	public boolean isDelimitColumnIdentifiers()
	{
		return delimitColumnIdentifiers;
	}
	/**
	 * @return the delimitAliases
	 */
	public boolean isDelimitAliases()
	{
		return delimitAliases;
	}
	/**
	 * @return the autoEscapeReservedWords
	 */
	public boolean isAutoEscapeReservedWords()
	{
		return this.autoEscapeReservedWords;
	}

	
	
	
	///////////////////////////////////////////////////////////////////////////
	// setters          //
	/////////////////////
	
	/**
	 * @param delimitTableIdentifiers the delimitTableIdentifiers to set
	 */
	public DbmsConfiguration setDelimitTableIdentifiers(final boolean delimitTableIdentifiers)
	{
		this.delimitTableIdentifiers = delimitTableIdentifiers;
		return this;
	}
	/**
	 * @param autoEscapeReservedWords the autoEscapeReservedWords to set
	 */
	public DbmsConfiguration setAutoDelimitReservedWords(final boolean autoEscapeReservedWords)
	{
		this.autoEscapeReservedWords = autoEscapeReservedWords;
		return this;
	}
	/**
	 * @param delimitColumnIdentifiers the delimitColumnIdentifiers to set
	 */
	public DbmsConfiguration setDelimitColumnIdentifiers(boolean delimitColumnIdentifiers)
	{
		this.delimitColumnIdentifiers = delimitColumnIdentifiers;
		return this;
	}
	/**
	 * @param delimitAliases the delimitAliases to set
	 */
	public DbmsConfiguration setDelimitAliases(boolean delimitAliases)
	{
		this.delimitAliases = delimitAliases;
		return this;
	}
	
	


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy