|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.model.mapping.impl.MappingElementImpl
com.sun.jdo.api.persistence.model.mapping.impl.MappingMemberElementImpl
com.sun.jdo.api.persistence.model.mapping.impl.MappingReferenceKeyElementImpl
public class MappingReferenceKeyElementImpl
| Field Summary |
|---|
| Fields inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingElementProperties |
|---|
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 Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class com.sun.jdo.api.persistence.model.mapping.impl.MappingMemberElementImpl |
|---|
equals, firePropertyChange, fireVetoableChange, getDeclaringClass, hashCode, setDeclaringClass |
| Methods inherited from class com.sun.jdo.api.persistence.model.mapping.impl.MappingElementImpl |
|---|
addPropertyChangeListener, addVetoableChangeListener, compareTo, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingMemberElement |
|---|
getDeclaringClass |
| Methods inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingElement |
|---|
addPropertyChangeListener, addVetoableChangeListener, getName, removePropertyChangeListener, removeVetoableChangeListener, setName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public MappingReferenceKeyElementImpl()
public MappingReferenceKeyElementImpl(String name)
name - the name of the element
public MappingReferenceKeyElementImpl(MappingTableElement table)
throws ModelException
table - mapping table element to be used with this key.
ModelException| Method Detail |
|---|
public String getKeyName()
getKeyName in interface org.netbeans.modules.dbschema.ReferenceKey
public void setKeyName(String name)
throws ModelException
setKeyName in interface org.netbeans.modules.dbschema.ReferenceKeyname - the name
ModelException - if impossiblepublic MappingTableElement getTable()
getTable in interface MappingReferenceKeyElement
public 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.ReferenceKey
public void removeColumnPair(String pairName)
throws ModelException
removeColumnPair in interface MappingReferenceKeyElementpairName - the relative name of the column pair to remove
ModelException - if impossible
public void removeColumnPairs(ArrayList pairNames)
throws ModelException
removeColumnPairs in interface MappingReferenceKeyElementpairNames - the relative names of the column pairs to remove
ModelException - if impossible
public void addColumnPair(org.netbeans.modules.dbschema.ColumnPairElement pair)
throws ModelException
addColumnPair in interface MappingReferenceKeyElementaddColumnPair in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpair - the pair to add
ModelException - if impossible
public 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 add
ModelException - if impossible
public 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 remove
ModelException - if impossible
public 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 remove
ModelException - if impossible
public void setColumnPairs(org.netbeans.modules.dbschema.ColumnPairElement[] pairs)
throws ModelException
setColumnPairs in interface MappingReferenceKeyElementsetColumnPairs in interface org.netbeans.modules.dbschema.ColumnPairElementHolderpairs - the new column pairs
ModelException - 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 look
null if not foundpublic void setReferencingKey(ArrayList referencingKey)
referencingKey - the list of names of the columns in this
referencing keyprotected void stripSchemaName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||