storm-apt/api/src/main/java/com/turbomanage/storm/SQLiteDao.java
public long insert(T obj) {
		ContentValues cv = th.getEditableValues(obj);
		if (th.getId(obj) == 0) {
			// the default, remove from ContentValues to allow autoincrement
			cv.remove(th.getIdCol().toString());
		}
		long id = getWritableDb().insertOrThrow(th.getTableName(), null, cv);
		th.setId(obj, id);
		return id;
	}
public long insert(T obj) {
		ContentValues cv = th.getEditableValues(obj);
		if (th.getId(obj) == 0) {
			// the default, remove from ContentValues to allow autoincrement
			cv.remove(th.getIdCol().toString());
		}
		long id = getWritableDb().insertOrThrow(th.getTableName(), null, cv);
		th.setId(obj, id);
		return id;
	}
Inserts a row for the provided entity. If the entity's id is the
default long (0), the database generates an id and populates the
entity's ID field. Returns the generated ID or -1 if error.

@param obj An entity
@return ID of newly inserted row or -1 if err