org.apache.cayenne.map.naming
Class SmartNamingStrategy
java.lang.Object
org.apache.cayenne.map.naming.BasicNamingStrategy
org.apache.cayenne.map.naming.SmartNamingStrategy
- All Implemented Interfaces:
- NamingStrategy
public class SmartNamingStrategy
- extends BasicNamingStrategy
SmartNamingStrategy is a new strategy for generating names of
entities, attributes etc.
Advantages of this strategy are:
-Using of FK names at generating relationship names
-Dropping 'to' prefix for obj relationships and therefore for generated class methods' names
-Using pluralized form instead-of "ARRAY" suffix for to-many relationships (i.e. 'adresses'
instead-of 'addressArray')
- Since:
- 3.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartNamingStrategy
public SmartNamingStrategy()
createDbRelationshipName
public String createDbRelationshipName(ExportedKey key,
boolean toMany)
- Specified by:
createDbRelationshipName in interface NamingStrategy- Overrides:
createDbRelationshipName in class BasicNamingStrategy
Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.