Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to create the a new base Java backend class to render the page for BioSamples related to RNA seqence runs. #66

Open
computate opened this issue Oct 21, 2021 · 0 comments

Comments

@computate
Copy link
Member

computate commented Oct 21, 2021

Mission to create the a new base Java backend class to render the page for BioSamples related to RNA seqence runs.

Mission

Your mission, should you choose to accept it, is to create the a new base Java backend class to render the page for BioSamples related to RNA seqence runs. .

The day of the operation is October 26th, 2021

You will have 4 hours to complete your mission.

An open science project to uncover the planetary virome, freely and openly

You will be joining a team of the boldest

of all Red Hatters for this mission, who will be at your service developing the code and automating the deployment to OpenShift.

  • Should you, or any of your force be taken or compromised that day, you must report back as many changes as you have made, and any knowledge of your actions, by pull request or comments on the issue on the board.

How to get started:

Follow the instructions here to setup the project: https://github.com/team19hackathon2021/serratus-api/

The details of your mission:

  • The Java package name will be: io.serratus.api.enus.model.biosample
  • The Java class name will be: BioSampleGenPageGen
  • The path to the Java class will be: /usr/local/src/serratus-api/src/main/java/io/serratus/api/enus/model/biosample/BioSampleGenPageGen.java
  • The Java class will extend: BaseModelPage
package io.serratus.api.enus.model.biosample;

import io.serratus.api.enus.request.SiteRequestEnUS;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
import io.serratus.api.enus.java.LocalDateSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.serratus.api.enus.model.biosample.BioSample;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import org.apache.commons.lang3.StringUtils;
import java.lang.Integer;
import java.text.NumberFormat;
import java.util.ArrayList;
import io.serratus.api.enus.config.ConfigKeys;
import org.apache.commons.collections.CollectionUtils;
import java.lang.Long;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.serratus.api.enus.request.api.ApiRequest;
import io.serratus.api.enus.search.SearchList;
import java.lang.String;
import io.serratus.api.enus.java.ZonedDateTimeDeserializer;
import java.math.RoundingMode;
import org.slf4j.Logger;
import io.serratus.api.enus.writer.AllWriter;
import java.math.MathContext;
import io.vertx.core.Promise;
import org.apache.commons.text.StringEscapeUtils;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.serratus.api.enus.base.BaseModelPage;
import io.vertx.core.Future;
import java.util.Objects;
import io.vertx.core.json.JsonArray;
import io.serratus.api.enus.base.BaseModel;
import io.serratus.api.enus.java.ZonedDateTimeSerializer;
import org.apache.commons.lang3.math.NumberUtils;
import io.serratus.api.enus.wrap.Wrap;
import java.util.Optional;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/**
 **/

public abstract class BioSampleGenPageGen<DEV> extends BaseModelPage {
}

Create the LOG field inside the BioSampleGenPageGen class

	protected static final Logger LOG = LoggerFactory.getLogger(BioSampleGenPage.class);

Create the searchListBioSample_ field inside the BioSampleGenPageGen class

	protected SearchList<BioSample> searchListBioSample_;

Create the searchListBioSample method inside the BioSampleGenPageGen class

	protected abstract void _searchListBioSample_(Wrap<SearchList<BioSample>> w) {}

Create the getSearchListBioSample_ method inside the BioSampleGenPageGen class

	public SearchList<BioSample> getSearchListBioSample_() {
		return searchListBioSample_;
	}

Create the setSearchListBioSample_ method inside the BioSampleGenPageGen class

	public void setSearchListBioSample_(SearchList<BioSample> searchListBioSample_) {
		this.searchListBioSample_ = searchListBioSample_;
	}

Create the staticSetSearchListBioSample_ method inside the BioSampleGenPageGen class

	public static SearchList<BioSample> staticSetSearchListBioSample_(SiteRequestEnUS siteRequest_, String o) {
		return null;
	}

