slumberdb/slumberdb-mysql/src/main/java/org/boon/slumberdb/mysql/BaseVersionedMySQLSupport.java
@Override
    public KeyValueIterable<String, VersionedEntry<String, byte[]>> loadAll() {

        if (debug) logger.info("LOAD ALL  ");

        initIfNeeded();


        try {
            final ResultSet resultSet = loadAll.executeQuery();

            return new KeyValueIterable<String, VersionedEntry<String, byte[]>>() {

                @Override
                public void close() {
                    closeResultSet(resultSet);
                }

                @Override
                public Iterator<Entry<String, VersionedEntry<String, byte[]>>> iterator() {

                    return new Iterator<Entry<String, VersionedEntry<String, byte[]>>>() {
                        @Override
                        public boolean hasNext() {
                            return resultSetNext(resultSet);
                        }

                        @Override
                        public Entry<String, VersionedEntry<String, byte[]>> next() {
                            try {



                                String key = resultSet.getString(KEY_POS);
                                byte[] value = getValueColumn(VALUE_POS, resultSet);
                                long version = resultSet.getLong(VERSION_POS);
                                long update = resultSet.getLong(UPDATE_POS);
                                long create = resultSet.getLong(CREATE_POS);

                                VersionedEntry<String, byte[]> returnValue = new VersionedEntry<>(key, value);
                                returnValue.setCreateTimestamp(create);
                                returnValue.setUpdateTimestamp(update);
                                returnValue.setVersion(version);



                                return new Entry<>(key, returnValue);
                            } catch (SQLException e) {
                                handle("Unable to extract values for loadAllByKeys query", e);
                                return null;
                            }

                        }

                        @Override
                        public void remove() {

                        }
                    };
                }
            };


        } catch (SQLException e) {
            handle("Unable to load all records", e);
            return null;
        }
    }
@Override
    public KeyValueIterable<String, VersionedEntry<String, byte[]>> loadAll() {

        if (debug) logger.info("LOAD ALL  ");

        initIfNeeded();


        try {
            final ResultSet resultSet = loadAll.executeQuery();

            return new KeyValueIterable<String, VersionedEntry<String, byte[]>>() {

                @Override
                public void close() {
                    closeResultSet(resultSet);
                }

                @Override
                public Iterator<Entry<String, VersionedEntry<String, byte[]>>> iterator() {

                    return new Iterator<Entry<String, VersionedEntry<String, byte[]>>>() {
                        @Override
                        public boolean hasNext() {
                            return resultSetNext(resultSet);
                        }

                        @Override
                        public Entry<String, VersionedEntry<String, byte[]>> next() {
                            try {



                                String key = resultSet.getString(KEY_POS);
                                byte[] value = getValueColumn(VALUE_POS, resultSet);
                                long version = resultSet.getLong(VERSION_POS);
                                long update = resultSet.getLong(UPDATE_POS);
                                long create = resultSet.getLong(CREATE_POS);

                                VersionedEntry<String, byte[]> returnValue = new VersionedEntry<>(key, value);
                                returnValue.setCreateTimestamp(create);
                                returnValue.setUpdateTimestamp(update);
                                returnValue.setVersion(version);



                                return new Entry<>(key, returnValue);
                            } catch (SQLException e) {
                                handle("Unable to extract values for loadAllByKeys query", e);
                                return null;
                            }

                        }

                        @Override
                        public void remove() {

                        }
                    };
                }
            };


        } catch (SQLException e) {
            handle("Unable to load all records", e);
            return null;
        }
    }
@ Override public KeyValueIterable < String , VersionedEntry < String , byte [ ] > > loadAll ( ) { if ( debug ) logger . info ( "LOAD ALL  " ) ; initIfNeeded ( ) ; try { final ResultSet resultSet = loadAll . executeQuery ( ) ; return new KeyValueIterable < String , VersionedEntry < String , byte [ ] > > ( ) { @ Override public void close ( ) { closeResultSet ( resultSet ) ; } @ Override public Iterator < Entry < String , VersionedEntry < String , byte [ ] > > > iterator ( ) { return new Iterator < Entry < String , VersionedEntry < String , byte [ ] > > > ( ) { @ Override public boolean hasNext ( ) { return resultSetNext ( resultSet ) ; } @ Override public Entry < String , VersionedEntry < String , byte [ ] > > next ( ) { try { String key = resultSet . getString ( KEY_POS ) ; byte [ ] value = getValueColumn ( VALUE_POS , resultSet ) ; long version = resultSet . getLong ( VERSION_POS ) ; long update = resultSet . getLong ( UPDATE_POS ) ; long create = resultSet . getLong ( CREATE_POS ) ; VersionedEntry < String , byte [ ] > returnValue = new VersionedEntry <> ( key , value ) ; returnValue . setCreateTimestamp ( create ) ; returnValue . setUpdateTimestamp ( update ) ; returnValue . setVersion ( version ) ; return new Entry <> ( key , returnValue ) ; } catch ( SQLException e ) { handle ( "Unable to extract values for loadAllByKeys query" , e ) ; return null ; } } @ Override public void remove ( ) { } } ; } } ; } catch ( SQLException e ) { handle ( "Unable to load all records" , e ) ; return null ; } }
/*
/ *