Class MethodArgument


  • public class MethodArgument
    extends java.lang.Object
    Argument to use in select- and delete-methods.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodArgument​(Relation relation, java.lang.String foreignAttributeName, java.lang.String value)
      Creates a method argument for another foreign attribute as the relation points to.
      If value is a String it must be enclosed in double quotes.
      MethodArgument​(Relation relation, java.lang.String foreignAttributeName, Attribute attribute)
      Creates a method argument for another foreign attribute as the relation points to.
      MethodArgument​(Relation relation, Attribute attribute)
      Creates a method argument.
    • Constructor Detail

      • MethodArgument

        public MethodArgument​(Relation relation,
                              Attribute attribute)
        Creates a method argument.
        Parameters:
        relation - relation for delayed determination of the foreign attribute
        attribute - attribute of the current entity
      • MethodArgument

        public MethodArgument​(Relation relation,
                              java.lang.String foreignAttributeName,
                              Attribute attribute)
        Creates a method argument for another foreign attribute as the relation points to.
        Parameters:
        relation - relation for delayed determination of the foreign attribute
        foreignAttributeName - the name of the foreign attribute
        attribute - attribute of the current entity
      • MethodArgument

        public MethodArgument​(Relation relation,
                              java.lang.String foreignAttributeName,
                              java.lang.String value)
        Creates a method argument for another foreign attribute as the relation points to.
        If value is a String it must be enclosed in double quotes.
        Parameters:
        relation - relation for delayed determination of the foreign attribute
        foreignAttributeName - the name of the foreign attribute
        value - the fixed value in its representation as a string
    • Method Detail

      • isValue

        public boolean isValue()
        Returns whether the method argument is a fixed value.
        Returns:
        true if value, else attribute
      • getForeignAttribute

        public Attribute getForeignAttribute()
        Gets the foreign attribute.
        Returns:
        the attribute of the relation's entity (never null)
      • getAttribute

        public Attribute getAttribute()
        Gets the local attribute.
        Returns:
        the attribute of the local entity, null if fixed value
      • getValue

        public java.lang.String getValue()
        Gets the fixed value.
        Returns:
        the value (only valid if isValid() == true)
      • getMethodArgument

        public java.lang.String getMethodArgument()
        Gets the string for the method argument.
        Returns:
        the argument string
      • getSetterMethod

        public java.lang.String getSetterMethod()
        Gets the name of the setter method of the foreign attribute.
        Returns:
        the setter method
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object