{
if (result && !key.autoIncrement())
{
throw new CruxGeneratorException("Invalid composite key declaration on objectStore ["+targetObject.getQualifiedSourceName()+"]. Can not use autoIncrement only on subset on keyPath set.");
}
if (key.autoIncrement() && !method.getReturnType().getQualifiedSourceName().equals("int") &&
!method.getReturnType().getQualifiedSourceName().equals(Integer.class.getCanonicalName()))
{
throw new CruxGeneratorException("Invalid key declaration on objectStore ["+targetObject.getQualifiedSourceName()+"]. Can not use autoIncrement on a non int key.");
}
result = key.autoIncrement();