private static List<PrivateXmlRecord> getPrivateXmlStorageData() throws SQLException
    {
        Log.info( "Retrieving all data from Private XML Storage." );
        Connection con = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        try
        {
            final List<PrivateXmlRecord> result = new ArrayList<>();

            con = DbConnectionManager.getConnection();
            stmt = con.prepareStatement( "SELECT privateData, name, username, namespace FROM ofPrivate" );
            rs = stmt.executeQuery();
            while ( rs.next() ) {
                result.add( new PrivateXmlRecord( rs.getString( "privateData" ),
                                                  rs.getString( "name" ),
                                                  rs.getString( "username" ),
                                                  rs.getString( "namespace" ) ) );
            }

            return result;
        }
        finally
        {
            DbConnectionManager.closeConnection( rs, stmt, con );
        }
    }
Retrieves all data stored using XEP-0049 Private XML Storage
@return A collection of data (can be empty, cannot be null).
xmppserver/src/main/java/org/jivesoftware/database/bugfix/OF1515.java