<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings version="2.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">

    <package>org.apache.roller.weblogger.pojos</package>
    <entity metadata-complete="true" name="PingQueueEntry"
            class="org.apache.roller.weblogger.pojos.PingQueueEntry" access="PROPERTY">
        <table name="pingqueueentry"/>
        <named-query name="PingQueueEntry.getAllOrderByEntryTime">
            <query>SELECT p FROM PingQueueEntry p ORDER BY p.entryTime</query>
        </named-query>
        <named-query name="PingQueueEntry.getByPingTarget&amp;Website">
            <query>SELECT p FROM PingQueueEntry p WHERE p.pingTarget = ?1 AND p.website = ?2
            </query>
        </named-query>
        <named-query name="PingQueueEntry.getByWebsite">
            <query>SELECT p FROM PingQueueEntry p WHERE p.website = ?1</query>
        </named-query>
        <named-query name="PingQueueEntry.removeByPingTarget">
            <query>DELETE FROM PingQueueEntry p WHERE p.pingTarget = ?1</query>
        </named-query>
        <attributes>
            <id name="id">
                <column name="id"/>
            </id>
            <basic name="entryTime">
                <column name="entrytime" insertable="true" updatable="true" unique="false"/>
            </basic>
            <basic name="attempts">
                <column name="attempts" insertable="true" updatable="true" unique="false"/>
            </basic>
            <many-to-one name="pingTarget" target-entity="org.apache.roller.weblogger.pojos.PingTarget">
                <join-column name="pingtargetid" insertable="true" updatable="true"
                             nullable="false"/>
            </many-to-one>
            <many-to-one name="website" target-entity="org.apache.roller.weblogger.pojos.Weblog">
                <join-column name="websiteid" insertable="true" updatable="true" nullable="false"/>
            </many-to-one>
        </attributes>
    </entity>
</entity-mappings>
