protected void serializeProperties(EntityType model,  SerializerConfig config,
            CodeWriter writer) throws IOException {
        for (Property property : model.getProperties()) {
            // FIXME : the custom types should have the custom type category
            if (typeMappings.isRegistered(property.getType())
                    && property.getType().getCategory() != TypeCategory.CUSTOM
                    && property.getType().getCategory() != TypeCategory.ENTITY) {
                customField(model, property, config, writer);
                continue;
            }

            // strips of "? extends " etc
            Type propertyType = new SimpleType(property.getType(), property.getType().getParameters());
            Type queryType = typeMappings.getPathType(propertyType, model, false);
            Type genericQueryType = null;
            String localRawName = writer.getRawName(property.getType());
            String inits = getInits(property);

            switch (property.getType().getCategory()) {
            case STRING:
                serialize(model, property, queryType, writer, "createString");
                break;

            case BOOLEAN:
                serialize(model, property, queryType, writer, "createBoolean");
                break;

            case SIMPLE:
                serialize(model, property, queryType, writer, "createSimple", writer.getClassConstant(localRawName));
                break;

            case COMPARABLE:
                serialize(model, property, queryType, writer, "createComparable", writer.getClassConstant(localRawName));
                break;

            case ENUM:
                serialize(model, property, queryType, writer, "createEnum", writer.getClassConstant(localRawName));
                break;

            case DATE:
                serialize(model, property, queryType, writer, "createDate", writer.getClassConstant(localRawName));
                break;

            case DATETIME:
                serialize(model, property, queryType, writer, "createDateTime", writer.getClassConstant(localRawName));
                break;

            case TIME:
                serialize(model, property, queryType, writer, "createTime", writer.getClassConstant(localRawName));
                break;

            case NUMERIC:
                serialize(model, property, queryType, writer, "createNumber", writer.getClassConstant(localRawName));
                break;

            case CUSTOM:
                customField(model, property, config, writer);
                break;

            case ARRAY:
                serialize(model, property, new ClassType(ArrayPath.class,
                        property.getType(),
                        wrap(property.getType().getComponentType())),
                        writer, "createArray", writer.getClassConstant(localRawName));
                break;

            case COLLECTION:
                genericQueryType = typeMappings.getPathType(getRaw(property.getParameter(0)), model, false);
                String genericKey = writer.getGenericName(true, property.getParameter(0));
                localRawName = writer.getRawName(property.getParameter(0));
                queryType = typeMappings.getPathType(property.getParameter(0), model, true);

                serialize(model, property, new ClassType(CollectionPath.class, getRaw(property.getParameter(0)), genericQueryType),
                        writer, "this.<" + genericKey + COMMA + writer.getGenericName(true, genericQueryType) + ">createCollection",
                        writer.getClassConstant(localRawName), writer.getClassConstant(writer.getRawName(queryType)), inits);
                break;

            case SET:
                genericQueryType = typeMappings.getPathType(getRaw(property.getParameter(0)), model, false);
                genericKey = writer.getGenericName(true, property.getParameter(0));
                localRawName = writer.getRawName(property.getParameter(0));
                queryType = typeMappings.getPathType(property.getParameter(0), model, true);

                serialize(model, property, new ClassType(SetPath.class, getRaw(property.getParameter(0)), genericQueryType),
                        writer, "this.<" + genericKey + COMMA + writer.getGenericName(true, genericQueryType) + ">createSet",
                        writer.getClassConstant(localRawName), writer.getClassConstant(writer.getRawName(queryType)), inits);
                break;

            case LIST:
                genericQueryType = typeMappings.getPathType(getRaw(property.getParameter(0)), model, false);
                genericKey = writer.getGenericName(true, property.getParameter(0));
                localRawName = writer.getRawName(property.getParameter(0));
                queryType = typeMappings.getPathType(property.getParameter(0), model, true);

                serialize(model, property, new ClassType(ListPath.class, getRaw(property.getParameter(0)), genericQueryType),
                        writer, "this.<" + genericKey + COMMA + writer.getGenericName(true, genericQueryType) + ">createList",
                        writer.getClassConstant(localRawName), writer.getClassConstant(writer.getRawName(queryType)), inits);
                break;

            case MAP:
                genericKey = writer.getGenericName(true, property.getParameter(0));
                String genericValue = writer.getGenericName(true, property.getParameter(1));
                genericQueryType = typeMappings.getPathType(getRaw(property.getParameter(1)), model, false);
                String keyType = writer.getRawName(property.getParameter(0));
                String valueType = writer.getRawName(property.getParameter(1));
                queryType = typeMappings.getPathType(property.getParameter(1), model, true);

                serialize(model, property, new ClassType(MapPath.class, getRaw(property.getParameter(0)),
                        getRaw(property.getParameter(1)), genericQueryType),
                        writer, "this.<" + genericKey + COMMA + genericValue + COMMA +
                            writer.getGenericName(true, genericQueryType) + ">createMap",
                 writer.getClassConstant(keyType), writer.getClassConstant(valueType), writer.getClassConstant(writer.getRawName(queryType)));
                break;

            case ENTITY:
                entityField(model, property, config, writer);
                break;
            }
        }
    }
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