32 lines
524 B
Java
32 lines
524 B
Java
|
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;
|
||
|
}
|
||
|
|
||
|
}
|