class BaseDaoImpl implements Dao<T, ID> {

	@Override
	public CreateOrUpdateStatus createOrUpdate(T data) throws SQLException {
		if (data == null) {
			return new CreateOrUpdateStatus(false, false, 0);
		}
		ID id = extractId(data);
		// assume we need to create it if there is no id
		if (id == null || !idExists(id)) {
			int numRows = create(data);
			return new CreateOrUpdateStatus(true, false, numRows);
		} else {
			int numRows = update(data);
			return new CreateOrUpdateStatus(false, true, numRows);
		}
	}

	protected  BaseDaoImpl(Class<T> dataClass);
	protected  BaseDaoImpl(ConnectionSource connectionSource, Class<T> dataClass);
	protected  BaseDaoImpl(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig);
	private  BaseDaoImpl(ConnectionSource connectionSource, Class<T> dataClass, DatabaseTableConfig<T> tableConfig);

}