|
||||||||||
| 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.MappingTableElementImpl
public class MappingTableElementImpl
| 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 | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| 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, 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 |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public MappingTableElementImpl()
public MappingTableElementImpl(String name,
MappingClassElement declaringClass)
name - the name of the elementdeclaringClass - the class to attach to
public 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 to
ModelException| Method Detail |
|---|
public String getTable()
getTable in interface MappingTableElement
public 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 impossible
public void setName(String name)
throws ModelException
setName in interface MappingElementsetName in class MappingElementImplname - the name
ModelException - 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 MappingTableElement
public void addKeyColumn(org.netbeans.modules.dbschema.ColumnElement column)
throws ModelException
addKeyColumn in interface MappingTableElementcolumn - column element to be added
ModelException - if impossible
protected void addKeyColumnInternal(org.netbeans.modules.dbschema.ColumnElement column)
throws ModelException
column - column element to be added
ModelException - if impossible
public void removeKeyColumn(String columnName)
throws ModelException
removeKeyColumn in interface MappingTableElementcolumnName - the relative name of the column to be removed
ModelException - if impossiblepublic ArrayList getReferencingKeys()
getReferencingKeys in interface MappingTableElement
public void addReferencingKey(MappingReferenceKeyElement referencingKey)
throws ModelException
addReferencingKey in interface MappingTableElementreferencingKey - referencing key element to be added
ModelException - if impossible
public void removeReference(MappingTableElement table)
throws ModelException
removeReference in interface MappingTableElementtable - mapping table element for which to remove referencing keys
ModelException - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||