public class EntitySerializer extends java.lang.Object implements Serializer
Serializer
implementation for entity typesModifier and Type | Field and Description |
---|---|
protected java.util.Collection<java.lang.String> |
keywords |
protected TypeMappings |
typeMappings |
Constructor and Description |
---|
EntitySerializer(TypeMappings mappings,
java.util.Collection<java.lang.String> keywords)
Create a new EntitySerializer instance
|
Modifier and Type | Method and Description |
---|---|
protected void |
constructors(EntityType model,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer) |
protected void |
constructorsForVariables(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
entityAccessor(EntityType model,
Property field,
com.mysema.codegen.CodeWriter writer) |
protected void |
entityField(EntityType model,
Property field,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer) |
protected java.lang.String |
getAdditionalConstructorParameter(EntityType model) |
protected boolean |
hasOwnEntityProperties(EntityType model) |
protected void |
initEntityField(com.mysema.codegen.CodeWriter writer,
SerializerConfig config,
EntityType model,
Property field) |
protected void |
initEntityFields(com.mysema.codegen.CodeWriter writer,
SerializerConfig config,
EntityType model) |
protected void |
intro(EntityType model,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer) |
protected void |
introClassHeader(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
introDefaultInstance(com.mysema.codegen.CodeWriter writer,
EntityType model,
java.lang.String defaultName) |
protected void |
introDelegatePackages(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
introFactoryMethods(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
introImports(com.mysema.codegen.CodeWriter writer,
SerializerConfig config,
EntityType model) |
protected void |
introInits(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
introJavadoc(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
introPackage(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
introSuper(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected boolean |
isImportExprPackage(EntityType model) |
protected void |
listAccessor(EntityType model,
Property field,
com.mysema.codegen.CodeWriter writer) |
protected void |
mapAccessor(EntityType model,
Property field,
com.mysema.codegen.CodeWriter writer) |
protected void |
outro(EntityType model,
com.mysema.codegen.CodeWriter writer) |
protected void |
serialize(EntityType model,
Property field,
com.mysema.codegen.model.Type type,
com.mysema.codegen.CodeWriter writer,
java.lang.String factoryMethod,
java.lang.String... args) |
void |
serialize(EntityType model,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer)
Serialize the given
EntityType |
protected void |
serializeProperties(EntityType model,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer) |
protected final TypeMappings typeMappings
protected final java.util.Collection<java.lang.String> keywords
@Inject public EntitySerializer(TypeMappings mappings, @Named(value="keywords") java.util.Collection<java.lang.String> keywords)
mappings
- keywords
- protected void constructors(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
protected java.lang.String getAdditionalConstructorParameter(EntityType model)
protected void constructorsForVariables(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void entityAccessor(EntityType model, Property field, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
protected void entityField(EntityType model, Property field, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
protected boolean hasOwnEntityProperties(EntityType model)
protected void initEntityFields(com.mysema.codegen.CodeWriter writer, SerializerConfig config, EntityType model) throws java.io.IOException
java.io.IOException
protected void initEntityField(com.mysema.codegen.CodeWriter writer, SerializerConfig config, EntityType model, Property field) throws java.io.IOException
java.io.IOException
protected void intro(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
protected void introClassHeader(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void introDefaultInstance(com.mysema.codegen.CodeWriter writer, EntityType model, java.lang.String defaultName) throws java.io.IOException
java.io.IOException
protected void introFactoryMethods(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void introImports(com.mysema.codegen.CodeWriter writer, SerializerConfig config, EntityType model) throws java.io.IOException
java.io.IOException
protected boolean isImportExprPackage(EntityType model)
protected void introDelegatePackages(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void introInits(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void introJavadoc(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void introPackage(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void introSuper(com.mysema.codegen.CodeWriter writer, EntityType model) throws java.io.IOException
java.io.IOException
protected void listAccessor(EntityType model, Property field, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
protected void mapAccessor(EntityType model, Property field, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
protected void outro(EntityType model, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
public void serialize(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
Serializer
EntityType
serialize
in interface Serializer
model
- EntityType to serializeconfig
- TODOwriter
- serialization targetjava.io.IOException
protected void serialize(EntityType model, Property field, com.mysema.codegen.model.Type type, com.mysema.codegen.CodeWriter writer, java.lang.String factoryMethod, java.lang.String... args) throws java.io.IOException
java.io.IOException
protected void serializeProperties(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws java.io.IOException
java.io.IOException
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.