ISE-ComProg-After-Midterm/screwdriver-3.5.6/box/snippets/java/jpa2/SingularParameter.java

32 lines
524 B
Java
Raw Permalink Normal View History

2020-10-29 09:38:56 +00:00
package +zoccolo+.jpa;
import javax.persistence.metamodel.SingularAttribute;
public class SingularParameter<D, T> implements SearchParameter<T> {
private final String name;
private final T value;
private final Class<T> type;
public SingularParameter(SingularAttribute<D, T> sa, T value) {
this.name = sa.getName();
this.value = value;
this.type = sa.getJavaType();
}
public String getName() {
return name;
}
public T getValue() {
return value;
}
public Class<T> getType() {
return type;
}
}