}
private void validateFields(Class modelClass, Field idField, Field rangeField) {
if (idField == null)
throw new ValidationException("Missing the annotated @Id field in the model class.");
if (Modifier.isTransient(idField.getModifiers()) || ReflectUtil.hasAnnotation(idField, Transient.class))
throw new ValidationException("The @Key field cannot be transient or annotated with Transient in the model class.");
if (rangeField != null && (Modifier.isTransient(idField.getModifiers()) || Modifier.isTransient(rangeField.getModifiers())))
throw new ValidationException("The @Key field cannot be transient in the model class.");
if (ReflectUtil.hasAnnotation(idField, S3Field.class))
throw new ValidationException("The @Key field cannot be @S3Field in the model class.");
if (rangeField != null && ReflectUtil.hasAnnotation(rangeField, S3Field.class))
throw new ValidationException("The @Key field cannot be @S3Field in the model class.");
if (idField.getType() != String.class &&
idField.getType() != Integer.class &&
idField.getType() != int.class &&
idField.getType() != Long.class &&
idField.getType() != long.class)
throw new ValidationException("The @Id field can only be String, Integer, or Long.");
}