org.hibernate.ogm.cfg.impl
Class OgmNamingStrategy

java.lang.Object
  extended by org.hibernate.cfg.EJB3NamingStrategy
      extended by org.hibernate.ogm.cfg.impl.OgmNamingStrategy
All Implemented Interfaces:
Serializable, NamingStrategy

public class OgmNamingStrategy
extends EJB3NamingStrategy

Implements the OGM naming strategy: - based of the JPA 2 naming strategy - column names in components defaults to the fully qualified path (ie address.city)

Author:
Emmanuel Bernard
See Also:
Serialized Form

Field Summary
static NamingStrategy INSTANCE
           
 
Constructor Summary
OgmNamingStrategy()
           
 
Method Summary
 String collectionTableName(String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName)
           
 String foreignKeyColumnName(String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName)
           
 String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn)
           
 String logicalCollectionTableName(String tableName, String ownerEntityTable, String associatedEntityTable, String propertyName)
           
 String logicalColumnName(String columnName, String propertyName)
           
 String propertyToColumnName(String propertyName)
           
 
Methods inherited from class org.hibernate.cfg.EJB3NamingStrategy
classToTableName, columnName, joinKeyColumnName, tableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NamingStrategy INSTANCE
Constructor Detail

OgmNamingStrategy

public OgmNamingStrategy()
Method Detail

propertyToColumnName

public String propertyToColumnName(String propertyName)
Specified by:
propertyToColumnName in interface NamingStrategy
Overrides:
propertyToColumnName in class EJB3NamingStrategy

collectionTableName

public String collectionTableName(String ownerEntity,
                                  String ownerEntityTable,
                                  String associatedEntity,
                                  String associatedEntityTable,
                                  String propertyName)
Specified by:
collectionTableName in interface NamingStrategy
Overrides:
collectionTableName in class EJB3NamingStrategy

foreignKeyColumnName

public String foreignKeyColumnName(String propertyName,
                                   String propertyEntityName,
                                   String propertyTableName,
                                   String referencedColumnName)
Specified by:
foreignKeyColumnName in interface NamingStrategy
Overrides:
foreignKeyColumnName in class EJB3NamingStrategy

logicalColumnName

public String logicalColumnName(String columnName,
                                String propertyName)
Specified by:
logicalColumnName in interface NamingStrategy
Overrides:
logicalColumnName in class EJB3NamingStrategy

logicalCollectionTableName

public String logicalCollectionTableName(String tableName,
                                         String ownerEntityTable,
                                         String associatedEntityTable,
                                         String propertyName)
Specified by:
logicalCollectionTableName in interface NamingStrategy
Overrides:
logicalCollectionTableName in class EJB3NamingStrategy

logicalCollectionColumnName

public String logicalCollectionColumnName(String columnName,
                                          String propertyName,
                                          String referencedColumn)
Specified by:
logicalCollectionColumnName in interface NamingStrategy
Overrides:
logicalCollectionColumnName in class EJB3NamingStrategy


Copyright © 2010-2011 Red Hat Middleware, LLC, Emmanuel Bernard and various contributors. All Rights Reserved