@Embeddable
public class MethodWrapper {
@Any(metaColumn = @Column(name = "method_type"), fetch = FetchType.LAZY)
@AnyMetaDef(idType = "long", metaType = "string", metaValues = {
@MetaValue(value = "N", targetEntity = M1.class),
@MetaValue(value = "M", targetEntity = M2.class),
@MetaValue(value = "R", targetEntity = M3.class),
@MetaValue(value = "T", targetEntity = M4.class),
@MetaValue(value = "O", targetEntity = M5.class),
@MetaValue(value = "D", targetEntity = M6.class),
@MetaValue(value = "Z", targetEntity = M7.class),
@MetaValue(value = "E", targetEntity = M8.class),
@MetaValue(value = "I", targetEntity = M9.class),
@MetaValue(value = "C", targetEntity = M10.class),
@MetaValue(value = "G", targetEntity = M11.class)})
@JoinColumn(name = "algorithm_id")
@Cascade({CascadeType.MERGE, CascadeType.PERSIST})
@Valid
private Method method;
public Method getMethod() {
return method;
}
public void setMethod(final Method method) {
this.method = method;
}
}