-
1. Re: Upgrading @ExposeEntity to @Portable has broke generics ?
cbrock Feb 28, 2012 1:09 PM (in response to craiggreenhalgh)Can you expand on the problem you're having?
-
2. Re: Upgrading @ExposeEntity to @Portable has broke generics ?
craiggreenhalgh Feb 28, 2012 2:14 PM (in response to cbrock)Hi Mike,
I've found two problems with upgrading for 1.3 to 2 beta:
1)
I had used generic base classes for my request and responses.
public abstract class BaseCreateResponse<T>
{
private T entity;
private boolean success;
private List<Error> errors;
public T getEntity()
{
return entity;
}
public void setEntity(T entity)
{
this.entity = entity;
}
public boolean isSuccess()
{
return success;
}
public void setSuccess(boolean success)
{
this.success = success;
}
public List<Error> getErrors()
{
return errors;
}
public void setErrors(List<Error> errors)
{
this.errors = errors;
}
}
Then my actual reponse class would be as such
@ExposeEntity
public class GroupCreateResponse extends BaseCreateResponse<Group>
{
}
However the generation for marshalling now fails. I've needed to refactor all of these to had the getter and setters for "T" in the implementation classes.
2)
Inheritence is not recoginsed
I have an abstract class "Report", which "SummaryReport" extends. My request and response object (like above) contain just "Report", but when I set that get the values I actually use the extended classes "SummaryReport" etc. However, generation fails as "Report" is not annotated with @Portable, nor can it as it is abstract
Any ideas how I can achieve this ?
Many thanks for your help
Craig
-
3. Re: Upgrading @ExposeEntity to @Portable has broke generics ?
cbrock Feb 29, 2012 9:57 PM (in response to craiggreenhalgh)I will try to integrate a unit test along the lines of what you're describing and see if I can reproduce it and get back to you soon.
-
4. Re: Upgrading @ExposeEntity to @Portable has broke generics ?
cbrock Mar 1, 2012 5:12 PM (in response to craiggreenhalgh)This has been fixed. The 2.0-SNAPSHOT builds with this fix in it should be availabel in the next few hours.