@SuppressWarnings("unchecked") public static DynamicComposite setEqualityFlag( DynamicComposite composite, ComponentEquality eq ) { if ( composite.isEmpty() ) { return composite; } int i = composite.size() - 1; @SuppressWarnings("rawtypes") Component c = composite.getComponent( i ); composite.setComponent( i, c.getValue(), c.getSerializer(), c.getComparator(), eq ); return composite; }
@Override public Object getResultObject() throws Exception { DynamicComposite current = results.get(index); int length = current.getComponents().size(); Object id = keyStrategy.getInstance(current.getComponent(length - 1) .getBytes()); Object jpaId = ctx.newObjectId(classMeta.getDescribedType(), id); return ctx.find(jpaId, fetchConfig, null, null, 0); }
/** * Increase the last comparator to GT_E to ensure we get the next page * * @param composite * @return */ @SuppressWarnings({ "rawtypes", "unchecked" }) private DynamicComposite bumpComposite(DynamicComposite composite) { DynamicComposite newComposite = new DynamicComposite(); int size = composite.getComponents().size(); Component component = null; for (int i = 0; i < size - 1; i++) { component = composite.getComponent(i); newComposite.addComponent(component.getValue(), component.getSerializer(), component.getComparator(), component.getEquality()); } component = composite.getComponent(size - 1); newComposite.addComponent(component.getValue(), component.getSerializer(), component.getComparator(), ComponentEquality.GREATER_THAN_EQUAL); return newComposite; }
o = c.get(0); assertTrue(o instanceof UUID); assertEquals(UUIDTYPE.getTypeName(), c.getComponent(0).getComparator()); o = c.get(0); assertTrue(o instanceof UUID); assertEquals(UUIDTYPE.getTypeName(), c.getComponent(0).getComparator()); b = c.getComponent(0).getBytes(); UTF8Type.instance.validate(b);
current = idComposite.getComponent(0);
Object value = embeddedSerializer.getObject(composite.getComponent(i).getBytes()); if (value == null) { continue;
current = start.getComponent(i); end.setComponent(i, current.getValue(), current.getSerializer(), current.getComparator(), ComponentEquality.EQUAL); current = start.getComponent(i);
current = start.getComponent(i); end.setComponent(i, current.getValue(), current.getSerializer(), current.getComparator(), ComponentEquality.EQUAL); current = start.getComponent(i);