public class ObjRelationshipInfo extends CayenneController implements TreeSelectionListener
| Modifier and Type | Field and Description |
|---|---|
protected String |
currentPath |
protected List<DbRelationship> |
dbRelationships |
protected String |
mapKey |
protected List<String> |
mapKeys |
protected ProjectController |
mediator |
protected ObjEntity |
objectTarget |
protected List<ObjEntity> |
objectTargets |
protected ObjRelationship |
relationship |
protected String |
relationshipName |
protected List<DbRelationship> |
savedDbRelationships |
protected String |
targetCollection |
protected List<String> |
targetCollections |
protected ObjRelationshipInfoView |
view |
application, parent, propertyChangeSupport| Constructor and Description |
|---|
ObjRelationshipInfo(ProjectController mediator,
ObjRelationship relationship) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearPath()
Clears paths and selections in browser
|
ObjectNameGenerator |
createNamingStrategy(String strategyClass) |
protected void |
createRelationship()
Creates a new relationship connecting currently selected source entity
with ObjRelationship target entity.
|
String |
getCurrentPath() |
List<DbRelationship> |
getDbRelationships() |
DbEntity |
getEndEntity() |
DbRelationship |
getLastRelationship() |
String |
getMapKey() |
List |
getMapKeys() |
ObjEntity |
getObjectTarget()
Returns currently selected target of the ObjRelationship.
|
List<ObjEntity> |
getObjectTargets()
Returns a list of ObjEntities available for target mapping.
|
MultiColumnBrowser |
getPathBrowser() |
ObjRelationship |
getRelationship() |
String |
getRelationshipName() |
List<DbRelationship> |
getSavedDbRelationships() |
DbEntity |
getStartEntity() |
String |
getTargetCollection() |
List<String> |
getTargetCollections() |
Component |
getView()
Returns the vie wassociated with this Controller.
|
boolean |
isToMany() |
void |
relationshipChanged(int index)
Processes relationship path when path component at index was changed.
|
protected void |
revertPath()
Reverts current path to saved path
|
protected void |
saveMapping() |
boolean |
savePath()
Stores current state of the model in the internal ObjRelationship.
|
void |
selectPath() |
void |
setCollectionType() |
void |
setDbRelationships(List<DbRelationship> rels)
Sets list of DB Relationships current ObjRelationship is mapped to
|
void |
setMapKey() |
void |
setMapKey(String mapKey) |
void |
setObjectTarget(ObjEntity objectTarget) |
void |
setRelationshipName(String relationshipName) |
void |
setSavedDbRelationships(List<DbRelationship> rels) |
void |
setTargetCollection(String targetCollection) |
void |
startupAction()
Starts options dialog.
|
protected void |
updateCollectionChoosers()
Updates 'collection type' and 'map keys' comboboxes
|
protected void |
updateTargetCombo(DbEntity dbTarget)
Places in objectTargets list all ObjEntities for specified DbEntity
|
void |
valueChanged(TreeSelectionEvent e)
Sets list of DB Relationships current ObjRelationship is mapped to
|
addPropertyChangeListener, bindingUpdated, centerView, firePropertyChange, getApplication, getFrame, getLastDirectory, getParent, getViewPreferences, getWindow, makeCloseableOnEscape, reportErrorprotected ObjRelationship relationship
protected List<DbRelationship> dbRelationships
protected List<DbRelationship> savedDbRelationships
protected ObjEntity objectTarget
protected String relationshipName
protected String targetCollection
protected String mapKey
protected ObjRelationshipInfoView view
protected String currentPath
protected ProjectController mediator
public ObjRelationshipInfo(ProjectController mediator, ObjRelationship relationship)
public void startupAction()
public void setCollectionType()
public void setMapKey()
public Component getView()
CayenneControllergetView in interface BoundComponentgetView in class CayenneControllerpublic void setSavedDbRelationships(List<DbRelationship> rels)
public void selectPath()
protected void revertPath()
protected void updateCollectionChoosers()
protected void clearPath()
protected void saveMapping()
public MultiColumnBrowser getPathBrowser()
protected void createRelationship()
public ObjectNameGenerator createNamingStrategy(String strategyClass)
public void valueChanged(TreeSelectionEvent e)
valueChanged in interface TreeSelectionListenerpublic void setObjectTarget(ObjEntity objectTarget)
protected void updateTargetCombo(DbEntity dbTarget)
public ObjRelationship getRelationship()
public List<DbRelationship> getDbRelationships()
public List<DbRelationship> getSavedDbRelationships()
public DbRelationship getLastRelationship()
null if path is
emptypublic void setDbRelationships(List<DbRelationship> rels)
public ObjEntity getObjectTarget()
public List<ObjEntity> getObjectTargets()
public String getRelationshipName()
public void setRelationshipName(String relationshipName)
public void relationshipChanged(int index)
public boolean isToMany()
public boolean savePath()
public DbEntity getStartEntity()
public DbEntity getEndEntity()
public String getMapKey()
public void setMapKey(String mapKey)
public String getCurrentPath()
public String getTargetCollection()
public void setTargetCollection(String targetCollection)
public List getMapKeys()
Copyright © 2001–2015 Apache Cayenne. All rights reserved.