Create the searchListBioSample_Init method inside the BioSampleGenPageGen class

	protected BioSampleGenPage searchListBioSample_Init() {
		Wrap<SearchList<BioSample>> searchListBioSample_Wrap = new Wrap<SearchList<BioSample>>().var("searchListBioSample_");
		if(searchListBioSample_ == null) {
			_searchListBioSample_(searchListBioSample_Wrap);
			setSearchListBioSample_(searchListBioSample_Wrap.o);
		}
		return (BioSampleGenPage)this;
	}

Create the listBioSample field inside the BioSampleGenPageGen class

	protected JsonArray listBioSample = new JsonArray();

Create the _listBioSample method inside the BioSampleGenPageGen class

	protected abstract void _listBioSample(JsonArray l) {}

Create the getListBioSample method inside the BioSampleGenPageGen class

	public JsonArray getListBioSample() {
		return listBioSample;
	}

Create the setListBioSample method inside the BioSampleGenPageGen class

	public void setListBioSample(JsonArray listBioSample) {
		this.listBioSample = listBioSample;
	}

Create the staticSetListBioSample method inside the BioSampleGenPageGen class

	public static JsonArray staticSetListBioSample(SiteRequestEnUS siteRequest_, String o) {
		return null;
	}

Create the listBioSampleInit method inside the BioSampleGenPageGen class

	protected BioSampleGenPage listBioSampleInit() {
		_listBioSample(listBioSample);
		return (BioSampleGenPage)this;
	}

Create the bioSampleCount field inside the BioSampleGenPageGen class

	protected Integer bioSampleCount;

Create the _bioSampleCount method inside the BioSampleGenPageGen class

	protected abstract void _bioSampleCount(Wrap<Integer> w) {}

Create the getBioSampleCount method inside the BioSampleGenPageGen class

	public Integer getBioSampleCount() {
		return bioSampleCount;
	}

Create the setBioSampleCount method inside the BioSampleGenPageGen class

	public void setBioSampleCount(Integer bioSampleCount) {
		this.bioSampleCount = bioSampleCount;
	}

Create the setBioSampleCount method inside the BioSampleGenPageGen class

	public void setBioSampleCount(String o) {
		this.bioSampleCount = BioSampleGenPage.staticSetBioSampleCount(siteRequest_, o);
	}

Create the staticSetBioSampleCount method inside the BioSampleGenPageGen class

	public static Integer staticSetBioSampleCount(SiteRequestEnUS siteRequest_, String o) {
		if(NumberUtils.isParsable(o))
			return Integer.parseInt(o);
		return null;
	}

Create the bioSampleCountInit method inside the BioSampleGenPageGen class

	protected BioSampleGenPage bioSampleCountInit() {
		Wrap<Integer> bioSampleCountWrap = new Wrap<Integer>().var("bioSampleCount");
		if(bioSampleCount == null) {
			_bioSampleCount(bioSampleCountWrap);
			setBioSampleCount(bioSampleCountWrap.o);
		}
		return (BioSampleGenPage)this;
	}

Create the staticSolrBioSampleCount method inside the BioSampleGenPageGen class

	public static Integer staticSolrBioSampleCount(SiteRequestEnUS siteRequest_, Integer o) {
		return o;
	}

Create the staticSolrStrBioSampleCount method inside the BioSampleGenPageGen class

	public static String staticSolrStrBioSampleCount(SiteRequestEnUS siteRequest_, Integer o) {
		return o == null ? null : o.toString();
	}

Create the staticSolrFqBioSampleCount method inside the BioSampleGenPageGen class

	public static String staticSolrFqBioSampleCount(SiteRequestEnUS siteRequest_, String o) {
		return BioSampleGenPage.staticSolrStrBioSampleCount(siteRequest_, BioSampleGenPage.staticSolrBioSampleCount(siteRequest_, BioSampleGenPage.staticSetBioSampleCount(siteRequest_, o)));
	}

Create the bioSample_ field inside the BioSampleGenPageGen class

	protected BioSample bioSample_;

