public class DefaultObjectNameGenerator extends Object implements ObjectNameGenerator
| Constructor and Description |
|---|
DefaultObjectNameGenerator() |
DefaultObjectNameGenerator(DbEntityNameStemmer dbEntityNameStemmer) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isToMany(DbRelationship... relationshipChain) |
String |
objAttributeName(DbAttribute attr)
Generates a name for ObjAttribute derived from DbAttribute name.
|
String |
objEntityName(DbEntity dbEntity)
Generates a name for ObjEntity derived from DbEntity name.
|
String |
relationshipName(DbRelationship... relationshipChain)
Generates a String that can be used as a name of an ObjRelationship, derived from join semantics of a chain of
connected DbRelationships.
|
protected String |
stemmed(String dbEntityName) |
protected String |
toManyRelationshipName(DbRelationship... relationshipChain) |
protected String |
toOneRelationshipName(DbRelationship... relationshipChain) |
public DefaultObjectNameGenerator()
public DefaultObjectNameGenerator(DbEntityNameStemmer dbEntityNameStemmer)
public String relationshipName(DbRelationship... relationshipChain)
ObjectNameGeneratorThe chain must contain at least one relationship. Though if we are dealing with a flattened relationship, more than one can be passed, in the same order as they are present in a flattened relationship.
Generated name can be used for DbRelationship itself (in which case the chain must have exactly one parameter).
relationshipName in interface ObjectNameGeneratorprotected boolean isToMany(DbRelationship... relationshipChain)
protected String toManyRelationshipName(DbRelationship... relationshipChain)
protected String toOneRelationshipName(DbRelationship... relationshipChain)
public String objEntityName(DbEntity dbEntity)
ObjectNameGeneratorobjEntityName in interface ObjectNameGeneratorpublic String objAttributeName(DbAttribute attr)
ObjectNameGeneratorobjAttributeName in interface ObjectNameGeneratorCopyright © 2001–2019 Apache Cayenne. All rights reserved.