Best code examples for Hibernate ORM Dialect class (org.hibernate.dialect.Dialect)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM Dialect class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM Dialect examples from Open Source projects
This code example shows how to use the following methods: closeQuote, getDropForeignKeyString, openQuote, quote, supportsIfExistsAfterConstraintName
 
	public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
		return "alter table " +  
			getTable().getQualifiedName(dialect, defaultCatalog, defaultSchema) + 
			dialect.getDropForeignKeyString() + 
			getName();
	} 
 
	public boolean isCascadeDeleteEnabled() { 
		return cascadeDeleteEnabled;
	} 
 
	public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled) {
		this.cascadeDeleteEnabled = cascadeDeleteEnabled;
	} 
	 
	public boolean isPhysicalConstraint() { 
		return referencedTable.isPhysicalTable() && 
				getTable().isPhysicalTable() && 
				!referencedTable.hasDenormalizedTables();

7
CodeRank
This code example shows how to use the following methods: closeQuote, openQuote

6
CodeRank
This code example shows how to use the following methods: closeQuote, openQuote
	 * @param dialect 
	 * @return if quoted, identifier name enclosed in dialect-specific 
	 *         open- and end-quotes; otherwise, the identifier name. 
	 */ 
	public String encloseInQuotesIfQuoted(Dialect dialect) {
		return isQuoted ?
				new StringBuilder( name.length() + 2 )
						.append( dialect.openQuote() )
						.append( name )
						.append( dialect.closeQuote() )
						.toString() :
				name;
	} 
 
	@Override 
	public String toString() {
		return isQuoted
				? '`' + getName() + '`' 
				: getName(); 
	} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getCaseInsensitiveLike, getLowercaseFunction, supportsCaseInsensitiveLike
			CriteriaQuery criteriaQuery) throws HibernateException {
		Dialect dialect = criteriaQuery.getFactory().getDialect();
		String[] columns = criteriaQuery.findColumns(propertyName, criteria);
		if ( columns.length != 1 ) {
			throw new HibernateException( "Like may only be used with single-column properties" );
		} 
		String escape = escapeChar == null ? "" : " escape \'" + escapeChar + "\'";
		String column = columns[0];
		if ( ignoreCase ) {
			if ( dialect.supportsCaseInsensitiveLike() ) {
				return column +" " + dialect.getCaseInsensitiveLike() + " ?" + escape;
			} 
			else { 
				return dialect.getLowercaseFunction() + '(' + column + ')' + " like ?" + escape;
			} 
		} 
		else { 
			return column + " like ?" + escape;
		} 
	} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: closeQuote, openQuote
	public void addColumns(Iterator extraColumns) {
		while ( extraColumns.hasNext() ) addColumn( (Column) extraColumns.next() );
	} 
 
	/** 
	 * @param column 
	 * @return true if this constraint already contains a column with same name. 
	 */ 
	public boolean containsColumn(Column column) {
		return columns.contains( column );
	} 
 
	public String getName() {
		return name;
	} 
 
	public void setName(String name) {
		this.name = name;
	} 
 

6
CodeRank
See Code Examples for Hibernate ORM Dialect Methods: