public class EntitySerializer extends Object implements Serializer
Serializer implementation for entity types| Modifier and Type | Field and Description |
|---|---|
protected Collection<String> |
keywords |
protected TypeMappings |
typeMappings |
| Constructor and Description |
|---|
EntitySerializer(TypeMappings mappings,
Collection<String> keywords)
Create a new EntitySerializer instance
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
constructorContent(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
constructors(EntityType model,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer) |
protected void |
constructorsForVariables(com.mysema.codegen.CodeWriter writer,
EntityType model) |
protected void |
customField(EntityType model,
Property field,
SerializerConfig config,
com.mysema.codegen.CodeWriter writer) |
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 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,
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,
String factoryMethod,
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 Collection<String> keywords
@Inject public EntitySerializer(TypeMappings mappings, @Named(value="keywords") Collection<String> keywords)
mappings - keywords - protected void constructors(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected void constructorContent(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected String getAdditionalConstructorParameter(EntityType model)
protected void constructorsForVariables(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void entityAccessor(EntityType model, Property field, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected void entityField(EntityType model, Property field, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected boolean hasOwnEntityProperties(EntityType model)
protected void initEntityFields(com.mysema.codegen.CodeWriter writer,
SerializerConfig config,
EntityType model)
throws IOException
IOExceptionprotected void initEntityField(com.mysema.codegen.CodeWriter writer,
SerializerConfig config,
EntityType model,
Property field)
throws IOException
IOExceptionprotected void intro(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected void introClassHeader(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void introDefaultInstance(com.mysema.codegen.CodeWriter writer,
EntityType model,
String defaultName)
throws IOException
IOExceptionprotected void introFactoryMethods(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void introImports(com.mysema.codegen.CodeWriter writer,
SerializerConfig config,
EntityType model)
throws IOException
IOExceptionprotected boolean isImportExprPackage(EntityType model)
protected void introDelegatePackages(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void introInits(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void introJavadoc(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void introPackage(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void introSuper(com.mysema.codegen.CodeWriter writer,
EntityType model)
throws IOException
IOExceptionprotected void listAccessor(EntityType model, Property field, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected void mapAccessor(EntityType model, Property field, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected void outro(EntityType model, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionpublic void serialize(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws IOException
SerializerEntityTypeserialize in interface Serializermodel - EntityType to serializeconfig - TODOwriter - serialization targetIOExceptionprotected void serialize(EntityType model, Property field, com.mysema.codegen.model.Type type, com.mysema.codegen.CodeWriter writer, String factoryMethod, String... args) throws IOException
IOExceptionprotected void customField(EntityType model, Property field, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionprotected void serializeProperties(EntityType model, SerializerConfig config, com.mysema.codegen.CodeWriter writer) throws IOException
IOExceptionCopyright © 2007–2014 Mysema Ltd. All rights reserved.