com.mysema.query.codegen
Class EntitySerializer

java.lang.Object
  extended by com.mysema.query.codegen.EntitySerializer
All Implemented Interfaces:
Serializer
Direct Known Subclasses:
EmbeddableSerializer, SupertypeSerializer

@Immutable
public class EntitySerializer
extends Object
implements Serializer

EntitySerializer is a Serializer implementation for entity types

Author:
tiwe

Constructor Summary
EntitySerializer(TypeMappings mappings)
           
 
Method Summary
protected  void constructors(EntityModel model, SerializerConfig config, JavaWriter writer)
           
protected  void constructorsForVariables(JavaWriter writer, EntityModel model)
           
protected  void entityAccessor(PropertyModel field, CodeWriter writer)
           
protected  void entityField(PropertyModel field, SerializerConfig config, CodeWriter writer)
           
protected  boolean hasOwnEntityProperties(EntityModel model)
           
protected  void initEntityFields(JavaWriter writer, SerializerConfig config, EntityModel model)
           
protected  void intro(EntityModel model, SerializerConfig config, JavaWriter writer)
           
protected  void introClassHeader(CodeWriter writer, EntityModel model)
           
protected  void introDefaultInstance(CodeWriter writer, EntityModel model)
           
protected  void introFactoryMethods(JavaWriter writer, EntityModel model)
           
protected  void introImports(CodeWriter writer, SerializerConfig config, EntityModel model)
           
protected  void introInits(JavaWriter writer, EntityModel model)
           
protected  void introJavadoc(CodeWriter writer, EntityModel model)
           
protected  void introPackage(CodeWriter writer, EntityModel model)
           
protected  void introSuper(CodeWriter writer, EntityModel model)
           
protected  void listAccessor(PropertyModel field, CodeWriter writer)
           
protected  void mapAccessor(PropertyModel field, CodeWriter writer)
           
protected  void method(EntityModel model, MethodModel method, SerializerConfig config, JavaWriter writer)
           
protected  void outro(EntityModel model, CodeWriter writer)
           
 void serialize(EntityModel model, SerializerConfig config, Writer w)
          Serialize the given ClassModel
protected  void serialize(PropertyModel field, String type, JavaWriter writer, String factoryMethod, String... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntitySerializer

public EntitySerializer(TypeMappings mappings)
Method Detail

constructors

protected void constructors(EntityModel model,
                            SerializerConfig config,
                            JavaWriter writer)
                     throws IOException
Throws:
IOException

constructorsForVariables

protected void constructorsForVariables(JavaWriter writer,
                                        EntityModel model)
                                 throws IOException
Throws:
IOException

entityAccessor

protected void entityAccessor(PropertyModel field,
                              CodeWriter writer)
                       throws IOException
Throws:
IOException

entityField

protected void entityField(PropertyModel field,
                           SerializerConfig config,
                           CodeWriter writer)
                    throws IOException
Throws:
IOException

hasOwnEntityProperties

protected boolean hasOwnEntityProperties(EntityModel model)

initEntityFields

protected void initEntityFields(JavaWriter writer,
                                SerializerConfig config,
                                EntityModel model)
                         throws IOException
Throws:
IOException

intro

protected void intro(EntityModel model,
                     SerializerConfig config,
                     JavaWriter writer)
              throws IOException
Throws:
IOException

introClassHeader

protected void introClassHeader(CodeWriter writer,
                                EntityModel model)
                         throws IOException
Throws:
IOException

introDefaultInstance

protected void introDefaultInstance(CodeWriter writer,
                                    EntityModel model)
                             throws IOException
Throws:
IOException

introFactoryMethods

protected void introFactoryMethods(JavaWriter writer,
                                   EntityModel model)
                            throws IOException
Throws:
IOException

introImports

protected void introImports(CodeWriter writer,
                            SerializerConfig config,
                            EntityModel model)
                     throws IOException
Throws:
IOException

introInits

protected void introInits(JavaWriter writer,
                          EntityModel model)
                   throws IOException
Throws:
IOException

introJavadoc

protected void introJavadoc(CodeWriter writer,
                            EntityModel model)
                     throws IOException
Throws:
IOException

introPackage

protected void introPackage(CodeWriter writer,
                            EntityModel model)
                     throws IOException
Throws:
IOException

introSuper

protected void introSuper(CodeWriter writer,
                          EntityModel model)
                   throws IOException
Throws:
IOException

listAccessor

protected void listAccessor(PropertyModel field,
                            CodeWriter writer)
                     throws IOException
Throws:
IOException

mapAccessor

protected void mapAccessor(PropertyModel field,
                           CodeWriter writer)
                    throws IOException
Throws:
IOException

method

protected void method(EntityModel model,
                      MethodModel method,
                      SerializerConfig config,
                      JavaWriter writer)
               throws IOException
Throws:
IOException

outro

protected void outro(EntityModel model,
                     CodeWriter writer)
              throws IOException
Throws:
IOException

serialize

public void serialize(EntityModel model,
                      SerializerConfig config,
                      Writer w)
               throws IOException
Description copied from interface: Serializer
Serialize the given ClassModel

Specified by:
serialize in interface Serializer
Parameters:
model - ClassModel to serialize
config - TODO
w - serialization target
Throws:
IOException

serialize

protected void serialize(PropertyModel field,
                         String type,
                         JavaWriter writer,
                         String factoryMethod,
                         String... args)
                  throws IOException
Throws:
IOException


Copyright © 2007-2010 Mysema Ltd. All Rights Reserved.