I have the following abstract class:
public AbstractClass{
public abstract String getCode();
}
And the following concrete class:
public ConcreteClass extends AbstractClass{
public String getCode(){
return "EHY";
}
}
Now, I'd like for the output of that class to be a parameter for a mybatis query:
@Select(value="select* from Table where code= #{what here?}"
public List<Something> getFromTable(ConcreteClass param);
is it possible? I know that mybatis allows to bind the output of a method to a variable through the bind annotation:
<select id="selectBlogsLike" resultType="Blog">
<bind name="pattern" value="'%' + _parameter.getTitle() + '%'" />
SELECT * FROM BLOG
WHERE title LIKE #{pattern}
</select>
but here I'm using annotations and I cannot find any @Bind one...