Search in sources :

Example 1 with DefaultConfiguration

use of com.querydsl.apt.DefaultConfiguration in project querydsl by querydsl.

the class MorphiaAnnotationProcessor method createConfiguration.

@Override
protected Configuration createConfiguration(RoundEnvironment roundEnv) {
    Class<? extends Annotation> entities = QueryEntities.class;
    Class<? extends Annotation> entity = Entity.class;
    Class<? extends Annotation> superType = QuerySupertype.class;
    Class<? extends Annotation> embedded = Embedded.class;
    Class<? extends Annotation> skip = Transient.class;
    DefaultConfiguration conf = new DefaultConfiguration(processingEnv, roundEnv, Collections.<String>emptySet(), entities, entity, superType, null, embedded, skip);
    try {
        // Point is an Expression<Double[]>
        @SuppressWarnings("unchecked") Class<? extends Expression<Double[]>> cl = (Class<? extends Expression<Double[]>>) Class.forName("com.querydsl.mongodb.Point");
        conf.addCustomType(Double[].class, cl);
    } catch (ClassNotFoundException e) {
        throw new IllegalStateException(e);
    }
    return conf;
}
Also used : Entity(org.mongodb.morphia.annotations.Entity) DefaultConfiguration(com.querydsl.apt.DefaultConfiguration) QuerySupertype(com.querydsl.core.annotations.QuerySupertype) QueryEntities(com.querydsl.core.annotations.QueryEntities) Expression(com.querydsl.core.types.Expression) Embedded(org.mongodb.morphia.annotations.Embedded) Transient(org.mongodb.morphia.annotations.Transient)

Example 2 with DefaultConfiguration

use of com.querydsl.apt.DefaultConfiguration in project querydsl by querydsl.

the class RooAnnotationProcessor method createConfiguration.

@Override
protected Configuration createConfiguration(RoundEnvironment roundEnv) {
    Class<? extends Annotation> entity = RooJpaEntity.class;
    Class<? extends Annotation> superType = MappedSuperclass.class;
    Class<? extends Annotation> embeddable = Embeddable.class;
    Class<? extends Annotation> embedded = Embedded.class;
    Class<? extends Annotation> skip = Transient.class;
    DefaultConfiguration conf = new JPAConfiguration(roundEnv, processingEnv, entity, superType, embeddable, embedded, skip);
    conf.setAlternativeEntityAnnotation(RooJpaActiveRecord.class);
    return conf;
}
Also used : JPAConfiguration(com.querydsl.apt.jpa.JPAConfiguration) MappedSuperclass(javax.persistence.MappedSuperclass) DefaultConfiguration(com.querydsl.apt.DefaultConfiguration) Embedded(javax.persistence.Embedded) Transient(javax.persistence.Transient) RooJpaEntity(org.springframework.roo.addon.jpa.entity.RooJpaEntity) Embeddable(javax.persistence.Embeddable)

Example 3 with DefaultConfiguration

use of com.querydsl.apt.DefaultConfiguration in project spring-data-mongodb by spring-projects.

the class MongoAnnotationProcessor method createConfiguration.

/*
	 * (non-Javadoc)
	 * @see com.querydsl.apt.AbstractQuerydslProcessor#createConfiguration(javax.annotation.processing.RoundEnvironment)
	 */
@Override
protected Configuration createConfiguration(@Nullable RoundEnvironment roundEnv) {
    processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Running " + getClass().getSimpleName());
    DefaultConfiguration configuration = new DefaultConfiguration(processingEnv, roundEnv, Collections.emptySet(), QueryEntities.class, Document.class, QuerySupertype.class, QueryEmbeddable.class, QueryEmbedded.class, QueryTransient.class);
    configuration.setUnknownAsEmbedded(true);
    return configuration;
}
Also used : DefaultConfiguration(com.querydsl.apt.DefaultConfiguration)

Aggregations

DefaultConfiguration (com.querydsl.apt.DefaultConfiguration)3 JPAConfiguration (com.querydsl.apt.jpa.JPAConfiguration)1 QueryEntities (com.querydsl.core.annotations.QueryEntities)1 QuerySupertype (com.querydsl.core.annotations.QuerySupertype)1 Expression (com.querydsl.core.types.Expression)1 Embeddable (javax.persistence.Embeddable)1 Embedded (javax.persistence.Embedded)1 MappedSuperclass (javax.persistence.MappedSuperclass)1 Transient (javax.persistence.Transient)1 Embedded (org.mongodb.morphia.annotations.Embedded)1 Entity (org.mongodb.morphia.annotations.Entity)1 Transient (org.mongodb.morphia.annotations.Transient)1 RooJpaEntity (org.springframework.roo.addon.jpa.entity.RooJpaEntity)1