// Path: plume-db-querydsl/src/main/java/com/coreoz/plume/db/querydsl/crud/CrudEntityQuerydsl.java
// public abstract class CrudEntityQuerydsl implements CrudEntity {
// 
// }


import java.io.IOException;
import java.lang.annotation.Annotation;
import com.coreoz.plume.db.querydsl.crud.CrudEntityQuerydsl;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.util.Converter;
import com.querydsl.codegen.EntityType;
import com.querydsl.codegen.Property;
import com.querydsl.codegen.SerializerConfig;
import com.querydsl.codegen.Supertype;
import com.querydsl.codegen.utils.CodeWriter;
import com.querydsl.codegen.utils.model.ClassType;
import com.querydsl.sql.codegen.ExtendedBeanSerializer;
package com.coreoz.plume.db.querydsl.generation;



public class IdBeanSerializer extends ExtendedBeanSerializer {

	private boolean useJacksonAnnotation;

	public IdBeanSerializer() {
		setPrintSupertype(true);

		this.useJacksonAnnotation = false;
	}

	@Override
	public void serialize(EntityType model, SerializerConfig serializerConfig, CodeWriter writer) throws IOException {
		injectIdInterface(model);
		if(useJacksonAnnotation) {
			injectJacksonAnnotation(model);
		}

		super.serialize(model, serializerConfig, writer);
	}

	protected void injectIdInterface(EntityType model) {
		for(Property property : model.getProperties()) {
			if("id".equals(property.getName()) && Long.class.equals(property.getType().getJavaClass())) {
// Path: plume-db-querydsl/src/main/java/com/coreoz/plume/db/querydsl/crud/CrudEntityQuerydsl.java
// public abstract class CrudEntityQuerydsl implements CrudEntity {
// 
// }


// Path: plume-db-querydsl-codegen/src/main/java/com/coreoz/plume/db/querydsl/generation/IdBeanSerializer.java
import java.io.IOException;
import java.lang.annotation.Annotation;
import com.coreoz.plume.db.querydsl.crud.CrudEntityQuerydsl;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.util.Converter;
import com.querydsl.codegen.EntityType;
import com.querydsl.codegen.Property;
import com.querydsl.codegen.SerializerConfig;
import com.querydsl.codegen.Supertype;
import com.querydsl.codegen.utils.CodeWriter;
import com.querydsl.codegen.utils.model.ClassType;
import com.querydsl.sql.codegen.ExtendedBeanSerializer;

package com.coreoz.plume.db.querydsl.generation;



public class IdBeanSerializer extends ExtendedBeanSerializer {

	private boolean useJacksonAnnotation;

	public IdBeanSerializer() {
		setPrintSupertype(true);

		this.useJacksonAnnotation = false;
	}

	@Override
	public void serialize(EntityType model, SerializerConfig serializerConfig, CodeWriter writer) throws IOException {
		injectIdInterface(model);
		if(useJacksonAnnotation) {
			injectJacksonAnnotation(model);
		}

		super.serialize(model, serializerConfig, writer);
	}

	protected void injectIdInterface(EntityType model) {
		for(Property property : model.getProperties()) {
			if("id".equals(property.getName()) && Long.class.equals(property.getType().getJavaClass())) {
				model.addSupertype(new Supertype(new ClassType(CrudEntityQuerydsl.class)));