public DataServiceAssociationProvider(AssociationDirection direction,
     ColumnProvider fromColumn, ColumnProvider toColumn, IList<String> foreignKeyNames) {
     Direction = direction;
     FromColumn = fromColumn;
     ToColumn = toColumn;
     ForeignKeyNames = new ReadOnlyCollection<string>(foreignKeyNames);
 }
 public DynamicDataAssociationProvider(AssociationDirection direction, ColumnProvider owner, ColumnProvider to)
 {
     this.Direction = direction;
     this.IsPrimaryKeyInThisTable = owner.IsPrimaryKey;
     this.FromColumn = owner;
     this.ToTable    = to.Table;
 }
Exemplo n.º 3
0
		public DynamicDataAssociationProvider (AssociationDirection direction, ColumnProvider owner, ColumnProvider to)
		{
			this.Direction = direction;
			this.IsPrimaryKeyInThisTable = owner.IsPrimaryKey;
			this.FromColumn = owner;
			this.ToTable = to.Table;
		}
Exemplo n.º 4
0
 public PSMBridgeAssociation(string defaultName, List <string> aliases, PSMAssociation sourceAss, AssociationDirection direction, PropertyType propertyType, Classifier type) :
     base(defaultName, propertyType, type, BridgePropertyType.Association)
 {
     this.DefaultName        = defaultName;
     this.Aliases            = aliases;
     this.SourceAsscociation = sourceAss;
     this.Direction          = direction;
 }
Exemplo n.º 5
0
 public DataServiceAssociationProvider(AssociationDirection direction,
                                       ColumnProvider fromColumn, ColumnProvider toColumn, IList <String> foreignKeyNames)
 {
     Direction       = direction;
     FromColumn      = fromColumn;
     ToColumn        = toColumn;
     ForeignKeyNames = new ReadOnlyCollection <string>(foreignKeyNames);
 }
Exemplo n.º 6
0
        public void SetValues(Association otherElement)
        {
            base.SetValues(otherElement);
            sourceRef = otherElement.SourceRef;
            targetRef = otherElement.TargetRef;

            if (otherElement.AssociationDirection != null)
            {
                associationDirection = otherElement.AssociationDirection;
            }
        }
Exemplo n.º 7
0
        protected internal override void WriteAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw)
        {
            Association association = (Association)element;

            WriteDefaultAttribute(BpmnXMLConstants.ATTRIBUTE_FLOW_SOURCE_REF, association.SourceRef, xtw);
            WriteDefaultAttribute(BpmnXMLConstants.ATTRIBUTE_FLOW_TARGET_REF, association.TargetRef, xtw);
            AssociationDirection associationDirection = association.AssociationDirection;

            if (associationDirection != null)
            {
                WriteDefaultAttribute(BpmnXMLConstants.ATTRIBUTE_ASSOCIATION_DIRECTION, associationDirection.Value, xtw);
            }
        }
Exemplo n.º 8
0
        public static string GetValue(this AssociationDirection environment)
        {
            // get the field
            var field            = environment.GetType().GetField(environment.ToString());
            var customAttributes = field.GetCustomAttributes(typeof(DescriptionAttribute), false);

            if (customAttributes.Length > 0)
            {
                return((customAttributes[0] as DescriptionAttribute).Description);
            }
            else
            {
                throw new Exception("Can not read AssociationDirection Description Attribute. ");
            }
        }
Exemplo n.º 9
0
        protected internal override BaseElement ConvertXMLToElement(XMLStreamReader xtr, BpmnModel model)
        {
            Association association = new Association();

            BpmnXMLUtil.AddXMLLocation(association, xtr);
            association.SourceRef = xtr.GetAttributeValue(BpmnXMLConstants.ATTRIBUTE_FLOW_SOURCE_REF);
            association.TargetRef = xtr.GetAttributeValue(BpmnXMLConstants.ATTRIBUTE_FLOW_TARGET_REF);
            association.Id        = xtr.GetAttributeValue(BpmnXMLConstants.ATTRIBUTE_ID);

            string asociationDirectionString = xtr.GetAttributeValue(BpmnXMLConstants.ATTRIBUTE_ASSOCIATION_DIRECTION);

            if (!string.IsNullOrWhiteSpace(asociationDirectionString))
            {
                AssociationDirection associationDirection = AssociationDirection.ValueOf(asociationDirectionString.ToUpper());

                association.AssociationDirection = associationDirection;
            }

            ParseChildElements(XMLElementName, association, model, xtr);

            return(association);
        }
Exemplo n.º 10
0
 public DynamicDataAssociationAttribute(string columnName, AssociationDirection direction)
 {
     this.ColumnName = columnName;
     this.Direction  = direction;
 }
Exemplo n.º 11
0
		public DynamicDataAssociationAttribute (string columnName, AssociationDirection direction)
		{
			this.ColumnName = columnName;
			this.Direction = direction;
		}