|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.andromda.metafacades.uml.EntityMetafacadeUtils
public class EntityMetafacadeUtils
Utilities for dealing with entity metafacades
| Constructor Summary | |
|---|---|
EntityMetafacadeUtils()
|
|
| Method Summary | |
|---|---|
static void |
clearForeignKeyConstraintNameCache()
Clears out the foreign key cache. |
static java.lang.String |
constructSqlTypeName(java.lang.String typeName,
java.lang.String columnLength)
Constructs a sql type name from the given mappedName and
columnLength. |
static java.lang.String |
ensureMaximumNameLength(java.lang.String name,
java.lang.Short nameMaxLength)
Trims the passed in value to the maximum name length. |
static java.lang.String |
getForeignKeyConstraintName(EntityAssociationEnd associationEnd,
java.lang.String suffix,
java.lang.String sqlNameSeperator,
java.lang.String maxLengthProperty)
Constructs and returns the foreign key constraint name for the given associationEnd, suffix, sqlNameSeperator
and maxLengthProperty. |
static java.util.Collection |
getIdentifiers(Entity entity,
boolean follow)
Gets all identifiers for an entity. |
static java.lang.String |
getSqlNameFromTaggedValue(ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.Object separator)
Gets the SQL name. |
static java.lang.String |
getSqlNameFromTaggedValue(ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.String suffix,
java.lang.Object separator)
Gets the SQL name. |
static java.lang.String |
getSqlNameFromTaggedValue(java.lang.String prefix,
ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.Object separator)
Gets the SQL name. |
static java.lang.String |
getSqlNameFromTaggedValue(java.lang.String prefix,
ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.String suffix,
java.lang.Object separator)
Gets the SQL name. |
static java.lang.String |
toSqlName(java.lang.String modelElementName,
java.lang.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 java.lang.String toSqlName(java.lang.String modelElementName,
java.lang.Object separator)
modelElementName - the string to convertseparator - character used to separate words
public static java.lang.String getSqlNameFromTaggedValue(java.lang.String prefix,
ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.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 java.lang.String getSqlNameFromTaggedValue(ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.String suffix,
java.lang.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 java.lang.String getSqlNameFromTaggedValue(ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.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 java.lang.String getSqlNameFromTaggedValue(java.lang.String prefix,
ModelElementFacade element,
java.lang.String name,
java.lang.Short nameMaxLength,
java.lang.String suffix,
java.lang.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 java.lang.String ensureMaximumNameLength(java.lang.String name,
java.lang.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 java.util.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 java.lang.String constructSqlTypeName(java.lang.String typeName,
java.lang.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.
public static java.lang.String getForeignKeyConstraintName(EntityAssociationEnd associationEnd,
java.lang.String suffix,
java.lang.String sqlNameSeperator,
java.lang.String maxLengthProperty)
associationEnd, suffix, sqlNameSeperator
and maxLengthProperty.
associationEnd - the association end for which to construct the constraint name.suffix - the suffix appeneded to the constraint name (if not limited by length).sqlNameSeperator - the SQL name seperator to use (i.e. '_').maxLengthProperty - the numeric value stored as a string indicating the max length the constraint may be.
public static void clearForeignKeyConstraintNameCache()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||