public class MappingTableElementImpl extends MappingMemberElementImpl implements MappingTableElement
PROP_ASSOCIATED_COLUMNS, PROP_COLUMNS, PROP_CONSISTENCY, PROP_DATABASE_ROOT, PROP_FETCH_GROUP, PROP_FIELDS, PROP_IN_CONCURRENCY_CHECK, PROP_KEY_COLUMNS, PROP_MODIFIED, PROP_NAME, PROP_NAVIGABLE, PROP_READ_ONLY, PROP_REFERENCING_KEYS, PROP_TABLE, PROP_TABLES, PROP_VERSION_FIELD| Constructor and Description |
|---|
MappingTableElementImpl()
Create new MappingTableElementImpl with no corresponding name or
declaring class.
|
MappingTableElementImpl(String name,
MappingClassElement declaringClass)
Create new MappingTableElementImpl with the corresponding name and
declaring class.
|
MappingTableElementImpl(org.netbeans.modules.dbschema.TableElement table,
MappingClassElement declaringClass)
Creates new MappingTableElementImpl with a corresponding
table and declaring class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyColumn(org.netbeans.modules.dbschema.ColumnElement column)
Adds a column to the primary key of columns in this mapping table.
|
protected void |
addKeyColumnInternal(org.netbeans.modules.dbschema.ColumnElement column)
Adds a column to the primary key of columns in this mapping table.
|
void |
addReferencingKey(MappingReferenceKeyElement referencingKey)
Adds a referencing key to the list of keys in this mapping table.
|
ArrayList |
getKey()
Returns the list of column names in the primary key for this
mapping table.
|
ArrayList |
getKeyObjects()
Returns the list of columns (ColumnElements) in the primary key for
this mapping table.
|
ArrayList |
getReferencingKeys()
Returns the list of keys (MappingReferenceKeyElements) for this
mapping table.
|
String |
getTable()
Returns the name of the table element used by this mapping table.
|
org.netbeans.modules.dbschema.TableElement |
getTableObject()
Returns the table element (TableElement) used by this mapping
table.
|
boolean |
isEqual(org.netbeans.modules.dbschema.TableElement table)
Returns true if the table element used by this mapping table is equal
to the supplied table.
|
void |
removeKeyColumn(String columnName)
Removes a column from the primary key of columns in this mapping table.
|
void |
removeReference(MappingTableElement table)
Removes the referencing key for the supplied table element from list
of keys in this mapping table.
|
void |
setKey(ArrayList key)
Set the list of column names in the primary key for this mapping
table.
|
void |
setName(String name)
Override method in MappingElementImpl to set the _table variable
if necessary (used for unarchiving).
|
void |
setReferencingKeys(ArrayList referencingKeys)
Set the list of keys (MappingReferenceKeyElements) for this mapping
table.
|
void |
setTable(String table)
Set the name of the table element used by this mapping table.
|
void |
setTable(org.netbeans.modules.dbschema.TableElement table)
Set the table element for this mapping table to the supplied table.
|
protected void |
stripSchemaName()
Boston to Pilsen conversion.
|
equals, firePropertyChange, fireVetoableChange, getDeclaringClass, hashCode, setDeclaringClassaddPropertyChangeListener, addVetoableChangeListener, compareTo, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDeclaringClassaddPropertyChangeListener, addVetoableChangeListener, getName, removePropertyChangeListener, removeVetoableChangeListenercompareTopublic MappingTableElementImpl()
public MappingTableElementImpl(String name, MappingClassElement declaringClass)
name - the name of the elementdeclaringClass - the class to attach topublic MappingTableElementImpl(org.netbeans.modules.dbschema.TableElement table,
MappingClassElement declaringClass)
throws ModelException
table - table element to be used by the mapping table.declaringClass - the class to attach toModelExceptionpublic String getTable()
getTable in interface MappingTableElementpublic void setTable(org.netbeans.modules.dbschema.TableElement table)
throws ModelException
setTable in interface MappingTableElementtable - table element to be used by the mapping table.ModelException - if impossiblepublic void setName(String name) throws ModelException
setName in interface MappingElementsetName in class MappingElementImplname - the nameModelException - if impossiblepublic boolean isEqual(org.netbeans.modules.dbschema.TableElement table)
isEqual in interface MappingTableElementtrue if table elements are equal,
false otherwise.public ArrayList getKey()
getKey in interface MappingTableElementpublic void addKeyColumn(org.netbeans.modules.dbschema.ColumnElement column)
throws ModelException
addKeyColumn in interface MappingTableElementcolumn - column element to be addedModelException - if impossibleprotected void addKeyColumnInternal(org.netbeans.modules.dbschema.ColumnElement column)
throws ModelException
column - column element to be addedModelException - if impossiblepublic void removeKeyColumn(String columnName) throws ModelException
removeKeyColumn in interface MappingTableElementcolumnName - the relative name of the column to be removedModelException - if impossiblepublic ArrayList getReferencingKeys()
getReferencingKeys in interface MappingTableElementpublic void addReferencingKey(MappingReferenceKeyElement referencingKey) throws ModelException
addReferencingKey in interface MappingTableElementreferencingKey - referencing key element to be addedModelException - if impossiblepublic void removeReference(MappingTableElement table) throws ModelException
removeReference in interface MappingTableElementtable - mapping table element for which to remove referencing keysModelException - if impossiblepublic org.netbeans.modules.dbschema.TableElement getTableObject()
public ArrayList getKeyObjects()
public void setTable(String table)
table - the table name for this mapping tablepublic void setKey(ArrayList key)
key - the list of names of the columns in the primary key for
this mapping tablepublic void setReferencingKeys(ArrayList referencingKeys)
referencingKeys - the list of reference key elements for this
mapping tableprotected void stripSchemaName()
Copyright © 2015. All rights reserved.