If I have a user give a string such as
eval= "productId = '100' and (GUID = '100' or (GUID = '200' and productId = '100' ) )"
what would be the best way to use the string to see if a object in memory meets those constraints? For example the following model would evaluate true:
evaluate(eval, new Product{productId ='100', GUID='100'})
Anyone push me in the direction of a design pattern that could accomplish this?
Aucun commentaire:
Enregistrer un commentaire