
com.evento.common.modeling.messaging.payload.Query Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of evento-common Show documentation
Show all versions of evento-common Show documentation
Common Library of Object and Algorithms for Evento Framework
The newest version!
package com.evento.common.modeling.messaging.payload;
import com.evento.common.modeling.messaging.query.QueryResponse;
import java.lang.reflect.ParameterizedType;
/**
* The Query class is an abstract class that represents a query object. It extends the TrackablePayload class.
* It is generic, with a type parameter T that must extend the QueryResponse class.
*
* @param The type of the response object that the Query returns.
*
* @see TrackablePayload
* @see QueryResponse
*/
public abstract class Query> extends TrackablePayload {
/**
* Returns the response type of the Query.
*
* @return The Class object representing the response type.
*/
@SuppressWarnings("unchecked")
public Class getResponseType() {
return (Class) ((ParameterizedType) ((ParameterizedType) getClass()
.getGenericSuperclass()).getActualTypeArguments()[0]).getRawType();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy