private static void writeRootNode( Connection con, String serviceID ) throws SQLException
    {
        PreparedStatement pstmt = null;
        try
        {
            pstmt = con.prepareStatement( "INSERT INTO ofPubsubNode (serviceID, nodeID, leaf, creationDate, modificationDate, " +
                                              "parent, deliverPayloads, maxPayloadSize, persistItems, maxItems, " +
                                              "notifyConfigChanges, notifyDelete, notifyRetract, presenceBased, " +
                                              "sendItemSubscribe, publisherModel, subscriptionEnabled, configSubscription, " +
                                              "accessModel, payloadType, bodyXSLT, dataformXSLT, creator, description, " +
                                              "language, name, replyPolicy, associationPolicy, maxLeafNodes) " +
                                              "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" );

            // ServiceID
            pstmt.setString( 1, serviceID );

            // NodeID
            pstmt.setString( 2, serviceID );

            // is Leaf?
            pstmt.setInt( 3, 0 );

            // creation date
            pstmt.setString( 4, StringUtils.dateToMillis( new Date() ) );

            // modification date
            pstmt.setString( 5, StringUtils.dateToMillis( new Date() ) );

            // parent
            pstmt.setString( 6, null );

            // deliver Payloads
            pstmt.setInt( 7, 0 );

            // max payload size
            pstmt.setInt( 8, 0 );

            // persist items
            pstmt.setInt( 9, 0 );

            // max items
            pstmt.setInt( 10, 0 );

            // NotifyConfigChanges
            pstmt.setInt( 11, 1 );

            // Notify delete
            pstmt.setInt( 12, 1 );

            // notidfy retract
            pstmt.setInt( 13, 1 );

            // presence based
            pstmt.setInt( 14, 0 );

            // Send item subscribe
            pstmt.setInt( 15, 0 );

            // publisher model
            pstmt.setString( 16, PublisherModel.publishers.getName() );

            // subscritpionEnabled
            pstmt.setInt( 17, 1 );

            // config subscription
            pstmt.setInt( 18, 0 );

            // access model
            pstmt.setString( 19, AccessModel.presence.getName() );

            // payload type
            pstmt.setString( 20, "" );

            // body xslt
            pstmt.setString( 21, "" );

            // dataform xslt
            pstmt.setString( 22, "" );

            // creator
            pstmt.setString( 23, serviceID );

            // description
            pstmt.setString( 24, "" );

            // language
            pstmt.setString( 25, "English" );

            // name
            pstmt.setString( 26, "" );

            // reply policy
            pstmt.setString( 27, null );

            // association policy
            pstmt.setString( 28, CollectionNode.LeafNodeAssociationPolicy.all.name() );

            // max leaf nodes
            pstmt.setInt( 29, -1 );

            pstmt.executeUpdate();
        }
        finally
        {
            DbConnectionManager.fastcloseStmt( pstmt );
        }
    }
Creates appropriate database entries for each pubsub record
@param newRecords A collection of pubsub representations (can be empty, cannot be null).
xmppserver/src/main/java/org/jivesoftware/database/bugfix/OF1515.java