All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xapi.annotation.model.PersistentBuilder Maven / Gradle / Ivy

Go to download

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);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy