Android Open Source - swazam Request






From Project

Back to project page swazam.

License

The source code is released under:

MIT License

If you think the Android project swazam listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ac.tuwien.sa13.entity;
/*from  w ww.  ja  v a  2 s. c o  m*/
import java.sql.Date;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "request")
public class Request {

  @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
  
  @ManyToOne(fetch = FetchType.EAGER)
  @JoinColumn(name = "user_id")
  @JsonIgnore
  private User user;
  
  @OneToMany(mappedBy = "request")
  @Cascade(CascadeType.ALL)
  private List<Transaction> transactions = new ArrayList<Transaction>();

  @Column(length = 65535)
  private String fingerprint;
  
  private String result;
  
  private Date date;
  
  public Request() {}

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public User getUser() {
    return user;
  }

  public void setUser(User user) {
    this.user = user;
  }


  public List<Transaction> getTransactions() {
    return transactions;
  }

  public void setTransactions(List<Transaction> transactions) {
    this.transactions = transactions;
  }

  public String getFingerprint() {
    return fingerprint;
  }

  public void setFingerprint(String fingerprint) {
    this.fingerprint = fingerprint;
  }

  public String getResult() {
    return result;
  }

  public void setResult(String result) {
    this.result = result;
  }

  public Date getDate() {
    return date;
  }

  public void setDate(Date date) {
    this.date = date;
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((date == null) ? 0 : date.hashCode());
    result = prime * result
        + ((fingerprint == null) ? 0 : fingerprint.hashCode());
    result = prime * result + ((id == null) ? 0 : id.hashCode());
    result = prime * result
        + ((this.result == null) ? 0 : this.result.hashCode());
    result = prime * result
        + ((transactions == null) ? 0 : transactions.hashCode());
    result = prime * result + ((user == null) ? 0 : user.hashCode());
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Request other = (Request) obj;
    if (date == null) {
      if (other.date != null)
        return false;
    } else if (!date.equals(other.date))
      return false;
    if (fingerprint == null) {
      if (other.fingerprint != null)
        return false;
    } else if (!fingerprint.equals(other.fingerprint))
      return false;
    if (id == null) {
      if (other.id != null)
        return false;
    } else if (!id.equals(other.id))
      return false;
    if (result == null) {
      if (other.result != null)
        return false;
    } else if (!result.equals(other.result))
      return false;
    if (transactions == null) {
      if (other.transactions != null)
        return false;
    } else if (!transactions.equals(other.transactions))
      return false;
    if (user == null) {
      if (other.user != null)
        return false;
    } else if (!user.equals(other.user))
      return false;
    return true;
  }

  @Override
  public String toString() {
    return "Request [id=" + id + ", user=" + user + ", transactions="
        + transactions + ", fingerprint=" + fingerprint + ", result="
        + result + ", date=" + date + "]";
  }

  
}




Java Source Code List

ac.tuwien.sa13.beans.HibernateAwareObjectMapper.java
ac.tuwien.sa13.controller.HomeController.java
ac.tuwien.sa13.controller.LoginController.java
ac.tuwien.sa13.controller.RequestController.java
ac.tuwien.sa13.controller.TransactionController.java
ac.tuwien.sa13.controller.api.UserRestController.java
ac.tuwien.sa13.dao.HibernateDAO.java
ac.tuwien.sa13.dao.IGenericDAO.java
ac.tuwien.sa13.dao.IRequestDAO.java
ac.tuwien.sa13.dao.ITransactionDAO.java
ac.tuwien.sa13.dao.IUserDAO.java
ac.tuwien.sa13.dao.RequestDAO.java
ac.tuwien.sa13.dao.TransactionDAO.java
ac.tuwien.sa13.dao.UserDAO.java
ac.tuwien.sa13.entity.Request.java
ac.tuwien.sa13.entity.Transaction.java
ac.tuwien.sa13.entity.User.java
ac.tuwien.sa13.service.IGenericService.java
ac.tuwien.sa13.service.IRequestService.java
ac.tuwien.sa13.service.ITransactionService.java
ac.tuwien.sa13.service.IUserService.java
ac.tuwien.sa13.service.PeerManager.java
ac.tuwien.sa13.service.RequestService.java
ac.tuwien.sa13.service.TransactionService.java
ac.tuwien.sa13.service.UserService.java
ac.tuwien.sa13.utilities.SessionIdentifierGenerator.java
ac.tuwien.sa13.utilities.Token.java
ac.tuwien.sa13.validator.LoginValidator.java
at.ac.tuwien.swa13.swazam.NetworkConnection.java
at.ac.tuwien.swa13.swazam.Peer.java
at.ac.tuwien.swa13.swazam.fingerprint.IFingerPrintCreator.java
at.ac.tuwien.swa13.swazam.fingerprint.impl.FingerPrintCreator.java
at.ac.tuwien.swa13.swazam.library.ILibraryManager.java
at.ac.tuwien.swa13.swazam.library.ISong.java
at.ac.tuwien.swa13.swazam.library.impl.LibraryManager.java
at.ac.tuwien.swa13.swazam.library.impl.Song.java
at.ac.tuwien.swa13.swazam.p2p.PeerConnector.java
at.saws2013.szazam.App.java
at.saws2013.szazam.BaseActivity.java
at.saws2013.szazam.HistoryActivity.java
at.saws2013.szazam.LoginActivity.java
at.saws2013.szazam.RecognitionActivity.java
at.saws2013.szazam.SettingsActivity.java
at.saws2013.szazam.entities.IListItem.java
at.saws2013.szazam.entities.ListItemTypes.java
at.saws2013.szazam.entities.Request.java
at.saws2013.szazam.entities.Transaction.java
at.saws2013.szazam.fingerprint.IFingerPrintSystem.java
at.saws2013.szazam.fingerprint.impl.FingerPrintCreator.java
at.saws2013.szazam.fragments.SettingsFragment.java
at.saws2013.szazam.media.IAudioFilePicker.java
at.saws2013.szazam.media.IAudioRecorder.java
at.saws2013.szazam.media.impl.AudioFilePicker.java
at.saws2013.szazam.media.impl.AudioRecorder.java
at.saws2013.szazam.store.IAuthStore.java
at.saws2013.szazam.store.IRequestStore.java
at.saws2013.szazam.store.ITransactionStore.java
at.saws2013.szazam.store.impl.AuthStore.java
at.saws2013.szazam.store.impl.RequestStore.java
at.saws2013.szazam.store.impl.TransactionStore.java
at.saws2013.szazam.ui.CustomListAdapter.java
at.saws2013.szazam.ui.ViewTools.java
at.saws2013.szazam.volley.CustomVolleyStringRequest.java
de.passsy.holocircularprogressbar.HoloCircularProgressBar.java