* a T object.
* @return a {@link java.lang.String} object.
*/
public <T> String resolveApitraryEntityId(T entity) {
if (entity == null) {
throw new ApitraryOrmIdDefinitionsException("Apitrary entity has not to be null.");
}
List<java.lang.reflect.Field> fields = ClassUtil.getAnnotatedFields(entity.getClass(), Id.class);
if (fields.isEmpty()) {
throw new ApitraryOrmIdDefinitionsException("Apitrary entity must own an annotated ID field.");
}
if (fields.size() > 1) {
throw new ApitraryOrmIdDefinitionsException("Apitrary entity can not have more than one ID field.");
}
java.lang.reflect.Field field = fields.get(0);
String id = ClassUtil.getValueOf(field, entity, entity.getClass(), String.class);
if (id == null || id.isEmpty()) {