/////////////////////////////////////////////////////////////////////////////////////////
  //  REST RESOURCES
  /////////////////////////////////////////////////////////////////////////////////////////
  @Override
  public Set<Class<? extends RESTResource>> getRESTResourceTypes() {
    Set<Class<? extends RESTResource>> outResTypes = Sets.newHashSet();

    outResTypes.add(AA88RESTCRUDResourceForGuarantee.class);
    outResTypes.add(AA88RESTFindResourceForGuarantee.class);

    return outResTypes;
  }
Example #2
0
  public static class Builder {
    final JsonFactory jsonFactory;
    Collection<String> wrapperKeys = Sets.newHashSet();

    public Builder(JsonFactory paramJsonFactory) {
      jsonFactory = ((JsonFactory) Preconditions.checkNotNull(paramJsonFactory));
    }

    public JsonObjectParser build() {
      return new JsonObjectParser(this);
    }

    public Builder setWrapperKeys(Collection<String> paramCollection) {
      wrapperKeys = paramCollection;
      return this;
    }
  }
Example #3
0
@Entity
@Table(name = "FEEDENTRIES")
@SuppressWarnings("serial")
public class FeedEntry extends AbstractModel {

  @Column(length = 2048, nullable = false)
  private String guid;

  @Column(length = 40, nullable = false)
  private String guidHash;

  @ManyToMany
  @JoinTable(
      name = "FEED_FEEDENTRIES",
      joinColumns = {@JoinColumn(name = "FEEDENTRY_ID", nullable = false, updatable = false)},
      inverseJoinColumns = {@JoinColumn(name = "FEED_ID", nullable = false, updatable = false)})
  private Set<Feed> feeds = Sets.newHashSet();

  @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = false)
  @JoinColumn(nullable = false, updatable = false)
  private FeedEntryContent content;

  @Column(length = 2048)
  private String url;

  @Column(name = "author", length = 128)
  private String author;

  @Temporal(TemporalType.TIMESTAMP)
  private Date inserted;

  @Temporal(TemporalType.TIMESTAMP)
  private Date updated;

  @OneToMany(mappedBy = "entry", cascade = CascadeType.REMOVE)
  private Set<FeedEntryStatus> statuses;

  public String getGuid() {
    return guid;
  }

  public void setGuid(String guid) {
    this.guid = guid;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Set<Feed> getFeeds() {
    return feeds;
  }

  public void setFeeds(Set<Feed> feeds) {
    this.feeds = feeds;
  }

  public Set<FeedEntryStatus> getStatuses() {
    return statuses;
  }

  public void setStatuses(Set<FeedEntryStatus> statuses) {
    this.statuses = statuses;
  }

  public Date getInserted() {
    return inserted;
  }

  public void setInserted(Date inserted) {
    this.inserted = inserted;
  }

  public FeedEntryContent getContent() {
    return content;
  }

  public void setContent(FeedEntryContent content) {
    this.content = content;
  }

  public String getGuidHash() {
    return guidHash;
  }

  public void setGuidHash(String guidHash) {
    this.guidHash = guidHash;
  }

  public String getAuthor() {
    return author;
  }

  public void setAuthor(String author) {
    this.author = author;
  }
}