Key key = method.getAnnotation(Key.class);
if (key != null)
{
if (!isValidTypeForKey(method.getReturnType()))
{
throw new CruxGeneratorException("Invalid key type for key on method ["+method.getReadableDeclaration()+"]. Crux databases only support Strings, integers, double or dates as part of a key or index");
}
keys.add(key);
keyPath.add(JClassUtils.getPropertyForGetterOrSetterMethod(method));
}
}
for (int i=0; i< keys.size(); i++)
{
int orderI = keys.get(i).order();
if (orderI < 0 && keys.size() > 1)
{
throw new CruxGeneratorException("Crux object stores with composite keys must declare a valid order for its key's components");
}
int pos = i;
for (int j=i+1; j < keys.size(); j++)
{
int orderJ = keys.get(j).order();