Create the bioSample method inside the BioSampleGenPageGen class

	protected abstract void _bioSample_(Wrap<BioSample> w) {}

Create the getBioSample_ method inside the BioSampleGenPageGen class

	public BioSample getBioSample_() {
		return bioSample_;
	}

Create the setBioSample_ method inside the BioSampleGenPageGen class

	public void setBioSample_(BioSample bioSample_) {
		this.bioSample_ = bioSample_;
	}

Create the staticSetBioSample_ method inside the BioSampleGenPageGen class

	public static BioSample staticSetBioSample_(SiteRequestEnUS siteRequest_, String o) {
		return null;
	}

Create the bioSample_Init method inside the BioSampleGenPageGen class

	protected BioSampleGenPage bioSample_Init() {
		Wrap<BioSample> bioSample_Wrap = new Wrap<BioSample>().var("bioSample_");
		if(bioSample_ == null) {
			_bioSample_(bioSample_Wrap);
			setBioSample_(bioSample_Wrap.o);
		}
		return (BioSampleGenPage)this;
	}

Create the pk field inside the BioSampleGenPageGen class

	protected Long pk;

Create the _pk method inside the BioSampleGenPageGen class

	protected abstract void _pk(Wrap<Long> w) {}

Create the getPk method inside the BioSampleGenPageGen class

	public Long getPk() {
		return pk;
	}

Create the setPk method inside the BioSampleGenPageGen class

	public void setPk(Long pk) {
		this.pk = pk;
	}

Create the setPk method inside the BioSampleGenPageGen class

	public void setPk(String o) {
		this.pk = BioSampleGenPage.staticSetPk(siteRequest_, o);
	}

Create the staticSetPk method inside the BioSampleGenPageGen class

	public static Long staticSetPk(SiteRequestEnUS siteRequest_, String o) {
		if(NumberUtils.isParsable(o))
			return Long.parseLong(o);
		return null;
	}

Create the pkInit method inside the BioSampleGenPageGen class

	protected BioSampleGenPage pkInit() {
		Wrap<Long> pkWrap = new Wrap<Long>().var("pk");
		if(pk == null) {
			_pk(pkWrap);
			setPk(pkWrap.o);
		}
		return (BioSampleGenPage)this;
	}

Create the staticSolrPk method inside the BioSampleGenPageGen class

	public static Long staticSolrPk(SiteRequestEnUS siteRequest_, Long o) {
		return o;
	}

Create the staticSolrStrPk method inside the BioSampleGenPageGen class

	public static String staticSolrStrPk(SiteRequestEnUS siteRequest_, Long o) {
		return o == null ? null : o.toString();
	}

Create the staticSolrFqPk method inside the BioSampleGenPageGen class

	public static String staticSolrFqPk(SiteRequestEnUS siteRequest_, String o) {
		return BioSampleGenPage.staticSolrStrPk(siteRequest_, BioSampleGenPage.staticSolrPk(siteRequest_, BioSampleGenPage.staticSetPk(siteRequest_, o)));
	}

Create the promiseDeepBioSampleGenPage method inside the BioSampleGenPageGen class

	public Future<Void> promiseDeepBioSampleGenPage(SiteRequestEnUS siteRequest_) {
		setSiteRequest_(siteRequest_);
		return promiseDeepBioSampleGenPage();
	}

Create the promiseDeepBioSampleGenPage method inside the BioSampleGenPageGen class

	public Future<Void> promiseDeepBioSampleGenPage() {
		Promise<Void> promise = Promise.promise();
		Promise<Void> promise2 = Promise.promise();
		promiseBioSampleGenPage(promise2);
		promise2.future().onSuccess(a -> {
			super.promiseDeepBaseModelPage(siteRequest_).onSuccess(b -> {
				promise.complete();
			}).onFailure(ex -> {
				promise.fail(ex);
			});
		}).onFailure(ex -> {
			promise.fail(ex);
		});
		return promise.future();
	}

