CmsSection.java
package com.fwmotion.threescale.cms.model;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.time.OffsetDateTime;
public class CmsSection implements CmsObject {
private OffsetDateTime createdAt;
private OffsetDateTime updatedAt;
private Long id;
private String systemName;
private Long parentId;
private String title;
private Boolean _public;
private String path;
@Nonnull
@Override
public ThreescaleObjectType getType() {
return ThreescaleObjectType.SECTION;
}
@Override
public OffsetDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
@Override
public OffsetDateTime getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
}
@Nullable
@Override
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Boolean getPublic() {
return _public;
}
public void setPublic(Boolean _public) {
this._public = _public;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof CmsSection that)) return false;
return new EqualsBuilder().append(getId(), that.getId()).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(getId()).toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("createdAt", createdAt)
.append("updatedAt", updatedAt)
.append("id", id)
.append("systemName", systemName)
.append("parentId", parentId)
.append("title", title)
.append("public", _public)
.append("path", path)
.toString();
}
}