@Override
    public void serialize(EntityType model, SerializerConfig config,
            CodeWriter writer) throws IOException {
        intro(model, config, writer);

        // properties
        serializeProperties(model, config, writer);

        // constructors
        constructors(model, config, writer);

        // delegates
        for (Delegate delegate : model.getDelegates()) {
            delegate(model, delegate, config, writer);
        }

        // property accessors
        for (Property property : model.getProperties()) {
            TypeCategory category = property.getType().getCategory();
            if (category == TypeCategory.MAP && config.useMapAccessors()) {
                mapAccessor(model, property, writer);
            } else if (category == TypeCategory.LIST && config.useListAccessors()) {
                listAccessor(model, property, writer);
            } else if (category == TypeCategory.ENTITY && config.useEntityAccessors()) {
                entityAccessor(model, property, writer);
            }
        }
        outro(model, writer);
    }
Create a new {@code EntitySerializer} instance

@param mappings type mappings to be used
@param keywords keywords to be used
querydsl-codegen/src/main/java/com/querydsl/codegen/DefaultEntitySerializer.java