Hi,

You are free to use any hashcode and equals in your classes.
Ignite will convert your POJO to BinaryObject before save to cache and use
it's own hashing anyway.

It still unclear what are trying to do.
Key is unique for each cache entry. So, it is impossible to get entry by a
part of key.
You should use SQL API for this instead.


On Mon, Jun 4, 2018 at 12:31 PM, the_palakkaran <jik...@suntecsbs.com>
wrote:

> Hi Andrew,
>
> I need to somehow override the equals and hashcode method in my key class.
>
> ie;
>
> I have a CustomerKey and CustomerModel configured in a customerCache. I
> need
> to get results from the cache based on the key class that I am passing to
> the cache for query.
>
> like when I pass a key class to the cache that has an equals method in
> which
> I have something like customerNumber == obj.CustomerNo, I need to get
> results based on it. So basically during put to cache also, this equals
> method should have been executed.
>
> Is there any way I could achieve this using Binary Objects or Binarylizable
> or Externalizable ?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Reply via email to