// Path: droitatedDB/src/main/java/org/droitateddb/schema/EntityInfo.java
// public class EntityInfo {
//     private final String tableName;
//     private final String className;
//     private final Class<?> definition;
//     private final boolean validation;
// 
//     public EntityInfo(final String className, final String tableName, final Class<?> definition) {
//         this.className = className;
//         this.tableName = tableName;
//         this.definition = definition;
//         this.validation = false;
//     }
// 
//     public EntityInfo(final String className, final String tableName, final Class<?> definition, final boolean validation) {
//         this.className = className;
//         this.tableName = tableName;
//         this.definition = definition;
//         this.validation = validation;
//     }
// 
//     public String className() {
//         return className;
//     }
// 
//     public String table() {
//         return tableName;
//     }
// 
//     public Class<?> definition() {
//         return definition;
//     }
// 
//     public boolean hasValidation() {
//         return validation;
//     }
// }
// 
// Path: droitatedDB/src/main/java/org/droitateddb/Utilities.java
// static <T> T getFieldValue(Class<?> aClass, String fieldName, Object data) {
//     return getFieldValue(data, getDeclaredField(aClass, fieldName));
// }


import java.util.Collection;
import java.util.List;
import static org.droitateddb.Utilities.getFieldValue;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import org.droitateddb.cursor.CombinedCursorImpl;
import org.droitateddb.entity.Column;
import org.droitateddb.entity.Entity;
import org.droitateddb.entity.PrimaryKey;
import org.droitateddb.schema.EntityInfo;
import org.droitateddb.validation.AccumulatedValidationResult;
import org.droitateddb.validation.InvalidEntityException;
import org.droitateddb.validation.ValidationToggle;
import java.lang.reflect.Field;
import java.util.ArrayList;
                throw new InvalidEntityException(validationResult);
            }
        }

        SQLiteDatabase database = openDB();
        try {
            final DatabaseSaver databaseSaver = new DatabaseSaver(database, maxDepth);
            transactional(database, new DatabaseOperation<Void>() {
                @Override
                public Void execute() {
                    for (E object : data) {
                        databaseSaver.save(object);
                    }
                    return null;
                }
            });
        } finally {
            closeDB(database);
        }
    }

    /**
     * Deletes the given {@link Entity} from the database
     *
     * @param data {@link Entity} that should be deleted
     * @return <code>true</code> if the {@link Entity} could be deleted, <code>false</code> otherwise
     * @throws IllegalStateException    When the {@link PrimaryKey} field and its value of the {@link Entity} could not be determined
     * @throws IllegalArgumentException When the value of the {@link PrimaryKey} field is null
     */
    public boolean delete(final E data) {
// Path: droitatedDB/src/main/java/org/droitateddb/schema/EntityInfo.java
// public class EntityInfo {
//     private final String tableName;
//     private final String className;
//     private final Class<?> definition;
//     private final boolean validation;
// 
//     public EntityInfo(final String className, final String tableName, final Class<?> definition) {
//         this.className = className;
//         this.tableName = tableName;
//         this.definition = definition;
//         this.validation = false;
//     }
// 
//     public EntityInfo(final String className, final String tableName, final Class<?> definition, final boolean validation) {
//         this.className = className;
//         this.tableName = tableName;
//         this.definition = definition;
//         this.validation = validation;
//     }
// 
//     public String className() {
//         return className;
//     }
// 
//     public String table() {
//         return tableName;
//     }
// 
//     public Class<?> definition() {
//         return definition;
//     }
// 
//     public boolean hasValidation() {
//         return validation;
//     }
// }
// 
// Path: droitatedDB/src/main/java/org/droitateddb/Utilities.java
// static <T> T getFieldValue(Class<?> aClass, String fieldName, Object data) {
//     return getFieldValue(data, getDeclaredField(aClass, fieldName));
// }


// Path: droitatedDB/src/main/java/org/droitateddb/EntityService.java
import java.util.Collection;
import java.util.List;
import static org.droitateddb.Utilities.getFieldValue;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import org.droitateddb.cursor.CombinedCursorImpl;
import org.droitateddb.entity.Column;
import org.droitateddb.entity.Entity;
import org.droitateddb.entity.PrimaryKey;
import org.droitateddb.schema.EntityInfo;
import org.droitateddb.validation.AccumulatedValidationResult;
import org.droitateddb.validation.InvalidEntityException;
import org.droitateddb.validation.ValidationToggle;
import java.lang.reflect.Field;
import java.util.ArrayList;

                throw new InvalidEntityException(validationResult);
            }
        }

        SQLiteDatabase database = openDB();
        try {
            final DatabaseSaver databaseSaver = new DatabaseSaver(database, maxDepth);
            transactional(database, new DatabaseOperation<Void>() {
                @Override
                public Void execute() {
                    for (E object : data) {
                        databaseSaver.save(object);
                    }
                    return null;
                }
            });
        } finally {
            closeDB(database);
        }
    }

    /**
     * Deletes the given {@link Entity} from the database
     *
     * @param data {@link Entity} that should be deleted
     * @return <code>true</code> if the {@link Entity} could be deleted, <code>false</code> otherwise
     * @throws IllegalStateException    When the {@link PrimaryKey} field and its value of the {@link Entity} could not be determined
     * @throws IllegalArgumentException When the value of the {@link PrimaryKey} field is null
     */
    public boolean delete(final E data) {
        Number id = getFieldValue(data, primaryKey);