- java.lang.Object
-
- org.tentackle.model.MethodArgument
-
public class MethodArgument extends java.lang.ObjectArgument 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributegetAttribute()Gets the local attribute.AttributegetForeignAttribute()Gets the foreign attribute.java.lang.StringgetMethodArgument()Gets the string for the method argument.java.lang.StringgetSetterMethod()Gets the name of the setter method of the foreign attribute.java.lang.StringgetValue()Gets the fixed value.booleanisValue()Returns whether the method argument is a fixed value.java.lang.StringtoString()
-
-
-
Constructor Detail
-
MethodArgument
public MethodArgument(Relation relation, Attribute attribute)
Creates a method argument.- Parameters:
relation- relation for delayed determination of the foreign attributeattribute- 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 attributeforeignAttributeName- the name of the foreign attributeattribute- 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 attributeforeignAttributeName- the name of the foreign attributevalue- 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:
toStringin classjava.lang.Object
-
-