org.nakedobjects.metamodel.services.container.query.QueryFindByPattern Maven / Gradle / Ivy
The newest version!
package org.nakedobjects.metamodel.services.container.query;
import java.io.Serializable;
import org.nakedobjects.applib.query.Query;
/**
* Although implements {@link Query} and thus is ought to be {@link Serializable},
* it will be converted into a PersistenceQuery in the runtime for remoting purposes
* and so does not need to be (and indeed isn't).
*
*
* See discussion in {@link QueryBuiltInAbstract} for further details.
*/
public class QueryFindByPattern extends QueryBuiltInAbstract {
private static final long serialVersionUID = 1L;
private final T pattern;
public QueryFindByPattern(final Class type, T pattern) {
super(type);
this.pattern = pattern;
}
public T getPattern() {
return pattern;
}
public String getDescription() {
return getResultTypeName() + " (matching pattern)";
}
}