|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.metafacades.uml.EntityMetafacadeUtils
Utilities for dealing with entity metafacades
| Constructor Summary | |
EntityMetafacadeUtils()
|
|
| Method Summary | |
static String |
constructSqlTypeName(String typeName,
String columnLength)
Constructs a sql type name from the given mappedName and
columnLength. |
static String |
ensureMaximumNameLength(String name,
Short nameMaxLength)
Trims the passed in value to the maximum name length. |
static Collection |
getIdentifiers(Entity entity,
boolean follow)
Gets all identifiers for an entity. |
static String |
getSqlNameFromTaggedValue(ModelElementFacade element,
String name,
Short nameMaxLength,
Object separator)
Gets the SQL name. |
static String |
getSqlNameFromTaggedValue(ModelElementFacade element,
String name,
Short nameMaxLength,
String suffix,
Object separator)
Gets the SQL name. |
static String |
getSqlNameFromTaggedValue(String prefix,
ModelElementFacade element,
String name,
Short nameMaxLength,
Object separator)
Gets the SQL name. |
static String |
getSqlNameFromTaggedValue(String prefix,
ModelElementFacade element,
String name,
Short nameMaxLength,
String suffix,
Object separator)
Gets the SQL name. |
static String |
toSqlName(String modelElementName,
Object separator)
Converts a string following the Java naming conventions to a database attribute name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EntityMetafacadeUtils()
| Method Detail |
public static String toSqlName(String modelElementName,
Object separator)
modelElementName - the string to convertseparator - character used to separate words
public static String getSqlNameFromTaggedValue(String prefix,
ModelElementFacade element,
String name,
Short nameMaxLength,
Object separator)
name,
then it uses the element name by default and just returns that.
prefix - the optional prefix to add to the sql name (i.e. table name
prefix, etc.).element - from which to retrieve the SQL name.name - the name of the tagged value.nameMaxLength - if this is not null, then the name returned will be
trimmed to this length (if it happens to be longer).separator - character used to separate words
public static String getSqlNameFromTaggedValue(ModelElementFacade element,
String name,
Short nameMaxLength,
String suffix,
Object separator)
name,
then it uses the element name by default and just returns that.
element - from which to retrieve the SQL name.name - the name of the tagged value.nameMaxLength - if this is not null, then the name returned will be
trimmed to this length (if it happens to be longer).suffix - the optional suffix to add to the sql name (i.e. foreign
key suffix, etc.)separator - character used to separate words
public static String getSqlNameFromTaggedValue(ModelElementFacade element,
String name,
Short nameMaxLength,
Object separator)
name,
then it uses the element name by default and just returns that.
element - from which to retrieve the SQL name.name - the name of the tagged value.nameMaxLength - if this is not null, then the name returned will be
trimmed to this length (if it happens to be longer).separator - character used to separate words
public static String getSqlNameFromTaggedValue(String prefix,
ModelElementFacade element,
String name,
Short nameMaxLength,
String suffix,
Object separator)
name,
then it uses the element name by default and just returns that.
prefix - the optional prefix to add to the sql name (i.e. table name
prefix, etc.).element - from which to retrieve the SQL name.name - the name of the tagged value.nameMaxLength - if this is not null, then the name returned will be
trimmed to this length (if it happens to be longer).suffix - the optional suffix to add to the sql name (i.e. foreign
key suffix, etc.)separator - character used to separate words
public static String ensureMaximumNameLength(String name,
Short nameMaxLength)
name - the name length to check and trim if necessarynameMaxLength - if this is not null, then the name returned will be
trimmed to this length (if it happens to be longer).
public static Collection getIdentifiers(Entity entity,
boolean follow)
entity - the entity for which to retrieve the identifiersfollow - a flag indicating whether or not the inheritance hiearchy
should be followed
public static String constructSqlTypeName(String typeName,
String columnLength)
mappedName and
columnLength.
typeName - the actual type name (usually retrieved from a mappings
file, ie NUMBER(19).columnLength - the length of the column.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||