Merge pull request #8125 from eugenp/revert-8119-BAEL-3275-2

Revert "BAEL-3275: Using blocking queue for pub-sub"
This commit is contained in:
Eric Martin
2019-10-31 20:43:47 -05:00
committed by GitHub
parent db85c8f275
commit 3225470df5
20543 changed files with 1642750 additions and 0 deletions
@@ -0,0 +1,58 @@
package com.baeldung.domain;
import org.springframework.roo.addon.javabean.annotations.RooEquals;
import org.springframework.roo.addon.javabean.annotations.RooJavaBean;
import org.springframework.roo.addon.javabean.annotations.RooToString;
import org.springframework.roo.addon.jpa.annotations.entity.RooJpaEntity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;
/**
* = Book
TODO Auto-generated class documentation
*
*/
@RooJavaBean
@RooToString
@RooJpaEntity
@RooEquals(isJpaEntity = true)
public class Book {
/**
* TODO Auto-generated attribute documentation
*
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
/**
* TODO Auto-generated attribute documentation
*
*/
@Version
private Integer version;
/**
* TODO Auto-generated attribute documentation
*
*/
@NotNull
private String title;
/**
* TODO Auto-generated attribute documentation
*
*/
@NotNull
private String author;
/**
* TODO Auto-generated attribute documentation
*
*/
@NotNull
private String isbn;
}
@@ -0,0 +1,41 @@
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
// You may push code into the target .java compilation unit if you wish to edit any member(s).
package com.baeldung.domain;
import com.baeldung.domain.Book;
import java.util.Objects;
privileged aspect Book_Roo_Equals {
/**
* This `equals` implementation is specific for JPA entities and uses
* the entity identifier for it, following the article in
* https://vladmihalcea.com/2016/06/06/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
*
* @param obj
* @return Boolean
*/
public boolean Book.equals(Object obj) {
if (this == obj) {
return true;
}
// instanceof is false if the instance is null
if (!(obj instanceof Book)) {
return false;
}
return getId() != null && Objects.equals(getId(), ((Book) obj).getId());
}
/**
* This `hashCode` implementation is specific for JPA entities and uses a fixed `int` value to be able
* to identify the entity in collections after a new id is assigned to the entity, following the article in
* https://vladmihalcea.com/2016/06/06/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
*
* @return Integer
*/
public int Book.hashCode() {
return 31;
}
}
@@ -0,0 +1,100 @@
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
// You may push code into the target .java compilation unit if you wish to edit any member(s).
package com.baeldung.domain;
import com.baeldung.domain.Book;
privileged aspect Book_Roo_JavaBean {
/**
* TODO Auto-generated method documentation
*
* @return Long
*/
public Long Book.getId() {
return this.id;
}
/**
* TODO Auto-generated method documentation
*
* @param id
*/
public void Book.setId(Long id) {
this.id = id;
}
/**
* TODO Auto-generated method documentation
*
* @return Integer
*/
public Integer Book.getVersion() {
return this.version;
}
/**
* TODO Auto-generated method documentation
*
* @param version
*/
public void Book.setVersion(Integer version) {
this.version = version;
}
/**
* TODO Auto-generated method documentation
*
* @return String
*/
public String Book.getTitle() {
return this.title;
}
/**
* TODO Auto-generated method documentation
*
* @param title
*/
public void Book.setTitle(String title) {
this.title = title;
}
/**
* TODO Auto-generated method documentation
*
* @return String
*/
public String Book.getAuthor() {
return this.author;
}
/**
* TODO Auto-generated method documentation
*
* @param author
*/
public void Book.setAuthor(String author) {
this.author = author;
}
/**
* TODO Auto-generated method documentation
*
* @return String
*/
public String Book.getIsbn() {
return this.isbn;
}
/**
* TODO Auto-generated method documentation
*
* @param isbn
*/
public void Book.setIsbn(String isbn) {
this.isbn = isbn;
}
}
@@ -0,0 +1,28 @@
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
// You may push code into the target .java compilation unit if you wish to edit any member(s).
package com.baeldung.domain;
import com.baeldung.domain.Book;
import io.springlets.format.EntityFormat;
import javax.persistence.Entity;
privileged aspect Book_Roo_Jpa_Entity {
declare @type: Book: @Entity;
declare @type: Book: @EntityFormat;
/**
* TODO Auto-generated attribute documentation
*
*/
public static final String Book.ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";
/**
* TODO Auto-generated attribute documentation
*
*/
public static final String Book.ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";
}
@@ -0,0 +1,26 @@
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
// You may push code into the target .java compilation unit if you wish to edit any member(s).
package com.baeldung.domain;
import com.baeldung.domain.Book;
privileged aspect Book_Roo_ToString {
/**
* TODO Auto-generated method documentation
*
* @return String
*/
public String Book.toString() {
return "Book {" +
"id='" + id + '\'' +
", version='" + version + '\'' +
", title='" + title + '\'' +
", author='" + author + '\'' +
", isbn='" + isbn + '\'' +
", ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE='" + ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE + '\'' +
", ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE='" + ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE + '\'' + "}" + super.toString();
}
}