I have a java application and want to store some pojos in Couchbase and retrieve all the pojos of a certain class by one of the fields in the pojo.
The java class is something like this:
public class RuleDefinition implements Serializable{
private static final long serialVersionUID = 1L;
private Long id;
private String ruleName;
private String ruleDescription;
private String criteriaClauses;
private String scriptBody;
private String javaClassPath;
private String eventKey;
//with all the standard getter’s and setters, constructors, etc.
}
I have persisted in the RDBMS via Hibernate in the past and want to use Couchbase.
I am looking for a Couchbase example to mimic the database SQL
SELECT * FROM RuleDefinition where eventKey like ‘myperfectrules’
I can store the individual RuleDefinition pojos in couchbase and retrieve them by the “id” string.