java.lang.Object
org.tentackle.model.MethodArgument
Argument to use in select- and delete-methods.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionMethodArgument(Relation relation, String foreignAttributeName, 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, 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
Modifier and TypeMethodDescriptionGets the local attribute.Gets the foreign attribute.Gets the string for the method argument.Gets the name of the setter method of the foreign attribute.getValue()Gets the fixed value.booleanisValue()Returns whether the method argument is a fixed value.toString()
-
Constructor Details
-
MethodArgument
Creates a method argument.- Parameters:
relation- relation for delayed determination of the foreign attributeattribute- attribute of the current entity
-
MethodArgument
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
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 Details
-
isValue
public boolean isValue()Returns whether the method argument is a fixed value.- Returns:
- true if fixed value, else attribute
-
getForeignAttribute
Gets the foreign attribute.- Returns:
- the attribute of the relation's entity (never null)
-
getAttribute
Gets the local attribute.- Returns:
- the attribute of the local entity, null if fixed value
-
getValue
Gets the fixed value.- Returns:
- the value (only valid if isValid() == true)
-
getMethodArgument
Gets the string for the method argument.- Returns:
- the argument string
-
getSetterMethod
Gets the name of the setter method of the foreign attribute.- Returns:
- the setter method
-
toString
-