Package io.thestencil.persistence.api
Class ImmutableSiteState
- java.lang.Object
-
- io.thestencil.persistence.api.ImmutableSiteState
-
- All Implemented Interfaces:
ZoePersistence.SiteState
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSiteState extends Object implements ZoePersistence.SiteState
Immutable implementation ofZoePersistence.SiteState.Use the builder to create immutable instances:
ImmutableSiteState.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSiteState.BuilderBuilds instances of typeImmutableSiteState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSiteState.Builderbuilder()Creates a builder forImmutableSiteState.static ImmutableSiteStatecopyOf(ZoePersistence.SiteState instance)Creates an immutable copy of aZoePersistence.SiteStatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSiteStatethat have equal attribute values.com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Article>>getArticles()ZoePersistence.SiteContentTypegetContentType()com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Link>>getLinks()com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Locale>>getLocales()StringgetName()com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Page>>getPages()com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Release>>getReleases()com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Workflow>>getWorkflows()inthashCode()Computes a hash code from attributes:name,contentType,releases,locales,pages,links,articles,workflows.StringtoString()Prints the immutable valueSiteStatewith attribute values.ImmutableSiteStatewithArticles(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Article>> entries)Copy the current immutable object by replacing thearticlesmap with the specified map.ImmutableSiteStatewithContentType(ZoePersistence.SiteContentType value)Copy the current immutable object by setting a value for thecontentTypeattribute.ImmutableSiteStatewithLinks(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Link>> entries)Copy the current immutable object by replacing thelinksmap with the specified map.ImmutableSiteStatewithLocales(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Locale>> entries)Copy the current immutable object by replacing thelocalesmap with the specified map.ImmutableSiteStatewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableSiteStatewithPages(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Page>> entries)Copy the current immutable object by replacing thepagesmap with the specified map.ImmutableSiteStatewithReleases(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Release>> entries)Copy the current immutable object by replacing thereleasesmap with the specified map.ImmutableSiteStatewithWorkflows(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Workflow>> entries)Copy the current immutable object by replacing theworkflowsmap with the specified map.
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceZoePersistence.SiteState- Returns:
- The value of the
nameattribute
-
getContentType
public ZoePersistence.SiteContentType getContentType()
- Specified by:
getContentTypein interfaceZoePersistence.SiteState- Returns:
- The value of the
contentTypeattribute
-
getReleases
public com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Release>> getReleases()
- Specified by:
getReleasesin interfaceZoePersistence.SiteState- Returns:
- The value of the
releasesattribute
-
getLocales
public com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Locale>> getLocales()
- Specified by:
getLocalesin interfaceZoePersistence.SiteState- Returns:
- The value of the
localesattribute
-
getPages
public com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Page>> getPages()
- Specified by:
getPagesin interfaceZoePersistence.SiteState- Returns:
- The value of the
pagesattribute
-
getLinks
public com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Link>> getLinks()
- Specified by:
getLinksin interfaceZoePersistence.SiteState- Returns:
- The value of the
linksattribute
-
getArticles
public com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Article>> getArticles()
- Specified by:
getArticlesin interfaceZoePersistence.SiteState- Returns:
- The value of the
articlesattribute
-
getWorkflows
public com.google.common.collect.ImmutableMap<String,ZoePersistence.Entity<ZoePersistence.Workflow>> getWorkflows()
- Specified by:
getWorkflowsin interfaceZoePersistence.SiteState- Returns:
- The value of the
workflowsattribute
-
withName
public final ImmutableSiteState withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withContentType
public final ImmutableSiteState withContentType(ZoePersistence.SiteContentType value)
Copy the current immutable object by setting a value for thecontentTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for contentType- Returns:
- A modified copy of the
thisobject
-
withReleases
public final ImmutableSiteState withReleases(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Release>> entries)
Copy the current immutable object by replacing thereleasesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the releases map- Returns:
- A modified copy of
thisobject
-
withLocales
public final ImmutableSiteState withLocales(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Locale>> entries)
Copy the current immutable object by replacing thelocalesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the locales map- Returns:
- A modified copy of
thisobject
-
withPages
public final ImmutableSiteState withPages(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Page>> entries)
Copy the current immutable object by replacing thepagesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the pages map- Returns:
- A modified copy of
thisobject
-
withLinks
public final ImmutableSiteState withLinks(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Link>> entries)
Copy the current immutable object by replacing thelinksmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the links map- Returns:
- A modified copy of
thisobject
-
withArticles
public final ImmutableSiteState withArticles(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Article>> entries)
Copy the current immutable object by replacing thearticlesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the articles map- Returns:
- A modified copy of
thisobject
-
withWorkflows
public final ImmutableSiteState withWorkflows(Map<String,? extends ZoePersistence.Entity<ZoePersistence.Workflow>> entries)
Copy the current immutable object by replacing theworkflowsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the workflows map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSiteStatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,contentType,releases,locales,pages,links,articles,workflows.
-
toString
public String toString()
Prints the immutable valueSiteStatewith attribute values.
-
copyOf
public static ImmutableSiteState copyOf(ZoePersistence.SiteState instance)
Creates an immutable copy of aZoePersistence.SiteStatevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SiteState instance
-
builder
public static ImmutableSiteState.Builder builder()
Creates a builder forImmutableSiteState.ImmutableSiteState.builder() .name(String) // requiredname.contentType(io.thestencil.persistence.api.ZoePersistence.SiteContentType) // requiredcontentType.putReleases|putAllReleases(String => io.thestencil.persistence.api.ZoePersistence.Entity<io.thestencil.persistence.api.ZoePersistence.Release>) //releasesmappings .putLocales|putAllLocales(String => io.thestencil.persistence.api.ZoePersistence.Entity<io.thestencil.persistence.api.ZoePersistence.Locale>) //localesmappings .putPages|putAllPages(String => io.thestencil.persistence.api.ZoePersistence.Entity<io.thestencil.persistence.api.ZoePersistence.Page>) //pagesmappings .putLinks|putAllLinks(String => io.thestencil.persistence.api.ZoePersistence.Entity<io.thestencil.persistence.api.ZoePersistence.Link>) //linksmappings .putArticles|putAllArticles(String => io.thestencil.persistence.api.ZoePersistence.Entity<io.thestencil.persistence.api.ZoePersistence.Article>) //articlesmappings .putWorkflows|putAllWorkflows(String => io.thestencil.persistence.api.ZoePersistence.Entity<io.thestencil.persistence.api.ZoePersistence.Workflow>) //workflowsmappings .build();- Returns:
- A new ImmutableSiteState builder
-
-