Methods Summary |
---|
java.lang.String | createColumnName(ColumnImpl column)
String fullName = null;
if( column.isForeignKey() ){
fullName = prefixForeignKey()+column.getAttribute().getName();
}
else{
fullName = column.getAttribute().getName();
}
String result = myModel.getNameConstraints().shorten(fullName,
myModel.getNameConstraints().getMaxColumnNameLength());
return myModel.dereserve(result);
|
public java.lang.String | getCatalog()
return null;
|
SQLColumn | getColumn(oisoft.togetherx.scriptapi.UML.UMLAttribute attribute)
return getColumn(attribute,false);
|
private SQLColumn | getColumn(oisoft.togetherx.scriptapi.UML.UMLAttribute attribute, boolean forcePrimaryKey)
SQLColumn result = (SQLColumn)myColumns.get(attribute);
if( result == null ){
boolean nullable = !attribute.hasProperty(tagNamePrimaryKey());
result = new ColumnImpl(attribute,nullable,forcePrimaryKey,this);
myColumns.put(attribute,result);
}
return result;
|
public java.util.Enumeration | getColumns()
return getColumns(true);
|
public java.util.Enumeration | getColumns(boolean showForeign)
return new ColumnEnumeration(this,myModel,showForeign);
|
public java.util.Enumeration | getConstraints()
return new TableConstraintEnumeration(this);
|
SQLColumn | getForeignKeyColumn(ColumnImpl column, boolean forcePrimaryKey)
//return getColumn(column.getAttribute(),forcePrimaryKey);
SQLColumn result = (SQLColumn)myForeignColumns.get(column);
if( result == null ){
boolean nullable = !column.getAttribute().hasProperty(tagNamePrimaryKey());
result = new ColumnImpl(column.getAttribute(),nullable,forcePrimaryKey,this,true);
myForeignColumns.put(column,result);
}
return result;
|
java.lang.String | getForeignKeyName(SQLForeignKey fk)
String fullName = "CONSTRAINT_FK_"+fk.getReferencedTable().getName();
String result = myModel.getNameConstraints().shorten(fullName,
myModel.getNameConstraints().getMaxColumnNameLength());
return myModel.getUniqueName(result,myModel.getNameConstraints().getMaxColumnNameLength());
|
public SQLModel | getModel()
return myModel;
|
public java.lang.String | getName()
if( myName == null ){
myName = myModel.createTableName(myClass.toShortString());
}
return myName;
|
public java.util.Enumeration | getPrimaryKeyColumns()
return getPrimaryKeyColumns(true);
|
public java.util.Enumeration | getPrimaryKeyColumns(boolean showForeign)
return new ColumnEnumeration(this,myModel,showForeign,true);
//return new FilterEnumeration(getColumns(showForeign),new PrimaryKeyColumnFilter());
|
java.lang.String | getPrimaryKeyName()
String fullName = "PK_"+getName();
String result = myModel.getNameConstraints().shorten(fullName,
myModel.getNameConstraints().getMaxColumnNameLength());
return myModel.getUniqueName(result,myModel.getNameConstraints().getMaxColumnNameLength());
|
public java.lang.String | getRemarks()
return "";
|
public java.lang.String | getSchema()
return null;
|
SQLDiagramTags | getTags()
return myModel.getTags();
|
public java.lang.String | getType()
return "TABLE";
|
oisoft.togetherx.scriptapi.UML.UMLClass | getUMLClass()
return myClass;
|
java.lang.String | prefixForeignKey()
return "FK_";
|
private java.lang.String | tagNamePrimaryKey()
return getTags().attributePrimaryKey();
|