Create the promiseBioSampleGenPage method inside the BioSampleGenPageGen class

	public Future<Void> promiseBioSampleGenPage(Promise<Void> promise) {
		Future.future(a -> a.complete()).compose(a -> {
			Promise<Void> promise2 = Promise.promise();
			try {
				searchListBioSample_Init();
				listBioSampleInit();
				bioSampleCountInit();
				bioSample_Init();
				pkInit();
				promise2.complete();
			} catch(Exception ex) {
				promise2.fail(ex);
			}
			return promise2.future();
		}).onSuccess(a -> {
			promise.complete();
		}).onFailure(ex -> {
			promise.fail(ex);
		});
		return promise.future();
	}

Create the promiseDeepForClass method inside the BioSampleGenPageGen class

	public Future<Void> promiseDeepForClass(SiteRequestEnUS siteRequest_) {
		return promiseDeepBioSampleGenPage(siteRequest_);
	}

Create the siteRequestBioSampleGenPage method inside the BioSampleGenPageGen class

	public void siteRequestBioSampleGenPage(SiteRequestEnUS siteRequest_) {
			super.siteRequestBaseModelPage(siteRequest_);
	}

Create the siteRequestForClass method inside the BioSampleGenPageGen class

	public void siteRequestForClass(SiteRequestEnUS siteRequest_) {
		siteRequestBioSampleGenPage(siteRequest_);
	}

Create the obtainForClass method inside the BioSampleGenPageGen class

	public Object obtainForClass(String var) {
		String[] vars = StringUtils.split(var, ".");
		Object o = null;
		for(String v : vars) {
			if(o == null)
				o = obtainBioSampleGenPage(v);
			else if(o instanceof BaseModel) {
				BaseModel baseModel = (BaseModel)o;
				o = baseModel.obtainForClass(v);
			}
			else if(o instanceof Map) {
				Map<?, ?> map = (Map<?, ?>)o;
				o = map.get(v);
			}
		}
		return o;
	}

Create the obtainBioSampleGenPage method inside the BioSampleGenPageGen class

	public Object obtainBioSampleGenPage(String var) {
		BioSampleGenPage oBioSampleGenPage = (BioSampleGenPage)this;
		switch(var) {
			case "searchListBioSample_":
				return oBioSampleGenPage.searchListBioSample_;
			case "listBioSample":
				return oBioSampleGenPage.listBioSample;
			case "bioSampleCount":
				return oBioSampleGenPage.bioSampleCount;
			case "bioSample_":
				return oBioSampleGenPage.bioSample_;
			case "pk":
				return oBioSampleGenPage.pk;
			default:
				return super.obtainBaseModelPage(var);
		}
	}

Create the relateForClass method inside the BioSampleGenPageGen class

	public boolean relateForClass(String var, Object val) {
		String[] vars = StringUtils.split(var, ".");
		Object o = null;
		for(String v : vars) {
			if(o == null)
				o = relateBioSampleGenPage(v, val);
			else if(o instanceof BaseModel) {
				BaseModel baseModel = (BaseModel)o;
				o = baseModel.relateForClass(v, val);
			}
		}
		return o != null;
	}

Create the relateBioSampleGenPage method inside the BioSampleGenPageGen class

	public Object relateBioSampleGenPage(String var, Object val) {
		BioSampleGenPage oBioSampleGenPage = (BioSampleGenPage)this;
		switch(var) {
			default:
				return super.relateBaseModelPage(var, val);
		}
	}

