mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
#759130 : added template methods for BeanSerializer customizations
This commit is contained in:
parent
9b89b0e55b
commit
b19bfaceb3
@ -74,6 +74,8 @@ public class BeanSerializer implements Serializer{
|
||||
}
|
||||
writer.beginClass(model);
|
||||
|
||||
bodyStart(model, writer);
|
||||
|
||||
// fields
|
||||
for (Property property : model.getProperties()){
|
||||
if (propertyAnnotations){
|
||||
@ -98,9 +100,19 @@ public class BeanSerializer implements Serializer{
|
||||
writer.end();
|
||||
}
|
||||
|
||||
bodyEnd(model, writer);
|
||||
|
||||
writer.end();
|
||||
}
|
||||
|
||||
protected void bodyStart(EntityType model, CodeWriter writer) throws IOException {
|
||||
// template method
|
||||
}
|
||||
|
||||
protected void bodyEnd(EntityType model, CodeWriter writer) throws IOException {
|
||||
// template method
|
||||
}
|
||||
|
||||
private Set<String> getAnnotationTypes(EntityType model) {
|
||||
Set<String> imports = new HashSet<String>();
|
||||
for (Annotation annotation : model.getAnnotations()){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user