* and target object type has to be of type targetType.
* @return
*/
public List<PropertyCriteria> getCriteria() {
try {
PropertyBuilder pb = new PropertyBuilder()
.build("source", new InstanceOfMatcher(Class.forName(sourceType)))
.build("target", new InstanceOfMatcher(Class.forName(targetType)));
if (additionalCriteria != null && !additionalCriteria.isEmpty()) {
for (String property : additionalCriteria.keySet()) {
pb.build(property, additionalCriteria.get(property));
}
}
return new CriteriaBuilder().build(pb).getCriteria();
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException(e.getMessage());