public class MappingReferenceKeyElementImpl extends MappingMemberElementImpl implements MappingReferenceKeyElement
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 |
|---|
MappingReferenceKeyElementImpl()
Create new MappingReferenceKeyElementImpl with no corresponding name.
|
MappingReferenceKeyElementImpl(MappingTableElement table)
Creates new MappingReferenceKeyElementImpl with a corresponding
mapping table.
|
MappingReferenceKeyElementImpl(String name)
Creates new MappingReferenceKeyElementImpl with the corresponding name
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumnPair(org.netbeans.modules.dbschema.ColumnPairElement pair)
Add a new column pair to the holder.
|
void |
addColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
Add some new column pairs to the holder.
|
org.netbeans.modules.dbschema.ColumnPairElement |
getColumnPair(org.netbeans.modules.dbschema.DBIdentifier name)
Find a column pair by name.
|
ArrayList |
getColumnPairNames()
Returns the list of relative column pair names in this referencing key.
|
org.netbeans.modules.dbschema.ColumnPairElement[] |
getColumnPairs()
Get all column pairs in this holder.
|
org.netbeans.modules.dbschema.TableElement |
getDeclaringTable()
Get the declaring table.
|
String |
getKeyName()
Get the name of this element.
|
org.netbeans.modules.dbschema.ColumnElement[] |
getLocalColumns()
Get all local columns in this reference key.
|
org.netbeans.modules.dbschema.ColumnElement[] |
getReferencedColumns()
Get all referenced columns in this reference key.
|
org.netbeans.modules.dbschema.TableElement |
getReferencedTable()
Get the referenced table of the reference key.
|
MappingTableElement |
getTable()
Returns the mapping table element for this referencing key.
|
void |
removeColumnPair(org.netbeans.modules.dbschema.ColumnPairElement pair)
Remove a column pair from the holder.
|
void |
removeColumnPair(String pairName)
Remove a column pair from the holder.
|
void |
removeColumnPairs(ArrayList pairNames)
Remove some column pairs from the holder.
|
void |
removeColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
Remove some column pairs from the holder.
|
void |
setColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
Set the column pairs for this holder.
|
void |
setDeclaringTable(org.netbeans.modules.dbschema.TableElement tableElement)
Set the mapping table for this referencing key to the mapping table
based on the name of the supplied table.
|
void |
setKeyName(String name)
Set the name of this element.
|
void |
setReferencingKey(ArrayList referencingKey)
Set the list of of key column names in this referencing key.
|
void |
setTable(MappingTableElement table)
Set the mapping table for this referencing key to the supplied table.
|
protected void |
stripSchemaName()
Boston to Pilsen conversion.
|
equals, firePropertyChange, fireVetoableChange, getDeclaringClass, hashCode, setDeclaringClassaddPropertyChangeListener, addVetoableChangeListener, compareTo, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setName, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDeclaringClassaddPropertyChangeListener, addVetoableChangeListener, getName, removePropertyChangeListener, removeVetoableChangeListener, setNamecompareTopublic MappingReferenceKeyElementImpl()
public MappingReferenceKeyElementImpl(String name)
name - the name of the elementpublic MappingReferenceKeyElementImpl(MappingTableElement table) throws ModelException
table - mapping table element to be used with this key.ModelExceptionpublic String getKeyName()
getKeyName in interface org.netbeans.modules.dbschema.ReferenceKeypublic void setKeyName(String name) throws ModelException
setKeyName in interface org.netbeans.modules.dbschema.ReferenceKeyname - the nameModelException - if impossiblepublic MappingTableElement getTable()
getTable in interface MappingReferenceKeyElementpublic void setTable(MappingTableElement table) throws ModelException
setTable in interface MappingReferenceKeyElementtable - mapping table element to be used with this key.ModelException - if impossiblepublic org.netbeans.modules.dbschema.TableElement getDeclaringTable()
getDeclaringTable in interface org.netbeans.modules.dbschema.ReferenceKeynull if the element is not attached to any tablepublic void setDeclaringTable(org.netbeans.modules.dbschema.TableElement tableElement)
setDeclaringTable in interface org.netbeans.modules.dbschema.ReferenceKeytableElement - mapping table element to be used with this key.public org.netbeans.modules.dbschema.TableElement getReferencedTable()
getReferencedTable in interface org.netbeans.modules.dbschema.ReferenceKeypublic ArrayList getColumnPairNames()
getColumnPairNames in interface MappingReferenceKeyElementpublic org.netbeans.modules.dbschema.ColumnElement[] getLocalColumns()
getLocalColumns in interface org.netbeans.modules.dbschema.ReferenceKeypublic org.netbeans.modules.dbschema.ColumnElement[] getReferencedColumns()
getReferencedColumns in interface org.netbeans.modules.dbschema.ReferenceKeypublic void removeColumnPair(String pairName) throws ModelException
removeColumnPair in interface MappingReferenceKeyElementpairName - the relative name of the column pair to removeModelException - if impossiblepublic void removeColumnPairs(ArrayList pairNames) throws ModelException
removeColumnPairs in interface MappingReferenceKeyElementpairNames - the relative names of the column pairs to removeModelException - if impossiblepublic void addColumnPair(org.netbeans.modules.dbschema.ColumnPairElement pair)
throws ModelException
addColumnPair in interface MappingReferenceKeyElementaddColumnPair in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpair - the pair to addModelException - if impossiblepublic void addColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
throws ModelException
addColumnPairs in interface MappingReferenceKeyElementaddColumnPairs in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpairs - the column pairs to addModelException - if impossiblepublic void removeColumnPair(org.netbeans.modules.dbschema.ColumnPairElement pair)
throws ModelException
removeColumnPair in interface MappingReferenceKeyElementremoveColumnPair in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpair - the column pair to removeModelException - if impossiblepublic void removeColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
throws ModelException
removeColumnPairs in interface MappingReferenceKeyElementremoveColumnPairs in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpairs - the column pairs to removeModelException - if impossiblepublic void setColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
throws ModelException
setColumnPairs in interface MappingReferenceKeyElementsetColumnPairs in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpairs - the new column pairsModelException - if impossiblepublic org.netbeans.modules.dbschema.ColumnPairElement[] getColumnPairs()
getColumnPairs in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpublic org.netbeans.modules.dbschema.ColumnPairElement getColumnPair(org.netbeans.modules.dbschema.DBIdentifier name)
getColumnPair in interface org.netbeans.modules.dbschema.ColumnPairElementHoldername - the name of the column pair for which to looknull if not foundpublic void setReferencingKey(ArrayList referencingKey)
referencingKey - the list of names of the columns in this
referencing keyprotected void stripSchemaName()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.