private static List<PubsubRecordData> transform( List<PrivateXmlRecord> oldRecords )
    {
        Log.info( "Transforming all data from Private XML Storage into Pubsub entities." );
        String domain;
        try
        {
            domain = JiveGlobals.getProperty(XMPPServerInfo.XMPP_DOMAIN.getKey(), JiveGlobals.getXMLProperty( "fqdn", InetAddress.getLocalHost().getCanonicalHostName() ) ).toLowerCase();
        }
        catch ( UnknownHostException e )
        {
            domain = "localhost";
        }
        final List<PubsubRecordData> result = new ArrayList<>();
        for ( final PrivateXmlRecord oldRecord : oldRecords )
        {
            final PubsubRecordData newRecord = new PubsubRecordData( oldRecord.username + '@' + domain, oldRecord.namespace, oldRecord.privateData );
            result.add( newRecord );
        }

        return result;
    }
Transforms XML data storage records into Pubsub node records

@param oldRecords The records to transform (cannot be null)
@return Transformed records (never null, can be empty).
xmppserver/src/main/java/org/jivesoftware/database/bugfix/OF1515.java