LogEntry.java :  » App » droidshop » net » kleinhenz » droidshop » model » Android Open Source

Android Open Source » App » droidshop 
droidshop » net » kleinhenz » droidshop » model » LogEntry.java
package net.kleinhenz.droidshop.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "LOG")
public class LogEntry
{  
  @Transient
    public static final int TYPE_MOTD = 0;
  @Transient
    public static final int TYPE_SEARCH = 1;
  @Transient
    public static final int TYPE_LOOKUP = 2;

  @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    protected Long id = null;

  protected Date date = new Date();
  protected int type = -1;
  protected String ipaddress = null;
    protected String client = null;
    protected String locale = null;
    protected String keywords = null;
    protected int resultCount = -1;
    
    public LogEntry(int type, String ipaddress, String client, String locale,
      String keywords, int resultCount)
  {
    super();
    this.type = type;
    this.ipaddress = ipaddress;
    this.client = client;
    this.locale = locale;
    this.keywords = keywords;
    this.resultCount = resultCount;
  }

  public long getId()
  {
    return id;
  }
  
  public void setId(long id)
  {
    this.id = id;
  }
  
  public Date getDate()
  {
    return date;
  }
  
  public void setDate(Date date)
  {
    this.date = date;
  }
  
  public int getType()
  {
    return type;
  }
  
  public void setType(int type)
  {
    this.type = type;
  }
  
  public String getIpaddress()
  {
    return ipaddress;
  }
  
  public void setIpaddress(String ipaddress)
  {
    this.ipaddress = ipaddress;
  }
  
  public String getClient()
  {
    return client;
  }
  
  public void setClient(String client)
  {
    this.client = client;
  }
  
  public String getLocale()
  {
    return locale;
  }
  
  public void setLocale(String locale)
  {
    this.locale = locale;
  }
  
  public String getKeywords()
  {
    return keywords;
  }
  
  public void setKeywords(String keywords)
  {
    this.keywords = keywords;
  }
  
  public int getResultCount()
  {
    return resultCount;
  }
  
  public void setResultCount(int resultCount)
  {
    this.resultCount = resultCount;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.