All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rahulsom.grooves.groovy.transformations.Query Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
package com.github.rahulsom.grooves.groovy.transformations;

import com.github.rahulsom.grooves.api.AggregateType;
import com.github.rahulsom.grooves.api.snapshots.Snapshot;
import com.github.rahulsom.grooves.groovy.transformations.internal.QueryASTTransformation;
import org.codehaus.groovy.transform.GroovyASTTransformationClass;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks a class as a Query.
 *
 * 

The query is something that computes a snapshot out of an aggregate and a collection of events * * @author Rahul Somasunderam */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) @GroovyASTTransformationClass(classes = QueryASTTransformation.class) public @interface Query { /** * The aggregate for which this query needs to be performed * * @return The aggregate for which this query needs to be performed */ Class aggregate(); /** * The snapshot that the query will return * * @return The snapshot that the query will return */ Class snapshot(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy