Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Best practice: 12.0p Serverside manipulation of incoming Criteria and serverside walking though an AdvancedCriteria object

    Hi Isomorphic,

    what is the best practice for walking though a AdvancedCriteria object like you most likely do for getFieldCriterion()?
    Serverside AdvancedCriteria does not have too much methods, nothing that returns a List<Criteria>.
    I'd like some way to get a list of all inner Criterion, best directly as instance of their correct Criterion-subclass from a AdvancedCriteria object.

    Then I'd like to change or add some criterion in the tree.
    Reason is that I can make my statements faster if I replace or amend some iContains client-side criteria with additional ID-criteria in order to support the DB optimizer.

    Thank you & Best regards
    Blama

    #2
    Hi Isomorphic,

    ah I found it. It can be done with AdvancedCriteria.asCriterion().

    I assume the correct practice is to build a copy and replace what is not wanted with different stuff and not to try to modify the existing object.
    Then at the end call DSRequest.setCriteria() with the new object.

    Best regards
    Blama

    Comment

    Working...
    X