Best code examples for Hibernate ORM EJB3NamingStrategy class (org.hibernate.cfg.EJB3NamingStrategy)

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

Hibernate ORM EJB3NamingStrategy examples from Open Source projects
This code example shows how to use the following methods:
//$Id$ 
package org.hibernate.ejb.test; 
import org.hibernate.cfg.EJB3NamingStrategy; 
 
/** 
 * @author Emmanuel Bernard 
 */ 
public class MyNamingStrategy extends EJB3NamingStrategy { 
	@Override 
	public String tableName(String tableName) { 
		return "tbl_" + super.tableName( tableName ); 
	} 
} 

5
CodeRank
This code example shows how to use the following methods:
// $Id$ 
package org.hibernate.test.annotations.namingstrategy; 
 
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Iterator;
 
import org.jboss.logging.Logger; 
 
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.EJB3NamingStrategy;
import org.hibernate.cfg.Environment;
import org.hibernate.cfg.Mappings;
import org.hibernate.mapping.Table;
import org.hibernate.service.ServiceRegistry;
 
import junit.framework.TestCase;
 
import org.hibernate.testing.ServiceRegistryBuilder; 
 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
//$Id$ 
package org.hibernate.test.annotations; 
import org.hibernate.cfg.EJB3NamingStrategy;
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.internal.util.StringHelper;
 
/** 
 * @author Emmanuel Bernard 
 */ 
public class AlternativeNamingStrategy extends EJB3NamingStrategy {
	public static NamingStrategy INSTANCE = new AlternativeNamingStrategy();
 
	public String classToTableName(String className) {
		return tableName( StringHelper.unqualify( className ) );
	} 
 
	public String propertyToColumnName(String propertyName) {
		return columnName( StringHelper.unqualify( propertyName ) );
	} 
 

5
CodeRank
This code example shows how to use the following methods:
// $Id$ 
package org.hibernate.test.annotations.namingstrategy; 
import org.hibernate.cfg.EJB3NamingStrategy; 
 
@SuppressWarnings("serial") 
public class DummyNamingStrategy extends EJB3NamingStrategy { 
	 
	public String tableName(String tableName) { 
		return "T" + tableName; 
	} 
 
} 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
import org.hibernate.cfg.EJB3NamingStrategy;
 
/** 
 * @author lazyman 
 */ 
public class MidPointNamingStrategy extends EJB3NamingStrategy {
 
    private static final Trace LOGGER = TraceManager.getTrace(MidPointNamingStrategy.class);
    private static final int MAX_LENGTH = 30;
 
    @Override 
    public String classToTableName(String className) {
        String name = className.substring(1);
        //change camel case to underscore delimited 
        name = name.replaceAll(String.format("%s|%s|%s",
                "(?<=[A-Z])(?=[A-Z][a-z])", 
                "(?<=[^A-Z])(?=[A-Z])", 
                "(?<=[A-Za-z])(?=[^A-Za-z])" 
        ), "_"); 
 
Full Snippet Info
3
CodeRank
See Code Examples for Hibernate ORM EJB3NamingStrategy Methods: