xapi.annotation.model.PersistentBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xapi-dev Show documentation
Show all versions of xapi-dev Show documentation
Everything needed to run a comprehensive dev environment.
Just type X_ and pick a service from autocomplete;
new dev modules will be added as they are built.
The only dev service not included in the uber jar is xapi-dev-maven,
as it includes all runtime dependencies of maven, adding ~4 seconds to build time,
and 6 megabytes to the final output jar size (without xapi-dev-maven, it's ~1MB).
The newest version!
package xapi.annotation.model;
import xapi.annotation.model.Persistent;
@SuppressWarnings("all")
public class PersistentBuilder {
private static final class ImmutablePersistent implements Persistent {
private final boolean patchable;
private final PersistenceStrategy strategy;
public Class annotationType () {
return xapi.annotation.model.Persistent.class;
}
public final boolean patchable () {
return patchable;
}
public final PersistenceStrategy strategy () {
return strategy;
}
private ImmutablePersistent (boolean patchable, PersistenceStrategy strategy) {
this.patchable = patchable;
this.strategy = strategy;
}
}
public static PersistentBuilder buildPersistent () {
return new PersistentBuilder();
}
private boolean patchable;
private PersistenceStrategy strategy;
public final boolean isPatchable () {
return patchable;
}
public final PersistentBuilder setPatchable (boolean patchable) {
this.patchable = patchable;
return this;
}
public final PersistenceStrategy getStrategy () {
return strategy;
}
public final PersistentBuilder setStrategy (PersistenceStrategy strategy) {
this.strategy = strategy;
return this;
}
private PersistentBuilder () {
}
public Persistent build () {
return new ImmutablePersistent(patchable, strategy);
}
}