Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create hasItenWhich and itsdeclination for maps #19

Open
Riduidel opened this issue Oct 29, 2012 · 0 comments
Open

Create hasItenWhich and itsdeclination for maps #19

Riduidel opened this issue Oct 29, 2012 · 0 comments

Comments

@Riduidel
Copy link
Owner

Currently, CollectionFieldInformer and MapFieldInformer``both have predicate on direct value containment (containingfor Collection,`containingKey`and`containingValue` for Map).
These query predicates are "nice" for literal values, but of little interest for managed values.
it would be far better to have Informer chaining in Collection/Map.
This could be achieved by adding the following predficates

public class MapFieldInformer<KeyType, ValueType>
        extends ObjectFieldInformer {
    public FieldInformerType hasKeyWhich();
    public FieldInformerType hasValueWhich();
}

and

public class CollectionFieldInformer<ValueType> extends ObjectFieldInformer {
    public FieldInformerType hasItemWhich();
}

Implementation should be able to return the most meaningfull Informer, based upon keys and values known types.

The main interest is that it could allow dynamic informers to benefit from these implementation, creating methods such as (for our beloved gaedo-test-beans)

public class DynamicUserService extends DynamicFinder<User, UserInformer> {
    public Iterable<User> findAllByPostsHasItemWhichNoteEqualsTo(long note);
}

quite engrish, no ?

Riduidel pushed a commit that referenced this issue Feb 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant