Name
sn_smd.SMRelationship
Description
No description available
Script
var SMRelationship = Class.create();
SMRelationship.prototype = {
/** @type IRelationDefinition */
relationship: null,
/**
*@params {IRelationDefinition} element object
*/
initialize: function(relationship) {
this.relationship = relationship;
},
getId: function() {
return this.getDAO().getStableId();
},
getDAO: function() {
if(gs.nil(this.relationship)) {
throw 'Cannot work with null model relationship';
}
return this.relationship;
},
getSource: function() {
return new SMElement(this.getDAO().getSource());
},
getTarget: function(name) {
return new SMElement(this.getDAO().getTarget());
},
getType: function(name) {
return this.getDAO().getRelType();
},
remove: function() {
this.getDAO().remove();
},
type: 'SMRelationship'
};
Sys ID
fda3124a9f922200a0d5b10f842e70b3