Is even possible to bind an root object with super fields?
I have quite complicated entity (entities) to bind. I am already lost with it :)
This is my code situation:
public class CoreRestWrapper {
private Integer page;
private Integer perPage;
}
public class UserWrapper extends CoreRestWrapper {
private Collection<UserCVO> users;
}
public class UserCVO {
private UserVO userVO;
private Map<String, UserMeta> meta;
}
public class UserVO extends BaseVO {
//nothing here
}
public class BaseVO {
private Integer id;
private String mainName;
}
public class UserMeta extends Meta {
//nothing here
}
public class Meta {
private String key;
private Object value;
private String type; //String, Integer, Boolean, Date
}
UserWrapper is my root object. I would like to have my response xml look like this:
<users>
<page>1</page>
<perPage>2</perPage>
<user>
<id>1</id>
<main>test</main>
<meta type="String" key="wtf">just for fun</meta>
<meta type="Integer" key="age">99</meta>
</user>
<user>
<id>2</id>
<main>test</main>
<meta type="String" key="wtf">fooooo</meta>
<meta type="Integer" key="age">101</meta>
</user>
</users>
Or maybe even <users page="1" perPage="2">
and then just user tags...
Is this even possible (for a beginner in JiBX to handle)?