// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/app/xslt/DateXmlAdapter.java
// public class DateXmlAdapter extends XmlAdapter<String, Date>
// {
//     private final SimpleDateFormat dateFormat;
// 
//     public DateXmlAdapter()
//     {
//         dateFormat = new SimpleDateFormat(LocalizationConstants.XML_DATEFORMAT_SECONDS);
//         dateFormat.setTimeZone(CountryHelper.UTC);
//     }
// 
//     @Override
//     public String marshal(Date v) throws Exception
//     {
//         if (v == null)
//         {
//             return null;
//         }
//         return dateFormat.format(v);
//     }
// 
//     @Override
//     public Date unmarshal(String v) throws Exception
//     {
//         if (v == null)
//         {
//             return null;
//         }
//         return dateFormat.parse(v);
//     }
// 
// }
// 
// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/dao/IdentifiableEntity.java
// public interface IdentifiableEntity
// {
//     String getId();
// 
//     void setId(String id);
// }


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import de.hatoka.common.capi.app.xslt.DateXmlAdapter;
import de.hatoka.common.capi.dao.IdentifiableEntity;
import de.hatoka.common.capi.entities.MoneyPO;
package de.hatoka.tournament.capi.entities;




@Entity
@NamedQueries(value = {
                @NamedQuery(name = "TournamentPO.findByAccountRef", query = "select a from TournamentPO a where a.accountRef = :accountRef"),
                @NamedQuery(name = "TournamentPO.findByExternalRef", query = "select a from TournamentPO a where a.accountRef = :accountRef and a.externalRef = :externalRef") })
public class TournamentPO implements Serializable, IdentifiableEntity
{
    private static final long serialVersionUID = 1L;

    @Id
    @XmlTransient
    private String id;

    @NotNull
    @XmlID
    @XmlAttribute(name = "id")
    private String externalRef;

    @NotNull
    private String accountRef;
    @NotNull
    @XmlAttribute
    private boolean isCashGame;
    @NotNull
    private String name;

    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    @XmlAttribute
// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/app/xslt/DateXmlAdapter.java
// public class DateXmlAdapter extends XmlAdapter<String, Date>
// {
//     private final SimpleDateFormat dateFormat;
// 
//     public DateXmlAdapter()
//     {
//         dateFormat = new SimpleDateFormat(LocalizationConstants.XML_DATEFORMAT_SECONDS);
//         dateFormat.setTimeZone(CountryHelper.UTC);
//     }
// 
//     @Override
//     public String marshal(Date v) throws Exception
//     {
//         if (v == null)
//         {
//             return null;
//         }
//         return dateFormat.format(v);
//     }
// 
//     @Override
//     public Date unmarshal(String v) throws Exception
//     {
//         if (v == null)
//         {
//             return null;
//         }
//         return dateFormat.parse(v);
//     }
// 
// }
// 
// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/dao/IdentifiableEntity.java
// public interface IdentifiableEntity
// {
//     String getId();
// 
//     void setId(String id);
// }


// Path: de.hatoka.tournament/src/main/java/de/hatoka/tournament/capi/entities/TournamentPO.java
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import de.hatoka.common.capi.app.xslt.DateXmlAdapter;
import de.hatoka.common.capi.dao.IdentifiableEntity;
import de.hatoka.common.capi.entities.MoneyPO;

package de.hatoka.tournament.capi.entities;




@Entity
@NamedQueries(value = {
                @NamedQuery(name = "TournamentPO.findByAccountRef", query = "select a from TournamentPO a where a.accountRef = :accountRef"),
                @NamedQuery(name = "TournamentPO.findByExternalRef", query = "select a from TournamentPO a where a.accountRef = :accountRef and a.externalRef = :externalRef") })
public class TournamentPO implements Serializable, IdentifiableEntity
{
    private static final long serialVersionUID = 1L;

    @Id
    @XmlTransient
    private String id;

    @NotNull
    @XmlID
    @XmlAttribute(name = "id")
    private String externalRef;

    @NotNull
    private String accountRef;
    @NotNull
    @XmlAttribute
    private boolean isCashGame;
    @NotNull
    private String name;

    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    @XmlAttribute
    @XmlJavaTypeAdapter(DateXmlAdapter.class)