Create the staticSetForClass method inside the BioSampleGenPageGen class

	public static Object staticSetForClass(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		return staticSetBioSampleGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSetBioSampleGenPage method inside the BioSampleGenPageGen class

	public static Object staticSetBioSampleGenPage(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		switch(entityVar) {
		case "bioSampleCount":
			return BioSampleGenPage.staticSetBioSampleCount(siteRequest_, o);
		case "pk":
			return BioSampleGenPage.staticSetPk(siteRequest_, o);
			default:
				return BaseModelPage.staticSetBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the staticSolrForClass method inside the BioSampleGenPageGen class

	public static Object staticSolrForClass(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		return staticSolrBioSampleGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSolrBioSampleGenPage method inside the BioSampleGenPageGen class

	public static Object staticSolrBioSampleGenPage(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		switch(entityVar) {
		case "bioSampleCount":
			return BioSampleGenPage.staticSolrBioSampleCount(siteRequest_, (Integer)o);
		case "pk":
			return BioSampleGenPage.staticSolrPk(siteRequest_, (Long)o);
			default:
				return BaseModelPage.staticSolrBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the staticSolrStrForClass method inside the BioSampleGenPageGen class

	public static String staticSolrStrForClass(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		return staticSolrStrBioSampleGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSolrStrBioSampleGenPage method inside the BioSampleGenPageGen class

	public static String staticSolrStrBioSampleGenPage(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		switch(entityVar) {
		case "bioSampleCount":
			return BioSampleGenPage.staticSolrStrBioSampleCount(siteRequest_, (Integer)o);
		case "pk":
			return BioSampleGenPage.staticSolrStrPk(siteRequest_, (Long)o);
			default:
				return BaseModelPage.staticSolrStrBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the staticSolrFqForClass method inside the BioSampleGenPageGen class

	public static String staticSolrFqForClass(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		return staticSolrFqBioSampleGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSolrFqBioSampleGenPage method inside the BioSampleGenPageGen class

	public static String staticSolrFqBioSampleGenPage(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		switch(entityVar) {
		case "bioSampleCount":
			return BioSampleGenPage.staticSolrFqBioSampleCount(siteRequest_, o);
		case "pk":
			return BioSampleGenPage.staticSolrFqPk(siteRequest_, o);
			default:
				return BaseModelPage.staticSolrFqBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the defineForClass method inside the BioSampleGenPageGen class

	public boolean defineForClass(String var, Object val) {
		String[] vars = StringUtils.split(var, ".");
		Object o = null;
		if(val != null) {
			for(String v : vars) {
				if(o == null)
					o = defineBioSampleGenPage(v, val);
				else if(o instanceof BaseModel) {
					BaseModel oBaseModel = (BaseModel)o;
					o = oBaseModel.defineForClass(v, val);
				}
			}
		}
		return o != null;
	}

Create the defineBioSampleGenPage method inside the BioSampleGenPageGen class

	public Object defineBioSampleGenPage(String var, Object val) {
		switch(var.toLowerCase()) {
			default:
				return super.defineBaseModelPage(var, val);
		}
	}

Create the apiRequestBioSampleGenPage method inside the BioSampleGenPageGen class

	public void apiRequestBioSampleGenPage() {
		ApiRequest apiRequest = Optional.ofNullable(siteRequest_).map(SiteRequestEnUS::getApiRequest_).orElse(null);
		Object o = Optional.ofNullable(apiRequest).map(ApiRequest::getOriginal).orElse(null);
		if(o != null && o instanceof BioSampleGenPage) {
			BioSampleGenPage original = (BioSampleGenPage)o;
			super.apiRequestBaseModelPage();
		}
	}

Create the toString method inside the BioSampleGenPageGen class

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(super.toString());
		return sb.toString();
	}

Create the VAR_searchListBioSample_ field inside the BioSampleGenPageGen class

	public static final String VAR_searchListBioSample_ = "searchListBioSample_";

Create the VAR_listBioSample field inside the BioSampleGenPageGen class

	public static final String VAR_listBioSample = "listBioSample";

Create the VAR_bioSampleCount field inside the BioSampleGenPageGen class

	public static final String VAR_bioSampleCount = "bioSampleCount";

Create the VAR_bioSample_ field inside the BioSampleGenPageGen class

	public static final String VAR_bioSample_ = "bioSample_";

Create the VAR_pk field inside the BioSampleGenPageGen class

	public static final String VAR_pk = "pk";

This message will not self-destruct.

This message will not self destruct, because this project is open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant