Here are the examples of the java api @org.hibernate.annotations.Immutable taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
70 Examples
19
View Complete Implementation : PoolBoxPosition.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
@Table(name = "PoolBoxPosition")
@Synchronize("Pool")
public clreplaced PoolBoxPosition extends AbstractBoxPosition {
private static final long serialVersionUID = 1L;
@Id
private Long poolId;
public Long getPoolId() {
return poolId;
}
public void setPoolId(Long poolId) {
this.poolId = poolId;
}
}
19
View Complete Implementation : SequencingOrderCompletion.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
/**
* Information about completion (success/failure/pending/requested) lanes. This maps over a view in the database for sequencing orders and
* run information.
*/
@Enreplacedy
@Immutable
@Table(name = "SequencingOrderCompletion")
@IdClreplaced(SequencingOrderCompletionId.clreplaced)
public clreplaced SequencingOrderCompletion implements Serializable {
@Embeddable
public static clreplaced SequencingOrderCompletionId implements Serializable {
private static final long serialVersionUID = -2890725144995338712L;
@ManyToOne
@JoinColumn(name = "parametersId", nullable = false)
SequencingParameters parameters;
@ManyToOne(targetEnreplacedy = PoolImpl.clreplaced)
@JoinColumn(name = "poolId")
Pool pool;
public SequencingOrderCompletionId() {
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
SequencingOrderCompletionId other = (SequencingOrderCompletionId) obj;
if (parameters == null) {
if (other.parameters != null)
return false;
} else if (!parameters.equals(other.parameters))
return false;
if (pool == null) {
if (other.pool != null)
return false;
} else if (!pool.equals(other.pool))
return false;
return true;
}
public SequencingParameters getParameters() {
return parameters;
}
public Pool getPool() {
return pool;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((parameters == null) ? 0 : parameters.hashCode());
result = prime * result + ((pool == null) ? 0 : pool.hashCode());
return result;
}
public void setParameters(SequencingParameters parameters) {
this.parameters = parameters;
}
public void setPool(Pool pool) {
this.pool = pool;
}
}
private static final long serialVersionUID = 1L;
@Id
private Pool pool;
@Id
private SequencingParameters parameters;
@ElementCollection(targetClreplaced = Integer.clreplaced, fetch = FetchType.EAGER)
@CollectionTable(name = "SequencingOrderCompletion_Items", joinColumns = { @JoinColumn(name = "poolId", referencedColumnName = "poolId"), @JoinColumn(name = "parametersId", referencedColumnName = "parametersId") })
@Column(name = "num_parreplacedions")
@MapKeyClreplaced(HealthType.clreplaced)
@MapKeyColumn(name = "health", unique = true)
@MapKeyEnumerated(EnumType.STRING)
@Fetch(FetchMode.SUBSELECT)
private Map<HealthType, Integer> items;
@Temporal(TemporalType.TIMESTAMP)
private Date lastUpdated;
private int remaining;
private int loaded;
private String description;
private String purpose;
public int get(HealthType health) {
if (items.containsKey(health)) {
return items.get(health);
}
return 0;
}
public Map<HealthType, Integer> gereplacedems() {
return items;
}
public Date getLastUpdated() {
return lastUpdated;
}
/**
* The number of parreplacedions holding this pool which are in containers that have not been run
*/
public int getLoaded() {
return loaded;
}
public Pool getPool() {
return pool;
}
public int getRemaining() {
return remaining;
}
public SequencingParameters getSequencingParameters() {
return parameters;
}
public String getDescription() {
return description;
}
public void sereplacedems(Map<HealthType, Integer> items) {
this.items = items;
}
public void setLastUpdated(Date lastUpdated) {
this.lastUpdated = lastUpdated;
}
public void setLoaded(int loaded) {
this.loaded = loaded;
}
public void setPool(Pool pool) {
this.pool = pool;
}
public void setRemaining(int remaining) {
this.remaining = remaining;
}
public void setDescription(String description) {
this.description = description;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
}
19
View Complete Implementation : FeaturedModFile.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Setter
@Immutable
@Enreplacedy
@EnreplacedyListeners(FeaturedModFileEnricher.clreplaced)
public clreplaced FeaturedModFile {
private int id;
private String group;
private String md5;
private String name;
private String originalFileName;
private int version;
// Enriched in FeaturedModFileEnricher
private String url;
private String folderName;
private short fileId;
@Id
@Column(name = "id")
public int getId() {
return id;
}
@Column(name = "\"group\"")
public String getGroup() {
return group;
}
@Column(name = "md5")
public String getMd5() {
return md5;
}
/**
* Name of the file on the client's file system.
*/
@Column(name = "name")
public String getName() {
return name;
}
/**
* Name of the file on the server's file system.
*/
@Column(name = "fileName")
@Exclude
public String getOriginalFileName() {
return originalFileName;
}
@Column(name = "version")
public int getVersion() {
return version;
}
@Column(name = "fileId")
public short getFileId() {
return fileId;
}
@Transient
public // Enriched by FeaturedModFileEnricher
String getUrl() {
return url;
}
/**
* Returns the name of the folder on the server in which the file resides (e.g. {@code updates_faf_files}). Used by
* the {@link FeaturedModFileEnricher}.
*/
@Column(name = "folderName")
public String getFolderName() {
return folderName;
}
}
19
View Complete Implementation : TimeDimensionImpl.java
Copyright Apache License 2.0
Author : Jasig
Copyright Apache License 2.0
Author : Jasig
/**
*/
@Enreplacedy
@Table(name = "UP_TIME_DIMENSION")
@SequenceGenerator(name = "UP_TIME_DIMENSION_GEN", sequenceName = "UP_TIME_DIMENSION_SEQ", allocationSize = 1)
@TableGenerator(name = "UP_TIME_DIMENSION_GEN", pkColumnValue = "UP_TIME_DIMENSION_PROP", allocationSize = 1)
@Immutable
@NaturalIdCache(region = "org.apereo.portal.events.aggr.dao.jpa.TimeDimensionImpl-NaturalId")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public final clreplaced TimeDimensionImpl implements TimeDimension, Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "UP_TIME_DIMENSION_GEN")
@Column(name = "TIME_ID")
private final long id;
@NaturalId
@Column(name = "TD_TIME", nullable = false)
@Type(type = "localTime")
private final LocalTime time;
@Index(name = "IDX_UP_TD_HOUR")
@Column(name = "TD_HOUR", nullable = false)
private final int hour;
@Index(name = "IDX_UP_TD_FIVE_MIN_INCR")
@Column(name = "TD_FIVE_MINUTE_INCREMENT", nullable = false)
private final int fiveMinuteIncrement;
@Index(name = "IDX_UP_TD_MINUTE")
@Column(name = "TD_MINUTE", nullable = false)
private final int minute;
/**
* NEVER used directly, simply needed for join queries
*/
@SuppressWarnings("unused")
@OneToMany(mappedBy = "timeDimension", fetch = FetchType.LAZY)
private Collection<LoginAggregationImpl> loginAggregations;
@Transient
private int hashCode = 0;
/**
* no-arg needed by hibernate
*/
@SuppressWarnings("unused")
private TimeDimensionImpl() {
this.id = -1;
this.time = null;
this.hour = -1;
this.fiveMinuteIncrement = -1;
this.minute = -1;
}
TimeDimensionImpl(LocalTime time) {
this.id = -1;
// truncate at minute level
this.time = time.minuteOfHour().roundFloorCopy();
this.hour = this.time.getHourOfDay();
this.minute = this.time.getMinuteOfHour();
this.fiveMinuteIncrement = this.minute / 5;
}
@Override
public long getId() {
return this.id;
}
@Override
public LocalTime getTime() {
return this.time;
}
@Override
public int getHour() {
return this.hour;
}
@Override
public int getFiveMinuteIncrement() {
return this.fiveMinuteIncrement;
}
@Override
public int getMinute() {
return this.minute;
}
@Override
public int hashCode() {
int h = this.hashCode;
if (h == 0) {
final int prime = 31;
h = 1;
h = prime * h + ((time == null) ? 0 : time.hashCode());
this.hashCode = h;
}
return h;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof TimeDimension))
return false;
TimeDimension other = (TimeDimension) obj;
if (time == null) {
if (other.getTime() != null)
return false;
} else if (!time.equals(other.getTime()))
return false;
return true;
}
@Override
public String toString() {
return time.toString();
}
}
19
View Complete Implementation : TestEntity.java
Copyright Apache License 2.0
Author : hibernate
Copyright Apache License 2.0
Author : hibernate
/**
* @author Hardy Ferentschik
*/
@Enreplacedy
@Immutable
@Table(name = "ENreplacedY")
public clreplaced TestEnreplacedy implements Serializable {
@EmbeddedId
private Ref ref;
@Column(name = "NAME", insertable = false, updatable = false, unique = true)
private String name;
}
19
View Complete Implementation : MapVersionReviewsSummary.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Setter
@Table(name = "map_version_reviews_summary")
@Include(type = "mapVersionReviewsSummary")
@Immutable
public clreplaced MapVersionReviewsSummary {
private int id;
private float positive;
private float negative;
private float score;
private int reviews;
private float lowerBound;
private MapVersion mapVersion;
@Id
@Column(name = "map_version_id")
public int getId() {
return id;
}
@Column(name = "positive")
public float getPositive() {
return positive;
}
@Column(name = "negative")
public float getNegative() {
return negative;
}
@Column(name = "score")
public float getScore() {
return score;
}
@Column(name = "reviews")
public int getReviews() {
return reviews;
}
@Column(name = "lower_bound")
public float getLowerBound() {
return lowerBound;
}
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "map_version_id", insertable = false, updatable = false)
@BatchSize(size = 1000)
public MapVersion getMapVersion() {
return mapVersion;
}
}
19
View Complete Implementation : BoxableView.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
@Table(name = "BoxableView")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLreplaced)
public clreplaced BoxableView implements Serializable {
private static final long serialVersionUID = 1L;
@EmbeddedId
private BoxableId id;
private String name;
private String alias;
private String identificationBarcode;
private String locationBarcode;
private BigDecimal volume;
private boolean discarded;
private boolean distributed;
private Long boxId;
private String boxName;
private String boxAlias;
private String boxPosition;
private String boxLocationBarcode;
private Long preMigrationId;
private Long sampleClreplacedId;
public static BoxableView fromBoxable(Boxable boxable) {
BoxableView v = new BoxableView();
v.setId(new BoxableId(boxable.getEnreplacedyType(), boxable.getId()));
v.setName(boxable.getName());
v.setAlias(boxable.getAlias());
v.setIdentificationBarcode(boxable.getIdentificationBarcode());
v.setLocationBarcode(boxable.getLocationBarcode());
v.setVolume(boxable.getVolume());
v.setDiscarded(boxable.isDiscarded());
Box box = boxable.getBox();
if (box != null) {
v.setBoxId(box.getId());
v.setBoxName(box.getName());
v.setBoxAlias(box.getAlias());
v.setBoxPosition(boxable.getBoxPosition());
v.setBoxLocationBarcode(box.getLocationBarcode());
}
v.setPreMigrationId(boxable.getPreMigrationId());
return v;
}
public BoxableId getId() {
return id;
}
public void setId(BoxableId id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getIdentificationBarcode() {
return identificationBarcode;
}
public void setIdentificationBarcode(String identificationBarcode) {
this.identificationBarcode = identificationBarcode;
}
public String getLocationBarcode() {
return locationBarcode;
}
public void setLocationBarcode(String locationBarcode) {
this.locationBarcode = locationBarcode;
}
public BigDecimal getVolume() {
return volume;
}
public void setVolume(BigDecimal volume) {
this.volume = volume;
}
public boolean isDiscarded() {
return discarded;
}
public void setDiscarded(boolean discarded) {
if (discarded)
setVolume(BigDecimal.ZERO);
this.discarded = discarded;
}
public boolean isDistributed() {
return distributed;
}
public void setDistributed(boolean distributed) {
this.distributed = distributed;
}
public Long getBoxId() {
return boxId;
}
public void setBoxId(Long boxId) {
this.boxId = boxId;
}
public String getBoxName() {
return boxName;
}
public void setBoxName(String boxName) {
this.boxName = boxName;
}
public String getBoxAlias() {
return boxAlias;
}
public void setBoxAlias(String boxAlias) {
this.boxAlias = boxAlias;
}
public String getBoxPosition() {
return boxPosition;
}
public void setBoxPosition(String position) {
this.boxPosition = position;
}
public String getBoxLocationBarcode() {
return boxLocationBarcode;
}
public void setBoxLocationBarcode(String boxLocationBarcode) {
this.boxLocationBarcode = boxLocationBarcode;
}
public Long getPreMigrationId() {
return preMigrationId;
}
public void setPreMigrationId(Long preMigrationId) {
this.preMigrationId = preMigrationId;
}
public Long getSampleClreplacedId() {
return sampleClreplacedId;
}
public void setSampleClreplacedId(Long sampleClreplacedId) {
this.sampleClreplacedId = sampleClreplacedId;
}
}
19
View Complete Implementation : Document.java
Copyright GNU General Public License v3.0
Author : bkielczewski
Copyright GNU General Public License v3.0
Author : bkielczewski
@SuppressWarnings("UnusedDeclaration")
@Immutable
@Enreplacedy
public clreplaced Doreplacedent implements Serializable {
@Id
@NotNull
@Column(name = "id", nullable = false, updatable = false)
private String id;
@NotNull
@Column(name = "file", nullable = false, updatable = false)
private String file;
@NotNull
@Column(name = "replacedle", nullable = false, updatable = false)
private String replacedle;
@Column(name = "description", updatable = false)
private String description;
@NotNull
@Column(name = "contents", nullable = false, updatable = false, length = 65536)
@Lob
private String contents;
@ElementCollection
@CollectionTable(name = "doreplacedent_tags", joinColumns = @JoinColumn(name = "doreplacedent_id"))
@Column(name = "tag", updatable = false)
private Collection<String> tags;
@NotNull
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "datePublished", nullable = false, updatable = false)
private Date datePublished;
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "doreplacedent_id", unique = true)
@JsonManagedReference
private FacebookStats facebookStats;
private Doreplacedent() {
}
public Doreplacedent(String id, String file, String replacedle, String description, String contents, Collection<String> tags, Date datePublished, FacebookStats facebookStats) {
this.id = id;
this.file = file;
this.replacedle = replacedle;
this.description = description;
this.contents = contents;
this.tags = tags;
this.datePublished = new Date(datePublished.getTime());
this.facebookStats = facebookStats;
}
public String getId() {
return id;
}
public String getFile() {
return file;
}
public String getreplacedle() {
return replacedle;
}
public String getDescription() {
return description;
}
public String getContents() {
return contents;
}
public Collection<String> getTags() {
return ImmutableList.copyOf(tags);
}
public Date getDatePublished() {
return new Date(datePublished.getTime());
}
public FacebookStats getFacebookStats() {
return facebookStats;
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClreplaced() != obj.getClreplaced()) {
return false;
}
final Doreplacedent other = (Doreplacedent) obj;
return Objects.equal(this.id, other.id);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("id", id).add("file", file).add("replacedle", replacedle).add("description", description).add("tags", tags).add("datePublished", datePublished).add("facebookStats", facebookStats).toString();
}
}
19
View Complete Implementation : BookView.java
Copyright MIT License
Author : thjanssen
Copyright MIT License
Author : thjanssen
@Enreplacedy
@Immutable
public clreplaced BookView {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Version
@Column(name = "version")
private int version;
@Column
private String replacedle;
@Column
@Temporal(TemporalType.DATE)
private Date publishingDate;
@Column
private String authors;
public Long getId() {
return this.id;
}
public void setId(final Long id) {
this.id = id;
}
public int getVersion() {
return this.version;
}
public void setVersion(final int version) {
this.version = version;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof BookView)) {
return false;
}
BookView other = (BookView) obj;
if (id != null) {
if (!id.equals(other.id)) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
public String getreplacedle() {
return replacedle;
}
public void setreplacedle(String replacedle) {
this.replacedle = replacedle;
}
public Date getPublishingDate() {
return publishingDate;
}
public void setPublishingDate(Date publishingDate) {
this.publishingDate = publishingDate;
}
public String getAuthors() {
return authors;
}
public void setAuthors(String authors) {
this.authors = authors;
}
@Override
public String toString() {
return "BookView [id=" + id + ", version=" + version + ", replacedle=" + replacedle + ", publishingDate=" + publishingDate + ", authors=" + authors + "]";
}
}
19
View Complete Implementation : ProductContent.java
Copyright GNU General Public License v2.0
Author : candlepin
Copyright GNU General Public License v2.0
Author : candlepin
/**
* ProductContent
*/
@Enreplacedy
@Immutable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
@Table(name = ProductContent.DB_TABLE)
public clreplaced ProductContent extends AbstractHibernateObject implements ProductContentInfo {
/**
* Name of the table backing this object in the database
*/
public static final String DB_TABLE = "cp2_product_content";
/**
* The default state of the enabled flag
*/
public static final Boolean DEFAULT_ENABLED_STATE = Boolean.FALSE;
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@NotNull
private String id;
@ManyToOne
@JoinColumn(name = "product_uuid", nullable = false)
@NotNull
private Product product;
@ManyToOne
@JoinColumn(name = "content_uuid", nullable = false)
@NotNull
private Content content;
private boolean enabled;
public ProductContent() {
// Intentionally left empty
}
public ProductContent(Product product, Content content, boolean enabled) {
this.setContent(content);
this.setProduct(product);
this.setEnabled(enabled);
}
@Override
@XmlTransient
public Serializable getId() {
return this.id;
}
/**
* @param content the content to set
*/
public void setContent(Content content) {
this.content = content;
}
/**
* @return the content
*/
@Override
public Content getContent() {
return content;
}
/**
* @param product the product to set
*/
public void setProduct(Product product) {
this.product = product;
}
/**
* @return the product
*/
@XmlTransient
public Product getProduct() {
return product;
}
/**
* @param enabled the enabled to set
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
/**
* @return the enabled
*/
@Override
public Boolean isEnabled() {
return enabled;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof ProductContent) {
ProductContent that = (ProductContent) obj;
// We're only interested in ensuring the mapping between the two objects is the same.
String thisContentUuid = this.getContent() != null ? this.getContent().getUuid() : null;
String thatContentUuid = that.getContent() != null ? that.getContent().getUuid() : null;
return new EqualsBuilder().append(thisContentUuid, thatContentUuid).append(this.isEnabled(), that.isEnabled()).isEquals();
}
return false;
}
@Override
public int hashCode() {
// Impl note:
// Product is not included in this calculation because it only exists in this object to
// properly map products to content -- it should not be used for comparing two
// instances.
return new HashCodeBuilder(3, 23).append(this.getContent() != null ? this.getContent().getUuid() : null).append(this.isEnabled()).toHashCode();
}
/**
* Calculates and returns a version hash for this enreplacedy. This method operates much like the
* hashCode method, except that it is more accurate and should have fewer collisions.
*
* @return
* a version hash for this enreplacedy
*/
public int getEnreplacedyVersion() {
int hash = 17;
hash = 7 * hash + (this.content != null ? this.content.getEnreplacedyVersion() : 0);
hash = 7 * hash + (this.enabled ? 1 : 0);
return hash;
}
/**
* Returns a DTO representing this enreplacedy.
*
* @return
* a DTO representing this enreplacedy
*/
public ProductContentData toDTO() {
return new ProductContentData(this);
}
public String toString() {
return String.format("ProductContent [id: %s, product = %s, content = %s, enabled = %s]", this.getId(), this.getProduct(), this.getContent(), this.isEnabled());
}
}
19
View Complete Implementation : ResourceSearchView.java
Copyright Apache License 2.0
Author : jamesagnew
Copyright Apache License 2.0
Author : jamesagnew
@Enreplacedy
@Immutable
@Subselect("SELECT h.pid as pid, " + " h.res_id as res_id, " + " h.res_type as res_type, " + // FHIR version
" h.res_version as res_version, " + // resource version
" h.res_ver as res_ver, " + " h.has_tags as has_tags, " + " h.res_deleted_at as res_deleted_at, " + " h.res_published as res_published, " + " h.res_updated as res_updated, " + " h.res_text as res_text, " + " h.res_encoding as res_encoding, " + " p.SOURCE_URI as PROV_SOURCE_URI," + " p.REQUEST_ID as PROV_REQUEST_ID," + " f.forced_id as FORCED_PID " + "FROM HFJ_RES_VER h " + " LEFT OUTER JOIN HFJ_FORCED_ID f ON f.resource_pid = h.res_id " + " LEFT OUTER JOIN HFJ_RES_VER_PROV p ON p.res_ver_pid = h.pid " + " INNER JOIN HFJ_RESOURCE r ON r.res_id = h.res_id and r.res_ver = h.res_ver")
public clreplaced ResourceSearchView implements IBaseResourceEnreplacedy, Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "PID")
private Long myId;
@Column(name = "RES_ID")
private Long myResourceId;
@Column(name = "RES_TYPE", length = Constants.MAX_RESOURCE_NAME_LENGTH)
private String myResourceType;
@Column(name = "RES_VERSION")
@Enumerated(EnumType.STRING)
private FhirVersionEnum myFhirVersion;
@Column(name = "RES_VER")
private Long myResourceVersion;
@Column(name = "PROV_REQUEST_ID", length = Constants.REQUEST_ID_LENGTH)
private String myProvenanceRequestId;
@Column(name = "PROV_SOURCE_URI", length = ResourceHistoryProvenanceEnreplacedy.SOURCE_URI_LENGTH)
private String myProvenanceSourceUri;
@Column(name = "HAS_TAGS")
private boolean myHasTags;
@Column(name = "RES_DELETED_AT")
@Temporal(TemporalType.TIMESTAMP)
private Date myDeleted;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "RES_PUBLISHED")
private Date myPublished;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "RES_UPDATED")
private Date myUpdated;
@Column(name = "RES_TEXT")
@Lob()
private byte[] myResource;
@Column(name = "RES_ENCODING")
@Enumerated(EnumType.STRING)
private ResourceEncodingEnum myEncoding;
@Column(name = "FORCED_PID", length = ForcedId.MAX_FORCED_ID_LENGTH)
private String myForcedPid;
public ResourceSearchView() {
}
public String getProvenanceRequestId() {
return myProvenanceRequestId;
}
public String getProvenanceSourceUri() {
return myProvenanceSourceUri;
}
@Override
public Date getDeleted() {
return myDeleted;
}
public void setDeleted(Date theDate) {
myDeleted = theDate;
}
@Override
public FhirVersionEnum getFhirVersion() {
return myFhirVersion;
}
public void setFhirVersion(FhirVersionEnum theFhirVersion) {
myFhirVersion = theFhirVersion;
}
public String getForcedId() {
return myForcedPid;
}
@Override
public Long getId() {
return myResourceId;
}
@Override
public IdDt getIdDt() {
if (myForcedPid == null) {
Long id = myResourceId;
return new IdDt(myResourceType + '/' + id + '/' + Constants.PARAM_HISTORY + '/' + getVersion());
} else {
return new IdDt(getResourceType() + '/' + getForcedId() + '/' + Constants.PARAM_HISTORY + '/' + getVersion());
}
}
@Override
public InstantDt getPublished() {
if (myPublished != null) {
return new InstantDt(myPublished);
} else {
return null;
}
}
public void setPublished(Date thePublished) {
myPublished = thePublished;
}
@Override
public Long getResourceId() {
return myResourceId;
}
@Override
public String getResourceType() {
return myResourceType;
}
@Override
public InstantDt getUpdated() {
return new InstantDt(myUpdated);
}
@Override
public Date getUpdatedDate() {
return myUpdated;
}
@Override
public long getVersion() {
return myResourceVersion;
}
@Override
public boolean isHasTags() {
return myHasTags;
}
public byte[] getResource() {
return myResource;
}
public ResourceEncodingEnum getEncoding() {
return myEncoding;
}
}
19
View Complete Implementation : ActivityLog.java
Copyright MIT License
Author : InnovateUKGitHub
Copyright MIT License
Author : InnovateUKGitHub
@Enreplacedy
@Immutable
@EnreplacedyListeners(AuditingEnreplacedyListener.clreplaced)
public clreplaced ActivityLog {
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Long id;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "applicationId", referencedColumnName = "id")
private Application application;
@Enumerated(STRING)
private ActivityType type;
@CreatedBy
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "createdBy", referencedColumnName = "id", nullable = false, updatable = false)
private User createdBy;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "author_id", referencedColumnName = "id", nullable = true, updatable = false)
private User author;
@CreatedDate
@Column(nullable = false, updatable = false)
private ZonedDateTime createdOn;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "organisationId", referencedColumnName = "id")
private Organisation organisation;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "doreplacedentConfigId", referencedColumnName = "id")
private CompereplacedionDoreplacedent compereplacedionDoreplacedent;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "threadId", referencedColumnName = "id")
private Query query;
public ActivityLog() {
}
public ActivityLog(Application application, ActivityType type, CompereplacedionDoreplacedent compereplacedionDoreplacedent) {
this.application = application;
this.type = type;
this.compereplacedionDoreplacedent = compereplacedionDoreplacedent;
}
public ActivityLog(Application application, ActivityType type, Query query, Organisation organisation) {
this.application = application;
this.type = type;
this.query = query;
this.organisation = organisation;
}
public ActivityLog(Application application, ActivityType type) {
this.application = application;
this.type = type;
}
public ActivityLog(Application application, ActivityType type, Organisation organisation) {
this.application = application;
this.type = type;
this.organisation = organisation;
}
public ActivityLog(Application application, ActivityType type, Organisation organisation, User author) {
this.author = author;
this.application = application;
this.type = type;
this.organisation = organisation;
}
public Long getId() {
return id;
}
public Application getApplication() {
return application;
}
public Optional<Organisation> getOrganisation() {
return ofNullable(organisation);
}
public ActivityType getType() {
return type;
}
public User getCreatedBy() {
return createdBy;
}
public User getAuthor() {
return ofNullable(author).orElse(getCreatedBy());
}
public ZonedDateTime getCreatedOn() {
return createdOn;
}
public Optional<CompereplacedionDoreplacedent> getCompereplacedionDoreplacedent() {
return ofNullable(compereplacedionDoreplacedent);
}
public Optional<Query> getQuery() {
return ofNullable(query);
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClreplaced() != o.getClreplaced())
return false;
ActivityLog that = (ActivityLog) o;
return new EqualsBuilder().append(id, that.id).append(application, that.application).append(type, that.type).append(createdBy, that.createdBy).append(author, that.author).append(createdOn, that.createdOn).append(organisation, that.organisation).append(compereplacedionDoreplacedent, that.compereplacedionDoreplacedent).append(query, that.query).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(id).append(application).append(type).append(createdBy).append(createdOn).append(organisation).append(compereplacedionDoreplacedent).append(query).toHashCode();
}
public boolean isOrganisationRemoved() {
return getOrganisation().map(org -> ofNullable(getApplication()).map(a -> a.getProject()).map(p -> p.getOrganisations()).map(orgs -> !simpleAnyMatch(orgs, o -> org.getId().equals(o.getId()))).orElse(true)).orElse(false);
}
}
19
View Complete Implementation : Map.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Setter
@Table(name = "map")
@Include(rootLevel = true, type = Map.TYPE_NAME)
@Immutable
@EnreplacedyListeners(MapChangeListener.clreplaced)
public clreplaced Map extends AbstractEnreplacedy implements OwnableEnreplacedy {
public static final String TYPE_NAME = "map";
private String displayName;
private String mapType;
private String battleType;
private List<MapVersion> versions = new ArrayList<>();
private Player author;
private MapStatistics statistics;
private MapVersion latestVersion;
private int numberOfReviews;
private float averageReviewScore;
@Column(name = "display_name", unique = true)
@Size(max = 100)
@NotNull
public String getDisplayName() {
return displayName;
}
@Column(name = "map_type")
@NotNull
public String getMapType() {
return mapType;
}
@Column(name = "battle_type")
@NotNull
public String getBattleType() {
return battleType;
}
@Column(name = "reviews")
public int getNumberOfReviews() {
return numberOfReviews;
}
@Column(name = "average_review_score")
public float getAverageReviewScore() {
return averageReviewScore;
}
@OneToMany(mappedBy = "map", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
@NotEmpty
@Valid
@BatchSize(size = 1000)
public List<MapVersion> getVersions() {
return versions;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "author")
@Nullable
@BatchSize(size = 1000)
public Player getAuthor() {
return author;
}
@OneToOne(mappedBy = "map")
public MapStatistics getStatistics() {
return statistics;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumnsOrFormulas({ @JoinColumnOrFormula(formula = @JoinFormula(value = "(SELECT map_version.id FROM map_version WHERE map_version.map_id = id ORDER BY map_version.version DESC LIMIT 1)", referencedColumnName = "id")) })
@BatchSize(size = 1000)
public MapVersion getLatestVersion() {
return latestVersion;
}
@Transient
@Override
public Login getEnreplacedyOwner() {
return author;
}
}
19
View Complete Implementation : AggregatedTabMappingImpl.java
Copyright Apache License 2.0
Author : Jasig
Copyright Apache License 2.0
Author : Jasig
@Enreplacedy
@Table(name = "UP_AGGR_TAB_MAPPING")
@SequenceGenerator(name = "UP_AGGR_TAB_MAPPING_GEN", sequenceName = "UP_AGGR_TAB_MAPPING_SEQ", allocationSize = 10)
@TableGenerator(name = "UP_AGGR_TAB_MAPPING_GEN", pkColumnValue = "UP_AGGR_TAB_MAPPING_PROP", allocationSize = 10)
@Immutable
@NaturalIdCache(region = "org.apereo.portal.events.aggr.tabs.AggregatedTabMappingImpl-NaturalId")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public final clreplaced AggregatedTabMappingImpl implements AggregatedTabMapping, Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "UP_AGGR_TAB_MAPPING_GEN")
@Column(name = "ID")
private final long id;
@NaturalId
@Column(name = "FRAGMENT_NAME", length = 200, nullable = false)
private final String fragmentName;
@NaturalId
@Column(name = "TAB_NAME", length = 200, nullable = false)
private final String tabName;
@Transient
private int hashCode = 0;
@SuppressWarnings("unused")
private AggregatedTabMappingImpl() {
this.id = -1;
this.fragmentName = null;
this.tabName = null;
}
AggregatedTabMappingImpl(String fragmentName, String tabName) {
this.id = -1;
this.fragmentName = fragmentName;
this.tabName = tabName;
}
@Override
public long getId() {
return id;
}
@Override
public String getFragmentName() {
return this.fragmentName;
}
@Override
public String getTabName() {
return this.tabName;
}
@Override
public int hashCode() {
int h = this.hashCode;
if (h == 0) {
final int prime = 31;
h = 1;
h = prime * h + ((fragmentName == null) ? 0 : fragmentName.hashCode());
h = prime * h + ((tabName == null) ? 0 : tabName.hashCode());
this.hashCode = h;
}
return h;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
if (hashCode() != obj.hashCode())
return false;
AggregatedTabMappingImpl other = (AggregatedTabMappingImpl) obj;
if (fragmentName == null) {
if (other.fragmentName != null)
return false;
} else if (!fragmentName.equals(other.fragmentName))
return false;
if (tabName == null) {
if (other.tabName != null)
return false;
} else if (!tabName.equals(other.tabName))
return false;
return true;
}
@Override
public String toString() {
return "AggregatedTabMappingImpl [id=" + id + ", fragmentName=" + fragmentName + ", tabName=" + tabName + "]";
}
@Override
public String getDisplayString() {
return getTabName() + " (" + getFragmentName() + ")";
}
}
19
View Complete Implementation : IdmIdentityRoleThin.java
Copyright MIT License
Author : bcvsolutions
Copyright MIT License
Author : bcvsolutions
/**
* replacedigned idenreplacedy role - thin variant.
* - roles are related to idenreplacedy's contract
* - the only relation - role is loaded
*
* @author Radek Tomiška
* @since 9.7.0
*/
@Enreplacedy
@Immutable
@Table(name = "idm_idenreplacedy_role")
public clreplaced IdmIdenreplacedyRoleThin extends AbstractEnreplacedy implements ValidableEnreplacedy, ExternalIdentifiable, FormableEnreplacedy {
private static final long serialVersionUID = 1L;
@Size(max = DefaultFieldLengths.NAME)
@Column(name = "external_id", length = DefaultFieldLengths.NAME)
private String externalId;
@NotNull
@Column(name = "idenreplacedy_contract_id")
private UUID idenreplacedyContract;
@Column(name = "contract_position_id")
private UUID contractPosition;
@NotNull
@ManyToOne(optional = false)
@JoinColumn(name = "role_id", referencedColumnName = "id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
// jpa FK constraint does not work in hibernate 4
@SuppressWarnings("deprecation")
@org.hibernate.annotations.ForeignKey(name = "none")
private IdmRoleThin role;
@Column(name = "automatic_role_id")
private UUID // replacedigned role depends on automatic role
automaticRole;
@Column(name = "valid_from")
private LocalDate validFrom;
@Column(name = "valid_till")
private LocalDate validTill;
@Column(name = "direct_role_id")
private UUID directRole;
@Column(name = "role_composition_id")
private UUID roleComposition;
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public UUID getIdenreplacedyContract() {
return idenreplacedyContract;
}
public void setIdenreplacedyContract(UUID idenreplacedyContract) {
this.idenreplacedyContract = idenreplacedyContract;
}
public UUID getContractPosition() {
return contractPosition;
}
public void setContractPosition(UUID contractPosition) {
this.contractPosition = contractPosition;
}
public IdmRoleThin getRole() {
return role;
}
public void setRole(IdmRoleThin role) {
this.role = role;
}
public UUID getAutomaticRole() {
return automaticRole;
}
public void setAutomaticRole(UUID automaticRole) {
this.automaticRole = automaticRole;
}
public LocalDate getValidFrom() {
return validFrom;
}
public void setValidFrom(LocalDate validFrom) {
this.validFrom = validFrom;
}
public LocalDate getValidTill() {
return validTill;
}
public void setValidTill(LocalDate validTill) {
this.validTill = validTill;
}
public UUID getDirectRole() {
return directRole;
}
public void setDirectRole(UUID directRole) {
this.directRole = directRole;
}
public UUID getRoleComposition() {
return roleComposition;
}
public void setRoleComposition(UUID roleComposition) {
this.roleComposition = roleComposition;
}
}
19
View Complete Implementation : AttachmentUsage.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
public clreplaced AttachmentUsage {
@Id
private long attachmentId;
private long usage;
public long getAttachmentId() {
return attachmentId;
}
public void setAttachmentId(long attachmentId) {
this.attachmentId = attachmentId;
}
public long getUsage() {
return usage;
}
public void setUsage(long usage) {
this.usage = usage;
}
}
19
View Complete Implementation : ModVersionReviewsSummary.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Setter
@Table(name = "mod_version_reviews_summary")
@Include(type = "modVersionReviewsSummary")
@Immutable
public clreplaced ModVersionReviewsSummary {
private int id;
private float positive;
private float negative;
private float score;
private int reviews;
private float lowerBound;
private ModVersion modVersion;
@Id
@Column(name = "mod_version_id")
public int getId() {
return id;
}
@Column(name = "positive")
public float getPositive() {
return positive;
}
@Column(name = "negative")
public float getNegative() {
return negative;
}
@Column(name = "score")
public float getScore() {
return score;
}
@Column(name = "reviews")
public int getReviews() {
return reviews;
}
@Column(name = "lower_bound")
public float getLowerBound() {
return lowerBound;
}
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "mod_version_id", insertable = false, updatable = false)
@BatchSize(size = 1000)
public ModVersion getModVersion() {
return modVersion;
}
}
19
View Complete Implementation : ListPoolViewElement.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
@Table(name = "ListPoolView_Element")
@IdClreplaced(ListPoolViewElementId.clreplaced)
public clreplaced ListPoolViewElement implements Serializable {
public static clreplaced ListPoolViewElementId implements Serializable {
private static final long serialVersionUID = 1L;
private ListPoolView pool;
private long aliquotId;
public ListPoolView getPool() {
return pool;
}
public void setPool(ListPoolView pool) {
this.pool = pool;
}
public long getAliquotId() {
return aliquotId;
}
public void setAliquotId(long aliquotId) {
this.aliquotId = aliquotId;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (int) (aliquotId ^ (aliquotId >>> 32));
result = prime * result + ((pool == null) ? 0 : pool.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
ListPoolViewElementId other = (ListPoolViewElementId) obj;
if (aliquotId != other.aliquotId)
return false;
if (pool == null) {
if (other.pool != null)
return false;
} else if (!pool.equals(other.pool))
return false;
return true;
}
}
private static final long serialVersionUID = 1L;
@Id
@ManyToOne(targetEnreplacedy = ListPoolView.clreplaced)
@JoinColumn(name = "poolId")
private ListPoolView pool;
@Id
private long aliquotId;
private long libraryId;
private long projectId;
private boolean lowQuality;
private Long dnaSize;
@ManyToMany(targetEnreplacedy = Index.clreplaced)
@JoinTable(name = "Library_Index", joinColumns = { @JoinColumn(name = "library_libraryId", nullable = false, referencedColumnName = "libraryId") }, inverseJoinColumns = { @JoinColumn(name = "index_indexId", nullable = false) })
private final List<Index> indices = new ArrayList<>();
private String subprojectAlias;
private Boolean subprojectPriority = false;
@Enumerated(EnumType.STRING)
private ConsentLevel consentLevel;
public ListPoolView getPool() {
return pool;
}
public void setPool(ListPoolView pool) {
this.pool = pool;
}
public long getAliquotId() {
return aliquotId;
}
public void setAliquotId(long aliquotId) {
this.aliquotId = aliquotId;
}
public long getLibraryId() {
return libraryId;
}
public void setLibraryId(long libraryId) {
this.libraryId = libraryId;
}
public long getProjectId() {
return projectId;
}
public void setProjectId(long projectId) {
this.projectId = projectId;
}
public boolean isLowQuality() {
return lowQuality;
}
public void setLowQuality(boolean lowQuality) {
this.lowQuality = lowQuality;
}
public Long getDnaSize() {
return dnaSize;
}
public void setDnaSize(Long dnaSize) {
this.dnaSize = dnaSize;
}
public List<Index> getIndices() {
return indices;
}
public String getSubprojectAlias() {
return subprojectAlias;
}
public void setSubprojectAlias(String subprojectAlias) {
this.subprojectAlias = subprojectAlias;
}
public Boolean isSubprojectPriority() {
return subprojectPriority;
}
public void setSubprojectPriority(Boolean subprojectPriority) {
this.subprojectPriority = subprojectPriority;
}
public ConsentLevel getConsentLevel() {
return consentLevel;
}
public void setConsentLevel(ConsentLevel consentLevel) {
this.consentLevel = consentLevel;
}
}
19
View Complete Implementation : OpenPeriodResume.java
Copyright GNU General Public License v3.0
Author : arthurgregorio
Copyright GNU General Public License v3.0
Author : arthurgregorio
/**
* Immutable enreplacedy used to summarize the totals for all open (or expired) {@link FinancialPeriod}
*
* @author Arthur Gregorio
*
* @version 1.0.0
* @since 3.0.0, 16/04/2019
*/
@Enreplacedy
@Immutable
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "wb_view_003", schema = FINANCIAL)
public clreplaced OpenPeriodResume extends ImmutableEnreplacedy {
@Getter
@Column(name = "revenues")
private BigDecimal revenues;
@Getter
@Column(name = "expenses")
private BigDecimal expenses;
@Getter
@Column(name = "cash_expenses")
private BigDecimal cashExpenses;
@Getter
@Column(name = "credit_card_expenses")
private BigDecimal creditCardExpenses;
@Getter
@Column(name = "debit_card_expenses")
private BigDecimal debitCardExpenses;
@Getter
@Column(name = "movements_open")
private BigDecimal movementsOpen;
@Getter
@Column(name = "balance")
private BigDecimal balance;
@Getter
@Column(name = "credit_card_goal")
private BigDecimal creditCardGoal;
@Getter
@Column(name = "expenses_goal")
private BigDecimal expensesGoal;
@Getter
@Column(name = "revenues_goal")
private BigDecimal revenuesGoal;
@Getter
@Setter
@Transient
private BigDecimal acreplacedulated;
/**
* Constructor...
*/
public OpenPeriodResume() {
this.revenues = BigDecimal.ZERO;
this.expenses = BigDecimal.ZERO;
this.cashExpenses = BigDecimal.ZERO;
this.creditCardExpenses = BigDecimal.ZERO;
this.debitCardExpenses = BigDecimal.ZERO;
this.movementsOpen = BigDecimal.ZERO;
this.balance = BigDecimal.ZERO;
this.acreplacedulated = BigDecimal.ZERO;
this.creditCardGoal = BigDecimal.ZERO;
this.expensesGoal = BigDecimal.ZERO;
this.revenuesGoal = BigDecimal.ZERO;
}
}
19
View Complete Implementation : BestReviewedBooks.java
Copyright MIT License
Author : rieckpil
Copyright MIT License
Author : rieckpil
@Data
@Enreplacedy
@Immutable
public clreplaced BestReviewedBooks {
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Long bookId;
private String bookName;
private Long totalReviews;
private BigDecimal avgStars;
private Integer maxStars;
private Integer minStars;
}
19
View Complete Implementation : UserEntity.java
Copyright Apache License 2.0
Author : FINRAOS
Copyright Apache License 2.0
Author : FINRAOS
/**
* A user.
*/
@Table(name = UserEnreplacedy.TABLE_NAME)
@Immutable
@Enreplacedy
public clreplaced UserEnreplacedy extends AuditableEnreplacedy {
/**
* The table name.
*/
public static final String TABLE_NAME = "user_tbl";
/**
* The user id column.
*/
@Id
@Column(name = "user_id")
private String userId;
/**
* The namespace authorization admin column.
*/
@Column(name = "name_space_athrn_admin_fl")
@Type(type = "yes_no")
private Boolean namespaceAuthorizationAdmin;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Boolean getNamespaceAuthorizationAdmin() {
return namespaceAuthorizationAdmin;
}
public void setNamespaceAuthorizationAdmin(Boolean namespaceAuthorizationAdmin) {
this.namespaceAuthorizationAdmin = namespaceAuthorizationAdmin;
}
}
19
View Complete Implementation : GroupRolePermission.java
Copyright BSD 3-Clause "New" or "Revised" License
Author : grassrootza
Copyright BSD 3-Clause "New" or "Revised" License
Author : grassrootza
/**
* Just a bundler that is suposed to be used internally in Group, not exposed via its API
*/
@Embeddable
@Immutable
public clreplaced GroupRolePermission {
@Column(name = "role", nullable = false, length = 50)
@Enumerated(EnumType.STRING)
private GroupRole role;
@Column(name = "permission", nullable = false, length = 100)
@Enumerated(EnumType.STRING)
private Permission permission;
private GroupRolePermission() {
// for JPA
}
public GroupRolePermission(GroupRole role, Permission permission) {
this.role = role;
this.permission = permission;
}
public GroupRole getRole() {
return role;
}
public Permission getPermission() {
return permission;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GroupRolePermission)) {
return false;
}
GroupRolePermission that = (GroupRolePermission) o;
return role == that.role && permission == that.permission;
}
@Override
public int hashCode() {
return Objects.hash(role, permission);
}
@Override
public String toString() {
return new StringJoiner(", ", GroupRolePermission.clreplaced.getSimpleName() + "[", "]").add("role=" + role).add("permission=" + permission).toString();
}
}
19
View Complete Implementation : PeriodResult.java
Copyright GNU General Public License v3.0
Author : arthurgregorio
Copyright GNU General Public License v3.0
Author : arthurgregorio
/**
* Immutable enreplacedy used to get a result of all closed {@link FinancialPeriod}
*
* @author Arthur Gregorio
*
* @version 1.0.0
* @since 3.0.0, 16/04/2019
*/
@Enreplacedy
@Immutable
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "wb_view_005", schema = FINANCIAL)
public clreplaced PeriodResult extends ImmutableEnreplacedy {
@Getter
@Column(name = "financial_period_id")
private Long financialPeriodId;
@Getter
@Column(name = "financial_period")
private String financialPeriod;
@Getter
@Column(name = "revenues")
private BigDecimal revenues;
@Getter
@Column(name = "expenses")
private BigDecimal expenses;
@Getter
@Column(name = "balance")
private BigDecimal balance;
/**
* Constructor...
*/
public PeriodResult() {
this.revenues = BigDecimal.ZERO;
this.expenses = BigDecimal.ZERO;
this.balance = BigDecimal.ZERO;
}
}
19
View Complete Implementation : EuActionType.java
Copyright MIT License
Author : InnovateUKGitHub
Copyright MIT License
Author : InnovateUKGitHub
/**
* The type of EU grant.
*/
@Enreplacedy
@Immutable
public clreplaced EuActionType {
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Long id;
private String name;
private String description;
private int priority;
public EuActionType() {
this.name = null;
this.priority = -1;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
}
19
View Complete Implementation : Game.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Table(name = "game_stats")
@Include(rootLevel = true, type = "game")
@Immutable
@Setter
@EnreplacedyListeners(GameEnricher.clreplaced)
public clreplaced Game {
private int id;
private OffsetDateTime startTime;
private OffsetDateTime endTime;
private Integer replayTicks;
private VictoryCondition victoryCondition;
private FeaturedMod featuredMod;
private Player host;
private MapVersion mapVersion;
private String name;
private Validity validity;
private List<GamePlayerStats> playerStats;
private String replayUrl;
private List<GameReview> reviews;
private GameReviewsSummary reviewsSummary;
@Id
@Column(name = "id")
public int getId() {
return id;
}
@Column(name = "startTime")
public OffsetDateTime getStartTime() {
return startTime;
}
@Column(name = "replay_ticks")
public Integer getReplayTicks() {
return replayTicks;
}
@Column(name = "gameType")
public VictoryCondition getVictoryCondition() {
return victoryCondition;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "gameMod")
public FeaturedMod getFeaturedMod() {
return featuredMod;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "host")
public Player getHost() {
return host;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "mapId")
public MapVersion getMapVersion() {
return mapVersion;
}
@Column(name = "gameName")
public String getName() {
return name;
}
@Column(name = "validity")
@Enumerated(EnumType.ORDINAL)
public Validity getValidity() {
return validity;
}
@OneToMany(mappedBy = "game")
public List<GamePlayerStats> getPlayerStats() {
return playerStats;
}
@Column(name = "endTime")
@Nullable
public OffsetDateTime getEndTime() {
return endTime;
}
@Transient
@ComputedAttribute
public String getReplayUrl() {
return replayUrl;
}
@OneToMany(mappedBy = "game")
@UpdatePermission(expression = Prefab.ALL)
public List<GameReview> getReviews() {
return reviews;
}
@OneToOne(fetch = FetchType.LAZY)
@PrimaryKeyJoinColumn
@UpdatePermission(expression = Prefab.ALL)
@BatchSize(size = 1000)
public GameReviewsSummary getReviewsSummary() {
return reviewsSummary;
}
}
19
View Complete Implementation : GrantClaimMaximum.java
Copyright MIT License
Author : InnovateUKGitHub
Copyright MIT License
Author : InnovateUKGitHub
/**
* Reference data that describes the maximum funding levels that can be applied for.
*/
@Enreplacedy
@Immutable
public clreplaced GrantClaimMaximum {
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Long id;
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "grantClaimMaximums", cascade = { CascadeType.PERSIST, CascadeType.MERGE })
private List<Compereplacedion> compereplacedions;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "categoryId", referencedColumnName = "id")
private ResearchCategory researchCategory;
@Column(name = "organisation_size_id")
private OrganisationSize organisationSize;
private Integer maximum;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public List<Compereplacedion> getCompereplacedions() {
return compereplacedions;
}
public void setCompereplacedions(List<Compereplacedion> compereplacedions) {
this.compereplacedions = compereplacedions;
}
public ResearchCategory getResearchCategory() {
return researchCategory;
}
public void setResearchCategory(ResearchCategory researchCategory) {
this.researchCategory = researchCategory;
}
public OrganisationSize getOrganisationSize() {
return organisationSize;
}
public void setOrganisationSize(OrganisationSize organisationSize) {
this.organisationSize = organisationSize;
}
public Integer getMaximum() {
return maximum;
}
public void setMaximum(Integer maximum) {
this.maximum = maximum;
}
}
19
View Complete Implementation : ApplicationStatistics.java
Copyright MIT License
Author : InnovateUKGitHub
Copyright MIT License
Author : InnovateUKGitHub
/**
* ApplicationStatistics defines a view on the application table for statistical information
*/
@Immutable
@Enreplacedy
@Table(name = "Application")
public clreplaced ApplicationStatistics {
private static final Set<replacedessmentState> replacedESSOR_STATES = EnumSet.complementOf(EnumSet.of(REJECTED, WITHDRAWN));
private static final Set<replacedessmentState> ACCEPTED_STATES = EnumSet.complementOf(EnumSet.of(PENDING, REJECTED, WITHDRAWN, CREATED));
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Long id;
private String name;
private Long compereplacedion;
@OneToOne(mappedBy = "target", optional = false, fetch = FetchType.LAZY)
private ApplicationProcess applicationProcess;
@OneToMany(mappedBy = "applicationId")
private List<ProcessRole> processRoles = new ArrayList<>();
@OneToMany(mappedBy = "target", fetch = FetchType.LAZY)
@Where(clause = "process_type = 'replacedessment'")
private List<replacedessment> replacedessments;
public Long getId() {
return id;
}
public String getName() {
return name;
}
public Long getCompereplacedion() {
return compereplacedion;
}
public ApplicationState getApplicationState() {
return applicationProcess.getProcessState();
}
private Optional<ProcessRole> getLeadProcessRole() {
return this.processRoles.stream().filter(p -> LEADAPPLICANT == p.getRole()).findAny();
}
public Long getLeadOrganisationId() {
return getLeadProcessRole().map(ProcessRole::getOrganisationId).orElse(null);
}
public List<ProcessRole> getProcessRoles() {
return processRoles;
}
public List<replacedessment> getreplacedessments() {
return replacedessments;
}
public int getreplacedessors() {
return replacedessments.stream().filter(a -> replacedESSOR_STATES.contains(a.getProcessState())).mapToInt(e -> 1).sum();
}
public int getAccepted() {
return replacedessments.stream().filter(a -> ACCEPTED_STATES.contains(a.getProcessState())).mapToInt(e -> 1).sum();
}
public int getSubmitted() {
return replacedessments.stream().filter(a -> a.isInState(SUBMITTED)).mapToInt(e -> 1).sum();
}
}
19
View Complete Implementation : GameReviewsSummary.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Setter
@Table(name = "game_reviews_summary")
@Include(rootLevel = true, type = "gameReviewsSummary")
@Immutable
public clreplaced GameReviewsSummary {
private int id;
private float positive;
private float negative;
private float score;
private int reviews;
private float lowerBound;
private Game game;
@Id
@Column(name = "game_id")
public int getId() {
return id;
}
@Column(name = "positive")
public float getPositive() {
return positive;
}
@Column(name = "negative")
public float getNegative() {
return negative;
}
@Column(name = "score")
public float getScore() {
return score;
}
@Column(name = "reviews")
public int getReviews() {
return reviews;
}
@Column(name = "lower_bound")
public float getLowerBound() {
return lowerBound;
}
@OneToOne(mappedBy = "reviewsSummary")
@BatchSize(size = 1000)
public Game getGame() {
return game;
}
}
19
View Complete Implementation : QuarterDetailImpl.java
Copyright Apache License 2.0
Author : Jasig
Copyright Apache License 2.0
Author : Jasig
/**
*/
@Enreplacedy
@Table(name = "UP_QUARTER_DETAIL")
@SequenceGenerator(name = "UP_QUARTER_DETAIL_GEN", sequenceName = "UP_QUARTER_DETAIL_SEQ", allocationSize = 1)
@TableGenerator(name = "UP_QUARTER_DETAIL_GEN", pkColumnValue = "UP_QUARTER_DETAIL_PROP", allocationSize = 1)
@Immutable
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public clreplaced QuarterDetailImpl implements QuarterDetail, Serializable {
private static final long serialVersionUID = 1L;
@SuppressWarnings("unused")
@Id
@GeneratedValue(generator = "UP_QUARTER_DETAIL_GEN")
@Column(name = "QUARTER_ID")
private final long id;
@NaturalId
@Column(name = "QUARTER_START", nullable = false)
@Type(type = "monthDay")
private final MonthDay start;
@NaturalId
@Column(name = "QUARTER_END", nullable = false)
@Type(type = "monthDay")
private final MonthDay end;
@NaturalId
@Column(name = "QUARTER_NUMBER", nullable = false)
private final int quarterId;
@SuppressWarnings("unused")
private QuarterDetailImpl() {
this.id = -1;
this.start = null;
this.end = null;
this.quarterId = -1;
}
public QuarterDetailImpl(MonthDay start, MonthDay end, int quarterId) {
Validate.notNull(start);
Validate.notNull(end);
if (start.isEqual(end)) {
throw new IllegalArgumentException("start cannot equal end");
}
this.id = -1;
this.start = start;
this.end = end;
this.quarterId = quarterId;
}
@Override
public int getQuarterId() {
return this.quarterId;
}
@Override
public MonthDay getStart() {
return this.start;
}
@Override
public DateMidnight getStartDateMidnight(ReadableInstant instant) {
final MonthDay instantMonthDay = new MonthDay(instant);
// If the quarter wraps a year boundary AND
// the instant MonthDay is before the start AND
// the end is after the instant MonthDay
// then shift the start year back by one to deal with the year boundary
if (this.end.isBefore(this.start) && instantMonthDay.isBefore(this.start) && this.end.isAfter(instantMonthDay)) {
return this.start.toDateTime(new DateTime(instant).minusYears(1)).toDateMidnight();
}
return this.start.toDateTime(instant).toDateMidnight();
}
@Override
public DateMidnight getEndDateMidnight(ReadableInstant instant) {
final MonthDay instantMonthDay = new MonthDay(instant);
// If the quarter wraps a year boundary AND
// the end is NOT after the instant MonthDay AND
// the instant MonthDay is NOT before the start
// then shift the end year forward by one to deal with the year boundary
if (this.end.isBefore(this.start) && !this.end.isAfter(instantMonthDay) && !instantMonthDay.isBefore(this.start)) {
return this.end.toDateTime(new DateTime(instant).plusYears(1)).toDateMidnight();
}
return this.end.toDateTime(instant).toDateMidnight();
}
@Override
public MonthDay getEnd() {
return this.end;
}
@Override
public int compareTo(ReadableInstant instant) {
final DateMidnight startDateTime = this.getStartDateMidnight(instant);
final DateMidnight endDateTime = this.getEndDateMidnight(instant);
return EventDateTimeUtils.compareTo(startDateTime, endDateTime, instant);
}
@Override
public int compareTo(QuarterDetail o) {
return this.getQuarterId() - o.getQuarterId();
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((this.end == null) ? 0 : this.end.hashCode());
result = prime * result + this.quarterId;
result = prime * result + ((this.start == null) ? 0 : this.start.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
QuarterDetailImpl other = (QuarterDetailImpl) obj;
if (this.end == null) {
if (other.end != null)
return false;
} else if (!this.end.equals(other.end))
return false;
if (this.quarterId != other.quarterId)
return false;
if (this.start == null) {
if (other.start != null)
return false;
} else if (!this.start.equals(other.start))
return false;
return true;
}
@Override
public String toString() {
return "QuarterDetailImpl [quarterId=" + this.quarterId + ", start=" + this.start + ", end=" + this.end + "]";
}
}
19
View Complete Implementation : UseByMovementClass.java
Copyright GNU General Public License v3.0
Author : arthurgregorio
Copyright GNU General Public License v3.0
Author : arthurgregorio
/**
* Immutable enreplacedy to represent the view with the daily use grouped by {@link MovementClreplaced}
*
* @author Arthur Gregorio
*
* @version 1.0.0
* @since 3.0.0, 28/04/2019
*/
@Enreplacedy
@Immutable
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "wb_view_009", schema = FINANCIAL)
public clreplaced UseByMovementClreplaced extends ImmutableEnreplacedy {
@Getter
@Column(name = "financial_period_id")
private Long financialPeriodId;
@Getter
@Column(name = "financial_period")
private String financialPeriod;
@Getter
@Column(name = "cost_center_color")
@Convert(converter = ColorConverter.clreplaced)
private Color costCenterColor;
@Getter
@Column(name = "cost_center_id")
private Long costCenterId;
@Getter
@Column(name = "cost_center")
private String costCenter;
@Getter
@Column(name = "movement_clreplaced_id")
private Long movementClreplacedId;
@Getter
@Column(name = "movement_clreplaced")
private String movementClreplaced;
@Getter
@Enumerated(STRING)
@Column(name = "direction")
private MovementClreplacedType direction;
@Getter
@Column(name = "total_paid")
private BigDecimal value;
}
19
View Complete Implementation : AggregatedPortletMappingImpl.java
Copyright Apache License 2.0
Author : Jasig
Copyright Apache License 2.0
Author : Jasig
@Enreplacedy
@Table(name = "UP_AGGR_PORTLET_MAPPING")
@SequenceGenerator(name = "UP_AGGR_PORTLET_MAPPING_GEN", sequenceName = "UP_AGGR_PORTLET_MAPPING_SEQ", allocationSize = 10)
@TableGenerator(name = "UP_AGGR_PORTLET_MAPPING_GEN", pkColumnValue = "UP_AGGR_PORTLET_MAPPING_PROP", allocationSize = 10)
@Immutable
@NaturalIdCache(region = "org.apereo.portal.events.aggr.portlets.AggregatedPortletMappingImpl-NaturalId")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public final clreplaced AggregatedPortletMappingImpl implements AggregatedPortletMapping, Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "UP_AGGR_PORTLET_MAPPING_GEN")
@Column(name = "ID")
private final long id;
@Column(name = "PORTLET_NAME", length = 128, nullable = false)
private final String name;
@NaturalId
@Column(name = "PORTLET_FNAME", length = 255, nullable = false)
@Type(type = "fname")
private final String fname;
@Transient
private int hashCode = 0;
@SuppressWarnings("unused")
private AggregatedPortletMappingImpl() {
this.id = -1;
this.name = null;
this.fname = null;
}
AggregatedPortletMappingImpl(String name, String fname) {
this.id = -1;
this.name = name;
this.fname = fname;
}
@Override
public String getFname() {
return this.fname;
}
@Override
public String getName() {
return this.name;
}
@Override
public int hashCode() {
int h = this.hashCode;
if (h == 0) {
final int prime = 31;
h = 1;
h = prime * h + ((fname == null) ? 0 : fname.hashCode());
this.hashCode = h;
}
return h;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
if (hashCode() != obj.hashCode())
return false;
AggregatedPortletMappingImpl other = (AggregatedPortletMappingImpl) obj;
if (fname == null) {
if (other.fname != null)
return false;
} else if (!fname.equals(other.fname))
return false;
return true;
}
@Override
public String toString() {
return "AggregatedPortletMappingImpl [id=" + id + ", name=" + name + ", fname=" + fname + "]";
}
}
19
View Complete Implementation : MapStatistics.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Setter
@Table(name = "map_statistics")
@Include(rootLevel = true, type = MapStatistics.TYPE_NAME)
@Immutable
public clreplaced MapStatistics {
public static final String TYPE_NAME = "mapStatistics";
private int id;
private int downloads;
private int plays;
private int draws;
private Map map;
@Id
@Column(name = "map_id")
public int getId() {
return id;
}
@Column(name = "downloads")
public int getDownloads() {
return downloads;
}
@Column(name = "plays")
public int getPlays() {
return plays;
}
@Column(name = "draws")
public int getDraws() {
return draws;
}
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "map_id", insertable = false, updatable = false)
public Map getMap() {
return map;
}
}
19
View Complete Implementation : LibraryBoxPosition.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
@Table(name = "LibraryBoxPosition")
@Synchronize("Library")
public clreplaced LibraryBoxPosition extends AbstractBoxPosition {
private static final long serialVersionUID = 1L;
@Id
private Long libraryId;
public Long getLibraryId() {
return libraryId;
}
public void setLibraryId(Long libraryId) {
this.libraryId = libraryId;
}
}
19
View Complete Implementation : OpenPeriodResult.java
Copyright GNU General Public License v3.0
Author : arthurgregorio
Copyright GNU General Public License v3.0
Author : arthurgregorio
/**
* Immutable enreplacedy used to represent a result of the current (not expired) {@link FinancialPeriod}
*
* @author Arthur Gregorio
*
* @version 1.1.0
* @since 3.0.0, 29/04/2019
*/
@Enreplacedy
@Immutable
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "wb_view_011", schema = FINANCIAL)
public clreplaced OpenPeriodResult extends ImmutableEnreplacedy {
@Getter
@Column(name = "financial_period_id")
private Long financialPeriodId;
@Getter
@Column(name = "financial_period")
private String financialPeriod;
@Getter
@Column(name = "expired")
private boolean expired;
@Getter
@Column(name = "revenues")
private BigDecimal revenues;
@Getter
@Column(name = "expenses")
private BigDecimal expenses;
@Getter
@Column(name = "balance")
private BigDecimal balance;
/**
* Constructor...
*/
public OpenPeriodResult() {
this.revenues = BigDecimal.ZERO;
this.expenses = BigDecimal.ZERO;
this.balance = BigDecimal.ZERO;
}
}
19
View Complete Implementation : SampleBoxPosition.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
@Table(name = "SampleBoxPosition")
@Synchronize("Sample")
public clreplaced SampleBoxPosition extends AbstractBoxPosition {
private static final long serialVersionUID = 1L;
@Id
private Long sampleId;
public Long getSampleId() {
return sampleId;
}
public void setSampleId(Long sampleId) {
this.sampleId = sampleId;
}
}
19
View Complete Implementation : Mod.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Table(name = "\"mod\"")
@Include(rootLevel = true, type = Mod.TYPE_NAME)
@Immutable
@Setter
public clreplaced Mod extends AbstractEnreplacedy implements OwnableEnreplacedy {
public static final String TYPE_NAME = "mod";
private String displayName;
private String author;
private List<ModVersion> versions;
private ModVersion latestVersion;
private Player uploader;
private int numberOfReviews;
private float averageReviewScore;
@Column(name = "display_name")
@Size(max = 100)
@NotNull
public String getDisplayName() {
return displayName;
}
@Column(name = "author")
@Size(max = 100)
@NotNull
public String getAuthor() {
return author;
}
@Column(name = "reviews")
public int getNumberOfReviews() {
return numberOfReviews;
}
@Column(name = "average_review_score")
public float getAverageReviewScore() {
return averageReviewScore;
}
@ManyToOne
@JoinColumn(name = "uploader")
public Player getUploader() {
return uploader;
}
@OneToMany(mappedBy = "mod", cascade = CascadeType.ALL, orphanRemoval = true)
@NotEmpty
@Valid
public List<ModVersion> getVersions() {
return versions;
}
@ManyToOne
@JoinColumnsOrFormulas({ @JoinColumnOrFormula(formula = @JoinFormula(value = "(SELECT mod_version.id FROM mod_version WHERE mod_version.mod_id = id ORDER BY mod_version.version DESC LIMIT 1)", referencedColumnName = "id")) })
public ModVersion getLatestVersion() {
return latestVersion;
}
@Transient
@Override
public Login getEnreplacedyOwner() {
return uploader;
}
}
19
View Complete Implementation : BarcodableView.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
@Table(name = "BarcodableView")
public clreplaced BarcodableView implements Serializable {
private static final long serialVersionUID = 1L;
@EmbeddedId
private BarcodableId id;
private String name;
private String alias;
private String identificationBarcode;
public BarcodableId getId() {
return id;
}
public void setId(BarcodableId id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getIdentificationBarcode() {
return identificationBarcode;
}
public void setIdentificationBarcode(String identificationBarcode) {
this.identificationBarcode = identificationBarcode;
}
@Embeddable
public static clreplaced BarcodableId implements Serializable {
private static final long serialVersionUID = 1L;
@Enumerated(EnumType.STRING)
private EnreplacedyType targetType;
private long targetId;
public EnreplacedyType getTargetType() {
return targetType;
}
public void setTargetType(EnreplacedyType targetType) {
this.targetType = targetType;
}
public long getTargetId() {
return targetId;
}
public void setTargetId(long targetId) {
this.targetId = targetId;
}
@Override
public int hashCode() {
return new HashCodeBuilder(71, 49).append(targetId).append(targetType).toHashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
BarcodableId other = (BarcodableId) obj;
return new EqualsBuilder().append(targetId, other.targetId).append(targetType, other.targetType).isEquals();
}
}
}
19
View Complete Implementation : IdmRoleThin.java
Copyright MIT License
Author : bcvsolutions
Copyright MIT License
Author : bcvsolutions
/**
* Role - thin variant
*
* @author Radek Tomiška
* @since 9.7.0
*/
@Enreplacedy
@Immutable
@Table(name = "idm_role")
public clreplaced IdmRoleThin extends AbstractEnreplacedy implements Codeable, FormableEnreplacedy, Disableable, ExternalIdentifiable {
private static final long serialVersionUID = -3099001738101202320L;
@NotEmpty
@Size(min = 1, max = DefaultFieldLengths.NAME)
@Column(name = "code", length = DefaultFieldLengths.NAME, nullable = false)
private String code;
@NotEmpty
@Size(min = 1, max = DefaultFieldLengths.NAME)
@Column(name = "base_code", length = DefaultFieldLengths.NAME, nullable = false)
private String baseCode;
@Size(max = DefaultFieldLengths.NAME)
@Column(name = "environment", length = DefaultFieldLengths.NAME)
private String environment;
@NotEmpty
@Size(min = 1, max = DefaultFieldLengths.NAME)
@Column(name = "name", length = DefaultFieldLengths.NAME, nullable = false)
private String name;
@Size(max = DefaultFieldLengths.NAME)
@Column(name = "external_id", length = DefaultFieldLengths.NAME)
private String externalId;
@NotNull
@Column(name = "priority", nullable = false)
private int priority = 0;
@Column(name = "approve_remove", nullable = false)
private boolean approveRemove = false;
@Size(max = DefaultFieldLengths.DESCRIPTION)
@Column(name = "description", length = DefaultFieldLengths.DESCRIPTION)
private String description;
@NotNull
@Column(name = "disabled", nullable = false)
private boolean disabled;
@NotNull
@Column(name = "can_be_requested", nullable = false)
private boolean canBeRequested;
@Column(name = "idenreplacedy_role_attr_def_id")
private UUID idenreplacedyRoleAttributeDefinition;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getBaseCode() {
return baseCode;
}
public void setBaseCode(String baseCode) {
this.baseCode = baseCode;
}
public String getEnvironment() {
return environment;
}
public void setEnvironment(String environment) {
this.environment = environment;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public boolean isApproveRemove() {
return approveRemove;
}
public void setApproveRemove(boolean approveRemove) {
this.approveRemove = approveRemove;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public boolean isDisabled() {
return disabled;
}
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
public boolean isCanBeRequested() {
return canBeRequested;
}
public void setCanBeRequested(boolean canBeRequested) {
this.canBeRequested = canBeRequested;
}
public UUID getIdenreplacedyRoleAttributeDefinition() {
return idenreplacedyRoleAttributeDefinition;
}
public void setIdenreplacedyRoleAttributeDefinition(UUID idenreplacedyRoleAttributeDefinition) {
this.idenreplacedyRoleAttributeDefinition = idenreplacedyRoleAttributeDefinition;
}
}
19
View Complete Implementation : ListPoolView.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
public clreplaced ListPoolView implements Aliasable, Nameable, Serializable, Timestamped {
private static final long serialVersionUID = 1L;
private static final long UNSAVED_ID = 0L;
@Id
private long poolId = UNSAVED_ID;
private String name;
private String alias;
private String identificationBarcode;
private String description;
@Enumerated(EnumType.STRING)
private PlatformType platformType;
@ManyToOne(targetEnreplacedy = UserImpl.clreplaced)
@JoinColumn(name = "creator", nullable = false, updatable = false)
private User creator;
@Temporal(TemporalType.DATE)
private Date creationDate;
@Column(name = "created", nullable = false, updatable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date creationTime;
@ManyToOne(targetEnreplacedy = UserImpl.clreplaced)
@JoinColumn(name = "lastModifier", nullable = false)
private User lastModifier;
@Column(nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date lastModified;
private Double concentration;
@Enumerated(EnumType.STRING)
private ConcentrationUnit concentrationUnits;
private boolean discarded;
private boolean distributed;
@OneToOne(targetEnreplacedy = BoxImpl.clreplaced, fetch = FetchType.LAZY)
@JoinColumn(name = "boxId", insertable = false, updatable = false)
private Box box;
private Long boxId;
private String boxName;
private String boxAlias;
private String boxLocationBarcode;
private String boxPosition;
@OneToMany(mappedBy = "pool")
private List<ListPoolViewElement> elements;
@OneToMany(mappedBy = "item")
private List<TransferPool> transfers;
@Override
public long getId() {
return poolId;
}
@Override
public void setId(long poolId) {
this.poolId = poolId;
}
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getIdentificationBarcode() {
return identificationBarcode;
}
public void setIdentificationBarcode(String identificationBarcode) {
this.identificationBarcode = identificationBarcode;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public PlatformType getPlatformType() {
return platformType;
}
public void setPlatformType(PlatformType platformType) {
this.platformType = platformType;
}
@Override
public User getCreator() {
return creator;
}
@Override
public void setCreator(User creator) {
this.creator = creator;
}
/**
* @return the user-specified creation date of the pool
*/
public Date getCreationDate() {
return creationDate;
}
/**
* Sets the user-specified creation date of the pool
*
* @param creationDate
*/
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
@Override
public Date getCreationTime() {
return creationTime;
}
@Override
public void setCreationTime(Date creationTime) {
this.creationTime = creationTime;
}
@Override
public User getLastModifier() {
return lastModifier;
}
@Override
public void setLastModifier(User lastModifier) {
this.lastModifier = lastModifier;
}
@Override
public Date getLastModified() {
return lastModified;
}
@Override
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
public Double getConcentration() {
return concentration;
}
public void setConcentration(Double concentration) {
this.concentration = concentration;
}
public ConcentrationUnit getConcentrationUnits() {
return concentrationUnits;
}
public void setConcentrationUnits(ConcentrationUnit concentrationUnits) {
this.concentrationUnits = concentrationUnits;
}
public boolean isDiscarded() {
return discarded;
}
public void setDiscarded(boolean discarded) {
this.discarded = discarded;
}
public boolean isDistributed() {
return distributed;
}
public void setDistributed(boolean distributed) {
this.distributed = distributed;
}
public Box getBox() {
return box;
}
public void setBox(Box box) {
this.box = box;
}
public Long getBoxId() {
return boxId;
}
public void setBoxId(Long boxId) {
this.boxId = boxId;
}
public String getBoxName() {
return boxName;
}
public void setBoxName(String boxName) {
this.boxName = boxName;
}
public String getBoxAlias() {
return boxAlias;
}
public void setBoxAlias(String boxAlias) {
this.boxAlias = boxAlias;
}
public String getBoxLocationBarcode() {
return boxLocationBarcode;
}
public void setBoxLocationBarcode(String boxLocationBarcode) {
this.boxLocationBarcode = boxLocationBarcode;
}
public String getBoxPosition() {
return boxPosition;
}
public void setBoxPosition(String boxPosition) {
this.boxPosition = boxPosition;
}
@Override
public boolean isSaved() {
return getId() != UNSAVED_ID;
}
public Set<String> getPrioritySubprojectAliases() {
return getElements().stream().filter(element -> element.isSubprojectPriority() != null && element.isSubprojectPriority()).map(ListPoolViewElement::getSubprojectAlias).collect(Collectors.toSet());
}
public boolean hasLowQualityMembers() {
return getElements().stream().anyMatch(element -> element.isLowQuality());
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((alias == null) ? 0 : alias.hashCode());
result = prime * result + ((boxAlias == null) ? 0 : boxAlias.hashCode());
result = prime * result + ((boxId == null) ? 0 : boxId.hashCode());
result = prime * result + ((boxLocationBarcode == null) ? 0 : boxLocationBarcode.hashCode());
result = prime * result + ((boxName == null) ? 0 : boxName.hashCode());
result = prime * result + ((boxPosition == null) ? 0 : boxPosition.hashCode());
result = prime * result + ((concentration == null) ? 0 : concentration.hashCode());
result = prime * result + ((concentrationUnits == null) ? 0 : concentrationUnits.hashCode());
result = prime * result + ((creationTime == null) ? 0 : creationTime.hashCode());
result = prime * result + ((creator == null) ? 0 : creator.hashCode());
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((lastModified == null) ? 0 : lastModified.hashCode());
result = prime * result + ((lastModifier == null) ? 0 : lastModifier.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + (int) (poolId ^ (poolId >>> 32));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClreplaced() != obj.getClreplaced())
return false;
ListPoolView other = (ListPoolView) obj;
if (alias == null) {
if (other.alias != null)
return false;
} else if (!alias.equals(other.alias))
return false;
if (boxAlias == null) {
if (other.boxAlias != null)
return false;
} else if (!boxAlias.equals(other.boxAlias))
return false;
if (boxId == null) {
if (other.boxId != null)
return false;
} else if (!boxId.equals(other.boxId))
return false;
if (boxLocationBarcode == null) {
if (other.boxLocationBarcode != null)
return false;
} else if (!boxLocationBarcode.equals(other.boxLocationBarcode))
return false;
if (boxName == null) {
if (other.boxName != null)
return false;
} else if (!boxName.equals(other.boxName))
return false;
if (boxPosition == null) {
if (other.boxPosition != null)
return false;
} else if (!boxPosition.equals(other.boxPosition))
return false;
if (concentration == null) {
if (other.concentration != null)
return false;
} else if (!concentration.equals(other.concentration))
return false;
if (concentrationUnits != other.concentrationUnits)
return false;
if (creationTime == null) {
if (other.creationTime != null)
return false;
} else if (!creationTime.equals(other.creationTime))
return false;
if (creator == null) {
if (other.creator != null)
return false;
} else if (!creator.equals(other.creator))
return false;
if (description == null) {
if (other.description != null)
return false;
} else if (!description.equals(other.description))
return false;
if (lastModified == null) {
if (other.lastModified != null)
return false;
} else if (!lastModified.equals(other.lastModified))
return false;
if (lastModifier == null) {
if (other.lastModifier != null)
return false;
} else if (!lastModifier.equals(other.lastModifier))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (poolId != other.poolId)
return false;
return true;
}
public List<ListPoolViewElement> getElements() {
if (elements == null) {
elements = new ArrayList<>();
}
return elements;
}
public void setElements(List<ListPoolViewElement> elements) {
this.elements = elements;
}
public List<TransferPool> getTransfers() {
if (transfers == null) {
transfers = new ArrayList<>();
}
return transfers;
}
}
19
View Complete Implementation : Teamkill.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Setter
@Table(name = "teamkills")
@Include(rootLevel = true, type = Teamkill.TYPE_NAME)
@Immutable
@ReadPermission(expression = ReadTeamkillReportCheck.EXPRESSION)
public clreplaced Teamkill {
public static final String TYPE_NAME = "teamkill";
private int id;
private Player teamkiller;
private Player victim;
private Game game;
private long gameTime;
private OffsetDateTime reportedAt;
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
@Column(name = "id")
public int getId() {
return id;
}
@ManyToOne
@JoinColumn(name = "teamkiller")
public Player getTeamkiller() {
return teamkiller;
}
@ManyToOne
@JoinColumn(name = "victim")
public Player getVictim() {
return victim;
}
@ManyToOne
@JoinColumn(name = "game_id")
public Game getGame() {
return game;
}
@Column(name = "gametime")
public long getGameTime() {
return gameTime;
}
@Column(name = "reported_at")
public OffsetDateTime getReportedAt() {
return reportedAt;
}
}
19
View Complete Implementation : SampleHierarchyView.java
Copyright GNU General Public License v3.0
Author : miso-lims
Copyright GNU General Public License v3.0
Author : miso-lims
@Enreplacedy
@Immutable
public clreplaced SampleHierarchyView implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private long sampleId;
private String externalName;
@Enumerated(EnumType.STRING)
private ConsentLevel consentLevel;
@ManyToOne(targetEnreplacedy = TissueOriginImpl.clreplaced)
@JoinColumn(name = "tissueOriginId")
private TissueOrigin tissueOrigin;
@ManyToOne(targetEnreplacedy = TissueTypeImpl.clreplaced)
@JoinColumn(name = "tissueTypeId")
private TissueType tissueType;
public long getId() {
return sampleId;
}
public void setId(long id) {
this.sampleId = id;
}
public String getExternalName() {
return externalName;
}
public void setExternalName(String externalName) {
this.externalName = externalName;
}
public ConsentLevel getConsentLevel() {
return consentLevel;
}
public void setConsentLevel(ConsentLevel consentLevel) {
this.consentLevel = consentLevel;
}
public TissueOrigin getTissueOrigin() {
return tissueOrigin;
}
public void setTissueOrigin(TissueOrigin tissueOrigin) {
this.tissueOrigin = tissueOrigin;
}
public TissueType getTissueType() {
return tissueType;
}
public void setTissueType(TissueType tissueType) {
this.tissueType = tissueType;
}
}
19
View Complete Implementation : AuthorSummary.java
Copyright Apache License 2.0
Author : AnghelLeonard
Copyright Apache License 2.0
Author : AnghelLeonard
@Enreplacedy
@Subselect("SELECT a.id AS id, a.name AS name, a.genre AS genre FROM Author a")
@Synchronize({ "author", "book" })
@Immutable
public clreplaced AuthorSummary implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
private String name;
private String genre;
@OneToMany(mappedBy = "author")
private Set<Book> books = new HashSet<>();
public Long getId() {
return id;
}
public String getName() {
return name;
}
public String getGenre() {
return genre;
}
public Set<Book> getBooks() {
return books;
}
}
19
View Complete Implementation : Lock.java
Copyright GNU Affero General Public License v3.0
Author : progilone
Copyright GNU Affero General Public License v3.0
Author : progilone
@Enreplacedy
@Table(name = Lock.TABLE_NAME)
@Immutable
public clreplaced Lock {
public static final String TABLE_NAME = "app_lock";
/**
* Identifiant de l'objet verrouillé
*/
@Id
private String identifier;
/**
* Clreplacede de l'objet verrouillé
*/
@Column(name = "clreplaced", updatable = false, nullable = false)
private String clazz;
/**
* Utilisateur ayant verrouillé l'objet
*/
@Column(name = "locked_by", updatable = false, nullable = false)
private String lockedBy;
/**
* Date de verrouillage de l'objet
*/
@Column(name = "locked_date", updatable = false, nullable = false)
private LocalDateTime lockedDate = LocalDateTime.now();
/**
* Constructeur pour JPA
*/
private Lock() {
}
/**
* Constructeur
*
* @param enreplacedy identifiant de l'enreplacedé
* @param lockedBy login de l'usager
*/
public Lock(final String enreplacedy, final String lockedBy, final String clazz) {
this(enreplacedy, lockedBy, LocalDateTime.now(), clazz);
}
public Lock(final String enreplacedy, final String lockedBy) {
this(enreplacedy, lockedBy, LocalDateTime.now(), null);
}
/**
* Constructeur
*
* @param enreplacedy identifiant de l'enreplacedé
* @param lockedBy login de l'usager
* @param lockedDate Date du lock
*/
public Lock(final String enreplacedy, final String lockedBy, final LocalDateTime lockedDate, final String clazz) {
this.identifier = enreplacedy;
this.lockedBy = lockedBy;
// LocalDateTime est immuable pas besoin de faire de copie défensive
this.lockedDate = lockedDate;
this.clazz = clazz;
}
/**
* Constructeur !! TEST ONLY !!
*
* @param enreplacedy identifiant de l'enreplacedé
* @param lockedBy login de l'usager
*/
public Lock(final String enreplacedy, final String lockedBy, final LocalDateTime lockedDate) {
this(enreplacedy, lockedBy, lockedDate, null);
}
public String getIdentifier() {
return identifier;
}
public void setIdentifier(final String identifier) {
this.identifier = identifier;
}
public String getClazz() {
return clazz;
}
public String getLockedBy() {
return lockedBy;
}
public LocalDateTime getLockedDate() {
return lockedDate;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClreplaced() != o.getClreplaced()) {
return false;
}
final Lock lock = (Lock) o;
return Objects.equals(identifier, lock.identifier);
}
@Override
public int hashCode() {
return Objects.hash(identifier);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("identifier", identifier).add("clazz", clazz).add("lockedBy", lockedBy).add("lockedDate", lockedDate).toString();
}
}
19
View Complete Implementation : GlobalLeaderboardEntry.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Setter
@Enreplacedy
@Table(name = "global_rating")
@Immutable
public clreplaced GlobalLeaderboardEntry {
private int id;
private String playerName;
private Float mean;
private Float deviation;
private short numGames;
private int rank;
@Id
@Column(name = "id")
public int getId() {
return id;
}
@Column(name = "login")
public String getPlayerName() {
return playerName;
}
@Column(name = "mean")
public Float getMean() {
return mean;
}
@Column(name = "deviation")
public Float getDeviation() {
return deviation;
}
@Column(name = "numGames")
public short getNumGames() {
return numGames;
}
@Column(name = "rank")
public int getRank() {
return rank;
}
}
19
View Complete Implementation : Skill.java
Copyright The Unlicense
Author : brmeyer
Copyright The Unlicense
Author : brmeyer
@Enreplacedy
@Immutable
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public clreplaced Skill {
@Id
@GeneratedValue
private int id;
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
19
View Complete Implementation : Author.java
Copyright Apache License 2.0
Author : AnghelLeonard
Copyright Apache License 2.0
Author : AnghelLeonard
@Enreplacedy
@Immutable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY, region = "Author")
public clreplaced Author implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
private String name;
private String genre;
private int age;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Author{" + "id=" + id + ", name=" + name + ", genre=" + genre + ", age=" + age + '}';
}
}
19
View Complete Implementation : CardConsume.java
Copyright GNU General Public License v3.0
Author : arthurgregorio
Copyright GNU General Public License v3.0
Author : arthurgregorio
/**
* Immutable enreplacedy representing a database view with with a resume of the consume for every card grouped by
* {@link CostCenter}
*
* @author Arthur Gregorio
*
* @version 1.0.0
* @since 3.0.0, 25/04/2019
*/
@Enreplacedy
@Immutable
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "wb_view_006", schema = FINANCIAL)
public clreplaced CardConsume extends ImmutableEnreplacedy {
@Getter
@Column(name = "card_id")
private Long cardId;
@Getter
@Column(name = "cost_center_color")
@Convert(converter = ColorConverter.clreplaced)
private Color costCenterColor;
@Getter
@Column(name = "cost_center")
private String costCenter;
@Getter
@Column(name = "total_value")
private BigDecimal value;
}
19
View Complete Implementation : UseByCostCenter.java
Copyright GNU General Public License v3.0
Author : arthurgregorio
Copyright GNU General Public License v3.0
Author : arthurgregorio
/**
* Immutable enreplacedy to represent the view with the daily use grouped by {@link CostCenter}
*
* @author Arthur Gregorio
*
* @version 1.0.0
* @since 3.0.0, 28/04/2019
*/
@Enreplacedy
@Immutable
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "wb_view_008", schema = FINANCIAL)
public clreplaced UseByCostCenter extends ImmutableEnreplacedy {
@Getter
@Column(name = "financial_period_id")
private Long financialPeriodId;
@Getter
@Column(name = "financial_period")
private String financialPeriod;
@Getter
@Column(name = "cost_center_color")
@Convert(converter = ColorConverter.clreplaced)
private Color costCenterColor;
@Getter
@Column(name = "cost_center")
private String costCenter;
@Getter
@Enumerated(STRING)
@Column(name = "direction")
private MovementClreplacedType direction;
@Getter
@Column(name = "total_paid")
private BigDecimal value;
}
19
View Complete Implementation : GamePlayerStats.java
Copyright MIT License
Author : FAForever
Copyright MIT License
Author : FAForever
@Enreplacedy
@Table(name = "game_player_stats")
@Include(rootLevel = true, type = "gamePlayerStats")
@Immutable
@Setter
public clreplaced GamePlayerStats {
private long id;
private Player player;
private boolean ai;
private Faction faction;
private byte color;
private byte team;
private byte startSpot;
private Double beforeMean;
private Double beforeDeviation;
private Double afterMean;
private Double afterDeviation;
private Byte score;
private OffsetDateTime scoreTime;
private Game game;
@Id
@Column(name = "id")
public long getId() {
return id;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "playerId")
public Player getPlayer() {
return player;
}
@Column(name = "AI")
public boolean getAi() {
return ai;
}
@Column(name = "faction")
public Faction getFaction() {
return faction;
}
@Column(name = "color")
public byte getColor() {
return color;
}
@Column(name = "team")
public byte getTeam() {
return team;
}
@Column(name = "place")
public byte getStartSpot() {
return startSpot;
}
@Column(name = "mean")
public Double getBeforeMean() {
return beforeMean;
}
@Column(name = "deviation")
public Double getBeforeDeviation() {
return beforeDeviation;
}
@Column(name = "after_mean")
public Double getAfterMean() {
return afterMean;
}
@Column(name = "after_deviation")
public Double getAfterDeviation() {
return afterDeviation;
}
@Column(name = "score")
public Byte getScore() {
return score;
}
@Column(name = "scoreTime")
public OffsetDateTime getScoreTime() {
return scoreTime;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "gameId")
public Game getGame() {
return game;
}
}
19
View Complete Implementation : TermsAndConditions.java
Copyright MIT License
Author : InnovateUKGitHub
Copyright MIT License
Author : InnovateUKGitHub
/**
* Represents a set of Terms and Conditions, comprising a name, a version, and an identifier for the template to use
* for those terms and conditions.
*/
@Enreplacedy
@Immutable
@DiscriminatorColumn(name = "type")
public abstract clreplaced TermsAndConditions extends AuditableEnreplacedy {
@Id
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Long id;
@SuppressWarnings("unused")
private String name;
@SuppressWarnings("unused")
private String template;
@SuppressWarnings("unused")
private int version;
public Long getId() {
return id;
}
/**
* Setter for MapStruct
*/
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public String getTemplate() {
return template;
}
public int getVersion() {
return version;
}
public void setName(final String name) {
this.name = name;
}
public void setTemplate(final String template) {
this.template = template;
}
public void setVersion(final int version) {
this.version = version;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClreplaced() != o.getClreplaced()) {
return false;
}
final TermsAndConditions that = (TermsAndConditions) o;
return new EqualsBuilder().append(version, that.version).append(id, that.id).append(name, that.name).append(template, that.template).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(id).append(name).append(template).append(version).toHashCode();
}
}