Package com.im.ijc.df.impl.db
Class DBRelationshipNTO
- java.lang.Object
-
- com.chemaxon.dif.db.api.item.newtype.AbstractNTOImpl
-
- com.chemaxon.dif.db.api.item.newtype.SingleDFItemNTO<com.im.df.api.ddl.DFRelationship>
-
- com.im.ijc.df.impl.db.DBRelationshipNTO
-
- All Implemented Interfaces:
com.im.df.api.support.DFNewTypeOptions
,com.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
,com.im.df.api.support.DFNewTypeWellKnownOptions.SingleDFItem
- Direct Known Subclasses:
DBRelationshipMtoNNTO
,DBRelationshipSimpleNTO
public abstract class DBRelationshipNTO extends com.chemaxon.dif.db.api.item.newtype.SingleDFItemNTO<com.im.df.api.ddl.DFRelationship> implements com.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
- Author:
- svata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
DBRelationshipNTO.RelationFKImpl
-
Field Summary
Fields Modifier and Type Field Description protected com.im.df.api.ddl.DFRelationship.Type
relType
-
Fields inherited from interface com.im.df.api.support.DFNewTypeOptions
PROP_ERROR_MESSAGE, PROP_VALID
-
-
Constructor Summary
Constructors Constructor Description DBRelationshipNTO(com.im.df.api.ddl.DFContainer<com.im.df.api.ddl.DFRelationship> parentContainer, boolean canChangeRelType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canChangeRelType()
protected com.im.commons.db.util.SchemaQualifiedName[]
getConstraintNames(List<? extends com.im.df.api.ddl.DFEntity> entities)
Returns constraint names forentities
end for previously processedentities
.com.im.df.api.ddl.DFField
getDstField()
com.im.df.api.ddl.DFRelationship.Type
getRelType()
com.chemaxon.dif.db.api.schema.DBSchemaImpl
getSchema()
com.im.df.api.ddl.DFField
getSrcField()
boolean
isCreateConstraints()
protected boolean
isFKRequired(boolean source, com.im.df.api.ddl.DFField fld)
protected void
notifyCreateConstraintsChanged()
protected void
notifyFieldChanged(boolean source, com.im.df.api.ddl.DFField field)
protected void
notifyFKNameChanged(com.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationshipFK fk)
void
setCreateConstraints(boolean createForeignKey)
void
setDstField(com.im.df.api.ddl.DFField dstField)
protected void
setFKNameSafe(com.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationshipFK fk, com.im.commons.db.util.SchemaQualifiedName name)
void
setRelType(com.im.df.api.ddl.DFRelationship.Type relType)
void
setSrcField(com.im.df.api.ddl.DFField srcField)
protected void
updateKeyValidators()
protected void
updateStatus()
-
Methods inherited from class com.chemaxon.dif.db.api.item.newtype.SingleDFItemNTO
getDescription, getNewDFItemName, getParentContainer, normalizeDFItemName, notifyNewDFItemNameChanged, setDescription, setNewDFItemName, setNewDFItemNameSafe
-
Methods inherited from class com.chemaxon.dif.db.api.item.newtype.AbstractNTOImpl
addPropertyChangeListener, firePropertyChange, getErrorMessage, isValid, removePropertyChangeListener, setErrorMessage, setValid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getSchema
public com.chemaxon.dif.db.api.schema.DBSchemaImpl getSchema()
-
isFKRequired
protected boolean isFKRequired(boolean source, com.im.df.api.ddl.DFField fld)
-
updateStatus
protected void updateStatus()
- Overrides:
updateStatus
in classcom.chemaxon.dif.db.api.item.newtype.SingleDFItemNTO<com.im.df.api.ddl.DFRelationship>
-
updateKeyValidators
protected void updateKeyValidators()
-
getConstraintNames
protected com.im.commons.db.util.SchemaQualifiedName[] getConstraintNames(List<? extends com.im.df.api.ddl.DFEntity> entities)
Returns constraint names forentities
end for previously processedentities
.- Parameters:
entities
-- Returns:
- constraint names
- Throws:
IllegalStateException
- ifentities
contains null.
-
getSrcField
public com.im.df.api.ddl.DFField getSrcField()
- Specified by:
getSrcField
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
setSrcField
public void setSrcField(com.im.df.api.ddl.DFField srcField)
- Specified by:
setSrcField
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
getDstField
public com.im.df.api.ddl.DFField getDstField()
- Specified by:
getDstField
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
setDstField
public void setDstField(com.im.df.api.ddl.DFField dstField)
- Specified by:
setDstField
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
notifyFieldChanged
protected void notifyFieldChanged(boolean source, com.im.df.api.ddl.DFField field)
-
isCreateConstraints
public boolean isCreateConstraints()
- Specified by:
isCreateConstraints
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
setCreateConstraints
public void setCreateConstraints(boolean createForeignKey)
- Specified by:
setCreateConstraints
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
notifyCreateConstraintsChanged
protected void notifyCreateConstraintsChanged()
-
getRelType
public com.im.df.api.ddl.DFRelationship.Type getRelType()
- Specified by:
getRelType
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
setRelType
public void setRelType(com.im.df.api.ddl.DFRelationship.Type relType)
- Specified by:
setRelType
in interfacecom.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationship
-
canChangeRelType
public boolean canChangeRelType()
-
setFKNameSafe
protected void setFKNameSafe(com.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationshipFK fk, com.im.commons.db.util.SchemaQualifiedName name)
-
notifyFKNameChanged
protected void notifyFKNameChanged(com.im.df.api.support.DFNewTypeWellKnownOptions.NewRelationshipFK fk)
-
-