How To Use Coherence Filters In Combination With Java Collections? (Doc ID 1388977.1)

Last updated on JUNE 20, 2017

Applies to:

Oracle Coherence - Version 3.6.1.2 and later
Information in this document applies to any platform.

Goal

Customer is using Coherence filters in combination with java Collections. This example is useful to understand Coherence filters. Customer is having Class-A implementing PortableObject that has a number of fields. One of those fields is a Collection of Class-B which is also a PortableObject with a number of fields. One of those fields is a Collection of Class-C which is also a PortableObject with a number of fields, it is as follow:

Class C {
  string Name
  string Type
  object value
}

class B {
  String name
  String Type
  List of C
}

class A {
  String name
  String Id
  List of B
}


Customer would like to know how using Coherence API to return all the instances of A in the cache that have one or more instances of B in their list that have instance C in their list where C.Name == "XYZ" AND C.Type = "A".

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms