Hibernate ORM ImprovedNamingStrategy - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ImprovedNamingStrategy class.

This code example shows how to use the following methods:
 */ 
public class CreateDataBaseTableByHibernateConfigFile { 
	 
	 
	public static void main(String[] args) {
		Configuration configuration = new Configuration().configure().setNamingStrategy(new ImprovedNamingStrategy());
		SchemaExport export = new SchemaExport(configuration);
		 
		export.setFormat(false);
		export.setOutputFile("src/test/resources/data/h2/create-table-new.sql");
		export.create(true, false);
	} 
	 
} 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
package com.github.dactiv.orm.test; 
 
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.ImprovedNamingStrategy;
import org.hibernate.tool.hbm2ddl.SchemaExport;
 
public class CreateTestInitializeDataBaseSqlFile { 
	 
	public static void main(String[] args) {
		 
		Configuration configuration = new Configuration().configure().setNamingStrategy(new ImprovedNamingStrategy());
		SchemaExport export = new SchemaExport(configuration);
		 
		export.setFormat(false);
		export.setOutputFile("src/test/resources/h2schma.sql");
		export.create(true, false);
	} 
} 

4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: classToTableName
	public String classToTableName(String className) {
		StringBuilder sb = new StringBuilder();
		if(!StringUtils.isEmpty(prefix) && !className.startsWith(prefix)) {
			sb.append(prefix);
		} 
		return sb.append(super.classToTableName(className)).toString();
	} 
	 
	 
	@Override 
	public String tableName(String tableName) {
		StringBuilder sb = new StringBuilder();
		if(!StringUtils.isEmpty(prefix) && !tableName.startsWith(prefix)) {
			sb.append(prefix);
		} 
		return sb.append(super.tableName(tableName)).toString();
	} 
 
} 
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: columnName
     * @param columnName 컬럼명 
     * @return Oracle 명명 규칙에 따른 컬럼명 
     */ 
    @Override 
    public String columnName(String columnName) {
        return super.columnName(columnName).toUpperCase();
    } 
 
    private static final long serialVersionUID = -4830733993241581835L;
} 
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
package com.googlecode.tawus.hibernate.utils; 
 
import org.hibernate.cfg.ImprovedNamingStrategy;
 
@SuppressWarnings("serial") 
public class NewAndImprovedNamingStrategy extends ImprovedNamingStrategy {
   @Override 
   public String foreignKeyColumnName(String propertyName,
         String propertyEntityName, String propertyTableName,
         String referencedColumnName) {
      String s = super.foreignKeyColumnName(propertyName, propertyEntityName,
            propertyTableName, referencedColumnName);
      return s.endsWith("_id") ? s : s + "_id";
   } 
} 
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Hibernate ORM ImprovedNamingStrategy Methods: