CompoundKey compoundKey = new CompoundKey();
Long longKey = 1L;
compoundKey.append("longKey", longKey);
SimpleEnum simpleEnum = SimpleEnum.A;
compoundKey.append("enumKey", simpleEnum);
Map<String, CompoundKey.TypeInfo> fieldTypes = new HashMap<String, CompoundKey.TypeInfo>();
fieldTypes.put("longKey", new CompoundKey.TypeInfo(Long.class, Long.class));
fieldTypes.put("enumKey", new CompoundKey.TypeInfo(SimpleEnum.class, String.class));