public class MappingRelationshipElementImpl extends MappingFieldElementImpl implements MappingRelationshipElement
CLONE_DEEP, CLONE_FIELD, CLONE_MASK, IN_CONCURRENCY_CHECK, LOG_ON_ACCESS, LOG_ON_MASK, LOG_ON_UPDATE, MOD_BI_ON_UPDATE, OBSERVE_ON_ACCESS, READ_ONLY, RECORD_ON_UPDATE, REF_INTEGRITY_UPDATES, SEND_BEFORE_IMAGE, XLATE_FIELDGROUP_DEFAULT, GROUP_INDEPENDENT, GROUP_NONEPROP_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 |
|---|
MappingRelationshipElementImpl()
Create new MappingRelationshipElementImpl with no corresponding name or
declaring class.
|
MappingRelationshipElementImpl(String name,
MappingClassElement declaringClass)
Create new MappingRelationshipElementImpl with the corresponding name
and declaring class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAssociatedColumn(org.netbeans.modules.dbschema.ColumnPairElement column)
Adds a column to the list of associated columns mapped by this mapping
field.
|
void |
addColumn(org.netbeans.modules.dbschema.DBMemberElement column)
Adds a column to the list of columns mapped by this mapping
relationship.
|
void |
addLocalColumn(org.netbeans.modules.dbschema.ColumnPairElement column)
Adds a column to the list of columns mapped by this mapping field.
|
ArrayList |
getAssociatedColumnObjects()
Returns the list of associated columns (ColumnPairElements) to
which this mapping field is mapped.
|
ArrayList |
getAssociatedColumns()
Returns the list of associated column names to which this
mapping field is mapped.
|
int |
getDeleteAction()
Get the delete action for this relationship element.
|
String |
getElementClass()
Get the element class for this relationship element.
|
int |
getLowerBound()
Get the lower cardinality bound for this relationship element.
|
int |
getUpdateAction()
Get the update action for this relationship element.
|
int |
getUpperBound()
Get the upper cardinality bound for this relationship element.
|
void |
removeColumn(String columnName)
Removes a column from the list of columns mapped by this mapping field.
|
void |
setAssociatedColumns(ArrayList associatedColumns)
Set the list of associated column names to which this mapping field is
mapped.
|
protected void |
stripSchemaName()
Boston to Pilsen conversion.
|
getCloneDepth, getColumnObjects, getColumns, getConcurrencyGroups, getFetchGroup, getFieldNumber, getLogOnAccess, getLogOnUpdate, getModifyBeforeImageOnUpdate, getObserveOnAccess, getProperties, getRecordOnUpdate, getReferentialIntegrityUpdates, getSendBeforeImage, isInConcurrencyCheck, isMappedToTable, isReadOnly, isVersion, setCloneDepth, setFetchGroup, setFetchGroupInternal, setInConcurrencyCheck, setLogOnAccess, setLogOnUpdate, setModifyBeforeImageOnUpdate, setObserveOnAccess, setProperty, setReadOnly, setRecordOnUpdate, setReferentialIntegrityUpdates, setSendBeforeImage, setVersionequals, firePropertyChange, fireVetoableChange, getDeclaringClass, hashCode, setDeclaringClassaddPropertyChangeListener, addVetoableChangeListener, compareTo, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setName, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetColumns, getFetchGroup, isInConcurrencyCheck, isReadOnly, isVersion, setFetchGroup, setInConcurrencyCheck, setReadOnly, setVersiongetDeclaringClassaddPropertyChangeListener, addVetoableChangeListener, getName, removePropertyChangeListener, removeVetoableChangeListener, setNamecompareTopublic MappingRelationshipElementImpl()
public MappingRelationshipElementImpl(String name, MappingClassElement declaringClass)
name - the name of the elementdeclaringClass - the class to attach topublic ArrayList getAssociatedColumns()
getAssociatedColumns in interface MappingRelationshipElementMappingFieldElement.getColumns()public void addLocalColumn(org.netbeans.modules.dbschema.ColumnPairElement column)
throws ModelException
addColumn when mapping join
tables. This method is used to map between the local column and the
join table, while addAssociatedColumn is used to
map between the join table and the foreign table.addLocalColumn in interface MappingRelationshipElementcolumn - column pair element to be added to the mappingModelException - if impossibleMappingFieldElement.addColumn(org.netbeans.modules.dbschema.DBMemberElement),
addAssociatedColumn(org.netbeans.modules.dbschema.ColumnPairElement)public void addAssociatedColumn(org.netbeans.modules.dbschema.ColumnPairElement column)
throws ModelException
addColumn when mapping
join tables. This method is used to map between the join table column
and the foreign table column, while addLocalColumn is used
to map between the local table and the join table.addAssociatedColumn in interface MappingRelationshipElementcolumn - column pair element to be added to the mappingModelException - if impossibleMappingFieldElement.addColumn(org.netbeans.modules.dbschema.DBMemberElement),
addLocalColumn(org.netbeans.modules.dbschema.ColumnPairElement)public void addColumn(org.netbeans.modules.dbschema.DBMemberElement column)
throws ModelException
addColumn in interface MappingFieldElementaddColumn in class MappingFieldElementImplcolumn - column element to be added to the mappingModelException - if impossiblepublic void removeColumn(String columnName) throws ModelException
removeColumn in interface MappingFieldElementremoveColumn in class MappingFieldElementImplcolumnName - the relative name of the column to be removed from
the mappingModelException - if impossiblepublic ArrayList getAssociatedColumnObjects()
MappingFieldElement.getColumns()public String getElementClass()
wrapperclass.TYPE
to specify them.public int getUpdateAction()
RelationshipElement.NONE_ACTION,
RelationshipElement.NULLIFY_ACTION,
RelationshipElement.RESTRICT_ACTION,
RelationshipElement.CASCADE_ACTION, or
RelationshipElement.AGGREGATE_ACTIONpublic int getDeleteAction()
RelationshipElement.NONE_ACTION,
RelationshipElement.NULLIFY_ACTION,
RelationshipElement.RESTRICT_ACTION,
RelationshipElement.CASCADE_ACTION, or
RelationshipElement.AGGREGATE_ACTIONpublic int getUpperBound()
Integer.MAX_VALUE for npublic int getLowerBound()
public void setAssociatedColumns(ArrayList associatedColumns)
associatedColumns - the list of names of the columns mapped by
this mapping fieldprotected void stripSchemaName()
stripSchemaName in class MappingFieldElementImplCopyright © 2017–2019 Eclipse Foundation. All rights reserved.