blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f36c804bf19fbcf46b519c9846ddafed6c3afd29 | 0e7f18f5c03553dac7edfb02945e4083a90cd854 | /target/classes/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/Boolgt.java | 557c925432599f27ac2b8033616920110bb24e52 | [] | no_license | brunomathidios/PostgresqlWithDocker | 13604ecb5506b947a994cbb376407ab67ba7985f | 6b421c5f487f381eb79007fa8ec53da32977bed1 | refs/heads/master | 2020-03-22T00:54:07.750044 | 2018-07-02T22:20:17 | 2018-07-02T22:20:17 | 139,271,591 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 2,266 | java | /*
* This file is generated by jOOQ.
*/
package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines;
import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.11.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Boolgt extends AbstractRoutine<Boolean> {
private static final long serialVersionUID = -667816447;
/**
* The parameter <code>pg_catalog.boolgt.RETURN_VALUE</code>.
*/
public static final Parameter<Boolean> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN, false, false);
/**
* The parameter <code>pg_catalog.boolgt._1</code>.
*/
public static final Parameter<Boolean> _1 = createParameter("_1", org.jooq.impl.SQLDataType.BOOLEAN, false, true);
/**
* The parameter <code>pg_catalog.boolgt._2</code>.
*/
public static final Parameter<Boolean> _2 = createParameter("_2", org.jooq.impl.SQLDataType.BOOLEAN, false, true);
/**
* Create a new routine call instance
*/
public Boolgt() {
super("boolgt", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BOOLEAN);
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
addInParameter(_2);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(Boolean value) {
setValue(_1, value);
}
/**
* Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__1(Field<Boolean> field) {
setField(_1, field);
}
/**
* Set the <code>_2</code> parameter IN value to the routine
*/
public void set__2(Boolean value) {
setValue(_2, value);
}
/**
* Set the <code>_2</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__2(Field<Boolean> field) {
setField(_2, field);
}
}
| [
"[email protected]"
] | |
e70a2597aae75dea9204aa7e34d9429c7d7275b5 | 5f3685144511fa7eea5d1df9b765f2dabb8ce969 | /app/src/main/java/com/christzhang/view/stateview/StateView.java | 0ce967f930f95a8088ed03dd040ef3bbe65491e5 | [] | no_license | Nightstars/Smartvideo | 3b578777368fd44cd2b4fa00d28d7a78ff03097f | 87e7e0369e6fc6c5d78424237fc3c259b3622c58 | refs/heads/master | 2020-11-27T02:56:38.949149 | 2020-03-15T11:51:02 | 2020-03-15T11:51:02 | 229,279,246 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,845 | java | package com.christzhang.view.stateview;/**
* Created by PCPC on 2015/11/16.
*/
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.IntDef;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.christzhang.smartvideo.R;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* 描述: 加载状态控件 加载中,加载失败,空数据等等
* 名称: StateView
* User: csx
* Date: 11-16
*/
public class StateView extends FrameLayout {
//content
public static final int STATE_CONTENT = 0;
//loading
public static final int STATE_LOADING = 1;
//error
public static final int STATE_ERROR = 2;
//empty
public static final int STATE_EMPTY = 3;
//loading with content
public static final int STATE_CONTENT_LOADING = 4;
@Retention(RetentionPolicy.SOURCE)
@IntDef({STATE_CONTENT, STATE_LOADING, STATE_ERROR, STATE_EMPTY, STATE_CONTENT_LOADING})
public @interface ViewState {
}
//default show state
@ViewState
public int mCurrentState = STATE_CONTENT;
//各种状态下的View
private View mContentView, mLoadingView, mErrorView, mEmptyView;
private LayoutInflater inflater;
public StateView(Context context) {
super(context);
}
public StateView(Context context, AttributeSet attrs) {
super(context, attrs);
initStateView(attrs);
}
public StateView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initStateView(attrs);
}
/**
* @param attrs
*/
private void initStateView(AttributeSet attrs) {
inflater = LayoutInflater.from(getContext());
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StateView);
//初始化各种状态下的布局并添加到stateView中
int emptyViewResId = a.getResourceId(R.styleable.StateView_state_empty, -1);
if (emptyViewResId > -1) {
mEmptyView = inflater.inflate(emptyViewResId, this, false);
addView(mEmptyView, mEmptyView.getLayoutParams());
}
int errorViewResId = a.getResourceId(R.styleable.StateView_state_error, -1);
if (errorViewResId > -1) {
mErrorView = inflater.inflate(errorViewResId, this, false);
addView(mErrorView, mErrorView.getLayoutParams());
}
int contentViewResId = a.getResourceId(R.styleable.StateView_state_content,-1);
if(contentViewResId>-1){
mContentView = inflater.inflate(contentViewResId,this,false);
addView(mContentView,mContentView.getLayoutParams());
}
int loadingViewResId = a.getResourceId(R.styleable.StateView_state_loading, -1);
if (loadingViewResId > -1) {
mLoadingView = inflater.inflate(loadingViewResId, this, false);
addView(mLoadingView, mLoadingView.getLayoutParams());
}
//获取指定的状态,如未指定则默认content
int givenState = a.getInt(R.styleable.StateView_state_current, STATE_CONTENT);
switch (givenState) {
case STATE_CONTENT:
mCurrentState = STATE_CONTENT;
break;
case STATE_LOADING:
mCurrentState = STATE_LOADING;
break;
case STATE_EMPTY:
mCurrentState = STATE_EMPTY;
break;
case STATE_ERROR:
mCurrentState = STATE_ERROR;
break;
case STATE_CONTENT_LOADING:
mCurrentState = STATE_CONTENT_LOADING;
break;
}
a.recycle();
}
/**
* 设置各个状态下View的显示与隐藏
*/
private void setStateView() {
switch (mCurrentState) {
case STATE_CONTENT:
showStateView(mContentView, "Content View");
break;
case STATE_EMPTY:
showStateView(mEmptyView, "Empty View");
break;
case STATE_ERROR:
showStateView(mErrorView, "Error View");
break;
case STATE_LOADING:
showStateView(mLoadingView, "Loading View");
break;
case STATE_CONTENT_LOADING:
if (mContentView == null) {
throw new NullPointerException("Content View with Loading View");
}
mContentView.setVisibility(VISIBLE);
if (mLoadingView == null) {
throw new NullPointerException("Loading View with Content View");
}
mLoadingView.setVisibility(VISIBLE);
if (mEmptyView != null) mEmptyView.setVisibility(GONE);
if (mErrorView != null) mErrorView.setVisibility(GONE);
break;
default:
showStateView(mContentView, "Content View");
break;
}
}
/**
* 获取指定状态下的View
*
* @param state
* @return
*/
public View getStateView(@ViewState int state) {
switch (state) {
case STATE_CONTENT:
return mContentView;
case STATE_EMPTY:
return mEmptyView;
case STATE_ERROR:
return mErrorView;
case STATE_LOADING:
return mLoadingView;
default:
return null;
}
}
/**
* @param view
* @param viewName
*/
private void showStateView(View view, String viewName) {
if (mContentView != null) mContentView.setVisibility(GONE);
if (mErrorView != null) mErrorView.setVisibility(GONE);
if (mEmptyView != null) mEmptyView.setVisibility(GONE);
if (mLoadingView != null) mLoadingView.setVisibility(GONE);
if (view == null) {
throw new NullPointerException(viewName);
}
view.setVisibility(VISIBLE);
}
@ViewState
public int getCurrentState() {
return mCurrentState;
}
/**
* 设置当前状态
*
* @param state
*/
public void setCurrentState(@ViewState int state) {
if (state != mCurrentState) {
mCurrentState = state;
setStateView();
}
}
/**
* 通过代码设置指定状态的View
*
* @param stateView view in state
* @param state viewState
* @param switchToState 是否切换到指定的state
*/
public void setViewForState(View stateView, @ViewState int state, boolean switchToState) {
switch (state) {
case STATE_CONTENT:
if (mContentView != null)
removeView(mContentView);
mContentView = stateView;
addView(mContentView);
break;
case STATE_LOADING:
if (mLoadingView != null)
removeView(mLoadingView);
mLoadingView = stateView;
addView(mLoadingView);
break;
case STATE_EMPTY:
if (mEmptyView != null)
removeView(mEmptyView);
mEmptyView = stateView;
addView(mEmptyView);
break;
case STATE_ERROR:
if (mErrorView != null)
removeView(mErrorView);
mErrorView = stateView;
addView(mErrorView);
break;
}
//切换到指定状态
if (switchToState)
setCurrentState(state);
}
/**
* 方法重载,默认不切换至指定状态
*
* @param stateView
* @param state
*/
public void setViewForState(View stateView, @ViewState int state) {
setViewForState(stateView, state, false);
}
/**
* 动态设置指定状态的布局
*
* @param layoutRes
* @param state
* @param switchToState
*/
public void setViewForState(int layoutRes, @ViewState int state, boolean switchToState) {
if (inflater == null)
inflater = LayoutInflater.from(getContext());
View stateView = inflater.inflate(layoutRes, this, false);
setViewForState(stateView, state, switchToState);
}
/**
* 方法重载,默认不切换至指定状态
*
* @param layoutRes
* @param state
*/
public void setViewForState(int layoutRes, @ViewState int state) {
setViewForState(layoutRes, state, false);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (mContentView == null) throw new IllegalArgumentException("Content view is not defined");
setStateView();
}
/**
* 复写所有的addView()方法
*/
@Override
public void addView(View child) {
if (isValidContentView(child)) mContentView = child;
super.addView(child);
}
@Override
public void addView(View child, int index) {
if (isValidContentView(child)) mContentView = child;
super.addView(child, index);
}
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
if (isValidContentView(child)) mContentView = child;
super.addView(child, index, params);
}
@Override
public void addView(View child, ViewGroup.LayoutParams params) {
if (isValidContentView(child)) mContentView = child;
super.addView(child, params);
}
@Override
public void addView(View child, int width, int height) {
if (isValidContentView(child)) mContentView = child;
super.addView(child, width, height);
}
@Override
protected boolean addViewInLayout(View child, int index, ViewGroup.LayoutParams params) {
if (isValidContentView(child)) mContentView = child;
return super.addViewInLayout(child, index, params);
}
@Override
protected boolean addViewInLayout(View child, int index, ViewGroup.LayoutParams params, boolean preventRequestLayout) {
if (isValidContentView(child)) mContentView = child;
return super.addViewInLayout(child, index, params, preventRequestLayout);
}
/**
* 判断所添加的View是否是有效的contentView
*
* @param view
* @return
*/
private boolean isValidContentView(View view) {
if (mContentView != null && mContentView != view) {
return false;
}
return view != mLoadingView && view != mErrorView && view != mEmptyView;
}
}
| [
"[email protected]"
] | |
2dc718b5ced305bab865f14cc8d8639cb1a9bacc | cb57a606845f4c9945b7828671d838406c24c72a | /src/main/java/org/rsm/dao/CustomerDao.java | 3923cf7d254ec6c236595dc10134d6df9923e1b0 | [] | no_license | dpranantha/rest-api-mongodb-morphia-querydsl | 7911b8a0c7bb78324aef8b5225bf6dc70d977cff | a486f4ae35b01fda9c774ac3b1e74b8830656c4b | refs/heads/master | 2021-01-10T12:19:51.391065 | 2016-01-02T21:47:56 | 2016-01-02T21:47:56 | 48,655,371 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,367 | java | package org.rsm.dao;
import com.google.common.collect.ImmutableList;
import com.mongodb.MongoClient;
import com.mysema.query.mongodb.morphia.MorphiaQuery;
import org.mongodb.morphia.Datastore;
import org.mongodb.morphia.Key;
import org.mongodb.morphia.Morphia;
import org.rsm.model.Customer;
import org.rsm.model.QCustomer;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
public class CustomerDao {
private final MongoClient mongo;
private final Morphia morphia;
private final String dbName;
private final Datastore datastore;
private final QCustomer qCustomer;
public CustomerDao(MongoClient mongo, Morphia morphia, String dbName) {
this.mongo = checkNotNull(mongo, "mongo client is Null");
this.morphia = checkNotNull(morphia, "morphia is Null");
this.dbName = checkNotNull(dbName, "dbName is Null");
this.datastore = this.morphia.createDatastore(this.mongo,this.dbName);
this.qCustomer = new QCustomer(this.dbName);
}
public List<Customer> findAllCustomer() {
MorphiaQuery<Customer> query = new MorphiaQuery<Customer>(morphia, datastore, qCustomer);
return query.list();
}
public List<Key<Customer>> insertCustomers(Iterable<Customer> customers) {
return ImmutableList.copyOf(datastore.save(customers));
}
}
| [
"[email protected]"
] | |
0a37339bfcc32fb04d9ed222e66566c318409963 | 139f0cc1f10a5f021d830390b53ee48107a9a5d6 | /friendship/src/main/java/com/student/friendship/service/UserServiceImpl.java | 49f2b22f9eeb4d3f77530a3fa136fcd6e4a6266d | [
"MIT"
] | permissive | aanush/object-oriented | 8cb70629dd3ae7d48deeb75343d6b9c2c4573fe0 | 235bb32a8799f08edd46e00d85888d951b2035be | refs/heads/master | 2021-07-11T09:21:57.948976 | 2017-10-02T23:02:50 | 2017-10-02T23:02:50 | 104,231,279 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,715 | java | package com.student.friendship.service;
import com.student.friendship.cache.FutureValueCache;
import com.student.friendship.cache.FutureValueCacheFactory;
import com.student.friendship.pojo.User;
import com.student.friendship.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.concurrent.ExecutionException;
@Service
public class UserServiceImpl implements UserService {
public static final int cacheSize = 10;
@Autowired
private final UserRepository userRepository;
@Autowired
private final FutureValueCacheFactory<String, User> userCacheFactory;
private final FutureValueCache<String, User> userCache;
public UserServiceImpl(UserRepository userRepository, FutureValueCacheFactory<String, User> userCacheFactory) {
this.userRepository = userRepository;
this.userCacheFactory = userCacheFactory;
this.userCache = userCacheFactory.createSynchronizedFutureValueCache(cacheSize, username -> userRepository.getUser(username));
}
@Override
public void addUser(User user) {
userRepository.addUser(user);
}
@Override
public void updateUser(User user) {
userRepository.updateUser(user);
userCache.update(user.getUsername());
}
@Override
public User getUser(String username) {
try {
return userCache.get(username).get();
} catch (ExecutionException e) {
throw new RuntimeException(e.getCause());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e.getCause());
}
}
}
| [
"[email protected]"
] | |
c01e62f7427e2d6e0e9e6a8d1d3512d22029019c | 9eea6db118e825237850e9989a64c495c4fe773e | /src/main/java/com/software/nick/medicinestore/store/model/BaseAuditModel.java | 9a5d7914416151b7817061da50c83288f40792ab | [] | no_license | NickThe1/store | e5b9bd1fc95a313cdc1f34967dd745b4400491a4 | 7294beeea1b241916f7dd5535fda218db7b9c188 | refs/heads/main | 2023-04-07T23:38:11.178852 | 2021-04-09T16:10:12 | 2021-04-09T16:10:12 | 356,328,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 148 | java | package com.software.nick.medicinestore.store.model;
import javax.persistence.MappedSuperclass;
@MappedSuperclass
public class BaseAuditModel {
}
| [
"[email protected]"
] | |
35251adc7ad08f1e4cce8bfa1009d4bc4c036141 | 717e3c9e9e05472eacf4c219b2396e81981bdd9e | /src/commands/PrintCommand.java | 86690f1bc45371fd50f9d6e0d20ffba91240676c | [] | no_license | MD1010/FlightGear | 27419f14c80daa8139293c81047fb16ffcf4aedb | 70b636b42f32f0dcc7f5012c54ce2bc7ffc198b5 | refs/heads/master | 2021-04-08T18:03:13.228319 | 2020-04-04T11:39:44 | 2020-04-04T11:39:44 | 248,796,890 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,021 | java | package commands;
import interfaces.ICommand;
import mappers.VariableMapper;
public class PrintCommand implements ICommand {
@Override
public int doCommand(String[] args) {
if (args[0].startsWith("\"")) {
String output = "";
for (String substring : args) {
substring = substring.replaceAll("\"", "");
output = output.concat(substring + " ");
}
System.out.println(output);
} else {
if (VariableMapper.isVariableExist(args[0])) {
// String[] expression = Arrays.copyOfRange(args, 1, args.length);
// double expressionValue = ExpressionEvaluator.getExpressionNumericValue(args[0]);
String expressionValue = VariableMapper.getVaraibleByKey(args[0]).value;
System.out.println(expressionValue);
} else {
System.out.println("Variable " + args[0] + " is not defined");
}
}
return 1;
}
}
| [
"[email protected]"
] | |
1a17ca6f8334a295b42e93d2ad7a6acdd88fc978 | ae60052b97c841a4f15585000bea747a9ce87a5d | /app/src/main/java/com/hc360/koiambuyer/myinterface/iview/IShipAddressView.java | b4381d7e9ce6f9f4cb9586c48aadfcec4934d391 | [] | no_license | pf5512/koiambuyer | b585eca780859ad8deae421fa42e1a2b8f7b5000 | d0146ca6cedcc3527cc838a4fcbcff8fcf4cab31 | refs/heads/master | 2020-03-18T09:20:32.050883 | 2018-05-03T02:25:14 | 2018-05-03T02:25:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 678 | java | package com.hc360.koiambuyer.myinterface.iview;
import com.hc360.koiambuyer.api.bean.ShipAddressInfo;
import com.hc360.koiambuyer.view.base.IBaseView;
/**
* Project: IAmBuyer
* Author: 张佳林
* Version: 1.0
* Date: 2017/10/13
* Modify: //TODO
* Description: //TODO
* Copyright notice:
*/
public interface IShipAddressView extends IBaseView {
void getAddress(ShipAddressInfo info);
void deleteAddress(int id);
void deleteAddress();
void setDefaultAddress(int id, String useState);
void setDefaultAddress();
void editAddress(int id);
void selectAddress(String userStr,String addStr, int deliverId);
boolean getSelectState();
}
| [
"[email protected]"
] | |
56bcdfff904f13f3e702f3057372d23c265f33c1 | 726ef706d3ff6b403dd294c05a9d51711af2ea09 | /product/src/main/java/com/cg/product/dao/ProductDaoImpl.java | f4ed257ecdf8ad13b3896f61ba112add1468d612 | [] | no_license | Challa-Saranya/Mongo | b2c09248e0b1c70253d2e70955efd444d4897f26 | 1065f974e49fcad56e1effe6c134fd1817220b83 | refs/heads/master | 2023-01-10T22:06:07.208837 | 2020-03-10T05:07:28 | 2020-03-10T05:07:28 | 199,972,111 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,195 | java | package com.cg.product.dao;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;
import com.cg.product.dto.Product;
@Repository
public class ProductDaoImpl implements ProductDao {
@Autowired
MongoTemplate mongotemplate;
@Override
public Product addProducts(Product prod) {
// TODO Auto-generated method stub
return mongotemplate.insert(prod);
}
@Override
public List<Product> showAllProducts() {
// TODO Auto-generated method stub
return mongotemplate.findAll(Product.class);
}
@Override
public Product searchProductById(int prodId) {
// TODO Auto-generated method stub
Product prod= mongotemplate.findById(prodId, Product.class);
return prod;
}
@Override
public Product updateProduct(Product prod) {
// TODO Auto-generated method stub
return mongotemplate.save(prod);
}
@Override
public void deleteProduct(int prodId) {
// TODO Auto-generated method stub
Product prod= mongotemplate.findById(prodId, Product.class);
mongotemplate.remove(prod);
}
}
| [
"[email protected]"
] | |
4e9577f64fef7c8acd39987997aa9da49d1c470a | 541c2d6c2f5f4338147ae78802232171785898a6 | /src/main/java/org/docksidestage/dbflute/bsbhv/BsProductCategoryBhv.java | b980c3fcc1da4ae61b3cfaa87239ba2200309f99 | [
"Apache-2.0"
] | permissive | lastaflute/lastaflute-example-paradeplaza | 10082eebd8bcbccf64be12f777e31ba84492f010 | 05b8b0c79376a51b58b50cc8106f9c40708db3f3 | refs/heads/master | 2020-04-02T05:03:54.568333 | 2018-11-29T21:20:53 | 2018-11-29T21:20:53 | 154,050,759 | 0 | 1 | Apache-2.0 | 2018-10-28T15:45:00 | 2018-10-21T20:47:14 | Java | UTF-8 | Java | false | false | 65,688 | java | /*
* Copyright 2015-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.docksidestage.dbflute.bsbhv;
import java.util.List;
import org.dbflute.*;
import org.dbflute.bhv.*;
import org.dbflute.bhv.readable.*;
import org.dbflute.bhv.writable.*;
import org.dbflute.bhv.referrer.*;
import org.dbflute.cbean.*;
import org.dbflute.cbean.chelper.HpSLSFunction;
import org.dbflute.cbean.result.*;
import org.dbflute.exception.*;
import org.dbflute.optional.OptionalEntity;
import org.dbflute.outsidesql.executor.*;
import org.docksidestage.dbflute.exbhv.*;
import org.docksidestage.dbflute.bsbhv.loader.*;
import org.docksidestage.dbflute.exentity.*;
import org.docksidestage.dbflute.bsentity.dbmeta.*;
import org.docksidestage.dbflute.cbean.*;
/**
* The behavior of (商品カテゴリ)PRODUCT_CATEGORY as TABLE. <br>
* <pre>
* [primary key]
* PRODUCT_CATEGORY_CODE
*
* [column]
* PRODUCT_CATEGORY_CODE, PRODUCT_CATEGORY_NAME, PARENT_CATEGORY_CODE
*
* [sequence]
*
*
* [identity]
*
*
* [version-no]
*
*
* [foreign table]
* PRODUCT_CATEGORY
*
* [referrer table]
* PRODUCT, PRODUCT_CATEGORY
*
* [foreign property]
* productCategorySelf
*
* [referrer property]
* productList, productCategorySelfList
* </pre>
* @author DBFlute(AutoGenerator)
*/
public abstract class BsProductCategoryBhv extends AbstractBehaviorWritable<ProductCategory, ProductCategoryCB> {
// ===================================================================================
// Definition
// ==========
/*df:beginQueryPath*/
/*df:endQueryPath*/
// ===================================================================================
// DB Meta
// =======
/** {@inheritDoc} */
public ProductCategoryDbm asDBMeta() { return ProductCategoryDbm.getInstance(); }
/** {@inheritDoc} */
public String asTableDbName() { return "PRODUCT_CATEGORY"; }
// ===================================================================================
// New Instance
// ============
/** {@inheritDoc} */
public ProductCategoryCB newConditionBean() { return new ProductCategoryCB(); }
// ===================================================================================
// Count Select
// ============
/**
* Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}<br>
* SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct.
* <pre>
* <span style="color: #70226C">int</span> count = <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectCount</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...
* });
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The count for the condition. (NotMinus)
*/
public int selectCount(CBCall<ProductCategoryCB> cbLambda) {
return facadeSelectCount(createCB(cbLambda));
}
// ===================================================================================
// Entity Select
// =============
/**
* Select the entity by the condition-bean. <br>
* It returns not-null optional entity, so you should ... <br>
* <span style="color: #AD4747; font-size: 120%">If the data is always present as your business rule, alwaysPresent().</span> <br>
* <span style="color: #AD4747; font-size: 120%">If it might be no data, isPresent() and orElse(), ...</span>
* <pre>
* <span style="color: #3F7E5E">// if the data always exists as your business rule</span>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectEntity</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...
* }).<span style="color: #CC4747">alwaysPresent</span>(<span style="color: #553000">productCategory</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #3F7E5E">// called if present, or exception</span>
* ... = <span style="color: #553000">productCategory</span>.get...
* });
*
* <span style="color: #3F7E5E">// if it might be no data, ...</span>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectEntity</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...
* }).<span style="color: #CC4747">ifPresent</span>(<span style="color: #553000">productCategory</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #3F7E5E">// called if present</span>
* ... = <span style="color: #553000">productCategory</span>.get...
* }).<span style="color: #994747">orElse</span>(() <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #3F7E5E">// called if not present</span>
* });
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The optional entity selected by the condition. (NotNull: if no data, empty entity)
* @throws EntityAlreadyDeletedException When get(), required() of return value is called and the value is null, which means entity has already been deleted (not found).
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
*/
public OptionalEntity<ProductCategory> selectEntity(CBCall<ProductCategoryCB> cbLambda) {
return facadeSelectEntity(createCB(cbLambda));
}
protected OptionalEntity<ProductCategory> facadeSelectEntity(ProductCategoryCB cb) {
return doSelectOptionalEntity(cb, typeOfSelectedEntity());
}
protected <ENTITY extends ProductCategory> OptionalEntity<ENTITY> doSelectOptionalEntity(ProductCategoryCB cb, Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectEntity(cb, tp), cb);
}
protected Entity doReadEntity(ConditionBean cb) { return facadeSelectEntity(downcast(cb)).orElse(null); }
/**
* Select the entity by the condition-bean with deleted check. <br>
* <span style="color: #AD4747; font-size: 120%">If the data is always present as your business rule, this method is good.</span>
* <pre>
* ProductCategory <span style="color: #553000">productCategory</span> = <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectEntityWithDeletedCheck</span>(cb <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> cb.acceptPK(1));
* ... = <span style="color: #553000">productCategory</span>.get...(); <span style="color: #3F7E5E">// the entity always be not null</span>
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The entity selected by the condition. (NotNull: if no data, throws exception)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
*/
public ProductCategory selectEntityWithDeletedCheck(CBCall<ProductCategoryCB> cbLambda) {
return facadeSelectEntityWithDeletedCheck(createCB(cbLambda));
}
/**
* Select the entity by the primary-key value.
* @param productCategoryCode (商品カテゴリコード): PK, NotNull, CHAR(3). (NotNull)
* @return The optional entity selected by the PK. (NotNull: if no data, empty entity)
* @throws EntityAlreadyDeletedException When get(), required() of return value is called and the value is null, which means entity has already been deleted (not found).
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws SelectEntityConditionNotFoundException When the condition for selecting an entity is not found.
*/
public OptionalEntity<ProductCategory> selectByPK(String productCategoryCode) {
return facadeSelectByPK(productCategoryCode);
}
protected OptionalEntity<ProductCategory> facadeSelectByPK(String productCategoryCode) {
return doSelectOptionalByPK(productCategoryCode, typeOfSelectedEntity());
}
protected <ENTITY extends ProductCategory> ENTITY doSelectByPK(String productCategoryCode, Class<? extends ENTITY> tp) {
return doSelectEntity(xprepareCBAsPK(productCategoryCode), tp);
}
protected <ENTITY extends ProductCategory> OptionalEntity<ENTITY> doSelectOptionalByPK(String productCategoryCode, Class<? extends ENTITY> tp) {
return createOptionalEntity(doSelectByPK(productCategoryCode, tp), productCategoryCode);
}
protected ProductCategoryCB xprepareCBAsPK(String productCategoryCode) {
assertObjectNotNull("productCategoryCode", productCategoryCode);
return newConditionBean().acceptPK(productCategoryCode);
}
// ===================================================================================
// List Select
// ===========
/**
* Select the list as result bean.
* <pre>
* ListResultBean<ProductCategory> <span style="color: #553000">productCategoryList</span> = <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectList</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...;
* <span style="color: #553000">cb</span>.query().addOrderBy...;
* });
* <span style="color: #70226C">for</span> (ProductCategory <span style="color: #553000">productCategory</span> : <span style="color: #553000">productCategoryList</span>) {
* ... = <span style="color: #553000">productCategory</span>.get...;
* }
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The result bean of selected list. (NotNull: if no data, returns empty list)
* @throws DangerousResultSizeException When the result size is over the specified safety size.
*/
public ListResultBean<ProductCategory> selectList(CBCall<ProductCategoryCB> cbLambda) {
return facadeSelectList(createCB(cbLambda));
}
@Override
protected boolean isEntityDerivedMappable() { return true; }
// ===================================================================================
// Page Select
// ===========
/**
* Select the page as result bean. <br>
* (both count-select and paging-select are executed)
* <pre>
* PagingResultBean<ProductCategory> <span style="color: #553000">page</span> = <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectPage</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...
* <span style="color: #553000">cb</span>.query().addOrderBy...
* <span style="color: #553000">cb</span>.<span style="color: #CC4747">paging</span>(20, 3); <span style="color: #3F7E5E">// 20 records per a page and current page number is 3</span>
* });
* <span style="color: #70226C">int</span> allRecordCount = <span style="color: #553000">page</span>.getAllRecordCount();
* <span style="color: #70226C">int</span> allPageCount = <span style="color: #553000">page</span>.getAllPageCount();
* <span style="color: #70226C">boolean</span> isExistPrePage = <span style="color: #553000">page</span>.isExistPrePage();
* <span style="color: #70226C">boolean</span> isExistNextPage = <span style="color: #553000">page</span>.isExistNextPage();
* ...
* <span style="color: #70226C">for</span> (ProductCategory productCategory : <span style="color: #553000">page</span>) {
* ... = productCategory.get...;
* }
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The result bean of selected page. (NotNull: if no data, returns bean as empty list)
* @throws DangerousResultSizeException When the result size is over the specified safety size.
*/
public PagingResultBean<ProductCategory> selectPage(CBCall<ProductCategoryCB> cbLambda) {
return facadeSelectPage(createCB(cbLambda));
}
// ===================================================================================
// Cursor Select
// =============
/**
* Select the cursor by the condition-bean.
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectCursor</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...
* }, <span style="color: #553000">member</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* ... = <span style="color: #553000">member</span>.getMemberName();
* });
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @param entityLambda The handler of entity row of ProductCategory. (NotNull)
*/
public void selectCursor(CBCall<ProductCategoryCB> cbLambda, EntityRowHandler<ProductCategory> entityLambda) {
facadeSelectCursor(createCB(cbLambda), entityLambda);
}
// ===================================================================================
// Scalar Select
// =============
/**
* Select the scalar value derived by a function from uniquely-selected records. <br>
* You should call a function method after this method called like as follows:
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">selectScalar</span>(Date.class).max(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.specify().<span style="color: #CC4747">column...</span>; <span style="color: #3F7E5E">// required for the function</span>
* <span style="color: #553000">cb</span>.query().set...
* });
* </pre>
* @param <RESULT> The type of result.
* @param resultType The type of result. (NotNull)
* @return The scalar function object to specify function for scalar value. (NotNull)
*/
public <RESULT> HpSLSFunction<ProductCategoryCB, RESULT> selectScalar(Class<RESULT> resultType) {
return facadeScalarSelect(resultType);
}
// ===================================================================================
// Sequence
// ========
@Override
protected Number doReadNextVal() {
String msg = "This table is NOT related to sequence: " + asTableDbName();
throw new UnsupportedOperationException(msg);
}
// ===================================================================================
// Load Referrer
// =============
/**
* Load referrer for the list by the referrer loader.
* <pre>
* List<Member> <span style="color: #553000">memberList</span> = <span style="color: #0000C0">memberBhv</span>.selectList(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().set...
* });
* memberBhv.<span style="color: #CC4747">load</span>(<span style="color: #553000">memberList</span>, <span style="color: #553000">memberLoader</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">memberLoader</span>.<span style="color: #CC4747">loadPurchase</span>(<span style="color: #553000">purchaseCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">purchaseCB</span>.setupSelect...
* <span style="color: #553000">purchaseCB</span>.query().set...
* <span style="color: #553000">purchaseCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can also load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(purchaseLoader -> {</span>
* <span style="color: #3F7E5E">// purchaseLoader.loadPurchasePayment(...);</span>
* <span style="color: #3F7E5E">//});</span>
*
* <span style="color: #3F7E5E">// you can also pull out foreign table and load its referrer</span>
* <span style="color: #3F7E5E">// (setupSelect of the foreign table should be called)</span>
* <span style="color: #3F7E5E">//memberLoader.pulloutMemberStatus().loadMemberLogin(...)</span>
* });
* <span style="color: #70226C">for</span> (Member member : <span style="color: #553000">memberList</span>) {
* List<Purchase> purchaseList = member.<span style="color: #CC4747">getPurchaseList()</span>;
* <span style="color: #70226C">for</span> (Purchase purchase : purchaseList) {
* ...
* }
* }
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has order by FK before callback.
* @param productCategoryList The entity list of productCategory. (NotNull)
* @param loaderLambda The callback to handle the referrer loader for actually loading referrer. (NotNull)
*/
public void load(List<ProductCategory> productCategoryList, ReferrerLoaderHandler<LoaderOfProductCategory> loaderLambda) {
xassLRArg(productCategoryList, loaderLambda);
loaderLambda.handle(new LoaderOfProductCategory().ready(productCategoryList, _behaviorSelector));
}
/**
* Load referrer for the entity by the referrer loader.
* <pre>
* Member <span style="color: #553000">member</span> = <span style="color: #0000C0">memberBhv</span>.selectEntityWithDeletedCheck(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> <span style="color: #553000">cb</span>.acceptPK(1));
* <span style="color: #0000C0">memberBhv</span>.<span style="color: #CC4747">load</span>(<span style="color: #553000">member</span>, <span style="color: #553000">memberLoader</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">memberLoader</span>.<span style="color: #CC4747">loadPurchase</span>(<span style="color: #553000">purchaseCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">purchaseCB</span>.setupSelect...
* <span style="color: #553000">purchaseCB</span>.query().set...
* <span style="color: #553000">purchaseCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can also load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(purchaseLoader -> {</span>
* <span style="color: #3F7E5E">// purchaseLoader.loadPurchasePayment(...);</span>
* <span style="color: #3F7E5E">//});</span>
*
* <span style="color: #3F7E5E">// you can also pull out foreign table and load its referrer</span>
* <span style="color: #3F7E5E">// (setupSelect of the foreign table should be called)</span>
* <span style="color: #3F7E5E">//memberLoader.pulloutMemberStatus().loadMemberLogin(...)</span>
* });
* List<Purchase> purchaseList = <span style="color: #553000">member</span>.<span style="color: #CC4747">getPurchaseList()</span>;
* <span style="color: #70226C">for</span> (Purchase purchase : purchaseList) {
* ...
* }
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has order by FK before callback.
* @param productCategory The entity of productCategory. (NotNull)
* @param loaderLambda The callback to handle the referrer loader for actually loading referrer. (NotNull)
*/
public void load(ProductCategory productCategory, ReferrerLoaderHandler<LoaderOfProductCategory> loaderLambda) {
xassLRArg(productCategory, loaderLambda);
loaderLambda.handle(new LoaderOfProductCategory().ready(xnewLRAryLs(productCategory), _behaviorSelector));
}
/**
* Load referrer of productList by the set-upper of referrer. <br>
* (商品)PRODUCT by PRODUCT_CATEGORY_CODE, named 'productList'.
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">loadProduct</span>(<span style="color: #553000">productCategoryList</span>, <span style="color: #553000">productCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">productCB</span>.setupSelect...
* <span style="color: #553000">productCB</span>.query().set...
* <span style="color: #553000">productCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(referrerList -> {</span>
* <span style="color: #3F7E5E">// ...</span>
* <span style="color: #3F7E5E">//});</span>
* <span style="color: #70226C">for</span> (ProductCategory productCategory : <span style="color: #553000">productCategoryList</span>) {
* ... = productCategory.<span style="color: #CC4747">getProductList()</span>;
* }
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has settings before callback as follows:
* <pre>
* cb.query().setProductCategoryCode_InScope(pkList);
* cb.query().addOrderBy_ProductCategoryCode_Asc();
* </pre>
* @param productCategoryList The entity list of productCategory. (NotNull)
* @param refCBLambda The callback to set up referrer condition-bean for loading referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
*/
public NestedReferrerListGateway<Product> loadProduct(List<ProductCategory> productCategoryList, ReferrerConditionSetupper<ProductCB> refCBLambda) {
xassLRArg(productCategoryList, refCBLambda);
return doLoadProduct(productCategoryList, new LoadReferrerOption<ProductCB, Product>().xinit(refCBLambda));
}
/**
* Load referrer of productList by the set-upper of referrer. <br>
* (商品)PRODUCT by PRODUCT_CATEGORY_CODE, named 'productList'.
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">loadProduct</span>(<span style="color: #553000">productCategory</span>, <span style="color: #553000">productCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">productCB</span>.setupSelect...
* <span style="color: #553000">productCB</span>.query().set...
* <span style="color: #553000">productCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(referrerList -> {</span>
* <span style="color: #3F7E5E">// ...</span>
* <span style="color: #3F7E5E">//});</span>
* ... = <span style="color: #553000">productCategory</span>.<span style="color: #CC4747">getProductList()</span>;
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has settings before callback as follows:
* <pre>
* cb.query().setProductCategoryCode_InScope(pkList);
* cb.query().addOrderBy_ProductCategoryCode_Asc();
* </pre>
* @param productCategory The entity of productCategory. (NotNull)
* @param refCBLambda The callback to set up referrer condition-bean for loading referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
*/
public NestedReferrerListGateway<Product> loadProduct(ProductCategory productCategory, ReferrerConditionSetupper<ProductCB> refCBLambda) {
xassLRArg(productCategory, refCBLambda);
return doLoadProduct(xnewLRLs(productCategory), new LoadReferrerOption<ProductCB, Product>().xinit(refCBLambda));
}
protected NestedReferrerListGateway<Product> doLoadProduct(List<ProductCategory> productCategoryList, LoadReferrerOption<ProductCB, Product> option) {
return helpLoadReferrerInternally(productCategoryList, option, "productList");
}
/**
* Load referrer of productCategorySelfList by the set-upper of referrer. <br>
* (商品カテゴリ)PRODUCT_CATEGORY by PARENT_CATEGORY_CODE, named 'productCategorySelfList'.
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">loadProductCategorySelf</span>(<span style="color: #553000">productCategoryList</span>, <span style="color: #553000">categoryCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">categoryCB</span>.setupSelect...
* <span style="color: #553000">categoryCB</span>.query().set...
* <span style="color: #553000">categoryCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(referrerList -> {</span>
* <span style="color: #3F7E5E">// ...</span>
* <span style="color: #3F7E5E">//});</span>
* <span style="color: #70226C">for</span> (ProductCategory productCategory : <span style="color: #553000">productCategoryList</span>) {
* ... = productCategory.<span style="color: #CC4747">getProductCategorySelfList()</span>;
* }
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has settings before callback as follows:
* <pre>
* cb.query().setParentCategoryCode_InScope(pkList);
* cb.query().addOrderBy_ParentCategoryCode_Asc();
* </pre>
* @param productCategoryList The entity list of productCategory. (NotNull)
* @param refCBLambda The callback to set up referrer condition-bean for loading referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
*/
public NestedReferrerListGateway<ProductCategory> loadProductCategorySelf(List<ProductCategory> productCategoryList, ReferrerConditionSetupper<ProductCategoryCB> refCBLambda) {
xassLRArg(productCategoryList, refCBLambda);
return doLoadProductCategorySelf(productCategoryList, new LoadReferrerOption<ProductCategoryCB, ProductCategory>().xinit(refCBLambda));
}
/**
* Load referrer of productCategorySelfList by the set-upper of referrer. <br>
* (商品カテゴリ)PRODUCT_CATEGORY by PARENT_CATEGORY_CODE, named 'productCategorySelfList'.
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">loadProductCategorySelf</span>(<span style="color: #553000">productCategory</span>, <span style="color: #553000">categoryCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">categoryCB</span>.setupSelect...
* <span style="color: #553000">categoryCB</span>.query().set...
* <span style="color: #553000">categoryCB</span>.query().addOrderBy...
* }); <span style="color: #3F7E5E">// you can load nested referrer from here</span>
* <span style="color: #3F7E5E">//}).withNestedReferrer(referrerList -> {</span>
* <span style="color: #3F7E5E">// ...</span>
* <span style="color: #3F7E5E">//});</span>
* ... = <span style="color: #553000">productCategory</span>.<span style="color: #CC4747">getProductCategorySelfList()</span>;
* </pre>
* About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br>
* The condition-bean, which the set-upper provides, has settings before callback as follows:
* <pre>
* cb.query().setParentCategoryCode_InScope(pkList);
* cb.query().addOrderBy_ParentCategoryCode_Asc();
* </pre>
* @param productCategory The entity of productCategory. (NotNull)
* @param refCBLambda The callback to set up referrer condition-bean for loading referrer. (NotNull)
* @return The callback interface which you can load nested referrer by calling withNestedReferrer(). (NotNull)
*/
public NestedReferrerListGateway<ProductCategory> loadProductCategorySelf(ProductCategory productCategory, ReferrerConditionSetupper<ProductCategoryCB> refCBLambda) {
xassLRArg(productCategory, refCBLambda);
return doLoadProductCategorySelf(xnewLRLs(productCategory), new LoadReferrerOption<ProductCategoryCB, ProductCategory>().xinit(refCBLambda));
}
protected NestedReferrerListGateway<ProductCategory> doLoadProductCategorySelf(List<ProductCategory> productCategoryList, LoadReferrerOption<ProductCategoryCB, ProductCategory> option) {
return helpLoadReferrerInternally(productCategoryList, option, "productCategorySelfList");
}
// ===================================================================================
// Pull out Relation
// =================
/**
* Pull out the list of foreign table 'ProductCategory'.
* @param productCategoryList The list of productCategory. (NotNull, EmptyAllowed)
* @return The list of foreign table. (NotNull, EmptyAllowed, NotNullElement)
*/
public List<ProductCategory> pulloutProductCategorySelf(List<ProductCategory> productCategoryList)
{ return helpPulloutInternally(productCategoryList, "productCategorySelf"); }
// ===================================================================================
// Extract Column
// ==============
/**
* Extract the value list of (single) primary key productCategoryCode.
* @param productCategoryList The list of productCategory. (NotNull, EmptyAllowed)
* @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement)
*/
public List<String> extractProductCategoryCodeList(List<ProductCategory> productCategoryList)
{ return helpExtractListInternally(productCategoryList, "productCategoryCode"); }
// ===================================================================================
// Entity Update
// =============
/**
* Insert the entity modified-only. (DefaultConstraintsEnabled)
* <pre>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
* productCategory.setFoo...(value);
* productCategory.setBar...(value);
* <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
* <span style="color: #3F7E5E">//productCategory.setRegisterUser(value);</span>
* <span style="color: #3F7E5E">//productCategory.set...;</span>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">insert</span>(productCategory);
* ... = productCategory.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
* </pre>
* <p>While, when the entity is created by select, all columns are registered.</p>
* @param productCategory The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
* @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
*/
public void insert(ProductCategory productCategory) {
doInsert(productCategory, null);
}
/**
* Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) <br>
* By PK as default, and also you can update by unique keys using entity's uniqueOf().
* <pre>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* productCategory.setPK...(value); <span style="color: #3F7E5E">// required</span>
* productCategory.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
* <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
* <span style="color: #3F7E5E">//productCategory.setRegisterUser(value);</span>
* <span style="color: #3F7E5E">//productCategory.set...;</span>
* <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span>
* productCategory.<span style="color: #CC4747">setVersionNo</span>(value);
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">update</span>(productCategory);
* </pre>
* @param productCategory The entity of update. (NotNull, PrimaryKeyNotNull)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
*/
public void update(ProductCategory productCategory) {
doUpdate(productCategory, null);
}
/**
* Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br>
* if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br>
* <p><span style="color: #994747; font-size: 120%">Also you can update by unique keys using entity's uniqueOf().</span></p>
* @param productCategory The entity of insert or update. (NotNull, ...depends on insert or update)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
*/
public void insertOrUpdate(ProductCategory productCategory) {
doInsertOrUpdate(productCategory, null, null);
}
/**
* Delete the entity. (ZeroUpdateException, NonExclusiveControl) <br>
* By PK as default, and also you can delete by unique keys using entity's uniqueOf().
* <pre>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* productCategory.setPK...(value); <span style="color: #3F7E5E">// required</span>
* <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span>
* productCategory.<span style="color: #CC4747">setVersionNo</span>(value);
* <span style="color: #70226C">try</span> {
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">delete</span>(productCategory);
* } <span style="color: #70226C">catch</span> (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span>
* ...
* }
* </pre>
* @param productCategory The entity of delete. (NotNull, PrimaryKeyNotNull)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
*/
public void delete(ProductCategory productCategory) {
doDelete(productCategory, null);
}
// ===================================================================================
// Batch Update
// ============
/**
* Batch-insert the entity list modified-only of same-set columns. (DefaultConstraintsEnabled) <br>
* This method uses executeBatch() of java.sql.PreparedStatement. <br>
* <p><span style="color: #CC4747; font-size: 120%">The columns of least common multiple are registered like this:</span></p>
* <pre>
* <span style="color: #70226C">for</span> (... : ...) {
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* productCategory.setFooName("foo");
* <span style="color: #70226C">if</span> (...) {
* productCategory.setFooPrice(123);
* }
* <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are registered</span>
* <span style="color: #3F7E5E">// FOO_PRICE not-called in any entities are registered as null without default value</span>
* <span style="color: #3F7E5E">// columns not-called in all entities are registered as null or default value</span>
* productCategoryList.add(productCategory);
* }
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">batchInsert</span>(productCategoryList);
* </pre>
* <p>While, when the entities are created by select, all columns are registered.</p>
* <p>And if the table has an identity, entities after the process don't have incremented values.
* (When you use the (normal) insert(), you can get the incremented value from your entity)</p>
* @param productCategoryList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment)
* @return The array of inserted count. (NotNull, EmptyAllowed)
*/
public int[] batchInsert(List<ProductCategory> productCategoryList) {
return doBatchInsert(productCategoryList, null);
}
/**
* Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br>
* This method uses executeBatch() of java.sql.PreparedStatement. <br>
* <span style="color: #CC4747; font-size: 120%">You should specify same-set columns to all entities like this:</span>
* <pre>
* for (... : ...) {
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* productCategory.setFooName("foo");
* <span style="color: #70226C">if</span> (...) {
* productCategory.setFooPrice(123);
* } <span style="color: #70226C">else</span> {
* productCategory.setFooPrice(null); <span style="color: #3F7E5E">// updated as null</span>
* <span style="color: #3F7E5E">//productCategory.setFooDate(...); // *not allowed, fragmented</span>
* }
* <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are updated</span>
* <span style="color: #3F7E5E">// (others are not updated: their values are kept)</span>
* productCategoryList.add(productCategory);
* }
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">batchUpdate</span>(productCategoryList);
* </pre>
* @param productCategoryList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
* @return The array of updated count. (NotNull, EmptyAllowed)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
*/
public int[] batchUpdate(List<ProductCategory> productCategoryList) {
return doBatchUpdate(productCategoryList, null);
}
/**
* Batch-delete the entity list. (NonExclusiveControl) <br>
* This method uses executeBatch() of java.sql.PreparedStatement.
* @param productCategoryList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
* @return The array of deleted count. (NotNull, EmptyAllowed)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
*/
public int[] batchDelete(List<ProductCategory> productCategoryList) {
return doBatchDelete(productCategoryList, null);
}
// ===================================================================================
// Query Update
// ============
/**
* Insert the several entities by query (modified-only for fixed value).
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">queryInsert</span>(new QueryInsertSetupper<ProductCategory, ProductCategoryCB>() {
* public ConditionBean setup(ProductCategory entity, ProductCategoryCB intoCB) {
* FooCB cb = FooCB();
* cb.setupSelect_Bar();
*
* <span style="color: #3F7E5E">// mapping</span>
* intoCB.specify().columnMyName().mappedFrom(cb.specify().columnFooName());
* intoCB.specify().columnMyCount().mappedFrom(cb.specify().columnFooCount());
* intoCB.specify().columnMyDate().mappedFrom(cb.specify().specifyBar().columnBarDate());
* entity.setMyFixedValue("foo"); <span style="color: #3F7E5E">// fixed value</span>
* <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
* <span style="color: #3F7E5E">//entity.setRegisterUser(value);</span>
* <span style="color: #3F7E5E">//entity.set...;</span>
* <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
* <span style="color: #3F7E5E">//entity.setVersionNo(value);</span>
*
* return cb;
* }
* });
* </pre>
* @param manyArgLambda The callback to set up query-insert. (NotNull)
* @return The inserted count.
*/
public int queryInsert(QueryInsertSetupper<ProductCategory, ProductCategoryCB> manyArgLambda) {
return doQueryInsert(manyArgLambda, null);
}
/**
* Update the several entities by query non-strictly modified-only. (NonExclusiveControl)
* <pre>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* <span style="color: #3F7E5E">// you don't need to set PK value</span>
* <span style="color: #3F7E5E">//productCategory.setPK...(value);</span>
* productCategory.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
* <span style="color: #3F7E5E">// you don't need to set values of common columns</span>
* <span style="color: #3F7E5E">//productCategory.setRegisterUser(value);</span>
* <span style="color: #3F7E5E">//productCategory.set...;</span>
* <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
* <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
* <span style="color: #3F7E5E">//productCategory.setVersionNo(value);</span>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">queryUpdate</span>(productCategory, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().setFoo...
* });
* </pre>
* @param productCategory The entity that contains update values. (NotNull, PrimaryKeyNullAllowed)
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The updated count.
* @throws NonQueryUpdateNotAllowedException When the query has no condition.
*/
public int queryUpdate(ProductCategory productCategory, CBCall<ProductCategoryCB> cbLambda) {
return doQueryUpdate(productCategory, createCB(cbLambda), null);
}
/**
* Delete the several entities by query. (NonExclusiveControl)
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">queryDelete</span>(productCategory, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().setFoo...
* });
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @return The deleted count.
* @throws NonQueryDeleteNotAllowedException When the query has no condition.
*/
public int queryDelete(CBCall<ProductCategoryCB> cbLambda) {
return doQueryDelete(createCB(cbLambda), null);
}
// ===================================================================================
// Varying Update
// ==============
// -----------------------------------------------------
// Entity Update
// -------------
/**
* Insert the entity with varying requests. <br>
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br>
* Other specifications are same as insert(entity).
* <pre>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span>
* productCategory.setFoo...(value);
* productCategory.setBar...(value);
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">varyingInsert</span>(productCategory, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #3F7E5E">// you can insert by your values for common columns</span>
* <span style="color: #553000">op</span>.disableCommonColumnAutoSetup();
* });
* ... = productCategory.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span>
* </pre>
* @param productCategory The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment)
* @param opLambda The callback for option of insert for varying requests. (NotNull)
* @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
*/
public void varyingInsert(ProductCategory productCategory, WritableOptionCall<ProductCategoryCB, InsertOption<ProductCategoryCB>> opLambda) {
doInsert(productCategory, createInsertOption(opLambda));
}
/**
* Update the entity with varying requests modified-only. (ZeroUpdateException, NonExclusiveControl) <br>
* For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup(). <br>
* Other specifications are same as update(entity).
* <pre>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* productCategory.setPK...(value); <span style="color: #3F7E5E">// required</span>
* productCategory.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
* <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span>
* productCategory.<span style="color: #CC4747">setVersionNo</span>(value);
* <span style="color: #3F7E5E">// you can update by self calculation values</span>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">varyingUpdate</span>(productCategory, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">op</span>.self(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.specify().<span style="color: #CC4747">columnXxxCount()</span>;
* }).plus(1); <span style="color: #3F7E5E">// XXX_COUNT = XXX_COUNT + 1</span>
* });
* </pre>
* @param productCategory The entity of update. (NotNull, PrimaryKeyNotNull)
* @param opLambda The callback for option of update for varying requests. (NotNull)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
*/
public void varyingUpdate(ProductCategory productCategory, WritableOptionCall<ProductCategoryCB, UpdateOption<ProductCategoryCB>> opLambda) {
doUpdate(productCategory, createUpdateOption(opLambda));
}
/**
* Insert or update the entity with varying requests. (ExclusiveControl: when update) <br>
* Other specifications are same as insertOrUpdate(entity).
* @param productCategory The entity of insert or update. (NotNull)
* @param insertOpLambda The callback for option of insert for varying requests. (NotNull)
* @param updateOpLambda The callback for option of update for varying requests. (NotNull)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
* @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation)
*/
public void varyingInsertOrUpdate(ProductCategory productCategory, WritableOptionCall<ProductCategoryCB, InsertOption<ProductCategoryCB>> insertOpLambda, WritableOptionCall<ProductCategoryCB, UpdateOption<ProductCategoryCB>> updateOpLambda) {
doInsertOrUpdate(productCategory, createInsertOption(insertOpLambda), createUpdateOption(updateOpLambda));
}
/**
* Delete the entity with varying requests. (ZeroUpdateException, NonExclusiveControl) <br>
* Now a valid option does not exist. <br>
* Other specifications are same as delete(entity).
* @param productCategory The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull)
* @param opLambda The callback for option of delete for varying requests. (NotNull)
* @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found)
* @throws EntityDuplicatedException When the entity has been duplicated.
*/
public void varyingDelete(ProductCategory productCategory, WritableOptionCall<ProductCategoryCB, DeleteOption<ProductCategoryCB>> opLambda) {
doDelete(productCategory, createDeleteOption(opLambda));
}
// -----------------------------------------------------
// Batch Update
// ------------
/**
* Batch-insert the list with varying requests. <br>
* For example, disableCommonColumnAutoSetup()
* , disablePrimaryKeyIdentity(), limitBatchInsertLogging(). <br>
* Other specifications are same as batchInsert(entityList).
* @param productCategoryList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
* @param opLambda The callback for option of insert for varying requests. (NotNull)
* @return The array of updated count. (NotNull, EmptyAllowed)
*/
public int[] varyingBatchInsert(List<ProductCategory> productCategoryList, WritableOptionCall<ProductCategoryCB, InsertOption<ProductCategoryCB>> opLambda) {
return doBatchInsert(productCategoryList, createInsertOption(opLambda));
}
/**
* Batch-update the list with varying requests. <br>
* For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
* , disableCommonColumnAutoSetup(), limitBatchUpdateLogging(). <br>
* Other specifications are same as batchUpdate(entityList).
* @param productCategoryList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
* @param opLambda The callback for option of update for varying requests. (NotNull)
* @return The array of updated count. (NotNull, EmptyAllowed)
*/
public int[] varyingBatchUpdate(List<ProductCategory> productCategoryList, WritableOptionCall<ProductCategoryCB, UpdateOption<ProductCategoryCB>> opLambda) {
return doBatchUpdate(productCategoryList, createUpdateOption(opLambda));
}
/**
* Batch-delete the list with varying requests. <br>
* For example, limitBatchDeleteLogging(). <br>
* Other specifications are same as batchDelete(entityList).
* @param productCategoryList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull)
* @param opLambda The callback for option of delete for varying requests. (NotNull)
* @return The array of deleted count. (NotNull, EmptyAllowed)
*/
public int[] varyingBatchDelete(List<ProductCategory> productCategoryList, WritableOptionCall<ProductCategoryCB, DeleteOption<ProductCategoryCB>> opLambda) {
return doBatchDelete(productCategoryList, createDeleteOption(opLambda));
}
// -----------------------------------------------------
// Query Update
// ------------
/**
* Insert the several entities by query with varying requests (modified-only for fixed value). <br>
* For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br>
* Other specifications are same as queryInsert(entity, setupper).
* @param manyArgLambda The set-upper of query-insert. (NotNull)
* @param opLambda The callback for option of insert for varying requests. (NotNull)
* @return The inserted count.
*/
public int varyingQueryInsert(QueryInsertSetupper<ProductCategory, ProductCategoryCB> manyArgLambda, WritableOptionCall<ProductCategoryCB, InsertOption<ProductCategoryCB>> opLambda) {
return doQueryInsert(manyArgLambda, createInsertOption(opLambda));
}
/**
* Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl} <br>
* For example, self(selfCalculationSpecification), specify(updateColumnSpecification)
* , disableCommonColumnAutoSetup(), allowNonQueryUpdate(). <br>
* Other specifications are same as queryUpdate(entity, cb).
* <pre>
* <span style="color: #3F7E5E">// ex) you can update by self calculation values</span>
* ProductCategory productCategory = <span style="color: #70226C">new</span> ProductCategory();
* <span style="color: #3F7E5E">// you don't need to set PK value</span>
* <span style="color: #3F7E5E">//productCategory.setPK...(value);</span>
* productCategory.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span>
* <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span>
* <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span>
* <span style="color: #3F7E5E">//productCategory.setVersionNo(value);</span>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">varyingQueryUpdate</span>(productCategory, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().setFoo...
* }, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">op</span>.self(<span style="color: #553000">colCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">colCB</span>.specify().<span style="color: #CC4747">columnFooCount()</span>;
* }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span>
* });
* </pre>
* @param productCategory The entity that contains update values. (NotNull) {PrimaryKeyNotRequired}
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @param opLambda The callback for option of update for varying requests. (NotNull)
* @return The updated count.
* @throws NonQueryUpdateNotAllowedException When the query has no condition (if not allowed).
*/
public int varyingQueryUpdate(ProductCategory productCategory, CBCall<ProductCategoryCB> cbLambda, WritableOptionCall<ProductCategoryCB, UpdateOption<ProductCategoryCB>> opLambda) {
return doQueryUpdate(productCategory, createCB(cbLambda), createUpdateOption(opLambda));
}
/**
* Delete the several entities by query with varying requests non-strictly. <br>
* For example, allowNonQueryDelete(). <br>
* Other specifications are same as queryDelete(cb).
* <pre>
* <span style="color: #0000C0">productCategoryBhv</span>.<span style="color: #CC4747">queryDelete</span>(productCategory, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">cb</span>.query().setFoo...
* }, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">op</span>...
* });
* </pre>
* @param cbLambda The callback for condition-bean of ProductCategory. (NotNull)
* @param opLambda The callback for option of delete for varying requests. (NotNull)
* @return The deleted count.
* @throws NonQueryDeleteNotAllowedException When the query has no condition (if not allowed).
*/
public int varyingQueryDelete(CBCall<ProductCategoryCB> cbLambda, WritableOptionCall<ProductCategoryCB, DeleteOption<ProductCategoryCB>> opLambda) {
return doQueryDelete(createCB(cbLambda), createDeleteOption(opLambda));
}
// ===================================================================================
// OutsideSql
// ==========
/**
* Prepare the all facade executor of outside-SQL to execute it.
* <pre>
* <span style="color: #3F7E5E">// main style</span>
* productCategoryBhv.outideSql().selectEntity(pmb); <span style="color: #3F7E5E">// optional</span>
* productCategoryBhv.outideSql().selectList(pmb); <span style="color: #3F7E5E">// ListResultBean</span>
* productCategoryBhv.outideSql().selectPage(pmb); <span style="color: #3F7E5E">// PagingResultBean</span>
* productCategoryBhv.outideSql().selectPagedListOnly(pmb); <span style="color: #3F7E5E">// ListResultBean</span>
* productCategoryBhv.outideSql().selectCursor(pmb, handler); <span style="color: #3F7E5E">// (by handler)</span>
* productCategoryBhv.outideSql().execute(pmb); <span style="color: #3F7E5E">// int (updated count)</span>
* productCategoryBhv.outideSql().call(pmb); <span style="color: #3F7E5E">// void (pmb has OUT parameters)</span>
*
* <span style="color: #3F7E5E">// traditional style</span>
* productCategoryBhv.outideSql().traditionalStyle().selectEntity(path, pmb, entityType);
* productCategoryBhv.outideSql().traditionalStyle().selectList(path, pmb, entityType);
* productCategoryBhv.outideSql().traditionalStyle().selectPage(path, pmb, entityType);
* productCategoryBhv.outideSql().traditionalStyle().selectPagedListOnly(path, pmb, entityType);
* productCategoryBhv.outideSql().traditionalStyle().selectCursor(path, pmb, handler);
* productCategoryBhv.outideSql().traditionalStyle().execute(path, pmb);
*
* <span style="color: #3F7E5E">// options</span>
* productCategoryBhv.outideSql().removeBlockComment().selectList()
* productCategoryBhv.outideSql().removeLineComment().selectList()
* productCategoryBhv.outideSql().formatSql().selectList()
* </pre>
* <p>The invoker of behavior command should be not null when you call this method.</p>
* @return The new-created all facade executor of outside-SQL. (NotNull)
*/
public OutsideSqlAllFacadeExecutor<ProductCategoryBhv> outsideSql() {
return doOutsideSql();
}
// ===================================================================================
// Type Helper
// ===========
protected Class<? extends ProductCategory> typeOfSelectedEntity() { return ProductCategory.class; }
protected Class<ProductCategory> typeOfHandlingEntity() { return ProductCategory.class; }
protected Class<ProductCategoryCB> typeOfHandlingConditionBean() { return ProductCategoryCB.class; }
}
| [
"[email protected]"
] | |
a3af3c415725e0b04e858cc7369a0c98458adc2a | 8707b53e0c306d01c716a8f4ee58c262e17ecd8a | /B18Android/src/snake/Snake.java | 7b269fa6ea1fb144f44dae00cd0acd19d404d5c6 | [] | no_license | abdultanveer/b18java | a5840c77f36ffa2a5f442b0ad916ee71fd4fddab | 053c48f066e39fa0ae2c3425d03941478921b559 | refs/heads/master | 2020-05-04T18:22:17.334422 | 2019-04-23T17:38:41 | 2019-04-23T17:38:41 | 179,350,121 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 532 | java | package snake;
import basics.Student1;
public class Snake {
/**
* snake will move at the given speed
* @param speed
*/
public void move(int speed) {}
/**
* snake will turn in the given direction
* 1 = east, 2 = west, 3 = north, 4 = south
* @param direction
*/
public void turn(int direction) {
Student1.calculateAverage(15, 25, 35);
}
/**
* Snake eats the food and grows
*/
public void eat() {}
/**
* snake's length increases by one tile
*/
public void grow() {}
}
| [
"[email protected]"
] | |
b0ca57cb43317598d0eaa06c8122fe13308cd392 | 57c57725dfcba169a5fe6977a41a9045d8e47c72 | /src/main/java/nfrancois/poc/jerseyjaxbjsonguiceappengine/resource/DoubleHelloResource.java | 8503d62969fb5b18ef5273dafbb26f959c224c57 | [
"Beerware"
] | permissive | nfrancois/PocJerseyJaxBJsonGuiceAppEngine | 7cd1b171c90196b73ffce12cc70c576daf9d8c00 | 96d1ed165448c515bc201b3bfe0dc04a634f70a3 | refs/heads/master | 2016-09-08T02:40:38.363421 | 2011-08-19T23:40:19 | 2011-08-19T23:40:19 | 1,561,278 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 942 | java | package nfrancois.poc.jerseyjaxbjsonguiceappengine.resource;
import java.util.ArrayList;
import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import nfrancois.poc.jerseyjaxbjsonguiceappengine.model.Hello;
import nfrancois.poc.jerseyjaxbjsonguiceappengine.service.HelloService;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@Path("doublehello")
@Singleton
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public class DoubleHelloResource {
@Inject
private HelloService helloService;
@GET
@Path("/{name}")
public List<Hello> reply(@PathParam("name") String name){
List<Hello> hellos = new ArrayList<Hello>();
hellos.add(helloService.saysHelloToSomeone(name));
hellos.add(helloService.saysHelloToSomeone(name));
return hellos;
}
}
| [
"[email protected]"
] | |
83f6bf23c879f96ad68b782c74c313a15863910a | 615edc20afa7c5a0df5db6c828d5384b4ceeec13 | /CT25-DataPack/dist/game/data/scripts/quests/Q00617_GatherTheFlames/Q00617_GatherTheFlames.java | 15c4a13af1c30f5c2d58aa1d6810f287b70132a1 | [] | no_license | l2jmaximun/Freya | 7e40d4bce9a1b7837bbbe5c3bf6601a03c023fe9 | 5dc44b1a8048b9658a7e27b83eef2ea06268898a | refs/heads/master | 2021-08-30T19:31:24.630211 | 2017-12-19T05:57:16 | 2017-12-19T05:57:16 | 114,718,987 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,192 | java | /*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00617_GatherTheFlames;
import java.util.HashMap;
import java.util.Map;
import ct25.xtreme.gameserver.model.actor.L2Npc;
import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance;
import ct25.xtreme.gameserver.model.quest.Quest;
import ct25.xtreme.gameserver.model.quest.QuestState;
/**
* Gather the Flames (617)
* @author malyelfik
*/
public class Q00617_GatherTheFlames extends Quest
{
// NPCs
private static final int HILDA = 31271;
private static final int VULCAN = 31539;
private static final int ROONEY = 32049;
// Item
private static final int TORCH = 7264;
// Reward
private static final int[] REWARD =
{
6881,
6883,
6885,
6887,
6891,
6893,
6895,
6897,
6899,
7580
};
// Monsters
private static final Map<Integer, Integer> MOBS = new HashMap<>();
static
{
MOBS.put(22634, 639);
MOBS.put(22635, 611);
MOBS.put(22636, 649);
MOBS.put(22637, 639);
MOBS.put(22638, 639);
MOBS.put(22639, 645);
MOBS.put(22640, 559);
MOBS.put(22641, 588);
MOBS.put(22642, 537);
MOBS.put(22643, 618);
MOBS.put(22644, 633);
MOBS.put(22645, 550);
MOBS.put(22646, 593);
MOBS.put(22647, 688);
MOBS.put(22648, 632);
MOBS.put(22649, 685);
}
public Q00617_GatherTheFlames(final int questId, final String name, final String descr)
{
super(questId, name, descr);
addStartNpc(HILDA, VULCAN);
addTalkId(ROONEY, HILDA, VULCAN);
for (final int id : MOBS.keySet())
super.addKillId(id);
registerQuestItems(TORCH);
}
@Override
public String onAdvEvent(final String event, final L2Npc npc, final L2PcInstance player)
{
final QuestState st = player.getQuestState(getName());
if (st == null)
return getNoQuestMsg(player);
String htmltext = event;
switch (event)
{
case "31539-03.htm":
case "31271-03.htm":
st.startQuest();
break;
case "32049-02.html":
case "31539-04.html":
case "31539-06.html":
break;
case "31539-07.html":
if (st.getQuestItemsCount(TORCH) < 1000 || !st.isStarted())
return getNoQuestMsg(player);
st.giveItems(REWARD[getRandom(REWARD.length)], 1);
st.takeItems(TORCH, 1000);
break;
case "31539-08.html":
st.exitQuest(true, true);
break;
case "6883":
case "6885":
case "7580":
case "6891":
case "6893":
case "6895":
case "6897":
case "6899":
if (st.getQuestItemsCount(TORCH) < 1200 || !st.isStarted())
return getNoQuestMsg(player);
st.giveItems(Integer.valueOf(event), 1);
st.takeItems(TORCH, 1200);
htmltext = "32049-04.html";
break;
case "6887":
case "6881":
if (st.getQuestItemsCount(TORCH) < 1200 || !st.isStarted())
return getNoQuestMsg(player);
st.giveItems(Integer.valueOf(event), 1);
st.takeItems(TORCH, 1200);
htmltext = "32049-03.html";
break;
default:
htmltext = null;
break;
}
return htmltext;
}
@Override
public String onKill(final L2Npc npc, final L2PcInstance player, final boolean isPet)
{
final L2PcInstance partyMember = getRandomPartyMember(player, 1);
if (partyMember == null)
return super.onKill(npc, player, isPet);
final QuestState st = partyMember.getQuestState(getName());
if (getRandom(1000) < MOBS.get(npc.getId()))
st.giveItems(TORCH, 2);
else
st.giveItems(TORCH, 1);
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
return super.onKill(npc, player, isPet);
}
@Override
public String onTalk(final L2Npc npc, final L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = player.getQuestState(getName());
if (st == null)
return htmltext;
switch (npc.getId())
{
case ROONEY:
if (st.isStarted())
htmltext = st.getQuestItemsCount(TORCH) >= 1200 ? "32049-02.html" : "32049-01.html";
break;
case VULCAN:
if (st.isCreated())
htmltext = player.getLevel() >= 74 ? "31539-01.htm" : "31539-02.htm";
else
htmltext = st.getQuestItemsCount(TORCH) >= 1000 ? "31539-04.html" : "31539-05.html";
break;
case HILDA:
if (st.isCreated())
htmltext = player.getLevel() >= 74 ? "31271-01.htm" : "31271-02.htm";
else
htmltext = "31271-04.html";
break;
}
return htmltext;
}
public static void main(final String[] args)
{
new Q00617_GatherTheFlames(617, Q00617_GatherTheFlames.class.getSimpleName(), "Gather the Flames");
}
} | [
"Rener@Rener-PC"
] | Rener@Rener-PC |
59ef695500664a4d8add2f934f4b01655b165f8d | ed3f6fc8e3c3025592b7e64bc6aee5a2662719e0 | /src/br/com/zup/ServiceVendedor.java | 70ba0199bffbd418679bfc92963d553318454172 | [] | no_license | yan-rds/DesafioModulo3 | 9c4d619fd7d6f8ae093dd42883b7f958a32d8a7e | e449200ed5b11a98dd0988c6bd7b27776cd849b9 | refs/heads/main | 2023-08-12T16:11:28.116624 | 2021-10-11T16:11:18 | 2021-10-11T16:11:18 | 415,020,194 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,269 | java | package br.com.zup;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
public class ServiceVendedor {
// Esta classe possuirá os métodos referentes à manipulação e gerenciamento dos objetos Vendedor
private static List<Vendedor> listaDeVendedor = new ArrayList<>(); // Lista de vendedores cadastrados
// Este método criará um objeto vendedor baseado nos parâmetros dados pelo Sistema e o adicionará à lista.
public static void cadastrarVendedor(String nome, String cpf, String email){
Vendedor vendedor = new Vendedor(nome, cpf, email);
listaDeVendedor.add(vendedor);
System.out.println("Vendedor cadastrado\nNome: " + vendedor);
}
// Este método procura o Vendedor que possui o email que é passado como parâmetro, assim que o encontra, ele o retorna.
public static Vendedor encontrarVendedorPeloEmail (String email) throws Exception{
for (Vendedor referencia : listaDeVendedor) {
if (referencia.getEmail().equalsIgnoreCase(email)) {
return referencia;
}
}
throw new Exception("Não existe um vendedor cadastrado com este email");
}
// Este método lista todos os vendedores cadastrados atráves de referência de método, caso não haja, uma exceção é criada.
public static void listarVendedoresCadastrados() throws Exception {
System.out.println("Vendedores cadastrados: ");
listaDeVendedor.forEach(System.out::println);
listaDeVendedor.stream().findFirst().orElseThrow(() -> new Exception("Não há."));
}
// Este método utiliza a function Predicate para identificar cadastros duplicados. Caso haja, uma exceção é criada.
public static void verificarDuplicidadeNoCadastro(String cpfOuEmail) throws Exception{
Predicate <Vendedor> emailDuplicado = Vendedor -> Vendedor.getEmail().equalsIgnoreCase(cpfOuEmail);
Predicate <Vendedor> cpfDuplicado = Vendedor -> Vendedor.getCpf().equalsIgnoreCase(cpfOuEmail);
if (listaDeVendedor.stream().anyMatch(emailDuplicado) | listaDeVendedor.stream().anyMatch(cpfDuplicado)){
throw new Exception("Já existe um vendedor com este dado cadastrado.");
}
}
}
| [
"[email protected]"
] | |
5cc44a58d9c7e7aad3d6cb32f45a4128ba5a61be | 9c717bf635f994cac440cff7153b9f92b605c831 | /src/main/java/org/mycontroller/standalone/db/tables/FirmwareType.java | 03e08720348fa89f8ca0ea4674db06ede72e489e | [
"Apache-2.0"
] | permissive | arturmon/mycontroller | c3122254fe3abdb7552b03fe1a78a24718bbef61 | 8a945c4f15cdebaec0a26137f2a631f6e6cfae17 | refs/heads/master | 2020-12-25T23:56:39.588646 | 2015-11-22T00:49:30 | 2015-11-22T00:49:30 | 43,523,710 | 2 | 0 | null | 2016-12-06T07:53:16 | 2015-10-01T22:05:09 | Java | UTF-8 | Java | false | false | 1,760 | java | /**
* Copyright (C) 2015 Jeeva Kandasamy ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mycontroller.standalone.db.tables;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
/**
* @author Jeeva Kandasamy (jkandasa)
* @since 0.0.1
*/
@DatabaseTable(tableName = "firmware_type")
@JsonIgnoreProperties(ignoreUnknown = true)
public class FirmwareType {
public FirmwareType() {
}
public FirmwareType(int id) {
this.id = id;
}
@DatabaseField(generatedId = true, allowGeneratedIdInsert = true)
private Integer id;
@DatabaseField(canBeNull = false, unique = true)
private String name;
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setId(Integer id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Id:").append(this.id);
builder.append(", Name:").append(this.name);
return builder.toString();
}
}
| [
"[email protected]"
] | |
bcb078fb7da2886f6e7aa14a921a3ce23940b5a7 | 9e464a9802eb8ae09079f420df8389d6da66d108 | /javaApi/src/dao/baglanti.java | 5c785e2326e9a3545cff142e55e05862b2268cea | [] | no_license | beytullah01/javaApi | a1689928621ec9403bdc1c63c65056c8ce53f033 | e111e5df9a2da636491272822c1d101897a707db | refs/heads/main | 2023-07-31T04:15:06.587864 | 2021-09-16T16:26:08 | 2021-09-16T16:26:08 | 353,032,145 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 801 | java | package dao;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import javax.sql.DataSource;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
public class baglanti {
public DataSource getMySQLDataSource() {
Properties props=new Properties();
InputStream is=getClass().getClassLoader().getResourceAsStream("db.properties");
MysqlDataSource mySQLDataSource=null;
try {
props.load(is);
mySQLDataSource =new MysqlDataSource();
mySQLDataSource.setURL(props.getProperty("url"));
mySQLDataSource.setUser(props.getProperty("username"));
mySQLDataSource.setPassword(props.getProperty("password"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return mySQLDataSource;
}
}
| [
"[email protected]"
] | |
8be262eb38bfc4298a617d54a1b63d2e612c88dc | 6aca06021f3f9465b309edcaf51f8b1aa91caca6 | /src/com/creating/dao/mapper/entity/basic/TreeNodeEty.java | 666d49d21e138d07d8f3f3972785fb9b36ed8816 | [] | no_license | bailu0309/stoms | e703b32b3faa8e3eac55e247b77c73ea8253432a | 311a1114c967e51a5bf2f383737e69106099808d | refs/heads/master | 2021-10-16T08:13:56.190757 | 2019-02-09T11:19:19 | 2019-02-09T11:19:19 | 164,053,949 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,735 | java | package com.creating.dao.mapper.entity.basic;
import java.util.List;
/**
* @Author mabailu
* @Date 2018/2/26 15:01
* @Description
*/
public class TreeNodeEty {
private String id;//ID
private String node;//ID
private String name;//菜单名称
private String text;//菜单名称
private boolean leaf;//是否为子节点
private String codeid;//
private String depid;//
private String personid;//
public String getDepid() {
return depid;
}
public void setDepid(String depid) {
this.depid = depid;
}
public String getPersonid() {
return personid;
}
public void setPersonid(String personid) {
this.personid = personid;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
private List<TreeNodeEty> children;//子节点
public String getNode() {
return node;
}
public void setNode(String node) {
this.node = node;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isLeaf() {
return leaf;
}
public void setLeaf(boolean leaf) {
this.leaf = leaf;
}
public String getCodeid() {
return codeid;
}
public void setCodeid(String codeid) {
this.codeid = codeid;
}
public List<TreeNodeEty> getChildren() {
return children;
}
public void setChildren(List<TreeNodeEty> children) {
this.children = children;
}
}
| [
"[email protected]"
] | |
bc0688943ab35c887249919325ddc417b8aebc2f | 05ff608e3c39f63d7dd2c6e6eee20e8c3864eee8 | /src/com/ekids/javaintermediate2020fall/lesson3/Main.java | 029d046f06e70ee552ab50371d85cc35b76636a8 | [] | no_license | melchior-by/java-intermediate-2020-fall | ddfa121edb3e260643bfa239a7b818799e93679f | 7ff4a07267b1bab437917f975526ad77987197a1 | refs/heads/master | 2023-01-24T02:34:50.436329 | 2020-12-13T10:32:15 | 2020-12-13T10:32:15 | 299,032,364 | 0 | 0 | null | 2020-12-14T06:41:23 | 2020-09-27T12:57:30 | Java | UTF-8 | Java | false | false | 2,687 | java | package com.ekids.javaintermediate2020fall.lesson3;
//ДЗ - продемонстрировать инкапсуляцию, наследование и полиморфизм в своих классах
public class Main {
public static void main(String[] args) {
//Java - object oriented language
// значит Java реализует понятия:
// инкапсуляция - сокрытие данных и предоставление возможности обращаться к ним через методы того же класса.
// наследование - предоставление возможности наследования одной сущности от другой.
// 1. class extends class
// полиморфизм - возможность применения одноименных методов в одном классе или в группе классов, связанных отношением наследования
// 1. if class extends class, then - we can override(переопределить) methods
// 2. we can create 2 methods with different parameters - overload(перегрузка) - можем создать несколько методов с
// одинаковым названием и разным числом/типом параметров
// мы можем придать дополнительные свойства классам, но тогда придется переделывать иерархию классов
// выход - использовать интерфейсы
//тип ссылки тип объекта
DevelopedCountry japan2020 = new Japan("Nihongo", 5_888_000_000_000.0, 125_960_000);
japan2020.isCool();
japan2020.isPopular();
// приведение переменной к типу
System.out.println(((Country) japan2020).getGDP());
//String abc = ((Integer) japan2020).toHexString(10); - не работает
System.out.println("\n///////////////////////////////////////////");
Japan japan1990 = new Japan("Nihongo", 4_888_000.0, 130_960_000);
japan1990.printRating(83.2);
japan1990.isAnime();
japan1990.isCool();
japan1990.isPopular();
System.out.println("\n///////////////////////////////////////////");
Country japan1900 = new Japan("Nihongo", 5_888_000.0, 65_960_000);
japan1900.printRating(55.2);
((Japan) japan1900).isAnime();
System.out.println(japan1900.toString());
}
}
| [
"[email protected]"
] | |
7356e1f75abdf14835e7f2890726ca05b73b3d20 | 15b9f896be915410e399ff43ca946a26b841f27a | /HotelReservation.java | d1b4e8220bea9b559e9e8c78f63b30b43e99a5b9 | [] | no_license | PaulPritam/Hotel-Reservation | 7efad8dc2d5893c375045c1502e591eed4d729e6 | f6f5111a3f8360744eea2637a5a85aba0f519f2a | refs/heads/master | 2023-04-13T15:45:07.060471 | 2021-04-16T20:12:24 | 2021-04-16T20:12:24 | 358,384,047 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,191 | java | package com.hotelreservation;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class HotelReservation {
public static void main(String[] args) throws ParseException {
int weekendCounter =0;
int weekdayCounter =0;
int calculateLakewood=0;
int calculateBridgewood =0;
int calculateRidgewood=0;
Hotels lakewoodHotel = new Hotels();
lakewoodHotel.setHotelName("Lakewood");
lakewoodHotel.setRegularWeekdayRates(110);
lakewoodHotel.setRegularWeekendRates(90);
lakewoodHotel.setHotelRatings(3);
Hotels bridgewoodHotel = new Hotels();
bridgewoodHotel.setHotelName("Bridgewood");
bridgewoodHotel.setRegularWeekdayRates(160);
bridgewoodHotel.setRegularWeekendRates(60);
bridgewoodHotel.setHotelRatings(4);
Hotels ridgewoodHotel = new Hotels();
ridgewoodHotel.setHotelName("Ridgewood");
ridgewoodHotel.setRegularWeekdayRates(220);
ridgewoodHotel.setRegularWeekendRates(150);
ridgewoodHotel.setHotelRatings(5);
System.out.println("Welcome to Hotel Reservation Program ");
System.out.println("Enter the number of days you want to stay ");
Scanner inputDays = new Scanner(System.in);
int numberOfDays = inputDays.nextInt();
System.out.println("Enter the dates you wish to book a hotel");
for (int i = 1; i <=numberOfDays ; i++)
{
Scanner inputdate = new Scanner(System.in);
String date = inputdate.next();
String month = inputdate.next();
String year = inputdate.next();
String inputDateStr = String.format("%s/%s/%s", date,month,year);
Date inputDate = new SimpleDateFormat("dd/MM/yyyy").parse(inputDateStr);
Calendar calendar = Calendar.getInstance();
calendar.setTime(inputDate);
String dayOfWeek = calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.US).toUpperCase();
System.out.println(dayOfWeek);
if (dayOfWeek.equals("SATURDAY") || dayOfWeek.equals("SUNDAY"))
{
weekendCounter++;
}
else
{
weekdayCounter++;
}
}
calculateLakewood = (weekdayCounter*lakewoodHotel.regularWeekdayRates) + (weekendCounter*lakewoodHotel.getRegularWeekendRates());
calculateBridgewood = (weekdayCounter*bridgewoodHotel.regularWeekdayRates) + (weekendCounter*bridgewoodHotel.getRegularWeekendRates());
calculateRidgewood = (weekdayCounter*ridgewoodHotel.regularWeekdayRates) + (weekendCounter*ridgewoodHotel.getRegularWeekendRates());
if (calculateLakewood < calculateBridgewood && calculateLakewood <calculateRidgewood)
{
System.out.println("The cheapest hotel for you is " +lakewoodHotel.getHotelName() +" Total Rates $" +calculateLakewood);
}
else if (calculateBridgewood < calculateLakewood && calculateBridgewood < calculateRidgewood)
{
System.out.println("The cheapest hotel for you is " +bridgewoodHotel.getHotelName() +" Total Rates $" +calculateBridgewood);
}
else
{
System.out.println("The cheapest hotel for you is " +ridgewoodHotel.getHotelName() +" Total Rates $" +calculateRidgewood);
}
if (lakewoodHotel.getHotelRatings() > bridgewoodHotel.getHotelRatings() && lakewoodHotel.getHotelRatings() > ridgewoodHotel.getHotelRatings())
{
System.out.println("Best rated hotel is " +lakewoodHotel.getHotelName() +" Total Rates $" +calculateLakewood);
}
else if (bridgewoodHotel.getHotelRatings() > lakewoodHotel.getHotelRatings() && bridgewoodHotel.getHotelRatings() > ridgewoodHotel.getHotelRatings())
{
System.out.println("Best rated hotel is " +bridgewoodHotel.getHotelName() +" Total Rates $" +calculateBridgewood);
}
else
{
System.out.println("Best rated hotel is " +ridgewoodHotel.getHotelName() +" Total Rates $" +calculateRidgewood);
}
}
}
| [
"[email protected]"
] | |
45305b7e5d7f6f25b9b2f9bd75e013cbfff6bb9e | 858761a5810934c51cb0987903f3f97f161bc4a6 | /branches/SAK-8908/kernel-impl/src/main/java/org/sakaiproject/authz/impl/DbAuthzGroupSqlMySql.java | 4cb9fe044bcf2bdfa0d6054718b94a8fe6a7102e | [] | no_license | svn2github/sakai-kernel | f10821d51e39651788c97e1d2739f762c25e79de | 2b97c9b7ad53becc8de57a5233c7d35873edd10d | refs/heads/master | 2020-04-14T21:44:05.973159 | 2014-12-23T21:38:01 | 2014-12-23T21:38:01 | 10,166,725 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,332 | java | /**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/authz/trunk/authz-api/api/src/java/org/sakaiproject/authz/api/AuthzGroup.java $
* $Id: AuthzGroup.java 7063 2006-03-27 17:46:13Z [email protected] $
***********************************************************************************
*
* Copyright 2007, 2008 Sakai Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.osedu.org/licenses/ECL-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************************/
package org.sakaiproject.authz.impl;
import java.util.Collection;
/**
* methods for accessing authz data in a mysql database.
*/
public class DbAuthzGroupSqlMySql extends DbAuthzGroupSqlDefault
{
/**
* returns the sql statement to delete the realm functions from the sakai_realm_rl_fn table for a given realm id..
*/
public String getDeleteRealmRoleFunction()
{
return "delete SAKAI_REALM_RL_FN from SAKAI_REALM_RL_FN inner join SAKAI_REALM on SAKAI_REALM_RL_FN.REALM_KEY = SAKAI_REALM.REALM_KEY where REALM_ID = ?";
}
/**
* returns the sql statement to delete the realm groups from the sakai_realm_rl_gr table for a given realm id.
*/
public String getDeleteRealmRoleGroup()
{
return "delete SAKAI_REALM_RL_GR from SAKAI_REALM_RL_GR inner join SAKAI_REALM on SAKAI_REALM_RL_GR.REALM_KEY = SAKAI_REALM.REALM_KEY where REALM_ID = ?";
}
/**
* returns the sql statement to delete the realm providers from the sakai_realm_provider table for a given realm id.
*/
public String getDeleteRealmProvider()
{
return "delete SAKAI_REALM_PROVIDER from SAKAI_REALM_PROVIDER inner join SAKAI_REALM on SAKAI_REALM_PROVIDER.REALM_KEY = SAKAI_REALM.REALM_KEY where REALM_ID = ?";
}
/**
* returns the sql statement to write a row into the sakai_function_role table.
*/
public String getInsertRealmFunctionSql()
{
return "insert into SAKAI_REALM_FUNCTION (FUNCTION_KEY, FUNCTION_NAME) values (DEFAULT, ?)";
}
/**
* returns the sql statement to write a row into the sakai_realm_role table.
*/
public String getInsertRealmRoleSql()
{
return "insert into SAKAI_REALM_ROLE (ROLE_KEY, ROLE_NAME) values (DEFAULT, ?)";
}
public String getDeleteRealmRoleFunction1Sql()
{
return "DELETE RRF FROM SAKAI_REALM_RL_FN RRF" + " INNER JOIN SAKAI_REALM R ON RRF.REALM_KEY = R.REALM_KEY AND R.REALM_ID = ?"
+ " INNER JOIN SAKAI_REALM_ROLE RR ON RRF.ROLE_KEY = RR.ROLE_KEY AND RR.ROLE_NAME = ?"
+ " INNER JOIN SAKAI_REALM_FUNCTION RF ON RRF.FUNCTION_KEY = RF.FUNCTION_KEY AND RF.FUNCTION_NAME = ?";
}
public String getDeleteRealmRoleGroup1Sql()
{
return "DELETE RRG FROM SAKAI_REALM_RL_GR RRG" + " INNER JOIN SAKAI_REALM R ON RRG.REALM_KEY = R.REALM_KEY AND R.REALM_ID = ?"
+ " INNER JOIN SAKAI_REALM_ROLE RR ON RRG.ROLE_KEY = RR.ROLE_KEY AND RR.ROLE_NAME = ?"
+ " WHERE RRG.USER_ID = ? AND RRG.ACTIVE = ? AND RRG.PROVIDED = ?";
}
public String getDeleteRoleDescriptionSql()
{
return "DELETE RRD FROM SAKAI_REALM_ROLE_DESC RRD" + " INNER JOIN SAKAI_REALM R ON RRD.REALM_KEY = R.REALM_KEY AND R.REALM_ID = ?"
+ " INNER JOIN SAKAI_REALM_ROLE RR ON RRD.ROLE_KEY = RR.ROLE_KEY AND RR.ROLE_NAME = ?";
}
public String getDeleteRealmRoleFunction2Sql()
{
return "DELETE SAKAI_REALM_RL_FN FROM SAKAI_REALM_RL_FN INNER JOIN SAKAI_REALM ON SAKAI_REALM_RL_FN.REALM_KEY = SAKAI_REALM.REALM_KEY AND SAKAI_REALM.REALM_ID = ?";
}
public String getDeleteRealmRoleGroup2Sql()
{
return "DELETE SAKAI_REALM_RL_GR FROM SAKAI_REALM_RL_GR INNER JOIN SAKAI_REALM ON SAKAI_REALM_RL_GR.REALM_KEY = SAKAI_REALM.REALM_KEY AND SAKAI_REALM.REALM_ID = ?";
}
public String getDeleteRealmProvider1Sql()
{
return "DELETE SAKAI_REALM_PROVIDER FROM SAKAI_REALM_PROVIDER INNER JOIN SAKAI_REALM ON SAKAI_REALM_PROVIDER.REALM_KEY = SAKAI_REALM.REALM_KEY AND SAKAI_REALM.REALM_ID = ?";
}
public String getDeleteRealmRoleDescription2Sql()
{
return "DELETE SAKAI_REALM_ROLE_DESC FROM SAKAI_REALM_ROLE_DESC INNER JOIN SAKAI_REALM ON SAKAI_REALM_ROLE_DESC.REALM_KEY = SAKAI_REALM.REALM_KEY AND SAKAI_REALM.REALM_ID = ?";
}
public String getCountRealmRoleFunctionSql(String anonymousRole, String authorizationRole, boolean authorized, String inClause)
{
return "select count(1) from SAKAI_REALM_RL_FN,SAKAI_REALM force index "
+ "(AK_SAKAI_REALM_ID) where SAKAI_REALM_RL_FN.REALM_KEY = SAKAI_REALM.REALM_KEY " + "and " + inClause
+ getCountRealmRoleFunctionEndSql(anonymousRole, authorizationRole, authorized, inClause);
}
public String getSelectRealmRoleGroupUserIdSql(String inClause1, String inClause2)
{
StringBuilder sqlBuf = new StringBuilder();
sqlBuf.append("select SRRG.USER_ID ");
sqlBuf.append("from SAKAI_REALM_RL_GR SRRG ");
sqlBuf.append("inner join SAKAI_REALM SR force index (AK_SAKAI_REALM_ID) ON SRRG.REALM_KEY = SR.REALM_KEY ");
sqlBuf.append("where " + inClause1 + " ");
sqlBuf.append("and SRRG.ACTIVE = '1' ");
sqlBuf.append("and SRRG.ROLE_KEY in ");
sqlBuf.append("(select SRRF.ROLE_KEY ");
sqlBuf.append("from SAKAI_REALM_RL_FN SRRF ");
sqlBuf.append("inner join SAKAI_REALM_FUNCTION SRF ON SRRF.FUNCTION_KEY = SRF.FUNCTION_KEY ");
sqlBuf.append("inner join SAKAI_REALM SR1 force index (AK_SAKAI_REALM_ID) ON SRRF.REALM_KEY = SR1.REALM_KEY ");
sqlBuf.append("where SRF.FUNCTION_NAME = ? ");
sqlBuf.append("and " + inClause2 + ")");
return sqlBuf.toString();
}
public String getDeleteRealmRoleGroup4Sql()
{
return "DELETE SAKAI_REALM_RL_GR FROM SAKAI_REALM_RL_GR INNER JOIN SAKAI_REALM ON SAKAI_REALM_RL_GR.REALM_KEY = SAKAI_REALM.REALM_KEY AND SAKAI_REALM.REALM_ID = ? WHERE SAKAI_REALM_RL_GR.USER_ID = ?";
}
}
| [
"[email protected]@66ffb92e-73f9-0310-93c1-f5514f145a0a"
] | [email protected]@66ffb92e-73f9-0310-93c1-f5514f145a0a |
415940d0cc9af057d0c881fbebac4d19c46bff98 | 0a4ba0ed8b4364946067b30aabca01f4bb7b2a04 | /app/src/main/java/com/example/asus/pokedex/SkinsFragment.java | 19a722d3584eb402bea97dc024595c51c31785a1 | [] | no_license | relativokobe/PokeDex | f1d806557f3b9733a1a10534f4795ca562396b1b | 09ab984fc67d6b432e72b9ffbef8624e933aacec | refs/heads/master | 2020-12-02T17:50:49.959845 | 2017-07-07T07:43:36 | 2017-07-07T07:43:36 | 96,439,194 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,035 | java | package com.example.asus.pokedex;
import android.app.Dialog;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.media.Image;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.bumptech.glide.Glide;
import org.json.JSONException;
import org.json.JSONObject;
/**
* A simple {@link Fragment} subclass.
*/
public class SkinsFragment extends DialogFragment {
ImageView front, back, frontShiny, backShiny;
public SkinsFragment() {
// Required empty public constructor
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
RelativeLayout root = new RelativeLayout(getActivity());
root.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
final Dialog dialog = new Dialog(getActivity());
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(root);
// dialog.getWindow().setBackgroundDrawableResource();
dialog.getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
return dialog;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_skins, container, false);
front = (ImageView)view.findViewById(R.id.front);
back = (ImageView)view.findViewById(R.id.back);
frontShiny = (ImageView)view.findViewById(R.id.shinyFront);
backShiny = (ImageView)view.findViewById(R.id.shinyBack);
int num=0;
String name;
setStyle(STYLE_NO_TITLE,0);
if(getArguments()!=null){
num = getArguments().getInt("number");
name = getArguments().getString("name");
getDialog().hide();
getDialog().dismiss();
insertImages(num);
}
return view;
}
public void insertImages(int num){
RequestQueue requestQueue;
requestQueue = Volley.newRequestQueue(getContext());
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, "https://pokeapi.co/api/v2/pokemon-form/" + num + "/", new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
try {
JSONObject sprites = response.getJSONObject("sprites");
String frontS = sprites.getString("front_default");
String backS = sprites.getString("back_default");
String front_shinyS = sprites.getString("front_shiny");
String back_shinyS = sprites.getString("back_shiny");
Glide.with(getContext()).load(frontS).into(front);
Glide.with(getContext()).load(backS).into(back);
Glide.with(getContext()).load(front_shinyS).into(frontShiny);
Glide.with(getContext()).load(back_shinyS).into(backShiny);
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}
);
requestQueue.add(jsonObjectRequest);
}
}
| [
"[email protected]"
] | |
3bed568a6d6add6a15252a5278c527fa7881546b | 550b81a0ddc89e96b90a1ec924c04d7afc1e42ab | /model/src/main/java/com/demo/Doctor.java | c7c80d30585f28fc78f4f4d2ff75962ef89a8a97 | [] | no_license | liumaoxiansheng/spring_cloud_start | ed2eab460651ddc71731467ac55b30c02bb3fda2 | b86db370d5d790d7b0dfc7067333c33f17a28ef0 | refs/heads/master | 2021-07-20T16:47:28.967515 | 2021-07-14T02:04:18 | 2021-07-14T02:04:18 | 187,597,526 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package com.demo;
import lombok.Data;
/**
* @author tianhuan
* @ClassName:Doctor
* @Description:
* @date 2019/5/8 - 19:01
*/
@Data
public class Doctor {
private String doctorName;
private String doctorJob;
private Integer doctorId;
}
| [
"[email protected]"
] | |
ca50d42c7674535967f511246da96bea310f67d6 | 673444711ba30d38c9e1faa7a72298c7c147e00e | /Cosmos-Android/app/src/main/java/starnamed/x/wasm/v1beta1/Tx.java | 42fc7f7323889f8fbe5895cc840a7c7afc20f4ed | [
"MIT"
] | permissive | cosmostation/cosmostation-mobile | edc3e893781b48eef0c56ae32861595218b9d24c | 8d6422c595819ff2195bfda8c5b3d82548c09736 | refs/heads/master | 2022-05-05T00:23:11.467892 | 2021-11-01T06:49:13 | 2021-11-01T06:49:13 | 193,687,977 | 100 | 44 | MIT | 2021-10-31T16:25:30 | 2019-06-25T10:38:34 | Swift | UTF-8 | Java | false | true | 366,064 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cosmwasm/wasm/v1beta1/tx.proto
package starnamed.x.wasm.v1beta1;
public final class Tx {
private Tx() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface MsgStoreCodeOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgStoreCode)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
java.lang.String getSender();
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
com.google.protobuf.ByteString
getSenderBytes();
/**
* <pre>
* WASMByteCode can be raw or gzip compressed
* </pre>
*
* <code>bytes wasm_byte_code = 2 [(.gogoproto.customname) = "WASMByteCode"];</code>
* @return The wasmByteCode.
*/
com.google.protobuf.ByteString getWasmByteCode();
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return The source.
*/
java.lang.String getSource();
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return The bytes for source.
*/
com.google.protobuf.ByteString
getSourceBytes();
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return The builder.
*/
java.lang.String getBuilder();
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return The bytes for builder.
*/
com.google.protobuf.ByteString
getBuilderBytes();
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
* @return Whether the instantiatePermission field is set.
*/
boolean hasInstantiatePermission();
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
* @return The instantiatePermission.
*/
starnamed.x.wasm.v1beta1.Types.AccessConfig getInstantiatePermission();
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder getInstantiatePermissionOrBuilder();
}
/**
* <pre>
* MsgStoreCode submit Wasm code to the system
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgStoreCode}
*/
public static final class MsgStoreCode extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgStoreCode)
MsgStoreCodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgStoreCode.newBuilder() to construct.
private MsgStoreCode(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgStoreCode() {
sender_ = "";
wasmByteCode_ = com.google.protobuf.ByteString.EMPTY;
source_ = "";
builder_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgStoreCode();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgStoreCode(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
sender_ = s;
break;
}
case 18: {
wasmByteCode_ = input.readBytes();
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
source_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
builder_ = s;
break;
}
case 42: {
starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder subBuilder = null;
if (instantiatePermission_ != null) {
subBuilder = instantiatePermission_.toBuilder();
}
instantiatePermission_ = input.readMessage(starnamed.x.wasm.v1beta1.Types.AccessConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(instantiatePermission_);
instantiatePermission_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.class, starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.Builder.class);
}
public static final int SENDER_FIELD_NUMBER = 1;
private volatile java.lang.Object sender_;
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
@java.lang.Override
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WASM_BYTE_CODE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString wasmByteCode_;
/**
* <pre>
* WASMByteCode can be raw or gzip compressed
* </pre>
*
* <code>bytes wasm_byte_code = 2 [(.gogoproto.customname) = "WASMByteCode"];</code>
* @return The wasmByteCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getWasmByteCode() {
return wasmByteCode_;
}
public static final int SOURCE_FIELD_NUMBER = 3;
private volatile java.lang.Object source_;
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return The source.
*/
@java.lang.Override
public java.lang.String getSource() {
java.lang.Object ref = source_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
source_ = s;
return s;
}
}
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return The bytes for source.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSourceBytes() {
java.lang.Object ref = source_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUILDER_FIELD_NUMBER = 4;
private volatile java.lang.Object builder_;
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return The builder.
*/
@java.lang.Override
public java.lang.String getBuilder() {
java.lang.Object ref = builder_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
builder_ = s;
return s;
}
}
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return The bytes for builder.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBuilderBytes() {
java.lang.Object ref = builder_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
builder_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTANTIATE_PERMISSION_FIELD_NUMBER = 5;
private starnamed.x.wasm.v1beta1.Types.AccessConfig instantiatePermission_;
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
* @return Whether the instantiatePermission field is set.
*/
@java.lang.Override
public boolean hasInstantiatePermission() {
return instantiatePermission_ != null;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
* @return The instantiatePermission.
*/
@java.lang.Override
public starnamed.x.wasm.v1beta1.Types.AccessConfig getInstantiatePermission() {
return instantiatePermission_ == null ? starnamed.x.wasm.v1beta1.Types.AccessConfig.getDefaultInstance() : instantiatePermission_;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
@java.lang.Override
public starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder getInstantiatePermissionOrBuilder() {
return getInstantiatePermission();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getSenderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_);
}
if (!wasmByteCode_.isEmpty()) {
output.writeBytes(2, wasmByteCode_);
}
if (!getSourceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_);
}
if (!getBuilderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, builder_);
}
if (instantiatePermission_ != null) {
output.writeMessage(5, getInstantiatePermission());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSenderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_);
}
if (!wasmByteCode_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, wasmByteCode_);
}
if (!getSourceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_);
}
if (!getBuilderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, builder_);
}
if (instantiatePermission_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getInstantiatePermission());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgStoreCode)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgStoreCode other = (starnamed.x.wasm.v1beta1.Tx.MsgStoreCode) obj;
if (!getSender()
.equals(other.getSender())) return false;
if (!getWasmByteCode()
.equals(other.getWasmByteCode())) return false;
if (!getSource()
.equals(other.getSource())) return false;
if (!getBuilder()
.equals(other.getBuilder())) return false;
if (hasInstantiatePermission() != other.hasInstantiatePermission()) return false;
if (hasInstantiatePermission()) {
if (!getInstantiatePermission()
.equals(other.getInstantiatePermission())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENDER_FIELD_NUMBER;
hash = (53 * hash) + getSender().hashCode();
hash = (37 * hash) + WASM_BYTE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getWasmByteCode().hashCode();
hash = (37 * hash) + SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getSource().hashCode();
hash = (37 * hash) + BUILDER_FIELD_NUMBER;
hash = (53 * hash) + getBuilder().hashCode();
if (hasInstantiatePermission()) {
hash = (37 * hash) + INSTANTIATE_PERMISSION_FIELD_NUMBER;
hash = (53 * hash) + getInstantiatePermission().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgStoreCode prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgStoreCode submit Wasm code to the system
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgStoreCode}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgStoreCode)
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.class, starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sender_ = "";
wasmByteCode_ = com.google.protobuf.ByteString.EMPTY;
source_ = "";
builder_ = "";
if (instantiatePermissionBuilder_ == null) {
instantiatePermission_ = null;
} else {
instantiatePermission_ = null;
instantiatePermissionBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCode getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCode build() {
starnamed.x.wasm.v1beta1.Tx.MsgStoreCode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCode buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgStoreCode result = new starnamed.x.wasm.v1beta1.Tx.MsgStoreCode(this);
result.sender_ = sender_;
result.wasmByteCode_ = wasmByteCode_;
result.source_ = source_;
result.builder_ = builder_;
if (instantiatePermissionBuilder_ == null) {
result.instantiatePermission_ = instantiatePermission_;
} else {
result.instantiatePermission_ = instantiatePermissionBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgStoreCode) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgStoreCode)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgStoreCode other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgStoreCode.getDefaultInstance()) return this;
if (!other.getSender().isEmpty()) {
sender_ = other.sender_;
onChanged();
}
if (other.getWasmByteCode() != com.google.protobuf.ByteString.EMPTY) {
setWasmByteCode(other.getWasmByteCode());
}
if (!other.getSource().isEmpty()) {
source_ = other.source_;
onChanged();
}
if (!other.getBuilder().isEmpty()) {
builder_ = other.builder_;
onChanged();
}
if (other.hasInstantiatePermission()) {
mergeInstantiatePermission(other.getInstantiatePermission());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgStoreCode parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgStoreCode) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object sender_ = "";
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The sender to set.
* @return This builder for chaining.
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sender_ = value;
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSender() {
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The bytes for sender to set.
* @return This builder for chaining.
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sender_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString wasmByteCode_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* WASMByteCode can be raw or gzip compressed
* </pre>
*
* <code>bytes wasm_byte_code = 2 [(.gogoproto.customname) = "WASMByteCode"];</code>
* @return The wasmByteCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getWasmByteCode() {
return wasmByteCode_;
}
/**
* <pre>
* WASMByteCode can be raw or gzip compressed
* </pre>
*
* <code>bytes wasm_byte_code = 2 [(.gogoproto.customname) = "WASMByteCode"];</code>
* @param value The wasmByteCode to set.
* @return This builder for chaining.
*/
public Builder setWasmByteCode(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
wasmByteCode_ = value;
onChanged();
return this;
}
/**
* <pre>
* WASMByteCode can be raw or gzip compressed
* </pre>
*
* <code>bytes wasm_byte_code = 2 [(.gogoproto.customname) = "WASMByteCode"];</code>
* @return This builder for chaining.
*/
public Builder clearWasmByteCode() {
wasmByteCode_ = getDefaultInstance().getWasmByteCode();
onChanged();
return this;
}
private java.lang.Object source_ = "";
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return The source.
*/
public java.lang.String getSource() {
java.lang.Object ref = source_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
source_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return The bytes for source.
*/
public com.google.protobuf.ByteString
getSourceBytes() {
java.lang.Object ref = source_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @param value The source to set.
* @return This builder for chaining.
*/
public Builder setSource(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
source_ = value;
onChanged();
return this;
}
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @return This builder for chaining.
*/
public Builder clearSource() {
source_ = getDefaultInstance().getSource();
onChanged();
return this;
}
/**
* <pre>
* Source is a valid absolute HTTPS URI to the contract's source code,
* optional
* </pre>
*
* <code>string source = 3;</code>
* @param value The bytes for source to set.
* @return This builder for chaining.
*/
public Builder setSourceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
source_ = value;
onChanged();
return this;
}
private java.lang.Object builder_ = "";
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return The builder.
*/
public java.lang.String getBuilder() {
java.lang.Object ref = builder_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
builder_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return The bytes for builder.
*/
public com.google.protobuf.ByteString
getBuilderBytes() {
java.lang.Object ref = builder_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
builder_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @param value The builder to set.
* @return This builder for chaining.
*/
public Builder setBuilder(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
builder_ = value;
onChanged();
return this;
}
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @return This builder for chaining.
*/
public Builder clearBuilder() {
builder_ = getDefaultInstance().getBuilder();
onChanged();
return this;
}
/**
* <pre>
* Builder is a valid docker image name with tag, optional
* </pre>
*
* <code>string builder = 4;</code>
* @param value The bytes for builder to set.
* @return This builder for chaining.
*/
public Builder setBuilderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
builder_ = value;
onChanged();
return this;
}
private starnamed.x.wasm.v1beta1.Types.AccessConfig instantiatePermission_;
private com.google.protobuf.SingleFieldBuilderV3<
starnamed.x.wasm.v1beta1.Types.AccessConfig, starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder, starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder> instantiatePermissionBuilder_;
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
* @return Whether the instantiatePermission field is set.
*/
public boolean hasInstantiatePermission() {
return instantiatePermissionBuilder_ != null || instantiatePermission_ != null;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
* @return The instantiatePermission.
*/
public starnamed.x.wasm.v1beta1.Types.AccessConfig getInstantiatePermission() {
if (instantiatePermissionBuilder_ == null) {
return instantiatePermission_ == null ? starnamed.x.wasm.v1beta1.Types.AccessConfig.getDefaultInstance() : instantiatePermission_;
} else {
return instantiatePermissionBuilder_.getMessage();
}
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
public Builder setInstantiatePermission(starnamed.x.wasm.v1beta1.Types.AccessConfig value) {
if (instantiatePermissionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
instantiatePermission_ = value;
onChanged();
} else {
instantiatePermissionBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
public Builder setInstantiatePermission(
starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder builderForValue) {
if (instantiatePermissionBuilder_ == null) {
instantiatePermission_ = builderForValue.build();
onChanged();
} else {
instantiatePermissionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
public Builder mergeInstantiatePermission(starnamed.x.wasm.v1beta1.Types.AccessConfig value) {
if (instantiatePermissionBuilder_ == null) {
if (instantiatePermission_ != null) {
instantiatePermission_ =
starnamed.x.wasm.v1beta1.Types.AccessConfig.newBuilder(instantiatePermission_).mergeFrom(value).buildPartial();
} else {
instantiatePermission_ = value;
}
onChanged();
} else {
instantiatePermissionBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
public Builder clearInstantiatePermission() {
if (instantiatePermissionBuilder_ == null) {
instantiatePermission_ = null;
onChanged();
} else {
instantiatePermission_ = null;
instantiatePermissionBuilder_ = null;
}
return this;
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
public starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder getInstantiatePermissionBuilder() {
onChanged();
return getInstantiatePermissionFieldBuilder().getBuilder();
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
public starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder getInstantiatePermissionOrBuilder() {
if (instantiatePermissionBuilder_ != null) {
return instantiatePermissionBuilder_.getMessageOrBuilder();
} else {
return instantiatePermission_ == null ?
starnamed.x.wasm.v1beta1.Types.AccessConfig.getDefaultInstance() : instantiatePermission_;
}
}
/**
* <pre>
* InstantiatePermission access control to apply on contract creation,
* optional
* </pre>
*
* <code>.starnamed.x.wasm.v1beta1.AccessConfig instantiate_permission = 5;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
starnamed.x.wasm.v1beta1.Types.AccessConfig, starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder, starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder>
getInstantiatePermissionFieldBuilder() {
if (instantiatePermissionBuilder_ == null) {
instantiatePermissionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
starnamed.x.wasm.v1beta1.Types.AccessConfig, starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder, starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder>(
getInstantiatePermission(),
getParentForChildren(),
isClean());
instantiatePermission_ = null;
}
return instantiatePermissionBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgStoreCode)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgStoreCode)
private static final starnamed.x.wasm.v1beta1.Tx.MsgStoreCode DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgStoreCode();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCode getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgStoreCode>
PARSER = new com.google.protobuf.AbstractParser<MsgStoreCode>() {
@java.lang.Override
public MsgStoreCode parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgStoreCode(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgStoreCode> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgStoreCode> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCode getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgStoreCodeResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgStoreCodeResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 1 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
long getCodeId();
}
/**
* <pre>
* MsgStoreCodeResponse returns store result data.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgStoreCodeResponse}
*/
public static final class MsgStoreCodeResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgStoreCodeResponse)
MsgStoreCodeResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgStoreCodeResponse.newBuilder() to construct.
private MsgStoreCodeResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgStoreCodeResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgStoreCodeResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgStoreCodeResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
codeId_ = input.readUInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.Builder.class);
}
public static final int CODE_ID_FIELD_NUMBER = 1;
private long codeId_;
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 1 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
@java.lang.Override
public long getCodeId() {
return codeId_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (codeId_ != 0L) {
output.writeUInt64(1, codeId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (codeId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, codeId_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse other = (starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse) obj;
if (getCodeId()
!= other.getCodeId()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CODE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCodeId());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgStoreCodeResponse returns store result data.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgStoreCodeResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgStoreCodeResponse)
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
codeId_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse build() {
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse result = new starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse(this);
result.codeId_ = codeId_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse.getDefaultInstance()) return this;
if (other.getCodeId() != 0L) {
setCodeId(other.getCodeId());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long codeId_ ;
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 1 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
@java.lang.Override
public long getCodeId() {
return codeId_;
}
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 1 [(.gogoproto.customname) = "CodeID"];</code>
* @param value The codeId to set.
* @return This builder for chaining.
*/
public Builder setCodeId(long value) {
codeId_ = value;
onChanged();
return this;
}
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 1 [(.gogoproto.customname) = "CodeID"];</code>
* @return This builder for chaining.
*/
public Builder clearCodeId() {
codeId_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgStoreCodeResponse)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgStoreCodeResponse)
private static final starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgStoreCodeResponse>
PARSER = new com.google.protobuf.AbstractParser<MsgStoreCodeResponse>() {
@java.lang.Override
public MsgStoreCodeResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgStoreCodeResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgStoreCodeResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgStoreCodeResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgStoreCodeResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgInstantiateContractOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgInstantiateContract)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
java.lang.String getSender();
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
com.google.protobuf.ByteString
getSenderBytes();
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return The admin.
*/
java.lang.String getAdmin();
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return The bytes for admin.
*/
com.google.protobuf.ByteString
getAdminBytes();
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
long getCodeId();
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return The label.
*/
java.lang.String getLabel();
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return The bytes for label.
*/
com.google.protobuf.ByteString
getLabelBytes();
/**
* <pre>
* InitMsg json encoded message to be passed to the contract on instantiation
* </pre>
*
* <code>bytes init_msg = 5;</code>
* @return The initMsg.
*/
com.google.protobuf.ByteString getInitMsg();
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin>
getFundsList();
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
cosmos.base.v1beta1.CoinOuterClass.Coin getFunds(int index);
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
int getFundsCount();
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
java.util.List<? extends cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsOrBuilderList();
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(
int index);
}
/**
* <pre>
* MsgInstantiateContract create a new smart contract instance for the given
* code id.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgInstantiateContract}
*/
public static final class MsgInstantiateContract extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgInstantiateContract)
MsgInstantiateContractOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgInstantiateContract.newBuilder() to construct.
private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgInstantiateContract() {
sender_ = "";
admin_ = "";
label_ = "";
initMsg_ = com.google.protobuf.ByteString.EMPTY;
funds_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgInstantiateContract();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgInstantiateContract(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
sender_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
admin_ = s;
break;
}
case 24: {
codeId_ = input.readUInt64();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
label_ = s;
break;
}
case 42: {
initMsg_ = input.readBytes();
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
funds_ = new java.util.ArrayList<cosmos.base.v1beta1.CoinOuterClass.Coin>();
mutable_bitField0_ |= 0x00000001;
}
funds_.add(
input.readMessage(cosmos.base.v1beta1.CoinOuterClass.Coin.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
funds_ = java.util.Collections.unmodifiableList(funds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.class, starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.Builder.class);
}
public static final int SENDER_FIELD_NUMBER = 1;
private volatile java.lang.Object sender_;
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
@java.lang.Override
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADMIN_FIELD_NUMBER = 2;
private volatile java.lang.Object admin_;
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return The admin.
*/
@java.lang.Override
public java.lang.String getAdmin() {
java.lang.Object ref = admin_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
admin_ = s;
return s;
}
}
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return The bytes for admin.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAdminBytes() {
java.lang.Object ref = admin_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
admin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CODE_ID_FIELD_NUMBER = 3;
private long codeId_;
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
@java.lang.Override
public long getCodeId() {
return codeId_;
}
public static final int LABEL_FIELD_NUMBER = 4;
private volatile java.lang.Object label_;
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return The label.
*/
@java.lang.Override
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
}
}
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return The bytes for label.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INIT_MSG_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString initMsg_;
/**
* <pre>
* InitMsg json encoded message to be passed to the contract on instantiation
* </pre>
*
* <code>bytes init_msg = 5;</code>
* @return The initMsg.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInitMsg() {
return initMsg_;
}
public static final int FUNDS_FIELD_NUMBER = 6;
private java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> funds_;
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> getFundsList() {
return funds_;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public java.util.List<? extends cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsOrBuilderList() {
return funds_;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public int getFundsCount() {
return funds_.size();
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public cosmos.base.v1beta1.CoinOuterClass.Coin getFunds(int index) {
return funds_.get(index);
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(
int index) {
return funds_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getSenderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_);
}
if (!getAdminBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, admin_);
}
if (codeId_ != 0L) {
output.writeUInt64(3, codeId_);
}
if (!getLabelBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, label_);
}
if (!initMsg_.isEmpty()) {
output.writeBytes(5, initMsg_);
}
for (int i = 0; i < funds_.size(); i++) {
output.writeMessage(6, funds_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSenderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_);
}
if (!getAdminBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, admin_);
}
if (codeId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, codeId_);
}
if (!getLabelBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, label_);
}
if (!initMsg_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, initMsg_);
}
for (int i = 0; i < funds_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, funds_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract other = (starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract) obj;
if (!getSender()
.equals(other.getSender())) return false;
if (!getAdmin()
.equals(other.getAdmin())) return false;
if (getCodeId()
!= other.getCodeId()) return false;
if (!getLabel()
.equals(other.getLabel())) return false;
if (!getInitMsg()
.equals(other.getInitMsg())) return false;
if (!getFundsList()
.equals(other.getFundsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENDER_FIELD_NUMBER;
hash = (53 * hash) + getSender().hashCode();
hash = (37 * hash) + ADMIN_FIELD_NUMBER;
hash = (53 * hash) + getAdmin().hashCode();
hash = (37 * hash) + CODE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCodeId());
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
hash = (37 * hash) + INIT_MSG_FIELD_NUMBER;
hash = (53 * hash) + getInitMsg().hashCode();
if (getFundsCount() > 0) {
hash = (37 * hash) + FUNDS_FIELD_NUMBER;
hash = (53 * hash) + getFundsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgInstantiateContract create a new smart contract instance for the given
* code id.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgInstantiateContract}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgInstantiateContract)
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.class, starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFundsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sender_ = "";
admin_ = "";
codeId_ = 0L;
label_ = "";
initMsg_ = com.google.protobuf.ByteString.EMPTY;
if (fundsBuilder_ == null) {
funds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
fundsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract build() {
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract result = new starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract(this);
int from_bitField0_ = bitField0_;
result.sender_ = sender_;
result.admin_ = admin_;
result.codeId_ = codeId_;
result.label_ = label_;
result.initMsg_ = initMsg_;
if (fundsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
funds_ = java.util.Collections.unmodifiableList(funds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.funds_ = funds_;
} else {
result.funds_ = fundsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract.getDefaultInstance()) return this;
if (!other.getSender().isEmpty()) {
sender_ = other.sender_;
onChanged();
}
if (!other.getAdmin().isEmpty()) {
admin_ = other.admin_;
onChanged();
}
if (other.getCodeId() != 0L) {
setCodeId(other.getCodeId());
}
if (!other.getLabel().isEmpty()) {
label_ = other.label_;
onChanged();
}
if (other.getInitMsg() != com.google.protobuf.ByteString.EMPTY) {
setInitMsg(other.getInitMsg());
}
if (fundsBuilder_ == null) {
if (!other.funds_.isEmpty()) {
if (funds_.isEmpty()) {
funds_ = other.funds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFundsIsMutable();
funds_.addAll(other.funds_);
}
onChanged();
}
} else {
if (!other.funds_.isEmpty()) {
if (fundsBuilder_.isEmpty()) {
fundsBuilder_.dispose();
fundsBuilder_ = null;
funds_ = other.funds_;
bitField0_ = (bitField0_ & ~0x00000001);
fundsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFundsFieldBuilder() : null;
} else {
fundsBuilder_.addAllMessages(other.funds_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object sender_ = "";
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The sender to set.
* @return This builder for chaining.
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sender_ = value;
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSender() {
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The bytes for sender to set.
* @return This builder for chaining.
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sender_ = value;
onChanged();
return this;
}
private java.lang.Object admin_ = "";
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return The admin.
*/
public java.lang.String getAdmin() {
java.lang.Object ref = admin_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
admin_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return The bytes for admin.
*/
public com.google.protobuf.ByteString
getAdminBytes() {
java.lang.Object ref = admin_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
admin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @param value The admin to set.
* @return This builder for chaining.
*/
public Builder setAdmin(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
admin_ = value;
onChanged();
return this;
}
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @return This builder for chaining.
*/
public Builder clearAdmin() {
admin_ = getDefaultInstance().getAdmin();
onChanged();
return this;
}
/**
* <pre>
* Admin is an optional address that can execute migrations
* </pre>
*
* <code>string admin = 2;</code>
* @param value The bytes for admin to set.
* @return This builder for chaining.
*/
public Builder setAdminBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
admin_ = value;
onChanged();
return this;
}
private long codeId_ ;
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
@java.lang.Override
public long getCodeId() {
return codeId_;
}
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @param value The codeId to set.
* @return This builder for chaining.
*/
public Builder setCodeId(long value) {
codeId_ = value;
onChanged();
return this;
}
/**
* <pre>
* CodeID is the reference to the stored WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return This builder for chaining.
*/
public Builder clearCodeId() {
codeId_ = 0L;
onChanged();
return this;
}
private java.lang.Object label_ = "";
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return The label.
*/
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return The bytes for label.
*/
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
label_ = value;
onChanged();
return this;
}
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
onChanged();
return this;
}
/**
* <pre>
* Label is optional metadata to be stored with a contract instance.
* </pre>
*
* <code>string label = 4;</code>
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
label_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString initMsg_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* InitMsg json encoded message to be passed to the contract on instantiation
* </pre>
*
* <code>bytes init_msg = 5;</code>
* @return The initMsg.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInitMsg() {
return initMsg_;
}
/**
* <pre>
* InitMsg json encoded message to be passed to the contract on instantiation
* </pre>
*
* <code>bytes init_msg = 5;</code>
* @param value The initMsg to set.
* @return This builder for chaining.
*/
public Builder setInitMsg(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
initMsg_ = value;
onChanged();
return this;
}
/**
* <pre>
* InitMsg json encoded message to be passed to the contract on instantiation
* </pre>
*
* <code>bytes init_msg = 5;</code>
* @return This builder for chaining.
*/
public Builder clearInitMsg() {
initMsg_ = getDefaultInstance().getInitMsg();
onChanged();
return this;
}
private java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> funds_ =
java.util.Collections.emptyList();
private void ensureFundsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
funds_ = new java.util.ArrayList<cosmos.base.v1beta1.CoinOuterClass.Coin>(funds_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder> fundsBuilder_;
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> getFundsList() {
if (fundsBuilder_ == null) {
return java.util.Collections.unmodifiableList(funds_);
} else {
return fundsBuilder_.getMessageList();
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public int getFundsCount() {
if (fundsBuilder_ == null) {
return funds_.size();
} else {
return fundsBuilder_.getCount();
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin getFunds(int index) {
if (fundsBuilder_ == null) {
return funds_.get(index);
} else {
return fundsBuilder_.getMessage(index);
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder setFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin value) {
if (fundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFundsIsMutable();
funds_.set(index, value);
onChanged();
} else {
fundsBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder setFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.set(index, builderForValue.build());
onChanged();
} else {
fundsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(cosmos.base.v1beta1.CoinOuterClass.Coin value) {
if (fundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFundsIsMutable();
funds_.add(value);
onChanged();
} else {
fundsBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin value) {
if (fundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFundsIsMutable();
funds_.add(index, value);
onChanged();
} else {
fundsBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(
cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.add(builderForValue.build());
onChanged();
} else {
fundsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.add(index, builderForValue.build());
onChanged();
} else {
fundsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addAllFunds(
java.lang.Iterable<? extends cosmos.base.v1beta1.CoinOuterClass.Coin> values) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, funds_);
onChanged();
} else {
fundsBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder clearFunds() {
if (fundsBuilder_ == null) {
funds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fundsBuilder_.clear();
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder removeFunds(int index) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.remove(index);
onChanged();
} else {
fundsBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder getFundsBuilder(
int index) {
return getFundsFieldBuilder().getBuilder(index);
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(
int index) {
if (fundsBuilder_ == null) {
return funds_.get(index); } else {
return fundsBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public java.util.List<? extends cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsOrBuilderList() {
if (fundsBuilder_ != null) {
return fundsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(funds_);
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder addFundsBuilder() {
return getFundsFieldBuilder().addBuilder(
cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance());
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder addFundsBuilder(
int index) {
return getFundsFieldBuilder().addBuilder(
index, cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance());
}
/**
* <pre>
* Funds coins that are transferred to the contract on instantiation
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 6 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin.Builder>
getFundsBuilderList() {
return getFundsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsFieldBuilder() {
if (fundsBuilder_ == null) {
fundsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>(
funds_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
funds_ = null;
}
return fundsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgInstantiateContract)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgInstantiateContract)
private static final starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgInstantiateContract>
PARSER = new com.google.protobuf.AbstractParser<MsgInstantiateContract>() {
@java.lang.Override
public MsgInstantiateContract parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgInstantiateContract(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgInstantiateContract> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgInstantiateContract> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContract getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgInstantiateContractResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return The address.
*/
java.lang.String getAddress();
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return The bytes for address.
*/
com.google.protobuf.ByteString
getAddressBytes();
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 2;</code>
* @return The data.
*/
com.google.protobuf.ByteString getData();
}
/**
* <pre>
* MsgInstantiateContractResponse return instantiation result data
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse}
*/
public static final class MsgInstantiateContractResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse)
MsgInstantiateContractResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgInstantiateContractResponse.newBuilder() to construct.
private MsgInstantiateContractResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgInstantiateContractResponse() {
address_ = "";
data_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgInstantiateContractResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgInstantiateContractResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
address_ = s;
break;
}
case 18: {
data_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.Builder.class);
}
public static final int ADDRESS_FIELD_NUMBER = 1;
private volatile java.lang.Object address_;
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return The address.
*/
@java.lang.Override
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
}
}
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return The bytes for address.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATA_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString data_;
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 2;</code>
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_);
}
if (!data_.isEmpty()) {
output.writeBytes(2, data_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_);
}
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, data_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse other = (starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse) obj;
if (!getAddress()
.equals(other.getAddress())) return false;
if (!getData()
.equals(other.getData())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgInstantiateContractResponse return instantiation result data
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse)
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
address_ = "";
data_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse build() {
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse result = new starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse(this);
result.address_ = address_;
result.data_ = data_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse.getDefaultInstance()) return this;
if (!other.getAddress().isEmpty()) {
address_ = other.address_;
onChanged();
}
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object address_ = "";
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return The address.
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return The bytes for address.
*/
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @param value The address to set.
* @return This builder for chaining.
*/
public Builder setAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
address_ = value;
onChanged();
return this;
}
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @return This builder for chaining.
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
onChanged();
return this;
}
/**
* <pre>
* Address is the bech32 address of the new contract instance.
* </pre>
*
* <code>string address = 1;</code>
* @param value The bytes for address to set.
* @return This builder for chaining.
*/
public Builder setAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
address_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 2;</code>
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 2;</code>
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 2;</code>
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgInstantiateContractResponse)
private static final starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgInstantiateContractResponse>
PARSER = new com.google.protobuf.AbstractParser<MsgInstantiateContractResponse>() {
@java.lang.Override
public MsgInstantiateContractResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgInstantiateContractResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgInstantiateContractResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgInstantiateContractResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgInstantiateContractResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgExecuteContractOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgExecuteContract)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
java.lang.String getSender();
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
com.google.protobuf.ByteString
getSenderBytes();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The contract.
*/
java.lang.String getContract();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The bytes for contract.
*/
com.google.protobuf.ByteString
getContractBytes();
/**
* <pre>
* Msg json encoded message to be passed to the contract
* </pre>
*
* <code>bytes msg = 3;</code>
* @return The msg.
*/
com.google.protobuf.ByteString getMsg();
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin>
getFundsList();
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
cosmos.base.v1beta1.CoinOuterClass.Coin getFunds(int index);
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
int getFundsCount();
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
java.util.List<? extends cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsOrBuilderList();
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(
int index);
}
/**
* <pre>
* MsgExecuteContract submits the given message data to a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgExecuteContract}
*/
public static final class MsgExecuteContract extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgExecuteContract)
MsgExecuteContractOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgExecuteContract.newBuilder() to construct.
private MsgExecuteContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgExecuteContract() {
sender_ = "";
contract_ = "";
msg_ = com.google.protobuf.ByteString.EMPTY;
funds_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgExecuteContract();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgExecuteContract(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
sender_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
contract_ = s;
break;
}
case 26: {
msg_ = input.readBytes();
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
funds_ = new java.util.ArrayList<cosmos.base.v1beta1.CoinOuterClass.Coin>();
mutable_bitField0_ |= 0x00000001;
}
funds_.add(
input.readMessage(cosmos.base.v1beta1.CoinOuterClass.Coin.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
funds_ = java.util.Collections.unmodifiableList(funds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.class, starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.Builder.class);
}
public static final int SENDER_FIELD_NUMBER = 1;
private volatile java.lang.Object sender_;
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
@java.lang.Override
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTRACT_FIELD_NUMBER = 2;
private volatile java.lang.Object contract_;
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The contract.
*/
@java.lang.Override
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The bytes for contract.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MSG_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString msg_;
/**
* <pre>
* Msg json encoded message to be passed to the contract
* </pre>
*
* <code>bytes msg = 3;</code>
* @return The msg.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMsg() {
return msg_;
}
public static final int FUNDS_FIELD_NUMBER = 5;
private java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> funds_;
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> getFundsList() {
return funds_;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public java.util.List<? extends cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsOrBuilderList() {
return funds_;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public int getFundsCount() {
return funds_.size();
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public cosmos.base.v1beta1.CoinOuterClass.Coin getFunds(int index) {
return funds_.get(index);
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
@java.lang.Override
public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(
int index) {
return funds_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getSenderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_);
}
if (!getContractBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, contract_);
}
if (!msg_.isEmpty()) {
output.writeBytes(3, msg_);
}
for (int i = 0; i < funds_.size(); i++) {
output.writeMessage(5, funds_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSenderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_);
}
if (!getContractBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, contract_);
}
if (!msg_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, msg_);
}
for (int i = 0; i < funds_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, funds_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract other = (starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract) obj;
if (!getSender()
.equals(other.getSender())) return false;
if (!getContract()
.equals(other.getContract())) return false;
if (!getMsg()
.equals(other.getMsg())) return false;
if (!getFundsList()
.equals(other.getFundsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENDER_FIELD_NUMBER;
hash = (53 * hash) + getSender().hashCode();
hash = (37 * hash) + CONTRACT_FIELD_NUMBER;
hash = (53 * hash) + getContract().hashCode();
hash = (37 * hash) + MSG_FIELD_NUMBER;
hash = (53 * hash) + getMsg().hashCode();
if (getFundsCount() > 0) {
hash = (37 * hash) + FUNDS_FIELD_NUMBER;
hash = (53 * hash) + getFundsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgExecuteContract submits the given message data to a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgExecuteContract}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgExecuteContract)
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.class, starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFundsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sender_ = "";
contract_ = "";
msg_ = com.google.protobuf.ByteString.EMPTY;
if (fundsBuilder_ == null) {
funds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
fundsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract build() {
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract result = new starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract(this);
int from_bitField0_ = bitField0_;
result.sender_ = sender_;
result.contract_ = contract_;
result.msg_ = msg_;
if (fundsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
funds_ = java.util.Collections.unmodifiableList(funds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.funds_ = funds_;
} else {
result.funds_ = fundsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract.getDefaultInstance()) return this;
if (!other.getSender().isEmpty()) {
sender_ = other.sender_;
onChanged();
}
if (!other.getContract().isEmpty()) {
contract_ = other.contract_;
onChanged();
}
if (other.getMsg() != com.google.protobuf.ByteString.EMPTY) {
setMsg(other.getMsg());
}
if (fundsBuilder_ == null) {
if (!other.funds_.isEmpty()) {
if (funds_.isEmpty()) {
funds_ = other.funds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFundsIsMutable();
funds_.addAll(other.funds_);
}
onChanged();
}
} else {
if (!other.funds_.isEmpty()) {
if (fundsBuilder_.isEmpty()) {
fundsBuilder_.dispose();
fundsBuilder_ = null;
funds_ = other.funds_;
bitField0_ = (bitField0_ & ~0x00000001);
fundsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFundsFieldBuilder() : null;
} else {
fundsBuilder_.addAllMessages(other.funds_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object sender_ = "";
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The sender to set.
* @return This builder for chaining.
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sender_ = value;
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSender() {
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The bytes for sender to set.
* @return This builder for chaining.
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sender_ = value;
onChanged();
return this;
}
private java.lang.Object contract_ = "";
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The contract.
*/
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The bytes for contract.
*/
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @param value The contract to set.
* @return This builder for chaining.
*/
public Builder setContract(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contract_ = value;
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return This builder for chaining.
*/
public Builder clearContract() {
contract_ = getDefaultInstance().getContract();
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @param value The bytes for contract to set.
* @return This builder for chaining.
*/
public Builder setContractBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contract_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString msg_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Msg json encoded message to be passed to the contract
* </pre>
*
* <code>bytes msg = 3;</code>
* @return The msg.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMsg() {
return msg_;
}
/**
* <pre>
* Msg json encoded message to be passed to the contract
* </pre>
*
* <code>bytes msg = 3;</code>
* @param value The msg to set.
* @return This builder for chaining.
*/
public Builder setMsg(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
msg_ = value;
onChanged();
return this;
}
/**
* <pre>
* Msg json encoded message to be passed to the contract
* </pre>
*
* <code>bytes msg = 3;</code>
* @return This builder for chaining.
*/
public Builder clearMsg() {
msg_ = getDefaultInstance().getMsg();
onChanged();
return this;
}
private java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> funds_ =
java.util.Collections.emptyList();
private void ensureFundsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
funds_ = new java.util.ArrayList<cosmos.base.v1beta1.CoinOuterClass.Coin>(funds_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder> fundsBuilder_;
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> getFundsList() {
if (fundsBuilder_ == null) {
return java.util.Collections.unmodifiableList(funds_);
} else {
return fundsBuilder_.getMessageList();
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public int getFundsCount() {
if (fundsBuilder_ == null) {
return funds_.size();
} else {
return fundsBuilder_.getCount();
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin getFunds(int index) {
if (fundsBuilder_ == null) {
return funds_.get(index);
} else {
return fundsBuilder_.getMessage(index);
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder setFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin value) {
if (fundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFundsIsMutable();
funds_.set(index, value);
onChanged();
} else {
fundsBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder setFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.set(index, builderForValue.build());
onChanged();
} else {
fundsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(cosmos.base.v1beta1.CoinOuterClass.Coin value) {
if (fundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFundsIsMutable();
funds_.add(value);
onChanged();
} else {
fundsBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin value) {
if (fundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFundsIsMutable();
funds_.add(index, value);
onChanged();
} else {
fundsBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(
cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.add(builderForValue.build());
onChanged();
} else {
fundsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addFunds(
int index, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.add(index, builderForValue.build());
onChanged();
} else {
fundsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder addAllFunds(
java.lang.Iterable<? extends cosmos.base.v1beta1.CoinOuterClass.Coin> values) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, funds_);
onChanged();
} else {
fundsBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder clearFunds() {
if (fundsBuilder_ == null) {
funds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fundsBuilder_.clear();
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public Builder removeFunds(int index) {
if (fundsBuilder_ == null) {
ensureFundsIsMutable();
funds_.remove(index);
onChanged();
} else {
fundsBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder getFundsBuilder(
int index) {
return getFundsFieldBuilder().getBuilder(index);
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getFundsOrBuilder(
int index) {
if (fundsBuilder_ == null) {
return funds_.get(index); } else {
return fundsBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public java.util.List<? extends cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsOrBuilderList() {
if (fundsBuilder_ != null) {
return fundsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(funds_);
}
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder addFundsBuilder() {
return getFundsFieldBuilder().addBuilder(
cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance());
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder addFundsBuilder(
int index) {
return getFundsFieldBuilder().addBuilder(
index, cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance());
}
/**
* <pre>
* Funds coins that are transferred to the contract on execution
* </pre>
*
* <code>repeated .cosmos.base.v1beta1.Coin funds = 5 [(.gogoproto.nullable) = false, (.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];</code>
*/
public java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin.Builder>
getFundsBuilderList() {
return getFundsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>
getFundsFieldBuilder() {
if (fundsBuilder_ == null) {
fundsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>(
funds_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
funds_ = null;
}
return fundsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgExecuteContract)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgExecuteContract)
private static final starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgExecuteContract>
PARSER = new com.google.protobuf.AbstractParser<MsgExecuteContract>() {
@java.lang.Override
public MsgExecuteContract parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgExecuteContract(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgExecuteContract> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgExecuteContract> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContract getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgExecuteContractResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgExecuteContractResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 1;</code>
* @return The data.
*/
com.google.protobuf.ByteString getData();
}
/**
* <pre>
* MsgExecuteContractResponse returns execution result data.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgExecuteContractResponse}
*/
public static final class MsgExecuteContractResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgExecuteContractResponse)
MsgExecuteContractResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgExecuteContractResponse.newBuilder() to construct.
private MsgExecuteContractResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgExecuteContractResponse() {
data_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgExecuteContractResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgExecuteContractResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
data_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.Builder.class);
}
public static final int DATA_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString data_;
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 1;</code>
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!data_.isEmpty()) {
output.writeBytes(1, data_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, data_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse other = (starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse) obj;
if (!getData()
.equals(other.getData())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgExecuteContractResponse returns execution result data.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgExecuteContractResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgExecuteContractResponse)
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
data_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse build() {
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse result = new starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse(this);
result.data_ = data_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse.getDefaultInstance()) return this;
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 1;</code>
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 1;</code>
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
* <pre>
* Data contains base64-encoded bytes to returned from the contract
* </pre>
*
* <code>bytes data = 1;</code>
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgExecuteContractResponse)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgExecuteContractResponse)
private static final starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgExecuteContractResponse>
PARSER = new com.google.protobuf.AbstractParser<MsgExecuteContractResponse>() {
@java.lang.Override
public MsgExecuteContractResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgExecuteContractResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgExecuteContractResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgExecuteContractResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgExecuteContractResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgMigrateContractOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgMigrateContract)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
java.lang.String getSender();
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
com.google.protobuf.ByteString
getSenderBytes();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The contract.
*/
java.lang.String getContract();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The bytes for contract.
*/
com.google.protobuf.ByteString
getContractBytes();
/**
* <pre>
* CodeID references the new WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
long getCodeId();
/**
* <pre>
* MigrateMsg json encoded message to be passed to the contract on migration
* </pre>
*
* <code>bytes migrate_msg = 4;</code>
* @return The migrateMsg.
*/
com.google.protobuf.ByteString getMigrateMsg();
}
/**
* <pre>
* MsgMigrateContract runs a code upgrade/ downgrade for a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgMigrateContract}
*/
public static final class MsgMigrateContract extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgMigrateContract)
MsgMigrateContractOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgMigrateContract.newBuilder() to construct.
private MsgMigrateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgMigrateContract() {
sender_ = "";
contract_ = "";
migrateMsg_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgMigrateContract();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgMigrateContract(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
sender_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
contract_ = s;
break;
}
case 24: {
codeId_ = input.readUInt64();
break;
}
case 34: {
migrateMsg_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.class, starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.Builder.class);
}
public static final int SENDER_FIELD_NUMBER = 1;
private volatile java.lang.Object sender_;
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
@java.lang.Override
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTRACT_FIELD_NUMBER = 2;
private volatile java.lang.Object contract_;
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The contract.
*/
@java.lang.Override
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The bytes for contract.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CODE_ID_FIELD_NUMBER = 3;
private long codeId_;
/**
* <pre>
* CodeID references the new WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
@java.lang.Override
public long getCodeId() {
return codeId_;
}
public static final int MIGRATE_MSG_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString migrateMsg_;
/**
* <pre>
* MigrateMsg json encoded message to be passed to the contract on migration
* </pre>
*
* <code>bytes migrate_msg = 4;</code>
* @return The migrateMsg.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMigrateMsg() {
return migrateMsg_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getSenderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_);
}
if (!getContractBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, contract_);
}
if (codeId_ != 0L) {
output.writeUInt64(3, codeId_);
}
if (!migrateMsg_.isEmpty()) {
output.writeBytes(4, migrateMsg_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSenderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_);
}
if (!getContractBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, contract_);
}
if (codeId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, codeId_);
}
if (!migrateMsg_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, migrateMsg_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract other = (starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract) obj;
if (!getSender()
.equals(other.getSender())) return false;
if (!getContract()
.equals(other.getContract())) return false;
if (getCodeId()
!= other.getCodeId()) return false;
if (!getMigrateMsg()
.equals(other.getMigrateMsg())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENDER_FIELD_NUMBER;
hash = (53 * hash) + getSender().hashCode();
hash = (37 * hash) + CONTRACT_FIELD_NUMBER;
hash = (53 * hash) + getContract().hashCode();
hash = (37 * hash) + CODE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCodeId());
hash = (37 * hash) + MIGRATE_MSG_FIELD_NUMBER;
hash = (53 * hash) + getMigrateMsg().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgMigrateContract runs a code upgrade/ downgrade for a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgMigrateContract}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgMigrateContract)
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.class, starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sender_ = "";
contract_ = "";
codeId_ = 0L;
migrateMsg_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract build() {
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract result = new starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract(this);
result.sender_ = sender_;
result.contract_ = contract_;
result.codeId_ = codeId_;
result.migrateMsg_ = migrateMsg_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract.getDefaultInstance()) return this;
if (!other.getSender().isEmpty()) {
sender_ = other.sender_;
onChanged();
}
if (!other.getContract().isEmpty()) {
contract_ = other.contract_;
onChanged();
}
if (other.getCodeId() != 0L) {
setCodeId(other.getCodeId());
}
if (other.getMigrateMsg() != com.google.protobuf.ByteString.EMPTY) {
setMigrateMsg(other.getMigrateMsg());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object sender_ = "";
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The sender to set.
* @return This builder for chaining.
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sender_ = value;
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSender() {
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The bytes for sender to set.
* @return This builder for chaining.
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sender_ = value;
onChanged();
return this;
}
private java.lang.Object contract_ = "";
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The contract.
*/
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return The bytes for contract.
*/
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @param value The contract to set.
* @return This builder for chaining.
*/
public Builder setContract(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contract_ = value;
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @return This builder for chaining.
*/
public Builder clearContract() {
contract_ = getDefaultInstance().getContract();
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 2;</code>
* @param value The bytes for contract to set.
* @return This builder for chaining.
*/
public Builder setContractBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contract_ = value;
onChanged();
return this;
}
private long codeId_ ;
/**
* <pre>
* CodeID references the new WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return The codeId.
*/
@java.lang.Override
public long getCodeId() {
return codeId_;
}
/**
* <pre>
* CodeID references the new WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @param value The codeId to set.
* @return This builder for chaining.
*/
public Builder setCodeId(long value) {
codeId_ = value;
onChanged();
return this;
}
/**
* <pre>
* CodeID references the new WASM code
* </pre>
*
* <code>uint64 code_id = 3 [(.gogoproto.customname) = "CodeID"];</code>
* @return This builder for chaining.
*/
public Builder clearCodeId() {
codeId_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString migrateMsg_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* MigrateMsg json encoded message to be passed to the contract on migration
* </pre>
*
* <code>bytes migrate_msg = 4;</code>
* @return The migrateMsg.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMigrateMsg() {
return migrateMsg_;
}
/**
* <pre>
* MigrateMsg json encoded message to be passed to the contract on migration
* </pre>
*
* <code>bytes migrate_msg = 4;</code>
* @param value The migrateMsg to set.
* @return This builder for chaining.
*/
public Builder setMigrateMsg(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
migrateMsg_ = value;
onChanged();
return this;
}
/**
* <pre>
* MigrateMsg json encoded message to be passed to the contract on migration
* </pre>
*
* <code>bytes migrate_msg = 4;</code>
* @return This builder for chaining.
*/
public Builder clearMigrateMsg() {
migrateMsg_ = getDefaultInstance().getMigrateMsg();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgMigrateContract)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgMigrateContract)
private static final starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgMigrateContract>
PARSER = new com.google.protobuf.AbstractParser<MsgMigrateContract>() {
@java.lang.Override
public MsgMigrateContract parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgMigrateContract(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgMigrateContract> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgMigrateContract> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContract getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgMigrateContractResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgMigrateContractResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Data contains same raw bytes returned as data from the wasm contract.
* (May be empty)
* </pre>
*
* <code>bytes data = 1;</code>
* @return The data.
*/
com.google.protobuf.ByteString getData();
}
/**
* <pre>
* MsgMigrateContractResponse returns contract migration result data.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgMigrateContractResponse}
*/
public static final class MsgMigrateContractResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgMigrateContractResponse)
MsgMigrateContractResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgMigrateContractResponse.newBuilder() to construct.
private MsgMigrateContractResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgMigrateContractResponse() {
data_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgMigrateContractResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgMigrateContractResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
data_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.Builder.class);
}
public static final int DATA_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString data_;
/**
* <pre>
* Data contains same raw bytes returned as data from the wasm contract.
* (May be empty)
* </pre>
*
* <code>bytes data = 1;</code>
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!data_.isEmpty()) {
output.writeBytes(1, data_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, data_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse other = (starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse) obj;
if (!getData()
.equals(other.getData())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgMigrateContractResponse returns contract migration result data.
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgMigrateContractResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgMigrateContractResponse)
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
data_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse build() {
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse result = new starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse(this);
result.data_ = data_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse.getDefaultInstance()) return this;
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Data contains same raw bytes returned as data from the wasm contract.
* (May be empty)
* </pre>
*
* <code>bytes data = 1;</code>
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
* <pre>
* Data contains same raw bytes returned as data from the wasm contract.
* (May be empty)
* </pre>
*
* <code>bytes data = 1;</code>
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
* <pre>
* Data contains same raw bytes returned as data from the wasm contract.
* (May be empty)
* </pre>
*
* <code>bytes data = 1;</code>
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgMigrateContractResponse)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgMigrateContractResponse)
private static final starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgMigrateContractResponse>
PARSER = new com.google.protobuf.AbstractParser<MsgMigrateContractResponse>() {
@java.lang.Override
public MsgMigrateContractResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgMigrateContractResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgMigrateContractResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgMigrateContractResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgMigrateContractResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgUpdateAdminOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgUpdateAdmin)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
java.lang.String getSender();
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
com.google.protobuf.ByteString
getSenderBytes();
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return The newAdmin.
*/
java.lang.String getNewAdmin();
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return The bytes for newAdmin.
*/
com.google.protobuf.ByteString
getNewAdminBytes();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The contract.
*/
java.lang.String getContract();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The bytes for contract.
*/
com.google.protobuf.ByteString
getContractBytes();
}
/**
* <pre>
* MsgUpdateAdmin sets a new admin for a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgUpdateAdmin}
*/
public static final class MsgUpdateAdmin extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgUpdateAdmin)
MsgUpdateAdminOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgUpdateAdmin.newBuilder() to construct.
private MsgUpdateAdmin(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgUpdateAdmin() {
sender_ = "";
newAdmin_ = "";
contract_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgUpdateAdmin();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgUpdateAdmin(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
sender_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
newAdmin_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
contract_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.class, starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.Builder.class);
}
public static final int SENDER_FIELD_NUMBER = 1;
private volatile java.lang.Object sender_;
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
@java.lang.Override
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NEW_ADMIN_FIELD_NUMBER = 2;
private volatile java.lang.Object newAdmin_;
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return The newAdmin.
*/
@java.lang.Override
public java.lang.String getNewAdmin() {
java.lang.Object ref = newAdmin_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
newAdmin_ = s;
return s;
}
}
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return The bytes for newAdmin.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNewAdminBytes() {
java.lang.Object ref = newAdmin_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
newAdmin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTRACT_FIELD_NUMBER = 3;
private volatile java.lang.Object contract_;
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The contract.
*/
@java.lang.Override
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The bytes for contract.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getSenderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_);
}
if (!getNewAdminBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newAdmin_);
}
if (!getContractBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, contract_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSenderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_);
}
if (!getNewAdminBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newAdmin_);
}
if (!getContractBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, contract_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin other = (starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin) obj;
if (!getSender()
.equals(other.getSender())) return false;
if (!getNewAdmin()
.equals(other.getNewAdmin())) return false;
if (!getContract()
.equals(other.getContract())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENDER_FIELD_NUMBER;
hash = (53 * hash) + getSender().hashCode();
hash = (37 * hash) + NEW_ADMIN_FIELD_NUMBER;
hash = (53 * hash) + getNewAdmin().hashCode();
hash = (37 * hash) + CONTRACT_FIELD_NUMBER;
hash = (53 * hash) + getContract().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgUpdateAdmin sets a new admin for a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgUpdateAdmin}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgUpdateAdmin)
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.class, starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sender_ = "";
newAdmin_ = "";
contract_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin build() {
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin result = new starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin(this);
result.sender_ = sender_;
result.newAdmin_ = newAdmin_;
result.contract_ = contract_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin.getDefaultInstance()) return this;
if (!other.getSender().isEmpty()) {
sender_ = other.sender_;
onChanged();
}
if (!other.getNewAdmin().isEmpty()) {
newAdmin_ = other.newAdmin_;
onChanged();
}
if (!other.getContract().isEmpty()) {
contract_ = other.contract_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object sender_ = "";
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The sender to set.
* @return This builder for chaining.
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sender_ = value;
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSender() {
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The bytes for sender to set.
* @return This builder for chaining.
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sender_ = value;
onChanged();
return this;
}
private java.lang.Object newAdmin_ = "";
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return The newAdmin.
*/
public java.lang.String getNewAdmin() {
java.lang.Object ref = newAdmin_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
newAdmin_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return The bytes for newAdmin.
*/
public com.google.protobuf.ByteString
getNewAdminBytes() {
java.lang.Object ref = newAdmin_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
newAdmin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @param value The newAdmin to set.
* @return This builder for chaining.
*/
public Builder setNewAdmin(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
newAdmin_ = value;
onChanged();
return this;
}
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @return This builder for chaining.
*/
public Builder clearNewAdmin() {
newAdmin_ = getDefaultInstance().getNewAdmin();
onChanged();
return this;
}
/**
* <pre>
* NewAdmin address to be set
* </pre>
*
* <code>string new_admin = 2;</code>
* @param value The bytes for newAdmin to set.
* @return This builder for chaining.
*/
public Builder setNewAdminBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
newAdmin_ = value;
onChanged();
return this;
}
private java.lang.Object contract_ = "";
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The contract.
*/
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The bytes for contract.
*/
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @param value The contract to set.
* @return This builder for chaining.
*/
public Builder setContract(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contract_ = value;
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return This builder for chaining.
*/
public Builder clearContract() {
contract_ = getDefaultInstance().getContract();
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @param value The bytes for contract to set.
* @return This builder for chaining.
*/
public Builder setContractBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contract_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgUpdateAdmin)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgUpdateAdmin)
private static final starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgUpdateAdmin>
PARSER = new com.google.protobuf.AbstractParser<MsgUpdateAdmin>() {
@java.lang.Override
public MsgUpdateAdmin parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgUpdateAdmin(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgUpdateAdmin> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgUpdateAdmin> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdmin getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgUpdateAdminResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse)
com.google.protobuf.MessageOrBuilder {
}
/**
* <pre>
* MsgUpdateAdminResponse returns empty data
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse}
*/
public static final class MsgUpdateAdminResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse)
MsgUpdateAdminResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgUpdateAdminResponse.newBuilder() to construct.
private MsgUpdateAdminResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgUpdateAdminResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgUpdateAdminResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgUpdateAdminResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.Builder.class);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse other = (starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse) obj;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgUpdateAdminResponse returns empty data
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse)
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse build() {
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse result = new starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse.getDefaultInstance()) return this;
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgUpdateAdminResponse)
private static final starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgUpdateAdminResponse>
PARSER = new com.google.protobuf.AbstractParser<MsgUpdateAdminResponse>() {
@java.lang.Override
public MsgUpdateAdminResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgUpdateAdminResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgUpdateAdminResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgUpdateAdminResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgUpdateAdminResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgClearAdminOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgClearAdmin)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
java.lang.String getSender();
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
com.google.protobuf.ByteString
getSenderBytes();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The contract.
*/
java.lang.String getContract();
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The bytes for contract.
*/
com.google.protobuf.ByteString
getContractBytes();
}
/**
* <pre>
* MsgClearAdmin removes any admin stored for a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgClearAdmin}
*/
public static final class MsgClearAdmin extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgClearAdmin)
MsgClearAdminOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgClearAdmin.newBuilder() to construct.
private MsgClearAdmin(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgClearAdmin() {
sender_ = "";
contract_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgClearAdmin();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgClearAdmin(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
sender_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
contract_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.class, starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.Builder.class);
}
public static final int SENDER_FIELD_NUMBER = 1;
private volatile java.lang.Object sender_;
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
@java.lang.Override
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTRACT_FIELD_NUMBER = 3;
private volatile java.lang.Object contract_;
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The contract.
*/
@java.lang.Override
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The bytes for contract.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getSenderBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_);
}
if (!getContractBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, contract_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSenderBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_);
}
if (!getContractBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, contract_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin other = (starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin) obj;
if (!getSender()
.equals(other.getSender())) return false;
if (!getContract()
.equals(other.getContract())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENDER_FIELD_NUMBER;
hash = (53 * hash) + getSender().hashCode();
hash = (37 * hash) + CONTRACT_FIELD_NUMBER;
hash = (53 * hash) + getContract().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgClearAdmin removes any admin stored for a smart contract
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgClearAdmin}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgClearAdmin)
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.class, starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sender_ = "";
contract_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin build() {
starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin result = new starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin(this);
result.sender_ = sender_;
result.contract_ = contract_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin.getDefaultInstance()) return this;
if (!other.getSender().isEmpty()) {
sender_ = other.sender_;
onChanged();
}
if (!other.getContract().isEmpty()) {
contract_ = other.contract_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object sender_ = "";
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The sender.
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return The bytes for sender.
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The sender to set.
* @return This builder for chaining.
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sender_ = value;
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSender() {
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* <pre>
* Sender is the that actor that signed the messages
* </pre>
*
* <code>string sender = 1;</code>
* @param value The bytes for sender to set.
* @return This builder for chaining.
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sender_ = value;
onChanged();
return this;
}
private java.lang.Object contract_ = "";
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The contract.
*/
public java.lang.String getContract() {
java.lang.Object ref = contract_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contract_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return The bytes for contract.
*/
public com.google.protobuf.ByteString
getContractBytes() {
java.lang.Object ref = contract_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contract_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @param value The contract to set.
* @return This builder for chaining.
*/
public Builder setContract(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contract_ = value;
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @return This builder for chaining.
*/
public Builder clearContract() {
contract_ = getDefaultInstance().getContract();
onChanged();
return this;
}
/**
* <pre>
* Contract is the address of the smart contract
* </pre>
*
* <code>string contract = 3;</code>
* @param value The bytes for contract to set.
* @return This builder for chaining.
*/
public Builder setContractBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contract_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgClearAdmin)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgClearAdmin)
private static final starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgClearAdmin>
PARSER = new com.google.protobuf.AbstractParser<MsgClearAdmin>() {
@java.lang.Override
public MsgClearAdmin parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgClearAdmin(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgClearAdmin> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgClearAdmin> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdmin getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MsgClearAdminResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:starnamed.x.wasm.v1beta1.MsgClearAdminResponse)
com.google.protobuf.MessageOrBuilder {
}
/**
* <pre>
* MsgClearAdminResponse returns empty data
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgClearAdminResponse}
*/
public static final class MsgClearAdminResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:starnamed.x.wasm.v1beta1.MsgClearAdminResponse)
MsgClearAdminResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MsgClearAdminResponse.newBuilder() to construct.
private MsgClearAdminResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private MsgClearAdminResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MsgClearAdminResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MsgClearAdminResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.Builder.class);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse)) {
return super.equals(obj);
}
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse other = (starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse) obj;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* MsgClearAdminResponse returns empty data
* </pre>
*
* Protobuf type {@code starnamed.x.wasm.v1beta1.MsgClearAdminResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:starnamed.x.wasm.v1beta1.MsgClearAdminResponse)
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.class, starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.Builder.class);
}
// Construct using starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return starnamed.x.wasm.v1beta1.Tx.internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_descriptor;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse getDefaultInstanceForType() {
return starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.getDefaultInstance();
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse build() {
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse buildPartial() {
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse result = new starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse) {
return mergeFrom((starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse other) {
if (other == starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse.getDefaultInstance()) return this;
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:starnamed.x.wasm.v1beta1.MsgClearAdminResponse)
}
// @@protoc_insertion_point(class_scope:starnamed.x.wasm.v1beta1.MsgClearAdminResponse)
private static final starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse();
}
public static starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<MsgClearAdminResponse>
PARSER = new com.google.protobuf.AbstractParser<MsgClearAdminResponse>() {
@java.lang.Override
public MsgClearAdminResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MsgClearAdminResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<MsgClearAdminResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<MsgClearAdminResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public starnamed.x.wasm.v1beta1.Tx.MsgClearAdminResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\036cosmwasm/wasm/v1beta1/tx.proto\022\030starna" +
"med.x.wasm.v1beta1\032\036cosmos/base/v1beta1/" +
"coin.proto\032\024gogoproto/gogo.proto\032!cosmwa" +
"sm/wasm/v1beta1/types.proto\"\261\001\n\014MsgStore" +
"Code\022\016\n\006sender\030\001 \001(\t\022(\n\016wasm_byte_code\030\002" +
" \001(\014B\020\342\336\037\014WASMByteCode\022\016\n\006source\030\003 \001(\t\022\017" +
"\n\007builder\030\004 \001(\t\022F\n\026instantiate_permissio" +
"n\030\005 \001(\0132&.starnamed.x.wasm.v1beta1.Acces" +
"sConfig\"3\n\024MsgStoreCodeResponse\022\033\n\007code_" +
"id\030\001 \001(\004B\n\342\336\037\006CodeID\"\321\001\n\026MsgInstantiateC" +
"ontract\022\016\n\006sender\030\001 \001(\t\022\r\n\005admin\030\002 \001(\t\022\033" +
"\n\007code_id\030\003 \001(\004B\n\342\336\037\006CodeID\022\r\n\005label\030\004 \001" +
"(\t\022\020\n\010init_msg\030\005 \001(\014\022Z\n\005funds\030\006 \003(\0132\031.co" +
"smos.base.v1beta1.CoinB0\310\336\037\000\252\337\037(github.c" +
"om/cosmos/cosmos-sdk/types.Coins\"?\n\036MsgI" +
"nstantiateContractResponse\022\017\n\007address\030\001 " +
"\001(\t\022\014\n\004data\030\002 \001(\014\"\237\001\n\022MsgExecuteContract" +
"\022\016\n\006sender\030\001 \001(\t\022\020\n\010contract\030\002 \001(\t\022\013\n\003ms" +
"g\030\003 \001(\014\022Z\n\005funds\030\005 \003(\0132\031.cosmos.base.v1b" +
"eta1.CoinB0\310\336\037\000\252\337\037(github.com/cosmos/cos" +
"mos-sdk/types.Coins\"*\n\032MsgExecuteContrac" +
"tResponse\022\014\n\004data\030\001 \001(\014\"h\n\022MsgMigrateCon" +
"tract\022\016\n\006sender\030\001 \001(\t\022\020\n\010contract\030\002 \001(\t\022" +
"\033\n\007code_id\030\003 \001(\004B\n\342\336\037\006CodeID\022\023\n\013migrate_" +
"msg\030\004 \001(\014\"*\n\032MsgMigrateContractResponse\022" +
"\014\n\004data\030\001 \001(\014\"E\n\016MsgUpdateAdmin\022\016\n\006sende" +
"r\030\001 \001(\t\022\021\n\tnew_admin\030\002 \001(\t\022\020\n\010contract\030\003" +
" \001(\t\"\030\n\026MsgUpdateAdminResponse\"1\n\rMsgCle" +
"arAdmin\022\016\n\006sender\030\001 \001(\t\022\020\n\010contract\030\003 \001(" +
"\t\"\027\n\025MsgClearAdminResponse2\257\005\n\003Msg\022c\n\tSt" +
"oreCode\022&.starnamed.x.wasm.v1beta1.MsgSt" +
"oreCode\032..starnamed.x.wasm.v1beta1.MsgSt" +
"oreCodeResponse\022\201\001\n\023InstantiateContract\022" +
"0.starnamed.x.wasm.v1beta1.MsgInstantiat" +
"eContract\0328.starnamed.x.wasm.v1beta1.Msg" +
"InstantiateContractResponse\022u\n\017ExecuteCo" +
"ntract\022,.starnamed.x.wasm.v1beta1.MsgExe" +
"cuteContract\0324.starnamed.x.wasm.v1beta1." +
"MsgExecuteContractResponse\022u\n\017MigrateCon" +
"tract\022,.starnamed.x.wasm.v1beta1.MsgMigr" +
"ateContract\0324.starnamed.x.wasm.v1beta1.M" +
"sgMigrateContractResponse\022i\n\013UpdateAdmin" +
"\022(.starnamed.x.wasm.v1beta1.MsgUpdateAdm" +
"in\0320.starnamed.x.wasm.v1beta1.MsgUpdateA" +
"dminResponse\022f\n\nClearAdmin\022\'.starnamed.x" +
".wasm.v1beta1.MsgClearAdmin\032/.starnamed." +
"x.wasm.v1beta1.MsgClearAdminResponseB/Z)" +
"github.com/iov-one/starnamed/x/wasm/type" +
"s\310\341\036\000b\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
cosmos.base.v1beta1.CoinOuterClass.getDescriptor(),
com.google.protobuf2.GoGoProtos.getDescriptor(),
starnamed.x.wasm.v1beta1.Types.getDescriptor(),
});
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCode_descriptor,
new java.lang.String[] { "Sender", "WasmByteCode", "Source", "Builder", "InstantiatePermission", });
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgStoreCodeResponse_descriptor,
new java.lang.String[] { "CodeId", });
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContract_descriptor,
new java.lang.String[] { "Sender", "Admin", "CodeId", "Label", "InitMsg", "Funds", });
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgInstantiateContractResponse_descriptor,
new java.lang.String[] { "Address", "Data", });
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContract_descriptor,
new java.lang.String[] { "Sender", "Contract", "Msg", "Funds", });
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgExecuteContractResponse_descriptor,
new java.lang.String[] { "Data", });
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContract_descriptor,
new java.lang.String[] { "Sender", "Contract", "CodeId", "MigrateMsg", });
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgMigrateContractResponse_descriptor,
new java.lang.String[] { "Data", });
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdmin_descriptor,
new java.lang.String[] { "Sender", "NewAdmin", "Contract", });
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgUpdateAdminResponse_descriptor,
new java.lang.String[] { });
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdmin_descriptor,
new java.lang.String[] { "Sender", "Contract", });
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_starnamed_x_wasm_v1beta1_MsgClearAdminResponse_descriptor,
new java.lang.String[] { });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.protobuf2.GoGoProtos.castrepeated);
registry.add(com.google.protobuf2.GoGoProtos.customname);
registry.add(com.google.protobuf2.GoGoProtos.goprotoGettersAll);
registry.add(com.google.protobuf2.GoGoProtos.nullable);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
cosmos.base.v1beta1.CoinOuterClass.getDescriptor();
com.google.protobuf2.GoGoProtos.getDescriptor();
starnamed.x.wasm.v1beta1.Types.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
| [
"[email protected]"
] | |
37d729f85ce60495c789fd0a01e77ce2d48a4e59 | 8f5d3d144cf98de0b0c535526eb65db0702d4ffc | /main/java/dqr/blocks/mobFigure/render/DqmTileEntityRenderFigurePuyon.java | ad7337b82eecd0671d4ccb6c4d97e3be355bb6bb | [] | no_license | azelDqm/MC1.7.10_DQRmod | 54c0790b80c11a8ae591f17d233adc95f1b7e41a | bfec0e17fcade9d4616ac29b5abcbb12aa562d2a | refs/heads/master | 2020-04-16T02:26:44.596119 | 2020-04-06T08:58:47 | 2020-04-06T08:58:47 | 57,311,023 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,867 | java | package dqr.blocks.mobFigure.render;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dqr.DQR;
import dqr.blocks.mobFigure.tileEntity.DqmTileEntityFigurePuyon;
import dqr.entity.mobEntity.model.DqmModelBaburin;
@SideOnly(Side.CLIENT)
public class DqmTileEntityRenderFigurePuyon extends TileEntitySpecialRenderer
{
//モデル
private DqmModelBaburin model = new DqmModelBaburin();
private float fixA = 0;
private float fixB = 1.0F;
private float fixC = 0;
private float fixD = 1.0F;
private static final ResourceLocation DqmMobTexture = new ResourceLocation("dqr:textures/entity/mob/Puyon.png");
public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
{
//エンティティ
DqmTileEntityFigurePuyon var9 = (DqmTileEntityFigurePuyon)var1;
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5F, (float)var4 + (1.5F * fixB / DQR.conf.figureMagni) + fixA, (float)var6 + 0.5F);
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
if (var9.getBlockMetadata() == 1)
{
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
}
if (var9.getBlockMetadata() == 2)
{
GL11.glRotatef(-180.0F, 0.0F, 1.0F, 0.0F);
}
if (var9.getBlockMetadata() == 3)
{
GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F);
}
//テクスチャー
this.bindTexture(DqmMobTexture);
GL11.glPushMatrix();
this.model.modelRender((0.0625F * fixD / DQR.conf.figureMagni) + fixC);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}
| [
"[email protected]"
] | |
513c54495771599c0112e76631a471f91d06618f | 50d921566816872a246fb74732582d8c6adef90c | /hekate-core/src/test/java/io/hekate/messaging/internal/BackPressureAggregateTest.java | f89f2b3475bb4f7728c100d45ff0a022be3cb1ce | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hekate-io/hekate | d33216bf802c00a8eb4a2729adc603d6cd7dcbd3 | cf577c98e66cdcc9c10d582da006c22b0d8da8fa | refs/heads/master | 2023-07-20T10:21:17.453105 | 2022-11-25T17:19:49 | 2022-11-25T17:19:49 | 84,603,051 | 24 | 4 | Apache-2.0 | 2023-07-05T20:52:50 | 2017-03-10T21:43:25 | Java | UTF-8 | Java | false | false | 8,097 | java | /*
* Copyright 2022 The Hekate Project
*
* The Hekate Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.hekate.messaging.internal;
import io.hekate.messaging.Message;
import io.hekate.messaging.MessagingChannel;
import io.hekate.messaging.MessagingOverflowPolicy;
import io.hekate.messaging.operation.AggregateFuture;
import io.hekate.messaging.operation.AggregateResult;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.stream.Stream;
import org.junit.Test;
import org.junit.runners.Parameterized.Parameters;
import static java.util.stream.Collectors.toList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class BackPressureAggregateTest extends BackPressureTestBase {
public static final int RECEIVERS = 2;
public BackPressureAggregateTest(BackPressureTestContext ctx) {
super(ctx);
}
@Parameters(name = "{index}: {0}")
public static Collection<BackPressureTestContext> getBackPressureTestContexts() {
return getMessagingServiceTestContexts().stream().flatMap(ctx ->
Stream.of(
// Multiply lo/hi watermarks by the number of receivers, since each broadcast/aggregate operation takes
// a number of back pressure slots that is proportional to the number of receiving nodes.
new BackPressureTestContext(ctx, 0, RECEIVERS),
new BackPressureTestContext(ctx, 2 * RECEIVERS, 4 * RECEIVERS)
))
.collect(toList());
}
@Test
public void test() throws Exception {
List<Message<String>> requests1 = new CopyOnWriteArrayList<>();
List<Message<String>> requests2 = new CopyOnWriteArrayList<>();
createChannel(c -> useBackPressure(c)
.withReceiver(requests1::add)
).join();
createChannel(c -> useBackPressure(c)
.withReceiver(requests2::add)
).join();
MessagingChannel<String> sender = createChannel(this::useBackPressure).join().channel().forRemotes();
// Request (aggregate) up to high watermark in order to trigger back pressure.
List<AggregateFuture<?>> futureResponses = new ArrayList<>();
for (int i = 0; i < highWatermark / RECEIVERS; i++) {
futureResponses.add(sender.newAggregate("request-" + i).submit());
}
busyWait("requests received", () -> requests1.size() == futureResponses.size());
busyWait("requests received", () -> requests2.size() == futureResponses.size());
// Check that message can't be sent when high watermark reached.
assertBackPressureEnabled(sender);
// Go down to low watermark.
for (int i = 0; i < getLowWatermarkBounds(); i++) {
String request = "request-" + i;
requests1.stream().filter(r -> r.payload().equals(request)).findFirst().ifPresent(r -> r.reply("ok"));
}
for (int i = 0; i < getLowWatermarkBounds(); i++) {
String request = "request-" + i;
requests2.stream().filter(r -> r.payload().equals(request)).findFirst().ifPresent(r -> r.reply("ok"));
}
busyWait("responses received", () ->
futureResponses.stream().filter(CompletableFuture::isDone).count() == getLowWatermarkBounds()
);
// Check that new request can be processed.
AggregateFuture<String> last = sender.newAggregate("last").submit();
busyWait("last request received", () -> requests1.size() == futureResponses.size() + 1);
busyWait("last request received", () -> requests2.size() == futureResponses.size() + 1);
requests1.stream().filter(Message::mustReply).forEach(r -> r.reply("ok"));
requests2.stream().filter(Message::mustReply).forEach(r -> r.reply("ok"));
assertTrue(get(last).isSuccess());
for (Future<?> future : futureResponses) {
get(future);
}
}
@Test
public void testFailure() throws Exception {
List<Message<String>> requests1 = new CopyOnWriteArrayList<>();
List<Message<String>> requests2 = new CopyOnWriteArrayList<>();
createChannel(c -> useBackPressure(c)
.withReceiver(requests1::add)
).join();
TestChannel receiver2 = createChannel(c -> useBackPressure(c)
.withReceiver(requests2::add)
).join();
MessagingChannel<String> sender = createChannel(this::useBackPressure).join().channel().forRemotes();
// Request (aggregate) up to high watermark in order to trigger back pressure.
List<AggregateFuture<?>> futureResponses = new ArrayList<>();
for (int i = 0; i < highWatermark / RECEIVERS; i++) {
futureResponses.add(sender.newAggregate("request-" + i).submit());
}
// Check that message can't be sent when high watermark reached.
assertBackPressureEnabled(sender);
busyWait("requests received", () -> requests1.size() == futureResponses.size());
busyWait("requests received", () -> requests2.size() == futureResponses.size());
// Go down to low watermark on first node.
for (int i = 0; i < getLowWatermarkBounds(); i++) {
String request = "request-" + i;
requests1.stream()
.filter(r -> r.payload().equals(request))
.findFirst()
.ifPresent(r ->
r.reply("ok")
);
}
// Stop second receiver so that all pending requests would partially fail.
receiver2.leave();
busyWait("responses received", () ->
futureResponses.stream().filter(CompletableFuture::isDone).count() == getLowWatermarkBounds()
);
// Check that new request can be processed.
AggregateFuture<String> last = sender.newAggregate("last").submit();
busyWait("last request received", () -> requests1.size() == futureResponses.size() + 1);
requests1.stream().filter(Message::mustReply).forEach(r -> r.reply("ok"));
assertTrue(get(last).isSuccess());
for (Future<?> future : futureResponses) {
get(future);
}
}
@Test
public void testContinuousBlocking() throws Exception {
int remoteNodes = 2;
for (int i = 0; i < remoteNodes; i++) {
createChannel(c -> useBackPressure(c)
.withReceiver(msg -> msg.reply("ok"))
).join();
}
MessagingChannel<String> sender = createChannel(cfg -> {
useBackPressure(cfg);
cfg.getBackPressure().withOutOverflowPolicy(MessagingOverflowPolicy.BLOCK);
}).join().channel().forRemotes();
get(sender.cluster().futureOf(topology -> topology.size() == remoteNodes));
int requests = 1000;
List<AggregateFuture<String>> asyncResponses = new ArrayList<>(requests);
for (int i = 0; i < requests; i++) {
if (i > 0 && i % 100 == 0) {
say("Submitted requests: %s", i);
}
asyncResponses.add(sender.newAggregate("test-" + i).submit());
}
for (AggregateFuture<String> future : asyncResponses) {
AggregateResult<String> result = get(future);
assertTrue(result.isSuccess());
assertEquals(2, result.resultsByNode().size());
}
}
}
| [
"[email protected]"
] | |
141d4c379be3979d95a834a930c8dbd69dc26c5c | 7e1511cdceeec0c0aad2b9b916431fc39bc71d9b | /flakiness-predicter/input_data/original_tests/spring-projects-spring-boot/nonFlakyMethods/org.springframework.boot.autoconfigure.web.DefaultErrorAttributesTests-unwrapServletException.java | 44095edfecb460a5b836a6c3633eb5ade32f3e6e | [
"BSD-3-Clause"
] | permissive | Taher-Ghaleb/FlakeFlagger | 6fd7c95d2710632fd093346ce787fd70923a1435 | 45f3d4bc5b790a80daeb4d28ec84f5e46433e060 | refs/heads/main | 2023-07-14T16:57:24.507743 | 2021-08-26T14:50:16 | 2021-08-26T14:50:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 621 | java | @Test public void unwrapServletException() throws Exception {
RuntimeException ex=new RuntimeException("Test");
ServletException wrapped=new ServletException(new ServletException(ex));
this.request.setAttribute("javax.servlet.error.exception",wrapped);
Map<String,Object> attributes=this.errorAttributes.getErrorAttributes(this.requestAttributes,false);
assertThat(this.errorAttributes.getError(this.requestAttributes),sameInstance((Object)wrapped));
assertThat(attributes.get("exception"),equalTo((Object)RuntimeException.class.getName()));
assertThat(attributes.get("message"),equalTo((Object)"Test"));
}
| [
"[email protected]"
] | |
b535bc2cd6b91584f94510751cc922e7cb0016a3 | b88a7f5a32c7ca246bab7e92864fb95be1f07fc9 | /vector/Vectorpgm6.java | a409e90af22d38ef89b636141fe4785f9f02d506 | [] | no_license | DivyaMididuddi/project | bfc3539b381381cf0393b7211fc06c61e690811d | ca1bdef9af78d394e6b23d5316caa35a8fafc58a | refs/heads/master | 2022-06-18T04:02:53.044852 | 2020-05-10T15:33:01 | 2020-05-10T15:33:01 | 262,814,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package vector;
import java.util.Vector;
public class Vectorpgm6
{
public static void main(String[] args)
{
Vector f1=new Vector();
f1.add('s');
f1.add('d');
f1.add('h');
f1.add('c');
System.out.println(f1);
}
}
| [
"Divya@DESKTOP-JS5HGFG"
] | Divya@DESKTOP-JS5HGFG |
4baaaeabfe788c0c0466d089a16e591b4b3655c6 | e93e1678fc955a53b9f05e491e14a93c0aade528 | /src/main/java/webapp/maven/webapp/Episodes.java | e72712b7d9e6faae4732fedf498a4341f4037e99 | [] | no_license | ngongocqui1995/moviestore-java-getdata-ztv | ad66506661956f3d7c1d9b2802d90989f13594b7 | 9e28cd0bcee191d406006db309a104d33a703f12 | refs/heads/master | 2023-08-28T21:56:17.734243 | 2018-09-28T03:38:45 | 2018-09-28T03:38:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,045 | java | package webapp.maven.webapp;
public class Episodes {
private String title;
private String url;
private String urlReal;
private String numberEpisodes;
private String key;
private String timeASet;
private String img;
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public String getUrlReal() {
return urlReal;
}
public void setUrlReal(String urlReal) {
this.urlReal = urlReal;
}
public String getTitle() {
return title;
}
public String getTimeASet() {
return timeASet;
}
public void setTimeASet(String timeASet) {
this.timeASet = timeASet;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getNumberEpisodes() {
return numberEpisodes;
}
public void setNumberEpisodes(String numberEpisodes) {
this.numberEpisodes = numberEpisodes;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
| [
"[email protected]"
] | |
14a2caf700054a2e712e09fdbb8f0b9e19ddbbc1 | 9de64afbff52057a461d1df74c5339e9d1962ae9 | /app/src/main/java/us/blanshard/sudoku/android/NetworkService.java | accd8dc2ac159a02a07d0d5b8f0820d5a040d355 | [] | no_license | leadpipe/sudoku-insight-android | f355b97e247eabfe15f7edbe32f581d7ff03fefb | 1b58d7c0e9c706f614923693457be7156574bb3f | refs/heads/master | 2021-06-12T23:33:02.516355 | 2017-02-25T23:29:21 | 2017-02-25T23:29:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 27,143 | java | /*
Copyright 2013 Luke Blanshard
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package us.blanshard.sudoku.android;
import static java.util.concurrent.TimeUnit.HOURS;
import static java.util.concurrent.TimeUnit.SECONDS;
import static us.blanshard.sudoku.android.Json.GSON;
import us.blanshard.sudoku.game.GameJson;
import us.blanshard.sudoku.gen.Generator;
import us.blanshard.sudoku.messages.InstallationRpcs;
import us.blanshard.sudoku.messages.PuzzleRpcs;
import us.blanshard.sudoku.messages.Rpc;
import android.accounts.Account;
import android.app.IntentService;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.util.Log;
import com.google.android.gms.auth.GoogleAuthUtil;
import com.google.common.base.Charsets;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nullable;
/**
* The "started service" that interacts with our AppEngine server over the
* network.
*
* @author Luke Blanshard
*/
public class NetworkService extends IntentService {
/**
* A callback to be notified when any puzzle's stats have been updated from
* the central server.
*/
public interface StatsCallback {
void statsUpdated(long puzzleId);
}
public static void addStatsCallback(StatsCallback callback) {
statsCallbacks.add(callback);
}
public static void runStartupTimeOps(Context context) {
pendingOps.add(new SaveInstallationOp());
runOp(context, new SaveAllUnsavedAttemptsAndVotesOp(), "Startup time ops started");
}
public static void saveInstallationInfo(Context context) {
runOp(context, new SaveInstallationOp(), "Save installation started");
}
public static void saveAttempt(Context context, Database.Attempt attempt) {
runOp(context, new SaveAttemptOp(attempt), "Saving attempt " + attempt._id);
}
public static void saveVote(Context context, long puzzleId) {
runOp(context, new SaveVoteOp(puzzleId), "Saving vote for " + puzzleId);
}
public static void updateOldStats(Context context, long cutoff) {
runOp(context, new UpdateOldStatsOp(cutoff), "Updating old stats");
}
public static void updateStats(Context context, long puzzleId) {
runOp(context, new UpdateStatsOp(puzzleId), "Updating stats for " + puzzleId);
}
private static void runOp(Context context, Op op, String desc) {
pendingOps.add(op);
context.startService(new Intent(context, NetworkService.class));
Log.d(TAG, desc);
}
/**
* A high-level operation enqueued by the user-facing app for the network
* service to handle at the appropriate time.
*/
private interface Op {
/**
* Calculates the RPCs required to perform this operation, adds them to the
* given set. There may be nothing to do.
*/
void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs);
}
/**
* An operation corresponding to a single RPC to send and process.
*/
private interface RpcOp<T> {
/**
* Converts this object to the RPC request parameters it corresponds to, if
* it is still needed.
*/
@Nullable Object asRequestParams();
/**
* Exposes an object to guide the JSON parsing of the RPC response.
*/
TypeToken<T> getResultTypeToken();
/**
* Returns the RPC method name.
*/
String getMethod();
/**
* Returns a cost for this RPC, approximating the relative time required
* to service it.
*/
int getCost();
/**
* Processes the given response from the server. Returns true if the RPC is
* complete (whether successful or not), false if it should be retried.
*/
boolean process(Rpc.Response<T> response);
}
private static final Queue<Op> pendingOps = Queues.newConcurrentLinkedQueue();
private static final WeakCallbackCollection<StatsCallback> statsCallbacks =
WeakCallbackCollection.create();
/** The auth scope that lets the web app verify it's really the given user. */
private static final String SCOPE = "audience:server:client_id:826990774749.apps.googleusercontent.com";
private static final String ADD_OP = "us.blanshard.sudoku.android.AddOp";
private static final int SAVE_INSTALLATION = 1;
private static final long DEFAULT_RETRY_TIME_MS = SECONDS.toMillis(10);
private static final long MAX_RETRY_TIME_MS = HOURS.toMillis(1);
private static final String BASE_URL = "https://sudoku-insight.appspot.com/";
// "http://10.0.2.2:8888/"; // <-- reaches localhost
private static final String RPC_URL = BASE_URL + "rpc";
private static final String TAG = "NetworkService";
private static final TypeToken<InstallationRpcs.UpdateResult> SET_INSTALLATION_TOKEN =
new TypeToken<InstallationRpcs.UpdateResult>() {};
private static final TypeToken<PuzzleRpcs.AttemptResult> SAVE_ATTEMPT_TOKEN =
new TypeToken<PuzzleRpcs.AttemptResult>() {};
private static final TypeToken<PuzzleRpcs.VoteResult> SAVE_VOTE_TOKEN =
new TypeToken<PuzzleRpcs.VoteResult>() {};
private static final TypeToken<PuzzleRpcs.PuzzleResult> PUZZLE_STATS_TOKEN =
new TypeToken<PuzzleRpcs.PuzzleResult>() {};
private static final TypeToken<List<Rpc.Response<Object>>> BATCH_RESULT_TOKEN =
new TypeToken<List<Rpc.Response<Object>>>() {};
private static final int WRITE_COST = 8;
private static final int SAVE_ATTEMPT_COST = 20;
private static final int READ_COST = 1;
private static final int MAX_COST = 200;
private Prefs mPrefs;
private Database mDb;
private final Object mConnectivityLock = new Object();
private boolean mConnected;
private BroadcastReceiver mConnectivityMonitor;
private static final AtomicInteger sId = new AtomicInteger();
public NetworkService() {
super(TAG);
}
@Override public void onCreate() {
super.onCreate();
mPrefs = Prefs.instance(this);
mDb = Database.instance(this);
// Set up our connectivity monitoring.
IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
mConnectivityMonitor = new BroadcastReceiver() {
@Override public void onReceive(Context context, Intent intent) {
updateConnectivity();
}
};
registerReceiver(mConnectivityMonitor, filter);
// And establish the base state.
updateConnectivity();
}
@Override public void onDestroy() {
super.onDestroy();
unregisterReceiver(mConnectivityMonitor);
}
@Override protected void onHandleIntent(Intent intent) {
switch (intent.getIntExtra(ADD_OP, -1)) {
case SAVE_INSTALLATION:
pendingOps.add(new SaveInstallationOp());
break;
default:
break;
}
try {
processOps();
} catch (Throwable t) {
Log.d(TAG, "uncaught processing network ops", t);
}
}
private void updateConnectivity() {
ConnectivityManager connMgr =
(ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
synchronized (mConnectivityLock) {
mConnected = networkInfo != null && networkInfo.isConnected();
if (mConnected) mConnectivityLock.notifyAll();
}
}
private static class RpcCall<T> {
RpcOp<T> op;
Rpc.Request request;
Rpc.Response<T> response;
RpcCall(RpcOp<T> op, Object params) {
this.op = op;
this.request = new Rpc.Request();
this.request.method = op.getMethod();
this.request.params = params;
this.request.id = sId.incrementAndGet();
}
static <T> RpcCall<T> create(RpcOp<T> op, Object params) {
return new RpcCall<T>(op, params);
}
@SuppressWarnings("unchecked")
void setResponse(Rpc.Response<?> response) {
this.response = (Rpc.Response<T>) response;
}
boolean processResponse() {
return response != null && op.process(response);
}
}
private void processOps() {
long timeoutMs = DEFAULT_RETRY_TIME_MS;
Set<RpcOp<?>> pendingRpcOps = Sets.newLinkedHashSet();
while (!pendingOps.isEmpty() || !pendingRpcOps.isEmpty()) {
if (!waitUntilConnected())
break;
for (Op op; (op = pendingOps.poll()) != null; )
op.addRpcs(this, pendingRpcOps);
List<Rpc.Request> batch = Lists.newArrayList();
Map<Integer, RpcCall<?>> calls = Maps.newLinkedHashMap();
int cost = 0;
for (Iterator<RpcOp<?>> it = pendingRpcOps.iterator(); it.hasNext(); ) {
RpcOp<?> rpcOp = it.next();
if (cost + rpcOp.getCost() > MAX_COST)
break;
it.remove();
Object params = rpcOp.asRequestParams();
if (params == null)
continue;
cost += rpcOp.getCost();
RpcCall<?> call = RpcCall.create(rpcOp, params);
batch.add(call.request);
calls.put(call.request.id, call);
}
if (batch.isEmpty())
break;
// Log.d(TAG, "Sending " + batch.size() + " RPCs with cost " + cost);
if (processBatch(batch, calls, pendingRpcOps)) {
timeoutMs = DEFAULT_RETRY_TIME_MS;
continue;
}
// The RPCs that can be retried have been put back into the pending set.
// Sleep awhile and try again.
try {
Thread.sleep(timeoutMs);
timeoutMs = Math.min(MAX_RETRY_TIME_MS, timeoutMs * 3);
} catch (InterruptedException e) {
// Just stop if we're interrupted.
break;
}
}
}
private boolean waitUntilConnected() {
synchronized (mConnectivityLock) {
while (!mConnected)
try {
mConnectivityLock.wait();
} catch (InterruptedException e) {
return false;
}
}
return true;
}
/**
* Sends a batch RPC, processes their results. Returns true if all the calls
* are complete, false if some of them should be retried. In the false case,
* also puts the retriable ones back into the {@code pendingRpcOps} set.
*
* @param batch the requests to send
* @param calls mapping from request ID to call
* @param pendingRpcOps the set of RPC ops still left to send
* @return true if none need retrying
*/
private boolean processBatch(List<Rpc.Request> batch, Map<Integer, RpcCall<?>> calls,
Set<RpcOp<?>> pendingRpcOps) {
sendBatch(batch, calls);
boolean answer = true;
for (RpcCall<?> call : calls.values()) {
if (call.processResponse()) {
// if (call.response.error == null)
// Log.d(TAG, "Processed RPC " + call.request.method);
// else
// Log.i(TAG, "Processed failed RPC " + call.request.method + ", error "
// + GSON.toJson(call.response.error));
} else {
Log.w(TAG, "Unable to process RPC " + call.request.method + ", will retry");
pendingRpcOps.add(call.op);
answer = false;
}
}
return answer;
}
private void sendBatch(List<Rpc.Request> batch, final Map<Integer, RpcCall<?>> calls) {
String json = GSON.toJson(batch);
Rpc.Response<Object> singleReponse = null;
HttpURLConnection conn = null;
try {
URL url = new URL(RPC_URL);
conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setConnectTimeout((int) SECONDS.toMillis(15));
conn.setReadTimeout((int) SECONDS.toMillis(60)); // App engine request timeout
Writer out = new OutputStreamWriter(conn.getOutputStream(), Charsets.UTF_8);
out.write(json);
out.flush();
conn.connect();
conn.getHeaderFields(); // Waits for the response
if (url.getHost().equals(conn.getURL().getHost())) {
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
Reader reader = new InputStreamReader(conn.getInputStream(), Charsets.UTF_8);
JsonReader in = new JsonReader(reader);
if (in.peek() == JsonToken.BEGIN_ARRAY) {
Json.setIdToType(new Function<Integer, Type>() {
@Override public Type apply(@Nullable Integer input) {
return calls.get(input).op.getResultTypeToken().getType();
}
});
try {
List<Rpc.Response<?>> responses = GSON.fromJson(in, BATCH_RESULT_TOKEN.getType());
// Log.d(TAG, "#responses: " + responses.size());
for (Rpc.Response<?> res : responses) {
RpcCall<?> call = calls.get(res.id);
if (call == null) {
Log.w(TAG, "Mismatched ID in batch response: " + res.id);
} else {
call.setResponse(res);
}
}
} finally {
Json.setIdToType(null);
}
} else {
// Probably just a single error, something bad happened.
singleReponse = GSON.fromJson(in, Rpc.Response.class);
if (singleReponse.error == null)
singleReponse.error = Rpc.error(0, "unknown", null);
// Log.d(TAG, "RPC batch returned single response: " + GSON.toJson(singleReponse));
}
} else {
// Unexpected error from the server. Make a response object, so we
// don't retry.
singleReponse = new Rpc.Response<Object>();
singleReponse.error = Rpc.error(conn.getResponseCode(), conn.getResponseMessage(), null);
}
if (singleReponse != null) {
for (RpcCall<?> call : calls.values())
call.setResponse(singleReponse);
}
} else {
// Whoops, we were redirected unexpectedly. Possibly there's a
// network sign-on page.
Log.e(TAG, "redirected trying to send RPC: " + conn.getURL());
}
} catch (Exception e) {
Log.e(TAG, "send RPC batch", e);
} finally {
if (conn != null) conn.disconnect();
}
}
private static boolean shouldRetry(Rpc.Error error) {
return error != null && error.code == Rpc.RETRIABLE_ERROR;
}
// Op and RpcOp classes
/**
* The high-level operation for saving this installation's info to the server.
*/
private static class SaveInstallationOp implements Op {
@Override public void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs) {
// We always add the RpcOp, and figure out whether it needs sending only
// when about to send it.
rpcs.add(svc.new SaveInstallationRpcOp());
}
}
/**
* The RPC op for saving the installation's info. All instances compare equal,
* to fold multiple requests to save into a single RPC. In addition, this
* class verifies that there is some difference between what is currently
* saved and the new data, before actually sending an RPC.
*/
private class SaveInstallationRpcOp implements RpcOp<InstallationRpcs.UpdateResult> {
private String savedJson;
@Override public InstallationRpcs.UpdateParams asRequestParams() {
InstallationRpcs.UpdateParams params = makeInstallationParams();
savedJson = GSON.toJson(params);
String prev = mPrefs.getInstallData();
if (savedJson.equals(prev))
return null;
try {
if (params.account != null) {
Intent intent = new Intent(NetworkService.this, NetworkService.class);
intent.putExtra(ADD_OP, SAVE_INSTALLATION);
params.account.authToken = GoogleAuthUtil.getTokenWithNotification(
NetworkService.this, params.account.id, SCOPE, null, intent);
}
} catch (Exception e) {
Log.e(TAG, "problem getting auth token", e);
// Delink the account from the installation. This isn't great, but it's
// preferable to not being able to save the installation at all.
params.account = null;
savedJson = GSON.toJson(params);
if (savedJson.equals(prev))
return null;
}
// Clear out our notion of what's been synced with the server.
mPrefs.setInstallDataSync("");
return params;
}
@Override public TypeToken<InstallationRpcs.UpdateResult> getResultTypeToken() {
return SET_INSTALLATION_TOKEN;
}
@Override public String getMethod() {
return InstallationRpcs.UPDATE_METHOD;
}
@Override public int getCost() {
return WRITE_COST;
}
@Override public boolean process(Rpc.Response<InstallationRpcs.UpdateResult> res) {
if (res.result != null) {
mPrefs.setInstallDataSync(savedJson);
if (res.result.installationName != null)
mPrefs.setDeviceNameAsync(res.result.installationName);
mPrefs.setStreamAsync(res.result.stream);
// Setting the stream count has to come after the stream itself:
mPrefs.setStreamCountAsync(res.result.streamCount);
}
return !shouldRetry(res.error);
}
@Override public boolean equals(Object o) {
return o instanceof SaveInstallationRpcOp;
}
@Override public int hashCode() {
return SaveInstallationRpcOp.class.hashCode();
}
private InstallationRpcs.UpdateParams makeInstallationParams() {
InstallationRpcs.UpdateParams params = new InstallationRpcs.UpdateParams();
params.id = Installation.id(NetworkService.this);
params.shareData = mPrefs.getShareData();
params.androidSdk = Build.VERSION.SDK_INT;
params.androidAppVersion = getAppVersion();
params.manufacturer = Build.MANUFACTURER;
params.model = Build.MODEL;
params.streamCount = mPrefs.getStreamCount();
params.stream = mPrefs.getStream();
params.monthNumber = mPrefs.getMonthNumber();
Account account = mPrefs.getUserAccount();
if (account != null) {
params.account = new InstallationRpcs.AccountInfo();
params.account.id = account.name;
params.account.installationName = mPrefs.getDeviceName();
}
return params;
}
private int getAppVersion() {
PackageManager pm = NetworkService.this.getPackageManager();
try {
PackageInfo info = pm.getPackageInfo("us.blanshard.sudoku.android", 0);
return info.versionCode;
} catch (NameNotFoundException e) {
Log.e(TAG, "our package not found", e);
return 0;
}
}
}
/**
* An Op for the startup-time task of bringing all attempts and votes up to
* date in the server.
*/
private static class SaveAllUnsavedAttemptsAndVotesOp implements Op {
@Override public void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs) {
for (Database.Attempt attempt : svc.mDb.getUnsavedAttempts())
rpcs.add(svc.new SaveAttemptRpcOp(attempt));
for (Database.Puzzle puzzle : svc.mDb.getPuzzlesWithUnsavedVotes())
rpcs.add(svc.new SaveVoteRpcOp(puzzle));
}
}
/**
* An Op for saving a particular attempt.
*/
private static class SaveAttemptOp implements Op {
private final Database.Attempt attempt;
public SaveAttemptOp(Database.Attempt attempt) {
this.attempt = attempt;
}
@Override public void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs) {
rpcs.add(svc.new SaveAttemptRpcOp(attempt));
}
}
/**
* An Op for saving a particular vote.
*/
private static class SaveVoteOp implements Op {
private final long puzzleId;
public SaveVoteOp(long puzzleId) {
this.puzzleId = puzzleId;
}
@Override public void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs) {
rpcs.add(svc.new SaveVoteRpcOp(svc.mDb.getFullPuzzle(puzzleId)));
}
}
/**
* The RPC op that saves an attempt.
*/
private class SaveAttemptRpcOp implements RpcOp<PuzzleRpcs.AttemptResult> {
private final Database.Attempt attempt;
public SaveAttemptRpcOp(Database.Attempt attempt) {
this.attempt = attempt;
}
@Override public PuzzleRpcs.AttemptParams asRequestParams() {
if (!attempt.attemptState.isComplete()) {
Log.e(TAG, "Trying to save an incomplete attempt " + attempt._id
+ ": " + attempt.attemptState);
return null;
}
PuzzleRpcs.AttemptParams params = new PuzzleRpcs.AttemptParams();
params.installationId = Installation.id(getApplicationContext());
params.attemptId = attempt._id;
params.puzzle = attempt.clues.toFlatString();
params.puzzleId = attempt.puzzleId;
JsonObject props = new JsonParser().parse(attempt.properties).getAsJsonObject();
if (props.has(Generator.NAME_KEY))
params.name = props.get(Generator.NAME_KEY).getAsString();
if (props.has(Generator.SOURCE_KEY))
params.source = props.get(Generator.SOURCE_KEY).getAsString();
params.history = GameJson.toHistory(Json.GSON, attempt.history);
params.elapsedMs = attempt.elapsedMillis;
params.stopTime = attempt.lastTime;
return params;
}
@Override public TypeToken<PuzzleRpcs.AttemptResult> getResultTypeToken() {
return SAVE_ATTEMPT_TOKEN;
}
@Override public String getMethod() {
return PuzzleRpcs.ATTEMPT_UPDATE_METHOD;
}
@Override public int getCost() {
return SAVE_ATTEMPT_COST;
}
@Override public boolean process(Rpc.Response<PuzzleRpcs.AttemptResult> res) {
if (res.result != null) {
mDb.markAttemptSaved(attempt._id, attempt.lastTime);
}
return !shouldRetry(res.error);
}
@Override public boolean equals(Object o) {
if (o instanceof SaveAttemptRpcOp) {
SaveAttemptRpcOp that = (SaveAttemptRpcOp) o;
return this.attempt._id == that.attempt._id;
}
return false;
}
@Override public int hashCode() {
return (int) attempt._id * 327852198 + 1283764;
}
}
/**
* The RPC op that saves a vote.
*/
private class SaveVoteRpcOp implements RpcOp<PuzzleRpcs.VoteResult> {
private final Database.Puzzle puzzle;
public SaveVoteRpcOp(Database.Puzzle puzzle) {
this.puzzle = puzzle;
}
@Override public PuzzleRpcs.VoteParams asRequestParams() {
PuzzleRpcs.VoteParams params = new PuzzleRpcs.VoteParams();
params.installationId = Installation.id(getApplicationContext());
params.puzzle = puzzle.clues.toFlatString();
params.vote = puzzle.vote;
return params;
}
@Override public TypeToken<PuzzleRpcs.VoteResult> getResultTypeToken() {
return SAVE_VOTE_TOKEN;
}
@Override public String getMethod() {
return PuzzleRpcs.VOTE_UPDATE_METHOD;
}
@Override public int getCost() {
return WRITE_COST;
}
@Override public boolean process(Rpc.Response<PuzzleRpcs.VoteResult> res) {
if (res.result != null) {
mDb.markVoteSaved(puzzle._id, puzzle.vote);
}
return !shouldRetry(res.error);
}
@Override public boolean equals(Object o) {
if (o instanceof SaveVoteRpcOp) {
SaveVoteRpcOp that = (SaveVoteRpcOp) o;
return this.puzzle._id == that.puzzle._id;
}
return false;
}
@Override public int hashCode() {
return (int) puzzle._id * 872634587 + 2384675;
}
}
/**
* An Op for updating all the puzzle stats last updated before a particular
* point in time.
*/
private static class UpdateOldStatsOp implements Op {
private final long cutoff;
public UpdateOldStatsOp(long cutoff) {
this.cutoff = cutoff;
}
@Override public void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs) {
for (Database.Puzzle puzzle : svc.mDb.getPuzzlesWithOldStats(cutoff))
rpcs.add(svc.new UpdateStatsRpcOp(puzzle));
}
}
/**
* An Op for updating the stats for a particular puzzle.
*/
private static class UpdateStatsOp implements Op {
private final long puzzleId;
public UpdateStatsOp(long puzzleId) {
this.puzzleId = puzzleId;
}
@Override public void addRpcs(NetworkService svc, Set<RpcOp<?>> rpcs) {
rpcs.add(svc.new UpdateStatsRpcOp(svc.mDb.getFullPuzzle(puzzleId)));
}
}
/**
* The RPC op that fetches the stats about a puzzle and saves them to the
* database.
*/
private class UpdateStatsRpcOp implements RpcOp<PuzzleRpcs.PuzzleResult> {
private final Database.Puzzle puzzle;
public UpdateStatsRpcOp(Database.Puzzle puzzle) {
this.puzzle = puzzle;
}
@Override public PuzzleRpcs.PuzzleParams asRequestParams() {
PuzzleRpcs.PuzzleParams params = new PuzzleRpcs.PuzzleParams();
params.puzzle = puzzle.clues.toFlatString();
if (puzzle.stats != null) {
PuzzleRpcs.PuzzleResult stats = GSON.fromJson(puzzle.stats, PuzzleRpcs.PuzzleResult.class);
params.previousStatsTimestamp = stats.statsTimestamp;
}
return params;
}
@Override public TypeToken<PuzzleRpcs.PuzzleResult> getResultTypeToken() {
return PUZZLE_STATS_TOKEN;
}
@Override public String getMethod() {
return PuzzleRpcs.PUZZLE_GET_METHOD;
}
@Override public int getCost() {
return READ_COST;
}
@Override public boolean process(Rpc.Response<PuzzleRpcs.PuzzleResult> res) {
if (res.result != null) {
mDb.setPuzzleStats(puzzle._id, GSON.toJson(res.result));
for (StatsCallback callback : statsCallbacks)
callback.statsUpdated(puzzle._id);
} else if (res.error.code == Rpc.OBJECT_UNCHANGED) {
// Just update the timestamp.
mDb.setPuzzleStats(puzzle._id, puzzle.stats);
}
return !shouldRetry(res.error);
}
@Override public boolean equals(Object o) {
if (o instanceof UpdateStatsRpcOp) {
UpdateStatsRpcOp that = (UpdateStatsRpcOp) o;
return this.puzzle._id == that.puzzle._id;
}
return false;
}
@Override public int hashCode() {
return (int) puzzle._id * 384763457 + 348567121;
}
}
}
| [
"[email protected]"
] | |
0990053196919467075b1096a5f26a1e2d429c63 | e48088f3614e88f90b8f7d18ca80cbe58ee4f26f | /admin-manage-core/src/main/java/com/duobei/core/operation/product/dao/ProductAuthConfigDao.java | 13ce945880cd252affef2d4199e043782241c7e6 | [] | no_license | huangzfa/admin-manage | e5cbd1be8e131ca22d3201dd96d443c3dae75b20 | e1fd3587b0f9de0c228ba8571e688681190dd23a | refs/heads/master | 2022-02-25T21:39:31.876497 | 2019-09-05T13:13:29 | 2019-09-05T13:13:29 | 206,566,843 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 713 | java | package com.duobei.core.operation.product.dao;
import com.duobei.core.operation.product.domain.ProductAuthConfig;
import com.duobei.core.operation.product.domain.vo.ProductAuthConfigVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author huangzhongfa
* @description 产品认证项
* @date 2019/2/26
*/
public interface ProductAuthConfigDao {
int update(ProductAuthConfig record);
int save(ProductAuthConfig record);
List<ProductAuthConfigVo> getByProductId(@Param("productId") Integer productId);
void deleteByProductId(@Param("productId") Integer productId);
int batchUpdateState(@Param("isEnable") Integer state,@Param("authId") Integer authId);
}
| [
"[email protected]"
] | |
b7cd3cac70543b1be7dd6a247812021860f695d6 | c999f17d9e16fbce6d70f3362fa12b52fab743ef | /asset-platform-idm/src/main/java/com/asset/mapper/OrganTreeMapper.java | 8e5efcc0a61618d5e1015609f593010216407da0 | [] | no_license | peak-edge/asset-platform | a1684f62d267e231453950b1fcb5eb0919c378a7 | bd1093b8c6893e5c7e0241994b382a6e6fc71c5f | refs/heads/master | 2020-06-11T15:51:30.754242 | 2019-06-25T02:39:04 | 2019-06-25T02:39:04 | 194,015,500 | 1 | 0 | null | 2019-10-31T02:19:51 | 2019-06-27T03:21:58 | JavaScript | UTF-8 | Java | false | false | 639 | java | package com.asset.mapper;
import com.asset.bean.OrganTree;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface OrganTreeMapper {
int deleteByPrimaryKey(String id);
int insert(OrganTree record);
int insertSelective(OrganTree record);
OrganTree selectByPrimaryKey(String id);
int updateByPrimaryKeySelective(OrganTree record);
int updateByPrimaryKey(OrganTree record);
OrganTree getNodeByName(String unitName);
List<OrganTree> getMainTree();
List<OrganTree> recursiveSelect(@Param("id") String id);
}
| [
"[email protected]"
] | |
44a4b82aa9c5be471ad5e802aec4afa89dd71245 | 98a39f8ea9d88c95c9dde062bbc219adb9dcc3fd | /PHAMNGUYENTANH/ManageStudent/app/src/main/java/com/example/managestudent/MainActivity.java | 9555f2518054f5d312c419ab4afd8e83e056ff99 | [] | no_license | dothimylinh1997/BAITAP_ANDROID | be21aa91e646f1347a50b8c4860a5a6c91712a7f | 4a6f0ff4a695bfb859d48fd0b43b24288161bdc2 | refs/heads/master | 2020-05-05T06:55:53.816680 | 2019-05-18T03:55:07 | 2019-05-18T03:55:07 | 179,806,489 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,459 | java | package com.example.managestudent;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
public class MainActivity extends AppCompatActivity {
ImageButton btnKhoa , btnLop , btnSinhVien ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnKhoa = findViewById(R.id.btnKhoa);
btnKhoa.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, ActivityKhoa.class);
startActivity(intent);
}
});
btnLop = findViewById(R.id.btnLop);
btnLop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, ActivityLop.class);
startActivity(intent);
}
});
btnSinhVien = findViewById(R.id.btnSinhVien);
btnSinhVien.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, ActivitySinhVien.class);
startActivity(intent);
}
});
}
}
| [
"[email protected]"
] | |
f7e40cce006ab6344c553e46616863314db168e9 | 7ef841751c77207651aebf81273fcc972396c836 | /cstream/src/main/java/com/loki/cstream/stubs/SampleClass5376.java | f60940c53d209f25152fc75e09e9b158f36636c1 | [] | no_license | SergiiGrechukha/ModuleApp | e28e4dd39505924f0d36b4a0c3acd76a67ed4118 | 00e22d51c8f7100e171217bcc61f440f94ab9c52 | refs/heads/master | 2022-05-07T13:27:37.704233 | 2019-11-22T07:11:19 | 2019-11-22T07:11:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package com.loki.cstream.stubs;
public class SampleClass5376 {
private SampleClass5377 sampleClass;
public SampleClass5376(){
sampleClass = new SampleClass5377();
}
public String getClassName() {
return sampleClass.getClassName();
}
} | [
"[email protected]"
] | |
a028fb927c5c3afde3f69cbcb5f49d12c6c20f85 | a1fab60c57b853f9ccbe3e021cd073e0f9d77ee0 | /cardsSrc/TheServantsOfCthulhu.java | ca9b918f0e71f8d738b5069ffb56de5cd8572577 | [] | no_license | kevvaria/343-GroupB-IlluminatiTheGame | fdf2a7eeb966f8f9f51819962407b34c9b3b28b5 | 3c88a437ff0c7ce5aa2e407086be44c2742943e2 | refs/heads/master | 2021-01-03T03:18:12.453222 | 2020-05-08T17:41:11 | 2020-05-08T17:41:11 | 239,899,413 | 0 | 0 | null | 2020-05-08T17:41:12 | 2020-02-12T01:12:43 | null | UTF-8 | Java | false | false | 162 | java | package cardsSrc;
public class TheServantsOfCthulhu extends IlluminatiCard{
public TheServantsOfCthulhu() {
super("The Servants of Cthulhu", 9, 9, 7);
}
}
| [
"[email protected]"
] | |
ba608bc6d4c13b3537b59b31f7cfe07bf92d8ea4 | 6d51d4f6d5d5f13bf7721d14948f161b8d0af89f | /src/test/java/com/example/map_mobile/MapMobileApplicationTests.java | 9558f5f4e9da7775c03d47279c714976c78e8fb1 | [] | no_license | parksiwoong/map_mobile | 77b4b552fac9ab7d18c7aa7469048f58e2332172 | ad263a1812f0fbbc79aed29acaa133374027f6ea | refs/heads/master | 2023-07-15T06:46:34.866690 | 2021-08-13T09:08:15 | 2021-08-13T09:08:15 | 381,402,811 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 217 | java | package com.example.map_mobile;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MapMobileApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
0f35466ecca430d79f1943dd9d9eb876f39451a9 | ce2340bda12a54a9a9a951f024b2b15c56fbf4a2 | /EventOrganization-Inheritance/src/abstractClassPolymorphism/IndoorActivities.java | 8669819ec2ebe5bd92f9d0da300737e12086f92c | [] | no_license | moondayz/VoluntaryEvent-UML-Inheritance | bbadf10788e6b74dfbbb848a2bfa89809a3b4719 | 5c8c43e68148785fd38585a04bf1d0253f8ea579 | refs/heads/master | 2022-11-09T13:53:14.241117 | 2020-06-26T17:50:44 | 2020-06-26T17:50:44 | 275,213,746 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 981 | java | package abstractClassPolymorphism;
public class IndoorActivities extends Activity{
private int rentCost; //renting cost for place or stand
private int budget;
public IndoorActivities(String nameActivity, int capacity, int rentCost, int budget) {
super(nameActivity, capacity);
setRentCost(rentCost);
setBudget(budget);
}
// Polymorphic method
@Override
public int getTotalBudget() {
return getRentCost() + getBudget() ;
}
public int getRentCost() {
return rentCost;
}
public void setRentCost(int rentCost) {
if(rentCost == 0 || "".equals(rentCost)) {
throw new IllegalArgumentException("Renting cost can not be zero or empty.");
}
this.rentCost = rentCost;
}
public int getBudget() {
return budget;
}
public void setBudget(int budget) {
if(budget == 0 || "".equals(budget)) {
throw new IllegalArgumentException("Budget can not be zero or empty.");
}
this.budget = budget;
}
}
| [
"[email protected]"
] | |
7ca9bfab5a6fd5552b1e817d8893f34aa354dfd1 | 0d115df48b84a07f337a3875eb0ea9ba5e94dd64 | /app/src/main/java/mx/com/omnius/yolabor/Model/JobTypeModel.java | 1fde626d106ef0a418f6f38638fded5cd05cae36 | [] | no_license | moviuz/yolaborWorker | c3c8fb47cc03da51be969d94aca0b1355bb6725a | e933459759e96fc17f9840db894e62ed044c33d0 | refs/heads/master | 2020-03-06T14:56:31.260258 | 2018-05-09T23:45:24 | 2018-05-09T23:45:24 | 126,945,315 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,155 | java | package mx.com.omnius.yolabor.Model;
import com.google.gson.annotations.SerializedName;
/**
* Created by UDIaz on 03/02/18.
*/
public class JobTypeModel {
public String getIdJobType() {
return idJobType;
}
public void setIdJobType(String idJobType) {
this.idJobType = idJobType;
}
public String getService() {
return service;
}
public void setService(String service) {
this.service = service;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getOrder() {
return order;
}
public void setOrder(String order) {
this.order = order;
}
public String getCost() {
return cost;
}
public void setCost(String cost) {
this.cost = cost;
}
@SerializedName("idJobType")
private String idJobType;
@SerializedName("service")
private String service;
@SerializedName("name")
private String name;
@SerializedName("order")
private String order;
@SerializedName("cost")
private String cost;
}
| [
"[email protected]"
] | |
1d47c81f675817579757d3d3226258d0f335db7b | 216032bae1407edfb3c48396bba2681cf80eaed0 | /network/myTCP.java | 070c5a92779ae999745b54abcdb91ee5e0edd707 | [] | no_license | trmini/Skool | 1ba2f89a86f4acf30f24872555c261bd3ece7f12 | f05b6f3befe459ae5e8a0325dc8e117e0fe9d530 | refs/heads/master | 2021-07-06T07:57:52.177212 | 2017-09-30T05:37:52 | 2017-09-30T05:37:52 | 105,343,449 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,942 | java | import java.lang.*;
/* Class that implement a myTCP packet */
public class myTCP {
protected int m_SEQ = 0;
protected int m_NAK = 0;
protected int d_LEN = 0;
protected byte h_LEN = 0;
protected byte m_FLG = 0;
protected byte SYN_MASK = 0x01;
protected byte FIN_MASK = 0x02;
protected byte RST_MASK = 0x04;
protected byte PSH_MASK = 0x08;
protected byte NAK_MASK = 0x10;
protected byte URG_MASK = 0x20;
protected byte[] m_DATA = null;
public myTCP() {
}
public myTCP(byte[] buf) {
m_SEQ = ((0x0 | buf[0]) << 8) | buf[1];
m_NAK = ((0x0 | buf[2]) << 8) | buf[3];
d_LEN = ( (0x0 | buf[6] ) << 8) | buf[7];
h_LEN = buf[4];
m_FLG = buf[5];
m_DATA = new byte[d_LEN];
System.arraycopy(buf, h_LEN, m_DATA, 0, d_LEN);
}
public boolean isSYN() {
if ( (m_FLG & SYN_MASK) != 0) return true;
else return false;
}
public boolean isFIN() {
if ( (m_FLG & FIN_MASK) != 0) return true;
else return false;
}
public boolean isRST() {
if ( (m_FLG & RST_MASK) != 0 ) return true;
else return false;
}
public boolean isPSH() {
if ( (m_FLG & PSH_MASK) != 0 ) return true;
else return false;
}
public boolean isNAK() {
if ( (m_FLG & NAK_MASK) != 0 ) return true;
else return false;
}
public boolean isURG() {
if ( (m_FLG & URG_MASK) != 0 ) return true;
else return false;
}
public void setNAK() {
m_FLG = (byte) (m_FLG | NAK_MASK);
}
public void unsetNAK() {
m_FLG = (byte) (m_FLG & (~NAK_MASK));
}
public int getSEQ() {
return m_SEQ;
}
public int getNAK() {
return m_NAK;
}
public void putSEQ(int sequenceNum) {
m_SEQ = sequenceNum;
}
public void putNAK(int nackNum) {
m_NAK = nackNum;
}
public byte getHeaderLength() {
return h_LEN;
}
public int getDataLength() {
return d_LEN;
}
public void setHeader(byte Length) {
h_LEN = Length ;
}
public void setData(int Length) {
d_LEN = Length;
}
public byte[] getData() {
return m_DATA;
}
public void putData(byte[] buf, int Length) {
d_LEN = Length;
if (Length == 0) {
m_DATA = null;
return;
}
if ( m_DATA == null ) {
m_DATA = new byte[d_LEN];
}
System.arraycopy(buf, 0, m_DATA, 0, d_LEN);
}
public byte[] makeNAK(int nakNum) {
myTCP nakPkt = new myTCP();
nakPkt.putSEQ(0);
nakPkt.putNAK(nakNum);
nakPkt.putData(null, 0);
return nakPkt.makePacket();
}
public byte[] makePacket() {
byte[] buf = new byte[h_LEN + d_LEN];
buf[0] = (byte) (m_SEQ >> 8);
buf[1] = (byte) (0x0F & m_SEQ);
buf[2] = (byte) (m_NAK >> 8);
buf[3] = (byte) (0x0F & m_NAK);
buf[4] = h_LEN;
buf[5] = m_FLG;
buf[6] = (byte) (d_LEN >> 8);
buf[7] = (byte) (0x0F & d_LEN);
if (m_DATA != null) {
System.arraycopy(m_DATA, 0, buf, h_LEN, d_LEN);
}
return buf;
}
}
| [
"[email protected]"
] | |
aa311a3053c86285bc26bf4333097c30ced30fc3 | 7a3d7e0d2cdc349b03ebfdfdf2ad1274765a0aba | /app/src/main/java/com/soe/sharesoe/module/sort/search/SearchResultsActivity.java | aba237a359a57fc87e4b142ac281b173c5b9e80d | [] | no_license | zhangyizhangyiran/share-user | 596c0e40685664e959f5dba52933a09bae5f5df0 | ff420c02c19d145fbf8c9b18e6d6b58228ab7647 | refs/heads/master | 2020-03-29T21:50:27.041912 | 2018-09-26T08:06:09 | 2018-09-26T08:06:09 | 150,390,128 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,788 | java | package com.soe.sharesoe.module.sort.search;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.soe.sharesoe.R;
import com.soe.sharesoe.base.RxBaseActivity;
import com.soe.sharesoe.module.goods.GoodsDetailActivity;
import com.soe.sharesoe.module.home.ProductList;
import com.soe.sharesoe.module.member.edittext.StringUtils;
import com.soe.sharesoe.net.RetrofitHelper;
import com.soe.sharesoe.utils.T;
import java.util.HashMap;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
import rx.Subscriber;
/**
* @author zhangyi<zhangyi, [email protected]>
* @version v1.0
* @project
* @Description 搜索结果界面
* @encoding UTF-8
* @date 17/11/10
* @time 下午7:29
* @修改记录 <pre>
* 版本 修改人 修改时间 修改内容描述
* --------------------------------------------------
* <p>
* --------------------------------------------------
* </pre>
*/
public class SearchResultsActivity extends RxBaseActivity implements BaseQuickAdapter.RequestLoadMoreListener {
@BindView(R.id.search_edittext)
EditText mSearchEdittext;
@BindView(R.id.search_clear)
ImageView mSearchClear;
@BindView(R.id.search_cancle)
TextView mSearchCancle;
@BindView(R.id.activity_search_result_recy_flush)
RecyclerView mActivitySearchResultRecyFlush;
@BindView(R.id.activity_swipe)
SwipeRefreshLayout mActivitySwipe;
private SearchResultsAdapter mSearchResultsAdapter;
//SearchGoodsActivity输入框结果
private String mSearchResult;
//输入框结果
private String mTrim;
//页数
private int page = 1;
private ProductList mProductList;
private Intent mIntent;
//加载类型
public String LoadType = "Request";
@Override
public int getLayoutId() {
return R.layout.activity_search_results;
}
@Override
public void initViews(Bundle savedInstanceState) {
mSearchEdittext.setHint("搜索商品");
mSearchResult = (String) getIntent().getExtras().get("key");
mIntent = new Intent(this, GoodsDetailActivity.class);
//请求数据
initData();
//Adapter初始化工作
initAdapter();
//输入框监听
initEditListener();
}
private void initAdapter() {
mSearchResultsAdapter = new SearchResultsAdapter(this);
mSearchResultsAdapter.setOnLoadMoreListener(this);
mActivitySearchResultRecyFlush.setLayoutManager(new LinearLayoutManager(this));
mActivitySearchResultRecyFlush.setAdapter(mSearchResultsAdapter);
mSearchResultsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
String id = mProductList.getList().get(position).getId();
mIntent.putExtra("pId", id);
startActivity(mIntent);
T.success(String.valueOf(position));
}
});
}
private void initData() {
LoadType = "Request";
setData(mSearchResult, String.valueOf(page));
}
private void setData(String keyWord, String page) {
HashMap<String, Object> map = new HashMap<>();
map.put("latitude", "");
map.put("longitude", "");
map.put("keyWord", keyWord);
map.put("categoryId", "");
map.put("recommend", "");
map.put("page", page);
map.put("order", "asc1");
map.put("pageSize", "20");
RetrofitHelper.getInstance().getProductList(map, new Subscriber<ProductList>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(ProductList productList) {
setData(productList);
}
});
}
private void setData(ProductList productList) {
mProductList = productList;
List<ProductList.ListBean> list = productList.getList();
if (LoadType.equals("Request")) {
if (list.size() > 8) {
mSearchResultsAdapter.setNewData(list);
mSearchResultsAdapter.setEnableLoadMore(true);
} else {
mSearchResultsAdapter.setNewData(list);
mSearchResultsAdapter.setEnableLoadMore(false);
}
} else if (LoadType.equals("More")) {
if (list.size() > 8) {
mSearchResultsAdapter.addData(list);
mSearchResultsAdapter.setEnableLoadMore(true);
} else {
mSearchResultsAdapter.addData(list);
mSearchResultsAdapter.setEnableLoadMore(false);
}
}
}
private void initEditListener() {
mSearchEdittext.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
mTrim = s.toString().trim();
}
});
mSearchEdittext.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_UNSPECIFIED) {
setHintKey();
String keytag = mSearchEdittext.getText().toString().trim();
if (StringUtils.isEmpty(keytag)) {
Toast.makeText(SearchResultsActivity.this, "请输入搜索关键字", Toast.LENGTH_SHORT).show();
return false;
}
// 搜索功能主体
setData(mTrim, String.valueOf(page));
return true;
}
return false;
}
});
}
//隐藏键盘
private void setHintKey() {
((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(
SearchResultsActivity.this
.getCurrentFocus()
.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
}
@OnClick({R.id.search_clear, R.id.search_cancle})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.search_clear:
mSearchEdittext.setText("");
break;
case R.id.search_cancle:
finish();
break;
}
}
@Override
public void onClick(View view) {
}
@Override
public void onLoadMoreRequested() {
getLoadMore();
}
public void getLoadMore() {
LoadType = "More";
page++;
initData();
}
}
| [
"[email protected]"
] | |
ac207ffc90a018cb62b2b524c170881f9b3b46bb | 8b7d67cfd9bc6f4a739c2ed9ce322755a37e18a0 | /backstage-system/src/main/java/com/backstage/system/dao/gen/SysLogGeneratedMapper.java | 42917d654a07eabfabbd7690b3b11d474e6ebfdd | [] | no_license | yangfeng005/backstage | 5cffd5dcaf5d9608a66a928293afd84e54d8c25e | fb3460ff4d98e9c6413cd81164dddda9b8441e2e | refs/heads/master | 2023-03-13T23:48:43.075314 | 2021-03-03T08:31:11 | 2021-03-03T08:31:11 | 336,734,372 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 493 | java | package com.backstage.system.dao.gen;
import com.backstage.core.mapper.BaseGeneratedMapper;
import com.backstage.system.entity.gen.SysLogCriteria;
import com.backstage.system.entity.customized.SysLogAO;
/**
* 自动生成的 SysLog 数据存取接口.
*
* <p>
* 该类于 2019-09-16 16:06:26 生成,请勿手工修改!
* </p>
*
* @author yangfeng
* @version 1.0.0, Sep 16, 2019
*/
public interface SysLogGeneratedMapper extends BaseGeneratedMapper<SysLogAO, SysLogCriteria> {
}
| [
"[email protected]"
] | |
2737410d9a8803b8bd7cb90e2e0683529b7fb178 | 315b96be6771afa2c98c8a95e75e077278f0f57c | /app/src/main/java/com/sampletest/anil/testapplication/utils/Utils.java | a5099621380de07a035dc99cb989a65d951c4bc7 | [] | no_license | anilbondada/FlickrApplication | fb6441cd5083abe909f63b8908e48b25bcfa98f9 | 0c4ec487c379ee40d6fe6a081289a137f13346a1 | refs/heads/master | 2020-03-27T07:11:50.835802 | 2018-08-26T16:16:06 | 2018-08-26T16:16:06 | 146,170,545 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,971 | java | package com.sampletest.anil.testapplication.utils;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Environment;
import android.util.Log;
import com.sampletest.anil.testapplication.model.Photo;
import java.io.File;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Created by H211060 on 8/24/2018.
*/
public class Utils {
private static final String TAG = "Utils";
private static int totalNumberOfPages = 0;
private static int currentPage = 0;
private static ExecutorService mImageAsyncService;
public static void doTheTaskInParallel(AsyncTask task,Object... params) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // Android 4.4 (API 19) and above
// Parallel AsyncTasks are possible, with the thread-pool size dependent on device
// hardware
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,params);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // Android 3.0 to
// Android 4.3
// Parallel AsyncTasks are not possible unless using executeOnExecutor
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
} else { // Below Android 3.0
// Parallel AsyncTasks are possible, with fixed thread-pool size
task.execute(params);
}
}
public static void doTheTaskInSerial(AsyncTask task,Object... params){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // Android 4.4 (API 19) and above
// Parallel AsyncTasks are possible, with the thread-pool size dependent on device
// hardware
task.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR,params);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // Android 3.0 to
// Android 4.3
// Parallel AsyncTasks are not possible unless using executeOnExecutor
task.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, params);
} else { // Below Android 3.0
// Parallel AsyncTasks are possible, with fixed thread-pool size
task.execute(params);
}
}
public static String getImageUrl(Photo photo) {
String url = null;
StringBuilder builder = new StringBuilder(150).append("http://").append("farm").append(photo.getFarm())
.append(".static.flickr.com/").append(photo.getServer()).append("/")
.append(photo.getId()).append("_").append(photo.getSecret()).append(".jpg");
url = builder.toString();
Log.d(TAG, "getImageUrl: "+url);
return url;
}
public static boolean permissionsAccepted(Context context){
if(checkWriteExternalPermission(context)){
return true;
}
return false;
}
private static boolean checkWriteExternalPermission(Context context)
{
String permission = android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
int res = context.checkCallingOrSelfPermission(permission);
return (res == PackageManager.PERMISSION_GRANTED);
}
public static boolean isDeviceOnline(Context context){
ConnectivityManager conMgr = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = conMgr.getActiveNetworkInfo();
if (netInfo == null){
return false;
}else{
return true;
}
}
public static void setCurrentAndTotalPages(int currPage, int totalPages){
totalNumberOfPages = totalPages;
currentPage = currPage;
}
public static int getTotalNumberOfPages(){
return totalNumberOfPages;
}
public static int getCurrentPage(){
return currentPage;
}
}
| [
"[email protected]"
] | |
6ae67b32db6f48275c522eeb9be4c2e2f5cebc91 | 74f6e1e744532e72c52fc33ce9fb5b955933bb12 | /elv-4.0/src/elv/task/executables/Standardization.java | d2d63f4248d28ad6fe36896c525ed20e1c42f181 | [] | no_license | qpa/elv-old | cfdccd28edde029bddc0e4b1ebbcb3019adc1247 | 71812dde991b6c0bd212187966f14c2a8be3d09e | refs/heads/master | 2020-12-24T16:08:09.927636 | 2013-03-21T15:55:47 | 2013-03-21T15:55:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 48,602 | java | /*
* Standardization.java
*/
package elv.task.executables;
/**
* Class for implementing the standardization methods.
* @author Elv
*/
public class Standardization extends Executable
{
// Constants.
/** The property file name. */
private final static java.lang.String PROPERTY_FILE = "standardization.prop";
/** The execution files. */
private final static ExecutionFile[] EXECUTION_FILES = {new ExecutionFile("standardization.csv", "Standardization.Districts"), new ExecutionFile("standardization_years.csv", "Standardization.Districts.Years"), new ExecutionFile("standardization_windows_intervals.csv", "Standardization.Districts.Windows-Intervals")};
// Indices in the above array.
/** Index in the <code>EXECUTION_FILES</code> array. */
public final int DISTRICTS = 0;
/** Index in the <code>EXECUTION_FILES</code> array. */
public final int DISTRICTS_YEARS = 1;
/** Index in the <code>EXECUTION_FILES</code> array. */
public final int DISTRICTS_WINDOWS_INTERVALS = 2;
// Property names.
/** The "name" property name.*/
public final static java.lang.String NAME = "Standardization";
/** The "year windows" property name.*/
public final static java.lang.String YEAR_WINDOWS_NAME = NAME + ".YearWindows";
// Property values.
/** The array of possible standardization types. */
private final static java.lang.String[] STANDARDIZATIONS = {"Standardization.Direct", "Standardization.Indirect"};
// The indices in the above array.
/** Index in the <code>STANDARDIZATIONS</code> array. */
public final static int DIRECT = 0;
/** Index in the <code>STANDARDIZATIONS</code> array. */
public final static int INDIRECT = 1;
/** The default year window value. */
public final static int DEFAULT_YEAR_WINDOW = 1;
/** File header. */
public final static java.lang.String HEADER =
"District" + VS + "Population" + VS + "Observed cases" + VS +
"Expected cases" + VS + "Incidence" + VS + "SMR" + VS + "SMR significance" + VS +
"SMR category" + VS + "Probability" + VS + "Probability category" + VS +
"Trend" + VS + "Trend significance" + VS + "Trend correlation" + VS + "Trend category";
/** File header. */
public final static java.lang.String YEARS_HEADER = "Year" + VS +
"District" + VS + "Population" + VS + "Observed cases" + VS + "Expected cases" + VS + "Incidence" + VS +
"SMR" + VS + "SMR significance" + VS + "SMR category" + VS + "Probability" + VS + "Probability category";
/** File header. */
public final static java.lang.String WINDOWS_INTERVALS_HEADER = "Year window" + VS + "Year interval" + VS +
"District" + VS + "Population" + VS + "Observed cases" + VS + "Expected cases" + VS + "Incidence" + VS +
"SMR" + VS + "SMR significance" + VS + "SMR category" + VS + "Probability" + VS + "Probability category";
/**
* Inner class for standardization probability reprezentation.
*/
public static class StandardizationProbability implements java.io.Serializable
{
// Variables.
/** The probability. */
protected double probability;
/** The associated value. */
protected double hi2;
/**
* Constructor.
* @param line the parsable line.
* @throws java.lang.Exception if there is any problem with parsing.
*/
public StandardizationProbability(java.lang.String line) throws java.lang.Exception
{
java.lang.String[] splitedLine = line.split(java.util.regex.Pattern.quote("="));
probability = java.lang.Double.parseDouble(splitedLine[0]);
hi2 = java.lang.Double.parseDouble(splitedLine[1]);
}
/**
* Method for getting all trend significances.
* @return a vector of standardization probabilities.
* @throws java.lang.Exception if there is any problem with loading.
*/
public static java.util.Vector<StandardizationProbability> getAllStandardizationProbabilityies() throws java.lang.Exception
{
java.util.Vector<StandardizationProbability> standardizationProbabilities = new java.util.Vector<StandardizationProbability>();
java.lang.String line;
java.io.BufferedReader fileReader = new java.io.BufferedReader(new java.io.InputStreamReader(new elv.util.Util().getClass().getResource("/resources/probability.properties").openStream(), elv.util.Util.FILE_ENCODING));
while((line = fileReader.readLine()) != null)
{
standardizationProbabilities.add(new StandardizationProbability(line));
}
fileReader.close();
return standardizationProbabilities;
}
}
/**
* Inner class for trend significance reprezentation.
*/
public static class TrendSignificance
{
// Variables.
/** The year value. */
protected int year;
/** The first associated value. */
protected double trend0_1;
/** The second associated value. */
protected double trend0_05;
/** The third associated value. */
protected double trend0_01;
/** The forth associated value. */
protected double trend0_001;
/**
* Constructor.
* @param line the parsable line.
* @throws java.lang.Exception if there is any problem with parsing.
*/
public TrendSignificance(java.lang.String line) throws java.lang.Exception
{
year = java.lang.Integer.parseInt(line.substring(0, line.indexOf("=")));
java.lang.String ts = line.substring(line.indexOf("=") + 1);
java.lang.String[] splitedLine = ts.split(java.util.regex.Pattern.quote(","));
trend0_1 = java.lang.Double.parseDouble(splitedLine[0]);
trend0_05 = java.lang.Double.parseDouble(splitedLine[1]);
trend0_01 = java.lang.Double.parseDouble(splitedLine[2]);
trend0_001 = java.lang.Double.parseDouble(splitedLine[3]);
}
/**
* Method for getting all trend significances.
* @return a vector of trend significances.
* @throws java.lang.Exception if there is any problem with loading.
*/
public static java.util.Vector<TrendSignificance> getAllTrendSignificances() throws java.lang.Exception
{
java.util.Vector<TrendSignificance> trendSignificances = new java.util.Vector<TrendSignificance>();
java.lang.String line;
java.io.BufferedReader fileReader = new java.io.BufferedReader(new java.io.InputStreamReader(new elv.util.Util().getClass().getResource("/resources/trend_significance.properties").openStream(), elv.util.Util.FILE_ENCODING));
while((line = fileReader.readLine()) != null)
{
trendSignificances.add(new TrendSignificance(line));
}
fileReader.close();
return trendSignificances;
}
}
/**
* Constructor.
* @throws java.lang.Exception if there is any error with setting.
*/
public Standardization() throws java.lang.Exception
{
properties = new java.util.Vector<elv.util.Property>();
setDefaultProperties();
}
/**
* Method for getting the name of the standardization.
* @return the name of this standardization.
*/
public java.lang.String getName()
{
return NAME;
}
/**
* Implemented method from <CODE>elv.util.Propertable</CODE>.
* @return the root name of properties.
*/
public java.lang.String getRootName()
{
return NAME;
}
/**
* Implemented method from <CODE>elv.util.Propertable</CODE>.
* @return the propety file name.
*/
public java.lang.String getPropertyFile()
{
return PROPERTY_FILE;
}
/**
* Implemented method from <CODE>elv.util.Propertable</CODE>.
* @throws java.lang.Exception if there is any error with setting.
*/
protected void setDefaultProperties() throws java.lang.Exception
{
properties.add(new elv.util.Property(elv.util.Property.STRING, elv.util.Property.COMBO_BOX, true, NAME, STANDARDIZATIONS[INDIRECT]));
java.util.Vector<java.lang.Integer> yearWindows = new java.util.Vector<java.lang.Integer>();
yearWindows.add(DEFAULT_YEAR_WINDOW);
properties.add(new elv.util.Property(elv.util.Property.INTEGER_ARRAY, elv.util.Property.LIST_BUTTON, true, YEAR_WINDOWS_NAME, yearWindows));
}
/**
* Implemented method from <CODE>elv.util.Propertable</CODE>.
* @throws java.lang.Exception if there is any error with the setting.
*/
public void setPropertiesDefaultValues() throws java.lang.Exception
{
elv.util.Property.get(NAME, properties).setDefaultValues(elv.util.Util.vectorize(STANDARDIZATIONS));
}
/**
* Overridden method from <CODE>java.lang.Object</CODE>.
* @param standardization an <CODE>elv.task.executables.Standardization</CODE> object.
*/
public boolean equals(java.lang.Object standardization)
{
boolean isEqual = false;
if(standardization != null && standardization instanceof Standardization)
{
isEqual = getPropertyFile().equals(((Standardization)standardization).getPropertyFile());
}
return isEqual;
}
/**
* Overridden method from <CODE>java.lang.Object</CODE>.
* @return the string reprezentation of this standardization.
*/
public java.lang.String toString()
{
return elv.util.Util.translate(getName());
}
/**
* Implemented method from <CODE>elv.task.execution.Executable</CODE>.
* @return an array with the execution files.
*/
public ExecutionFile[] getExecutionFiles()
{
return EXECUTION_FILES;
}
/**
* Implemented method from <CODE>elv.task.execution.Executable</CODE>.
* @return the icon of executable.
* @throws java.lang.Exception if there is any problem with getting.
*/
public javax.swing.ImageIcon getIcon() throws java.lang.Exception
{
return new javax.swing.ImageIcon(new elv.util.Util().getClass().getResource("/resources/images/executable.gif"));
}
/**
* Implemented method from <CODE>elv.task.executables.Executable</CODE>.
* @param execution an execution object.
* @return true, if the execution was finished correctly.
* @throws java.lang.Exception if there is any problem with execution.
*/
public boolean execute(elv.task.Execution execution) throws java.lang.Exception
{
execution.setExecutable(this);
// Initialize the file readers.
java.lang.String pathName = execution.getTask().getExecutionFolderPath() + "/" + EXECUTION_FILES[DISTRICTS].getFileName();
java.io.BufferedReader fileReader = null;
java.lang.String yearsPathName = execution.getTask().getExecutionFolderPath() + "/" + EXECUTION_FILES[DISTRICTS_YEARS].getFileName();
java.io.BufferedReader yearsFileReader = null;
java.lang.String windowsIntervalsPathName = execution.getTask().getExecutionFolderPath() + "/" + EXECUTION_FILES[DISTRICTS_WINDOWS_INTERVALS].getFileName();
java.io.BufferedReader windowsIntervalsFileReader = null;
try
{
fileReader = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(pathName), elv.util.Util.FILE_ENCODING));
// Throw header line.
fileReader.readLine();
yearsFileReader = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(yearsPathName), elv.util.Util.FILE_ENCODING));
// Throw header line.
yearsFileReader.readLine();
windowsIntervalsFileReader = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(windowsIntervalsPathName), elv.util.Util.FILE_ENCODING));
// Throw header line.
windowsIntervalsFileReader.readLine();
}
catch(java.io.FileNotFoundException exc)
{
// Return, if it is just progresses loading.
if(!execution.isExecuted())
{
return false;
}
fileReader = null;
// Store header line.
java.io.PrintWriter fileWriter = new java.io.PrintWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(pathName, true), elv.util.Util.FILE_ENCODING));
fileWriter.println(HEADER);
fileWriter.close();
yearsFileReader = null;
// Store header line.
java.io.PrintWriter yearsFileWriter = new java.io.PrintWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(yearsPathName, true), elv.util.Util.FILE_ENCODING));
yearsFileWriter.println(YEARS_HEADER);
yearsFileWriter.close();
windowsIntervalsFileReader = null;
// Store header line.
java.io.PrintWriter windowsIntervalsFileWriter = new java.io.PrintWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(windowsIntervalsPathName, true), elv.util.Util.FILE_ENCODING));
windowsIntervalsFileWriter.println(WINDOWS_INTERVALS_HEADER);
windowsIntervalsFileWriter.close();
}
// Initialize.
// Get all standardization probabilities.
java.util.Vector<StandardizationProbability> standardizationProbabilities = StandardizationProbability.getAllStandardizationProbabilityies();
// Get all trend significance values.
java.util.Vector<TrendSignificance> trendSignificances = TrendSignificance.getAllTrendSignificances();
java.lang.String standardizationMethod = (java.lang.String)elv.util.Property.get(NAME, properties).getValue();
// Determine the standardization year-window intervals.
java.util.Vector<java.lang.Integer> yearWindows = (java.util.Vector)elv.util.Property.get(YEAR_WINDOWS_NAME, properties).getValue();
elv.util.Property prop = elv.util.Property.get(YEAR_WINDOWS_NAME, properties);
java.util.Vector<java.util.Vector<elv.util.parameters.YearInterval>> yearWindowIntervals = new java.util.Vector<java.util.Vector<elv.util.parameters.YearInterval>>();
for(int yearWindowCount = 0; yearWindowCount < yearWindows.size(); yearWindowCount++)
{
int iteratorYearWindow = yearWindows.get(yearWindowCount);
java.util.Vector<elv.util.parameters.YearInterval> yearIntervals = new java.util.Vector<elv.util.parameters.YearInterval>();
for(int yearIntervalCount = 0; yearIntervalCount < execution.getYearIntervals().size(); yearIntervalCount++)
{
elv.util.parameters.Interval iteratorYearInterval = execution.getYearIntervals().get(yearIntervalCount);
int from = iteratorYearInterval.getFromValue();
int to = ((yearIntervalCount + iteratorYearWindow - 1 < execution.getYearIntervals().size()) ?
execution.getYearIntervals().get(yearIntervalCount + iteratorYearWindow - 1).getToValue() :
execution.getYearIntervals().get(execution.getYearIntervals().size() - 1).getToValue());
yearIntervals.add(new elv.util.parameters.YearInterval(from, to));
}
yearWindowIntervals.add(yearIntervals);
}
int meanYearCountPeriod = 1;
int fromYearPeriod = execution.getYears().get(0);
int toYearPeriod = execution.getYears().get(execution.getYears().size() - 1);
int meanYearPeriod = (fromYearPeriod + toYearPeriod) / 2;
if(meanYearPeriod - fromYearPeriod < toYearPeriod - meanYearPeriod)
{
meanYearCountPeriod = 2;
}
java.lang.String line;
int lineCount = 1; // Due to the header line;
// Parse.
//System.out.println(execution.getDistricts());
execution.getProgresses().push(new elv.util.Progress(elv.util.parameters.District.TITLE, 0, execution.getDistricts().size()));
for(int districtCount = 0; districtCount < execution.getDistricts().size(); districtCount++)
{
elv.util.parameters.District iteratorDistrict = execution.getDistricts().get(districtCount);
double populationPeriod = 0;
int observedCasesPeriod = 0;
double expectedCasesPeriod = 0;
double benchPopulationPeriod = 0;
int benchCasesPeriod = 0;
int sumX = 0;
double sumY = 0;
int sumX2 = 0;
double sumY2 = 0;
double sumXY = 0;
execution.getProgresses().push(new elv.util.Progress(YEAR_WINDOWS_NAME, 0, yearWindowIntervals.size()));
for(int yearWindowCount = 0; yearWindowCount < yearWindowIntervals.size(); yearWindowCount++)
{
int iteratorYearWindow = yearWindows.get(yearWindowCount);
execution.getProgresses().push(new elv.util.Progress(elv.util.parameters.YearInterval.TITLE, 0, yearWindowIntervals.get(yearWindowCount).size()));
for(int yearIntervalCount = 0; yearIntervalCount < yearWindowIntervals.get(yearWindowCount).size(); yearIntervalCount++)
{
elv.util.parameters.Interval iteratorYearInterval = yearWindowIntervals.get(yearWindowCount).get(yearIntervalCount);
int meanYearCount = 1;
int meanYear = (iteratorYearInterval.getFromValue() + iteratorYearInterval.getToValue()) / 2;
if(meanYear - iteratorYearInterval.getFromValue() < iteratorYearInterval.getToValue() - meanYear)
{
meanYearCount = 2;
}
if(windowsIntervalsFileReader != null && (line = windowsIntervalsFileReader.readLine()) != null)
{
lineCount++;
java.lang.String expectedLine = iteratorYearWindow + VS + iteratorYearInterval + VS + iteratorDistrict.getCode();
java.lang.String[] splitedLine = line.split(java.util.regex.Pattern.quote(VS));
java.lang.String observedLine = splitedLine[0] + VS + splitedLine[1] + VS + splitedLine[2];
if(!observedLine.equals(expectedLine))
{
throw new java.lang.IllegalArgumentException("Observed: " + observedLine + " is different than: " + expectedLine + "\n at line: " + lineCount);
}
int populationYearInterval = java.lang.Integer.parseInt(splitedLine[3]);
int observedCasesYearInterval = java.lang.Integer.parseInt(splitedLine[4]);
double expectedCasesYearInterval = java.lang.Double.parseDouble(splitedLine[5]);
double incidenceYearInterval = java.lang.Double.parseDouble(splitedLine[6]);
double smrYearInterval = java.lang.Double.parseDouble(splitedLine[7]);
int smrSignificanceYearInterval = java.lang.Integer.parseInt(splitedLine[8]);
int smrCategoryYearInterval = java.lang.Integer.parseInt(splitedLine[9]);
double probabilityYearInterval = java.lang.Double.parseDouble(splitedLine[10]);
int probabilityCategoryYearInterval = java.lang.Integer.parseInt(splitedLine[11]);
iteratorDistrict.getWindowIntervalResults().add(new DistrictWindowIntervalResult(iteratorYearWindow, iteratorYearInterval, populationYearInterval, observedCasesYearInterval, expectedCasesYearInterval, incidenceYearInterval, smrYearInterval, smrSignificanceYearInterval, smrCategoryYearInterval, probabilityYearInterval, probabilityCategoryYearInterval));
}
else
{
if(windowsIntervalsFileReader!= null)
{
windowsIntervalsFileReader.close();
// Return after load, if it is just progresses loading.
if(!execution.isExecuted())
{
return false;
}
}
windowsIntervalsFileReader = null;
double populationYearInterval = 0;
int observedCasesYearInterval = 0;
double expectedCasesYearInterval = 0;
double benchPopulationYearInterval = 0;
int benchCasesYearInterval = 0;
execution.getProgresses().push(new elv.util.Progress(elv.util.parameters.YearInterval.YEARS_TITLE, 0, iteratorYearInterval.getToValue() - iteratorYearInterval.getFromValue() + 1));
for(int iteratorYear = iteratorYearInterval.getFromValue(); iteratorYear <= iteratorYearInterval.getToValue(); iteratorYear++)
{
// Assigning the benchmark year to the standardization benchmark, if there is.
int benchYear;
if(execution.getBenchmarkYear() != 0)
{
benchYear = execution.getBenchmarkYear();
meanYear = benchYear;
meanYearCount = 1;
meanYearPeriod = benchYear;
meanYearCountPeriod = 1;
}
else
{
benchYear = iteratorYear;
}
boolean yearIsParsed = false;
for(DistrictYearResult iteratorYearResult : iteratorDistrict.getYearResults())
{
if(iteratorYearResult.year == iteratorYear)
{
yearIsParsed = true;
break;
}
// Return, if execution was stopped.
if(!execution.isExecuted())
{
return false;
}
}
populationPeriod = 0;
observedCasesPeriod = 0;
expectedCasesPeriod = 0;
benchPopulationPeriod = 0;
benchCasesPeriod = 0;
populationYearInterval = 0;
observedCasesYearInterval = 0;
expectedCasesYearInterval = 0;
benchPopulationYearInterval = 0;
benchCasesYearInterval = 0;
int populationYear = 0;
int observedCasesYear = 0;
double expectedCasesYear = 0;
int benchPopulationYear = 0;
int benchCasesYear = 0;
for(elv.util.parameters.Interval iteratorAgeInterval : execution.getAgeIntervals())
{
double benchPopulationPeriodAgeInterval = 0;
int benchCasesPeriodAgeInterval = 0;
double populationPeriodAgeInterval = 0;
int observedCasesPeriodAgeInterval = 0;
double benchPopulationYearIntervalAgeInterval = 0;
int benchCasesYearIntervalAgeInterval = 0;
double populationYearIntervalAgeInterval = 0;
int observedCasesYearIntervalAgeInterval = 0;
int benchPopulationYearAgeInterval = 0;
int benchCasesYearAgeInterval = 0;
int populationYearAgeInterval = 0;
int observedCasesYearAgeInterval = 0;
for(elv.util.parameters.Settlement iteratorSettlement: execution.getAllSettlements())
{
for(SettlementYearResult iteratorYearResult : iteratorSettlement.getYearResults())
{
if(iteratorYearResult.year == benchYear)
{
if(iteratorYearResult.ageInterval.equals(iteratorAgeInterval))
{
// Count district population and cases for this year and age-interval.
if(iteratorSettlement.getDistrictCode() == iteratorDistrict.getCode() &&
iteratorSettlement.getAggregation().equals(iteratorDistrict.getAggregation()))
{
populationYearAgeInterval += iteratorYearResult.population;
observedCasesYearAgeInterval += iteratorYearResult.analyzedCases;
}
// Count benchmark population and cases for this year and age-interval.
if(iteratorSettlement instanceof elv.util.parameters.BenchmarkSettlement)
{
benchPopulationYearAgeInterval += iteratorYearResult.population;
benchCasesYearAgeInterval += iteratorYearResult.analyzedCases;
}
}
}
if(iteratorYearInterval.getFromValue() <= iteratorYearResult.year && iteratorYearResult.year <= iteratorYearInterval.getToValue())
{
if(iteratorYearResult.ageInterval.equals(iteratorAgeInterval))
{
// Count district cases for this year-interval and age-interval.
if(iteratorSettlement.getDistrictCode() == iteratorDistrict.getCode() &&
iteratorSettlement.getAggregation().equals(iteratorDistrict.getAggregation()))
{
observedCasesYearIntervalAgeInterval += iteratorYearResult.analyzedCases;
}
// Count benchmark cases for this year-interval and age-interval.
if(iteratorSettlement instanceof elv.util.parameters.BenchmarkSettlement)
{
benchCasesYearIntervalAgeInterval += iteratorYearResult.analyzedCases;
}
}
}
if(iteratorYearResult.year == meanYear || iteratorYearResult.year == (meanYear + meanYearCount - 1))
{
if(iteratorYearResult.ageInterval.equals(iteratorAgeInterval))
{
// Count district population for this year-interval and age-interval.
if(iteratorSettlement.getDistrictCode() == iteratorDistrict.getCode() &&
iteratorSettlement.getAggregation().equals(iteratorDistrict.getAggregation()))
{
populationYearIntervalAgeInterval += (double)iteratorYearResult.population / meanYearCount;
}
// Count benchmark population for this year-interval and age-interval.
if(iteratorSettlement instanceof elv.util.parameters.BenchmarkSettlement)
{
benchPopulationYearIntervalAgeInterval += (double)iteratorYearResult.population / meanYearCount;
}
}
}
if(iteratorYearResult.ageInterval.equals(iteratorAgeInterval))
{
// Count district population and cases for this period and age-interval.
if(iteratorSettlement.getDistrictCode() == iteratorDistrict.getCode() &&
iteratorSettlement.getAggregation().equals(iteratorDistrict.getAggregation()))
{
observedCasesPeriodAgeInterval += iteratorYearResult.analyzedCases;
}
// Count benchmark population and cases for this period and age-interval.
if(iteratorSettlement instanceof elv.util.parameters.BenchmarkSettlement)
{
benchCasesPeriodAgeInterval += iteratorYearResult.analyzedCases;
}
}
if(iteratorYearResult.year == meanYearPeriod || iteratorYearResult.year == (meanYearPeriod + meanYearCountPeriod - 1))
{
if(iteratorYearResult.ageInterval.equals(iteratorAgeInterval))
{
// Count district population for this district and age-interval.
if(iteratorSettlement.getDistrictCode() == iteratorDistrict.getCode() &&
iteratorSettlement.getAggregation().equals(iteratorDistrict.getAggregation()))
{
populationPeriodAgeInterval += (double)iteratorYearResult.population / meanYearCountPeriod;
}
// Count benchmark population for this perion and age-interval.
if(iteratorSettlement instanceof elv.util.parameters.BenchmarkSettlement)
{
benchPopulationPeriodAgeInterval += (double)iteratorYearResult.population / meanYearCountPeriod;
}
}
}
// Return, if execution was stopped.
if(!execution.isExecuted())
{
return false;
}
}
}
benchPopulationYear += benchPopulationYearAgeInterval;
benchCasesYear += benchCasesYearAgeInterval;
benchPopulationYearInterval += benchPopulationYearIntervalAgeInterval;
benchCasesYearInterval += benchCasesYearIntervalAgeInterval;
benchPopulationPeriod += benchPopulationPeriodAgeInterval;
benchCasesPeriod += benchCasesPeriodAgeInterval;
// Observed and expected.
populationYear += populationYearAgeInterval;
observedCasesYear += observedCasesYearAgeInterval;
populationYearInterval += populationYearIntervalAgeInterval;
observedCasesYearInterval += observedCasesYearIntervalAgeInterval;
populationPeriod += populationPeriodAgeInterval;
observedCasesPeriod += observedCasesPeriodAgeInterval;
if(standardizationMethod.equals(STANDARDIZATIONS[DIRECT]))
{
expectedCasesYear += (populationYearAgeInterval == 0 ? 0 : (double)observedCasesYearAgeInterval / populationYearAgeInterval * benchPopulationYearAgeInterval);
expectedCasesYearInterval += (populationYearIntervalAgeInterval == 0 ? 0 : (double)observedCasesYearIntervalAgeInterval / populationYearIntervalAgeInterval * benchPopulationYearIntervalAgeInterval);
expectedCasesPeriod += (populationPeriodAgeInterval == 0 ? 0 : (double)observedCasesPeriodAgeInterval / populationPeriodAgeInterval * benchPopulationPeriodAgeInterval);
}
else if(standardizationMethod.equals(STANDARDIZATIONS[INDIRECT]))
{
expectedCasesYear += (benchPopulationYearAgeInterval == 0 ? 0 : (double)benchCasesYearAgeInterval / benchPopulationYearAgeInterval * populationYearAgeInterval);
expectedCasesYearInterval += (benchPopulationYearIntervalAgeInterval == 0 ? 0 : (double)benchCasesYearIntervalAgeInterval / benchPopulationYearIntervalAgeInterval * populationYearIntervalAgeInterval);
expectedCasesPeriod += (benchPopulationPeriodAgeInterval == 0 ? 0 : (double)benchCasesPeriodAgeInterval / benchPopulationPeriodAgeInterval * populationPeriodAgeInterval);
}
}
// Determine smr and incidence for year.
double smrYear = 0;
if(standardizationMethod.equals(STANDARDIZATIONS[DIRECT]))
{
smrYear = (benchCasesYear == 0 ? 0 : expectedCasesYear / benchCasesYear);
expectedCasesYear = (smrYear == 0 ? 0 : observedCasesYear / smrYear);
}
else if(standardizationMethod.equals(STANDARDIZATIONS[INDIRECT]))
{
smrYear = (expectedCasesYear == 0 ? 0 : observedCasesYear / expectedCasesYear);
}
double incidenceYear = (benchPopulationYear == 0 ? 0 : smrYear * benchCasesYear / benchPopulationYear * 1000);
// Determine the significance, category and probability for year.
int smrSignificanceYear = signify(observedCasesYear, expectedCasesYear);
int smrCategoryYear = categorize(smrYear, smrSignificanceYear);
double probabilityYear = computeProbability(signifyPoisson(observedCasesYear, expectedCasesYear), standardizationProbabilities);
int probabilityCategoryYear = categorizeProbability(probabilityYear);
DistrictYearResult districtYearResult = new DistrictYearResult(iteratorYear, populationYear, observedCasesYear, expectedCasesYear, incidenceYear, smrYear, smrSignificanceYear, smrCategoryYear, probabilityYear, probabilityCategoryYear);
if(!yearIsParsed)
{
// Summarize.
sumX += iteratorYear;
sumY += incidenceYear;
sumX2 += iteratorYear * iteratorYear;
sumY2 += incidenceYear * incidenceYear;
sumXY += iteratorYear * incidenceYear;
// Prepare line for year.
line = iteratorYear + VS + iteratorDistrict.getCode() + VS +
populationYear + VS + observedCasesYear + VS + elv.util.Util.toString(expectedCasesYear) + VS +
elv.util.Util.toString(incidenceYear) + VS + elv.util.Util.toString(smrYear) + VS +
elv.util.Util.toString(smrSignificanceYear) + VS + smrCategoryYear + VS +
elv.util.Util.toString(probabilityYear) + VS + probabilityCategoryYear;
// Store line for year.
java.io.PrintWriter yearsFileWriter = new java.io.PrintWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(yearsPathName, true), elv.util.Util.FILE_ENCODING));
yearsFileWriter.println(line);
yearsFileWriter.close();
iteratorDistrict.getYearResults().add(districtYearResult);
}
// Return, if execution was stopped.
if(!execution.isExecuted())
{
return false;
}
execution.getProgresses().peek().setValue(iteratorYear - iteratorYearInterval.getFromValue() + 1);
java.lang.Thread.yield();
}
execution.getProgresses().pop();
// Determine smr and incidence for year-interval.
double smrYearInterval = 0;
if(standardizationMethod.equals(STANDARDIZATIONS[DIRECT]))
{
smrYearInterval = (benchCasesYearInterval == 0 ? 0 : expectedCasesYearInterval / benchCasesYearInterval);
expectedCasesYearInterval = (smrYearInterval == 0 ? 0 : observedCasesYearInterval / smrYearInterval);
}
else if(standardizationMethod.equals(STANDARDIZATIONS[INDIRECT]))
{
smrYearInterval = (expectedCasesYearInterval == 0 ? 0 : observedCasesYearInterval / expectedCasesYearInterval);
}
double incidenceYearInterval = (benchPopulationYearInterval == 0 ? 0 : smrYearInterval * benchCasesYearInterval / benchPopulationYearInterval * 1000);
// Determine the significance, category and probability for year.
int smrSignificanceYearInterval = signify(observedCasesYearInterval, expectedCasesYearInterval);
int smrCategoryYearInterval = categorize(smrYearInterval, smrSignificanceYearInterval);
double probabilityYearInterval = computeProbability(signifyPoisson(observedCasesYearInterval, expectedCasesYearInterval),standardizationProbabilities);
int probabilityCategoryYearInterval = categorizeProbability(probabilityYearInterval);
iteratorDistrict.getWindowIntervalResults().add(new DistrictWindowIntervalResult(iteratorYearWindow, iteratorYearInterval, (int)populationYearInterval, observedCasesYearInterval, expectedCasesYearInterval, incidenceYearInterval, smrYearInterval, smrSignificanceYearInterval, smrCategoryYearInterval, probabilityYearInterval, probabilityCategoryYearInterval));
// Prepare line for year-interval.
line = iteratorYearWindow + VS + iteratorYearInterval + VS + iteratorDistrict.getCode() + VS +
(int)populationYearInterval + VS + observedCasesYearInterval + VS +
elv.util.Util.toString(expectedCasesYearInterval) + VS + elv.util.Util.toString(incidenceYearInterval) + VS +
elv.util.Util.toString(smrYearInterval) + VS + elv.util.Util.toString(smrSignificanceYearInterval) + VS +
smrCategoryYearInterval + VS + elv.util.Util.toString(probabilityYearInterval) + VS + probabilityCategoryYearInterval;
// Store line for year-interval.
java.io.PrintWriter windowsIntervalsFileWriter = new java.io.PrintWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(windowsIntervalsPathName, true), elv.util.Util.FILE_ENCODING));
windowsIntervalsFileWriter.println(line);
windowsIntervalsFileWriter.close();
}
execution.getProgresses().peek().setValue(yearIntervalCount + 1);
}
execution.getProgresses().pop();
execution.getProgresses().peek().setValue(yearWindowCount + 1);
}
execution.getProgresses().pop();
double smrPeriod = 0;
if(standardizationMethod.equals(STANDARDIZATIONS[DIRECT]))
{
smrPeriod = (benchCasesPeriod == 0 ? 0 : expectedCasesPeriod / benchCasesPeriod);
expectedCasesPeriod = (smrPeriod == 0 ? 0 : observedCasesPeriod / smrPeriod);
}
else if(standardizationMethod.equals(STANDARDIZATIONS[INDIRECT]))
{
smrPeriod = (expectedCasesPeriod == 0 ? 0 : observedCasesPeriod / expectedCasesPeriod);
}
double incidencePeriod = (benchPopulationPeriod == 0 ? 0 : smrPeriod * benchCasesPeriod / benchPopulationPeriod * 1000);
// Determine the significance, category and probability for year.
int smrSignificancePeriod = signify(observedCasesPeriod, expectedCasesPeriod);
int smrCategoryPeriod = categorize(smrPeriod, smrSignificancePeriod);
double probabilityPeriod = computeProbability(signifyPoisson(observedCasesPeriod, expectedCasesPeriod),standardizationProbabilities);
int probabilityCategoryPeriod = categorizeProbability(probabilityPeriod);
double sQx = (double)sumX2 - (double)sumX * sumX / execution.getYears().size();
double sQy = sumY2 - sumY * sumY / execution.getYears().size();
double sP = sumXY - (double)sumX * sumY / execution.getYears().size();
double trendPeriod = (sQx == 0 ? 0 : sP / sQx);
java.lang.String trendSignificancePeriod = signify(sQx, sQy, sP, execution.getYears(), trendSignificances);
double trendCorrelationPeriod = (sQx == 0 || sQy == 0 ? 0 : java.lang.Math.abs(sP / java.lang.Math.sqrt(java.lang.Math.abs(sQx * sQy))));
int trendCategoryPeriod = categorizeTrend(trendPeriod);
iteratorDistrict.setResult(new DistrictResult((int)populationPeriod, observedCasesPeriod, expectedCasesPeriod, incidencePeriod,
smrPeriod, smrSignificancePeriod, smrCategoryPeriod, probabilityPeriod, probabilityCategoryPeriod, trendPeriod,
trendSignificancePeriod, trendCorrelationPeriod, trendCategoryPeriod));
// Prepare line for district.
line = iteratorDistrict.getCode() + VS + (int)populationPeriod + VS +
observedCasesPeriod + VS + elv.util.Util.toString(expectedCasesPeriod) + VS +
elv.util.Util.toString(incidencePeriod) + VS + elv.util.Util.toString(smrPeriod) + VS +
elv.util.Util.toString(smrSignificancePeriod) + VS + smrCategoryPeriod + VS +
elv.util.Util.toString(probabilityPeriod) + VS + probabilityCategoryPeriod + VS +
elv.util.Util.toString(trendPeriod) + VS + trendSignificancePeriod + VS +
elv.util.Util.toString(trendCorrelationPeriod) + VS + trendCategoryPeriod;
// Store line for year-interval.
java.io.PrintWriter fileWriter = new java.io.PrintWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(pathName, true), elv.util.Util.FILE_ENCODING));
fileWriter.println(line);
fileWriter.close();
execution.getProgresses().peek().setValue(districtCount + 1);
}
execution.getProgresses().pop();
setDone(execution.getTask(), true);
return true;
}
/**
* Method for Poisson SMR significance calculating.
* @param observedCases the analysed cases.
* @param expectedCases the expected cases.
* @return the significance of standardization.
*/
protected static double signifyPoisson(int observedCases, double expectedCases)
{
return (observedCases == 0 || expectedCases == 0 ? 0 : ((double)observedCases - expectedCases)*((double)observedCases - expectedCases) / expectedCases);
}
/**
* Method for Pearson SMR significance calculating.
* @param observedCases the analysed cases.
* @param totalCases the total cases.
* @param population the analysed population.
* @param totalPopulation the total population.
* @return the significance of standardization.
*/
protected static double signifyPearson(int observedCases, int totalCases, int population, int totalPopulation)
{
double e1 = ((double)observedCases + population) * totalCases / (totalCases + totalPopulation);
double e2 = ((double)observedCases + population) * totalPopulation / (totalCases + totalPopulation);
double e3 = ((double)totalCases - observedCases + totalPopulation - population) *totalCases / (totalCases + totalPopulation);
double e4 = ((double)totalCases - observedCases + totalPopulation - population) *totalPopulation / (totalCases + totalPopulation);
return ((double)observedCases - e1) * ((double)observedCases - e1) / e1 +
((double)population - e2) * ((double)population - e2) / e2 +
((double)totalCases - observedCases - e3) * ((double)totalCases - observedCases - e3) / e3 +
((double)totalPopulation - population - e4) * ((double)totalPopulation - population - e4) / e4;
}
/**
* Method for Likelyhood SMR significance calculating.
* @param observedCases the analysed cases.
* @param totalCases the total cases.
* @param population the analysed population.
* @param totalPopulation the total population.
* @return the significance of standardization.
*/
protected static double signifyLikelyhood(int observedCases, int totalCases, int population, int totalPopulation)
{
double e1 = ((double)observedCases + population) * totalCases / (totalCases + totalPopulation);
double e2 = ((double)observedCases + population) * totalPopulation / (totalCases + totalPopulation);
double e3 = ((double)totalCases - observedCases + totalPopulation - population) *totalCases / (totalCases + totalPopulation);
double e4 = ((double)totalCases - observedCases + totalPopulation - population) *totalPopulation / (totalCases + totalPopulation);
return 2 * (observedCases * java.lang.Math.log(observedCases / e1) +
population * java.lang.Math.log(population / e2) +
(totalCases - observedCases) * java.lang.Math.log((totalCases - observedCases) / e3) +
(totalPopulation - population) * java.lang.Math.log((totalPopulation - population) / e4));
}
/**
* Method for calculating SMR significance.
* @param observedCases the analysed cases.
* @param expectedCases the expected cases.
* @return the significance of standardization.
*/
protected static int signify(int observedCases, double expectedCases)
{
double hi2 = signifyPoisson(observedCases, expectedCases);
return (hi2 > 3.84 ? 1 : -1);
}
/**
* Method for calculating SMR category.
* @param smr the standard mortality/morbiditi ratio.
* @param significance the significance of standardization.
* @return the category of standardization.
*/
protected static int categorize(double smr, int significance)
{
int category = 0;
if(significance == 1) // Significant.
{
category = (smr > 1 ? 1 : 5); // High or low.
}
else // Non significant.
{
category = (smr > 1.1 ? 2 : (smr < 0.9 ? 4 : 3)); // High, low or medium.
}
return category;
}
/**
* Method for calculating probability.
* @param hi2 the significance of standardization.
* @param sP a vector of standardization probabilities.
* @return the probability of standardization.
*/
protected static double computeProbability(double hi2, java.util.Vector<StandardizationProbability> sP)
{
double probability = 0;
if(hi2 < sP.get(0).hi2) // The firt element is the minimum in hi2s.
{
probability = 1;
}
else if(hi2 > sP.get(sP.size() - 1).hi2) // The last element is the maximum in hi2s.
{
probability = 0;
}
else
{
int i = -1;
for(StandardizationProbability iteratorSP : sP)
{
i++;
if(hi2 < iteratorSP.hi2)
{
break;
}
}
if(i == sP.size() - 1 && hi2 == sP.get(i).hi2)
{
probability = 1 - sP.get(i).probability;
}
else if(hi2 == sP.get(i - 1).hi2)
{
probability = 1 - sP.get(i - 1).probability;
}
else
{
probability = 1 - (sP.get(i - 1).probability + (sP.get(i).probability - sP.get(i - 1).probability) /
(sP.get(i).hi2 - sP.get(i - 1).hi2) * (hi2 - sP.get(i - 1).hi2));
}
}
return probability;
}
/**
* Method for calculating probability.
* @param hi2 the significance of standardization.
* @param sP a vector of standardization probabilities.
* @return the probability of standardization.
*/
protected static java.lang.String computeProbabilityAsString(double hi2, java.util.Vector<Standardization.StandardizationProbability> sP)
{
double probability = Standardization.computeProbability(hi2, sP);
java.lang.String probabilityString = "= 0";
if(probability == 1)
{
probabilityString = "= 1";
}
else if(probability == 0)
{
probabilityString = "= 0";
}
if(probability <= 0.01)
{
probabilityString = "<= 0.01";
}
else if(probability <= 0.05)
{
probabilityString = "<= 0.05";
}
else if(probability <= 0.1)
{
probabilityString = "> 0.05 <= 0.1";
}
else
{
probabilityString = "> 0.1";
}
return probabilityString;
}
/**
* Method for calculating the category of probability.
* @param probability the probability of standardization.
* @return the category of probability.
*/
protected static int categorizeProbability(double probability)
{
int category = 0;
if(probability <= 0.01)
{
category = 1;
}
else if(probability <= 0.05)
{
category = 2;
}
else if(probability <= 0.1)
{
category = 3;
}
else if(probability <= 0.2)
{
category = 4;
}
else
{
category = 5;
}
return category;
}
/**
* Method for calculating trend significance.
* @param sQx the year correlation.
* @param sQy the incidence correlation.
* @param sP the mixed correlation.
* @param years a vector of years.
* @param trendSignificances a vector of trend significances.
* @return the significance of standardization.
*/
protected static java.lang.String signify(double sQx, double sQy, double sP, java.util.Vector<java.lang.Integer> years, java.util.Vector<TrendSignificance> trendSignificances)
{
java.lang.String significance = "= 0";
if(years.size() > 2) // Otherwise trend significance has no meaning.
{
int index = -1;
for(TrendSignificance tS : trendSignificances)
{
index++;
if(years.size() - 2 >= tS.year)
{
break;
}
}
double a = sQy - sP * sP / sQx;
double b = a / (years.size() - 2);
double trend = sP / sQx;
double T = java.lang.Math.abs(trend / java.lang.Math.sqrt(java.lang.Math.abs(b / sQx)));
if(trend == 0)
{
significance = "= 0";
}
else if(T < trendSignificances.get(index).trend0_1)
{
significance = "> 0.1";
}
else if(T >= trendSignificances.get(index).trend0_1 && T < trendSignificances.get(index).trend0_05)
{
significance = "> 0.05 <= 0.1";
}
else if(T >= trendSignificances.get(index).trend0_05 && T < trendSignificances.get(index).trend0_01)
{
significance = "<= 0.05";
}
else if(T >= trendSignificances.get(index).trend0_01 && T < trendSignificances.get(index).trend0_001)
{
significance = "<= 0.01";
}
else
{
significance = "<= 0.001";
}
}
return significance;
}
/**
* Method for calculating the category of the trend.
* @param trend the trend of standardization.
* @return the category of trend.
*/
protected static int categorizeTrend(double trend)
{
int category = 0;
if(trend >= 0.25)
{
category = 1;
}
else if(trend < 0.25 && trend > 0.06)
{
category = 2;
}
else if(trend < 0.06 && trend > -0.06)
{
category=3;
}
else if(trend < -0.06 && trend >= -0.25)
{
category = 4;
}
else if(trend < -0.25)
{
category = 5;
}
return category;
}
}
| [
"[email protected]"
] | |
078a73aee4a2b0c08756dd1067d251e7a07767b2 | 28370741b1225f9885fc672e13fe37fd368eb1b0 | /app/src/main/java/com/example/contacts/Contact.java | d8b34e4b86bfaadd4fd62880f9de86eef7690418 | [] | no_license | Armor9D/CPSC312Project | da36e143b45ee9a3ac514bfa22d30c04dfab5467 | a268f293abedc5b6a10b93b597a636677d0d1053 | refs/heads/master | 2020-09-16T04:24:05.025042 | 2019-12-12T03:53:36 | 2019-12-12T03:53:36 | 223,652,493 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,631 | java | package com.example.contacts;
import androidx.annotation.NonNull;
/**
* Sets up a Contact class which can be stored into a list
*/
public class Contact {
private String name;
private String phoneNumber;
private String eMail;
private String address;
/**
* DVC for the Contact class
*/
public Contact() {
name = "BLANK_NAME";
phoneNumber = "";
eMail = "";
address = "";
}
/**
* EVC for the Contact class
*
* @param name - name of the contact
* @param phoneNumber - phone number of the contact
* @param eMail - email of the contact
* @param address - address of the contact
*/
public Contact(String name, String phoneNumber, String eMail, String address) {
this.name = name;
this.phoneNumber = phoneNumber;
this.eMail = eMail;
this.address = address;
}
/**
* @return String representation of the Contact (in this case, the Contact's name)
*/
@NonNull
@Override
public String toString() {
return name;
}
/**
* Gets the name of the Contact
*
* @return contact's name
*/
public String getName() {
return name;
}
/**
* Sets the name of the Contact
*
* @param name - name to set as contact's name
*/
public void setName(String name) {
this.name = name;
}
/**
* Gets the phone number of the Contact
*
* @return - contact's phone number
*/
public String getPhoneNumber() {
return phoneNumber;
}
/**
* Sets the phone number of the Contact
*
* @param phoneNumber - phone number to set as contact's phone number
*/
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
/**
* Gets the email address of the Contact
*
* @return - contact's email address
*/
public String geteMail() {
return eMail;
}
/**
* Sets the email address of the Contact
*
* @param eMail - email address to set as contact's email address
*/
public void seteMail(String eMail) {
this.eMail = eMail;
}
/**
* Gets the physical address of the Contact
*
* @return - contact's physical address
*/
public String getAddress() {
return address;
}
/**
* Sets the physical address of the Contact
*
* @param address - street address to set as contact's address
*/
public void setAddress(String address) {
this.address = address;
}
}
| [
"[email protected]"
] | |
6a9b01bc49f5c9396ce87e1ed691c82cc3a2c300 | 1a5b9fe874ff100fa0799344164e0c9eff66606c | /Algorithm - 201907/13.GraphsAndGraphAlgorithms-Exercise/src/AdvancedGraphAlgorithms/_3_MostReliablePath/MostReliablePath.java | 744acbe9689687cfd75049d83aaa8a92d5a6e4ef | [] | no_license | NikolovV/Independend | ad2237abec32f085d5ecbbd41e6415a3cfe616b0 | 701e4b5c9ead64ca7666263398237e5d272fc0f5 | refs/heads/master | 2021-02-28T08:58:03.386460 | 2020-12-25T19:08:40 | 2020-12-25T19:08:40 | 245,680,270 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,935 | java | package AdvancedGraphAlgorithms._3_MostReliablePath;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class MostReliablePath {
private static final Map<Integer, List<Edge>> graph = new HashMap<>();
private static double[] reliablePath;
private static int startNode;
private static int endNode;
private static boolean[] visited;
private static int[] previous;
public static void main(String[] args) {
parseInput();
List<Integer> path = mostReliablePath();
System.out.printf("Most reliable path reliability: %.2f%%%n", reliablePath[endNode]);
System.out.println(path.stream().map(Object::toString).collect(Collectors.joining(" -> ")));
}
private static void parseInput() {
Scanner in = new Scanner(System.in);
int nodes = Integer.parseInt(in.nextLine().split(": ")[1]);
IntStream.range(0, nodes).forEach(n -> graph.put(n, new ArrayList<>()));
String[] pathData = in.nextLine().split(" ");
startNode = Integer.parseInt(pathData[1]);
endNode = Integer.parseInt(pathData[3]);
int edgesCount = Integer.parseInt(in.nextLine().split(": ")[1]);
for (int i = 0; i < edgesCount; i++) {
String[] edgeParts = in.nextLine().split(" ");
int from = Integer.parseInt(edgeParts[0]);
int to = Integer.parseInt(edgeParts[1]);
int percentage = Integer.parseInt(edgeParts[2]);
Edge edge = new Edge(from, to, percentage);
graph.get(from).add(edge);
graph.get(to).add(edge);
}
reliablePath = new double[graph.size()];
visited = new boolean[graph.size()];
previous = new int[graph.size()];
previous[startNode] = -1;
for (int i = 0; i < graph.size(); i++) {
reliablePath[i] = -1;
}
reliablePath[startNode] = 100;
}
private static List<Integer> mostReliablePath() {
visited[startNode] = true;
PriorityQueue<Integer> queue = new PriorityQueue<>(Comparator.comparing(i -> reliablePath[i]));
queue.offer(startNode);
while (queue.size() > 0) {
int max = queue.poll();
if (reliablePath[max] == -1) {
break;
}
for (Edge child : graph.get(max)) {
int otherNode = child.getFirstVertex() == max ? child.getSecondVertex() : child.getFirstVertex();
if (!visited[otherNode]) {
visited[otherNode] = true;
queue.add(otherNode);
}
double newPercentage = reliablePath[max] / 100 * child.getPercentage();
if (reliablePath[otherNode] < newPercentage) {
reliablePath[otherNode] = newPercentage;
previous[otherNode] = max;
queue.remove(otherNode);
queue.add(otherNode);
}
}
}
return buildPath();
}
private static List<Integer> buildPath() {
List<Integer> path = new ArrayList<>();
int current = endNode;
while (current != -1) {
path.add(current);
current = previous[current];
}
Collections.reverse(path);
return path;
}
private static class Edge {
private final int firstVertex;
private final int secondVertex;
private final int percentage;
Edge(int from, int to, int percentage) {
this.firstVertex = from;
this.secondVertex = to;
this.percentage = percentage;
}
int getFirstVertex() {
return this.firstVertex;
}
int getSecondVertex() {
return this.secondVertex;
}
int getPercentage() {
return this.percentage;
}
}
} | [
"[email protected]"
] | |
71c13bf18d7af30e87499d7370fdfac57d25cab9 | 06a05ee6cf252a39c53c02a9cdf70c490cc54873 | /backend/src/main/java/com/example/backend/MyEndpoint.java | d25ee99248a11f6bd222d9616e450d8448062861 | [] | no_license | automator-map/Joke-Library-App | f30440b6308220c3dc2a41343a5ea1a517b60dad | b19da111f4293b63c7352f9f8f23883efee04344 | refs/heads/master | 2021-05-30T08:15:14.272594 | 2016-02-09T18:35:16 | 2016-02-09T18:35:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,075 | java | /*
For step-by-step instructions on connecting your Android application to this backend module,
see "App Engine Java Endpoints Module" template documentation at
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints
*/
package com.example.backend;
import com.example.JokesLibrary;
import com.google.api.server.spi.config.Api;
import com.google.api.server.spi.config.ApiMethod;
import com.google.api.server.spi.config.ApiNamespace;
import javax.inject.Named;
/**
* An endpoint class we are exposing
*/
@Api(
name = "myApi",
version = "v1",
namespace = @ApiNamespace(
ownerDomain = "backend.example.com",
ownerName = "backend.example.com",
packagePath = ""
)
)
public class MyEndpoint {
/**
* A simple endpoint method that tells a Joke
*/
@ApiMethod(name = "tellJoke")
public MyBean tellJoke() {
MyBean response = new MyBean();
response.setData(JokesLibrary.getJoke());
return response;
}
}
| [
"[email protected]"
] | |
b730aa78e3572afe768f6af45d6c28e7b55f8dbe | 128eb90ce7b21a7ce621524dfad2402e5e32a1e8 | /laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/symfony/var_dumper/Dumper/file_HtmlDumper_php.java | 59434c43a6b758385c2c8a1ea862b20c4c3c0dd1 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | RuntimeConverter/RuntimeConverterLaravelJava | 657b4c73085b4e34fe4404a53277e056cf9094ba | 7ae848744fbcd993122347ffac853925ea4ea3b9 | refs/heads/master | 2020-04-12T17:22:30.345589 | 2018-12-22T10:32:34 | 2018-12-22T10:32:34 | 162,642,356 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,170 | java | package com.project.convertedCode.includes.vendor.symfony.var_dumper.Dumper;
import com.runtimeconverter.runtime.RuntimeStack;
import com.runtimeconverter.runtime.interfaces.ContextConstants;
import com.runtimeconverter.runtime.includes.RuntimeIncludable;
import com.runtimeconverter.runtime.includes.IncludeEventException;
import com.runtimeconverter.runtime.classes.RuntimeClassBase;
import com.runtimeconverter.runtime.RuntimeEnv;
import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface;
import com.runtimeconverter.runtime.arrays.ZPair;
/*
Converted with The Runtime Converter (runtimeconverter.com)
vendor/symfony/var-dumper/Dumper/HtmlDumper.php
*/
public class file_HtmlDumper_php implements RuntimeIncludable {
public static final file_HtmlDumper_php instance = new file_HtmlDumper_php();
public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException {
Scope3705 scope = new Scope3705();
stack.pushScope(scope);
this.include(env, stack, scope);
stack.popScope();
}
public final void include(RuntimeEnv env, RuntimeStack stack, Scope3705 scope)
throws IncludeEventException {
// Namespace import was here
// Namespace import was here
// Conversion Note: class named HtmlDumper was here in the source code
env.addManualClassLoad("Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper");
// a function named esc was defined here with PHP code
env.addManualFunctionLoad("Symfony\\Component\\VarDumper\\Dumper\\esc");
}
private static final ContextConstants runtimeConverterContextContantsInstance =
new ContextConstants()
.setDir("/vendor/symfony/var-dumper/Dumper")
.setFile("/vendor/symfony/var-dumper/Dumper/HtmlDumper.php");
public ContextConstants getContextConstants() {
return runtimeConverterContextContantsInstance;
}
private static class Scope3705 implements UpdateRuntimeScopeInterface {
public void updateStack(RuntimeStack stack) {}
public void updateScope(RuntimeStack stack) {}
}
}
| [
"[email protected]"
] | |
0ec43fb33d6eac613a20967a955f10512e38bb0e | 7ad037dacdef9e7d003a8116157e5a5949d27824 | /orders/src/main/java/com/orders/crudyorders/model/Agent.java | 46311eb63e454b8fbef63068ee7ee2f0af64fc89 | [
"MIT"
] | permissive | Jtonna/java-orders | 1d58b2e991ed50f17db7d8fb26f4d80f27080327 | a22295745bab89ab637f1aee2f603a024e2618dc | refs/heads/master | 2020-06-03T03:35:47.268620 | 2019-06-17T02:40:30 | 2019-06-17T02:40:30 | 191,420,392 | 0 | 0 | MIT | 2019-06-17T02:40:32 | 2019-06-11T17:39:21 | Java | UTF-8 | Java | false | false | 2,446 | java | package com.orders.crudyorders.model;
import javax.persistence.*;
import java.util.ArrayList;
@Entity
@Table(name = "agent")
public class Agent
{
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
// setting strategy to this lets the database control how its set
@Column(nullable = false)
private long agentcode;
private String agentname, workingarea;
private double comission;
private String phone, country;
@OneToMany(mappedBy = "agent",
cascade = CascadeType.ALL,
orphanRemoval = true)
private ArrayList<Customer> customers = new ArrayList<>();
// this is for the long foreign key in customers?
@OneToMany(mappedBy = "agent",
cascade = CascadeType.ALL,
orphanRemoval = true)
private ArrayList<Order> orders = new ArrayList<>();
public Agent(){}
public Agent(String agentname, String workingarea, double comission, String phone, String country) {
this.agentname = agentname;
this.workingarea = workingarea;
this.comission = comission;
this.phone = phone;
this.country = country;
}
public long getAgentcode() {
return agentcode;
}
// public void setAgentcode(long agentcode) {
// this.agentcode = agentcode;
// }
public String getAgentname() {
return agentname;
}
public void setAgentname(String agentname) {
this.agentname = agentname;
}
public String getWorkingarea() {
return workingarea;
}
public void setWorkingarea(String workingarea) {
this.workingarea = workingarea;
}
public double getComission() {
return comission;
}
public void setComission(double comission) {
this.comission = comission;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public ArrayList<Customer> getCustomers() {
return customers;
}
public void setCustomers(ArrayList<Customer> customers) {
this.customers = customers;
}
public ArrayList<Order> getOrders() {
return orders;
}
public void setOrders(ArrayList<Order> orders) {
this.orders = orders;
}
} | [
"[email protected]"
] | |
0a4e65c986eb70167e10526e4a7138b0217d92b9 | 462b7e79c7f16aab08da4c93e5ab15cf7c8be27e | /ImoocHomework_Android07/app/src/main/java/cn/shui/imoochomework_android07/bean/Menu.java | e009b461b8feaf9537759198089cfe4b85e2ba4e | [] | no_license | shuile/ImoocAndroidProject | 26df99c4ab07877a141ac36aee73675cb6da28fe | 3716ee3bcac1f7e1df2ab258295777f4607c9538 | refs/heads/master | 2021-07-16T13:39:49.358899 | 2021-02-09T10:58:27 | 2021-02-09T10:58:27 | 238,690,607 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 644 | java | package cn.shui.imoochomework_android07.bean;
import java.util.ArrayList;
import java.util.List;
public class Menu {
private String menuName;
private List<MenuItem> children = new ArrayList<>();
public Menu() {
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public void addChild(MenuItem menuItem) {
children.add(menuItem);
}
public List<MenuItem> getChildren() {
return children;
}
public void setChildren(List<MenuItem> children) {
this.children = children;
}
}
| [
"[email protected]"
] | |
2082c9c63d0bc5d18d45ed1e9b7e39810e1e6f8c | a2998838f81014ae2a1ca9b789785cc0ee7310c7 | /FinalProject/newProject/app/src/main/java/ddwucom/mobile/finalproject/NaverBookDto.java | ba84562e4fce9097997c2a446399944d1c97296d | [] | no_license | hash827/BookReport-Project | 55bb54f6dc3c9eb9c4a4fdc0f7ac18c6970ad149 | ba1f8f0b59f21b3bd240fd5b8b73813c348528c4 | refs/heads/main | 2023-01-14T04:09:08.106666 | 2020-11-18T21:50:47 | 2020-11-18T21:50:47 | 313,861,005 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,510 | java | package ddwucom.mobile.finalproject;
import android.text.Html;
import android.text.Spanned;
public class NaverBookDto {
private int _id;
private String title;
private String author;
private String link;
private String imageLink;
private String publisher;
private String ibsn;
private String description;
private String price;
private String imageFileName; // 외부저장소에 저장했을 때의 파일명
public int get_id() {
return _id;
}
public String getPublisher() {
Spanned spanned = Html.fromHtml(publisher);
return spanned.toString();
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public String getIbsn() {
return ibsn;
}
public void setIbsn(String ibsn) {
this.ibsn = ibsn;
}
public void set_id(int _id) {
this._id = _id;
}
public String getAuthor() {
Spanned spanned = Html.fromHtml(author);
return spanned.toString();
}
public void setAuthor(String author) {
this.author = author;
}
public String getImageLink() {
return imageLink;
}
public void setImageLink(String imageLink) {
this.imageLink = imageLink;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public String getImgFileName() {
return imageFileName;
}
public void setImageFileName(String imageFileName) {
this.imageFileName = imageFileName;
}
public String getTitle() {
//xml을 보면 중간중간에 <b>주식</b>처럼 태그가 들어가 있어서 그걸 string으로 바꿔주는 함수
Spanned spanned = Html.fromHtml(title);
return spanned.toString();
// return title;
}
public String getDescription() {
Spanned spanned = Html.fromHtml(description);
return spanned.toString();
}
public void setDescription(String description) {
this.description = description;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getImageFileName() {
return imageFileName;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public String toString() {
return _id + ": " + title + " (" + author + ')';
}
}
| [
"[email protected]"
] | |
e8abed28ddefb0acb4729d1201050f42994a56f2 | 4433c0388cb7abd5742d907bf4f747f09d96ab6b | /kodilla-good-patterns/src/main/java/com/kodilla/good/patterns/challenges/OrderDto.java | b3b40d73100b580ae0de0ed07b4668505061668e | [] | no_license | arturzia/Artur-Ziabka-kodilla-java | 20f588f39fdad84adf00fe1361b2e0ede9f92653 | fd38e7c5b44d6e9e5719ccc4d3fdc6d44f3f7f4b | refs/heads/master | 2020-03-14T08:27:21.671135 | 2018-09-23T17:49:34 | 2018-09-23T17:49:34 | 131,524,984 | 0 | 0 | null | 2018-09-23T17:50:50 | 2018-04-29T19:53:10 | Java | UTF-8 | Java | false | false | 382 | java | package com.kodilla.good.patterns.challenges;
public class OrderDto {
public User user;
public boolean isOrdered;
public OrderDto(final User user, final boolean isOrdered) {
this.user = user;
this.isOrdered = isOrdered;
}
public User getUser() {
return user;
}
public boolean isOrdered() {
return isOrdered;
}
}
| [
"“[email protected]"
] | |
50aad77a202b2cf24ee7818325665c6960444065 | 6bac7e67ee89008df5fc536f9a5baa7a86c4f867 | /src/hutnik/maksim/JavaForAll/BasicOfJava/opop.java | 482102c9cab74b1e8e51098db8487d8c21973fb6 | [] | no_license | HutnikMaksim/forMaxim | 68ae3dcd284b763c74ef9849e04584e0d0e21d69 | 78929763c6b0c11e89d3f2a87ff04c9aa8895700 | refs/heads/master | 2023-07-02T07:25:41.272877 | 2021-08-01T20:18:37 | 2021-08-01T20:18:37 | 340,015,431 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 517 | java | package hutnik.maksim.JavaForAll.BasicOfJava;
class opop {
public static void main(String[] args) {
byte x = 100, y = 92, z;
float f;
z = (byte) (x + y);
f = 3.3f;
System.out.println(z +" " + f);
char a = 'A';
a = (char) (a + 1);
System.out.println(a);
a += 11;
System.out.println(a);
a++;
System.out.println(a);
System.out.println();
System.out.println(a++);
System.out.println(a);
}
}
| [
"[email protected]"
] | |
ce038a15a3f7dd8881eeaaac49fef409562ef230 | 415c5439b464f243d3291ebd07560f7630a584c0 | /src/SubstringwithConcatenationofAllWords.java | 998b179ee2a158419fadc3cb5569aa3276cac7e4 | [] | no_license | gardness/LeetCodePractice | 93e3a94458aca0a314384aa3cee4658cff3d3082 | 2d6c999f5a88e97e4276c9325da913dfc838c407 | refs/heads/master | 2021-07-30T04:23:44.911541 | 2021-07-24T15:50:17 | 2021-07-24T15:50:17 | 218,311,811 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,155 | java | import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class SubstringwithConcatenationofAllWords {
public List<Integer> findSubstring(String s, String[] words) {
if (s == null || words == null || words.length == 0) {
return new ArrayList<>();
}
List<Integer> res = new ArrayList<>();
int n = words.length;
int m = words[0].length();
HashMap<String, Integer> map = new HashMap<>();
for (String str : words) {
map.put(str, map.getOrDefault(str, 0) + 1);
}
for (int i = 0; i <= s.length() - n * m; i++) {
HashMap<String, Integer> copy = new HashMap<>(map);
int k = n;
int j = i;
while (k > 0) {
String tmp = s.substring(j, j + m);
if (!copy.containsKey(tmp) || copy.get(tmp) < 1) {
break;
}
copy.put(tmp, copy.get(tmp) - 1);
k--;
j += m;
}
if (k == 0) {
res.add(i);
}
}
return res;
}
}
| [
"[email protected]"
] | |
7c20fda16a42015eef057856bece1bbef68b5372 | 59a28030b9bbfce8b6c7ad51a9e5cbb7aadc36b9 | /QdmKnimeTranslator/src/main/java/edu/phema/jaxb/ihe/svs/XActMoodPermPermrq.java | 3b87d4f4bb25dd54099c9ae56eedffdb264cc6f3 | [] | no_license | PheMA/qdm-knime | c3970566c7fe529eefe94a9311d7beeed6d39dc8 | fb3e2925a6cd15ebba83ba5fc95bb604a54ff564 | refs/heads/master | 2020-12-24T14:27:42.708153 | 2016-05-25T21:42:57 | 2016-05-25T21:42:57 | 29,319,651 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,040 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.12.15 at 03:09:44 PM CST
//
package edu.phema.jaxb.ihe.svs;
import javax.xml.bind.annotation.XmlEnum;
/**
* <p>Java class for x_ActMoodPermPermrq.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="x_ActMoodPermPermrq">
* <restriction base="{urn:ihe:iti:svs:2008}cs">
* <enumeration value="PERM"/>
* <enumeration value="PERMRQ"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum XActMoodPermPermrq {
PERM,
PERMRQ;
public String value() {
return name();
}
public static XActMoodPermPermrq fromValue(String v) {
return valueOf(v);
}
}
| [
"[email protected]"
] | |
23cb223b0c58c9ec2e30ba02c4a372c01c1dd665 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/neo4j/2017/4/StoreFile.java | 635b5125ae3869cdc8d5c1b3f7b7a0ccb651f3c6 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 11,773 | java | /*
* Copyright (c) 2002-2017 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.storemigration;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.function.Predicate;
import org.neo4j.helpers.collection.Iterables;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.fs.StoreChannel;
import org.neo4j.kernel.impl.store.DynamicArrayStore;
import org.neo4j.kernel.impl.store.DynamicStringStore;
import org.neo4j.kernel.impl.store.LabelTokenStore;
import org.neo4j.kernel.impl.store.MetaDataStore;
import org.neo4j.kernel.impl.store.NodeStore;
import org.neo4j.kernel.impl.store.PropertyKeyTokenStore;
import org.neo4j.kernel.impl.store.PropertyStore;
import org.neo4j.kernel.impl.store.RelationshipGroupStore;
import org.neo4j.kernel.impl.store.RelationshipStore;
import org.neo4j.kernel.impl.store.RelationshipTypeTokenStore;
import org.neo4j.kernel.impl.store.SchemaStore;
import org.neo4j.kernel.impl.store.StoreFactory;
import org.neo4j.kernel.impl.store.counts.CountsTracker;
import org.neo4j.kernel.impl.store.format.standard.StandardV2_0;
import org.neo4j.kernel.impl.store.format.standard.StandardV2_1;
import org.neo4j.kernel.impl.store.format.standard.StandardV2_2;
import org.neo4j.kernel.impl.store.format.standard.StandardV3_0;
import org.neo4j.string.UTF8;
import static org.neo4j.helpers.collection.Iterables.iterable;
public enum StoreFile
{
// all store files in Neo4j
NODE_STORE(
NodeStore.TYPE_DESCRIPTOR,
StoreFactory.NODE_STORE_NAME,
StandardV2_0.STORE_VERSION
),
NODE_LABEL_STORE(
DynamicArrayStore.TYPE_DESCRIPTOR,
StoreFactory.NODE_LABELS_STORE_NAME,
StandardV2_0.STORE_VERSION
),
PROPERTY_STORE(
PropertyStore.TYPE_DESCRIPTOR,
StoreFactory.PROPERTY_STORE_NAME,
StandardV2_0.STORE_VERSION
),
PROPERTY_ARRAY_STORE(
DynamicArrayStore.TYPE_DESCRIPTOR,
StoreFactory.PROPERTY_ARRAYS_STORE_NAME,
StandardV2_0.STORE_VERSION
),
PROPERTY_STRING_STORE(
DynamicStringStore.TYPE_DESCRIPTOR,
StoreFactory.PROPERTY_STRINGS_STORE_NAME,
StandardV2_0.STORE_VERSION
),
PROPERTY_KEY_TOKEN_STORE(
PropertyKeyTokenStore.TYPE_DESCRIPTOR,
StoreFactory.PROPERTY_KEY_TOKEN_STORE_NAME,
StandardV2_0.STORE_VERSION
),
PROPERTY_KEY_TOKEN_NAMES_STORE(
DynamicStringStore.TYPE_DESCRIPTOR,
StoreFactory.PROPERTY_KEY_TOKEN_NAMES_STORE_NAME,
StandardV2_0.STORE_VERSION
),
RELATIONSHIP_STORE(
RelationshipStore.TYPE_DESCRIPTOR,
StoreFactory.RELATIONSHIP_STORE_NAME,
StandardV2_0.STORE_VERSION
),
RELATIONSHIP_GROUP_STORE(
RelationshipGroupStore.TYPE_DESCRIPTOR,
StoreFactory.RELATIONSHIP_GROUP_STORE_NAME,
StandardV2_1.STORE_VERSION
),
RELATIONSHIP_TYPE_TOKEN_STORE(
RelationshipTypeTokenStore.TYPE_DESCRIPTOR,
StoreFactory.RELATIONSHIP_TYPE_TOKEN_STORE_NAME,
StandardV2_0.STORE_VERSION
),
RELATIONSHIP_TYPE_TOKEN_NAMES_STORE(
DynamicStringStore.TYPE_DESCRIPTOR,
StoreFactory.RELATIONSHIP_TYPE_TOKEN_NAMES_STORE_NAME,
StandardV2_0.STORE_VERSION
),
LABEL_TOKEN_STORE(
LabelTokenStore.TYPE_DESCRIPTOR,
StoreFactory.LABEL_TOKEN_STORE_NAME,
StandardV2_0.STORE_VERSION
),
LABEL_TOKEN_NAMES_STORE(
DynamicStringStore.TYPE_DESCRIPTOR,
StoreFactory.LABEL_TOKEN_NAMES_STORE_NAME,
StandardV2_0.STORE_VERSION
),
SCHEMA_STORE(
SchemaStore.TYPE_DESCRIPTOR,
StoreFactory.SCHEMA_STORE_NAME,
StandardV2_0.STORE_VERSION
),
COUNTS_STORE_LEFT(
CountsTracker.TYPE_DESCRIPTOR,
StoreFactory.COUNTS_STORE + CountsTracker.LEFT,
StandardV2_2.STORE_VERSION,
false
)
{
@Override
boolean isOptional()
{
return true;
}
},
COUNTS_STORE_RIGHT(
CountsTracker.TYPE_DESCRIPTOR,
StoreFactory.COUNTS_STORE + CountsTracker.RIGHT,
StandardV2_2.STORE_VERSION,
false
)
{
@Override
boolean isOptional()
{
return true;
}
},
NEO_STORE(
MetaDataStore.TYPE_DESCRIPTOR,
"",
StandardV2_0.STORE_VERSION
);
private final String typeDescriptor;
private final String storeFileNamePart;
private final String sinceVersion;
private final boolean recordStore;
StoreFile( String typeDescriptor, String storeFileNamePart, String sinceVersion )
{
this( typeDescriptor, storeFileNamePart, sinceVersion, true );
}
StoreFile( String typeDescriptor, String storeFileNamePart, String sinceVersion, boolean recordStore )
{
this.typeDescriptor = typeDescriptor;
this.storeFileNamePart = storeFileNamePart;
this.sinceVersion = sinceVersion;
this.recordStore = recordStore;
}
public String forVersion( String version )
{
return typeDescriptor + " " + version;
}
public String fileName( StoreFileType type )
{
return type.augment( MetaDataStore.DEFAULT_NAME + storeFileNamePart );
}
public String storeFileName()
{
return fileName( StoreFileType.STORE );
}
public String fileNamePart()
{
return storeFileNamePart;
}
public boolean isRecordStore()
{
return recordStore;
}
public static Iterable<StoreFile> legacyStoreFilesForVersion( final String version )
{
Predicate<StoreFile> predicate = item -> version.compareTo( item.sinceVersion ) >= 0;
Iterable<StoreFile> storeFiles = currentStoreFiles();
Iterable<StoreFile> filter = Iterables.filter( predicate, storeFiles );
return filter;
}
public static Iterable<StoreFile> currentStoreFiles()
{
return Iterables.iterable( values() );
}
public static void fileOperation( FileOperation operation, FileSystemAbstraction fs, File fromDirectory,
File toDirectory, StoreFile... files ) throws IOException
{
fileOperation( operation, fs, fromDirectory, toDirectory, storeFiles( files ), false,
ExistingTargetStrategy.FAIL );
}
public static void fileOperation( FileOperation operation, FileSystemAbstraction fs, File fromDirectory,
File toDirectory, Iterable<StoreFile> files,
boolean allowSkipNonExistentFiles, ExistingTargetStrategy existingTargetStrategy ) throws IOException
{
fileOperation( operation, fs, fromDirectory, toDirectory, files, allowSkipNonExistentFiles,
existingTargetStrategy, StoreFileType.values() );
}
/**
* Performs a file operation on a database's store files from one directory
* to another. Remember that in the case of {@link FileOperation#MOVE moving files}, the way that's done is to
* just rename files (the standard way of moving with JDK6) from and to must be on the same disk partition.
*
* @param fromDirectory directory that hosts the database files.
* @param toDirectory directory to receive the database files.
* @throws IOException if any of the operations fail for any reason.
*/
public static void fileOperation( FileOperation operation, FileSystemAbstraction fs, File fromDirectory,
File toDirectory, Iterable<StoreFile> files,
boolean allowSkipNonExistentFiles, ExistingTargetStrategy existingTargetStrategy,
StoreFileType... types ) throws IOException
{
// TODO: change the order of files to handle failure conditions properly
for ( StoreFile storeFile : files )
{
for ( StoreFileType type : types )
{
String fileName = storeFile.fileName( type );
operation.perform( fs, fileName,
fromDirectory, allowSkipNonExistentFiles, toDirectory, existingTargetStrategy );
}
}
}
public static void removeTrailers( String version, FileSystemAbstraction fs, File storeDir, int pageSize )
throws IOException
{
for ( StoreFile storeFile : legacyStoreFilesForVersion( StandardV3_0.STORE_VERSION ) )
{
String trailer = storeFile.forVersion( version );
byte[] encodedTrailer = UTF8.encode( trailer );
File file = new File( storeDir, storeFile.storeFileName() );
long fileSize = fs.getFileSize( file );
long truncationPosition = containsTrailer( fs, file, fileSize, pageSize, encodedTrailer );
if ( truncationPosition != -1 )
{
fs.truncate( file, truncationPosition );
}
}
}
private static long containsTrailer( FileSystemAbstraction fs, File file, long fileSize, int pageSize,
byte[] encodedTrailer ) throws IOException
{
if ( !fs.fileExists( file ) )
{
return -1L;
}
try ( StoreChannel channel = fs.open( file, "rw" ) )
{
ByteBuffer buffer = ByteBuffer.allocate( encodedTrailer.length );
long newPosition = Math.max( 0, fileSize - encodedTrailer.length );
long stopPosition = Math.max( 0, fileSize - encodedTrailer.length - pageSize );
while ( newPosition >= stopPosition )
{
channel.position( newPosition );
int totalRead = 0;
do
{
int read = channel.read( buffer );
if ( read == -1 )
{
return -1L;
}
totalRead += read;
}
while ( totalRead < encodedTrailer.length );
if ( Arrays.equals( buffer.array(), encodedTrailer ) )
{
return newPosition;
}
else
{
newPosition -= 1;
buffer.clear();
}
}
return -1;
}
}
boolean isOptional()
{
return false;
}
/**
* Merely here as convenience since java generics is acting up in many cases, so this is nicer for
* inlining such a call into {@link #fileOperation(FileOperation, FileSystemAbstraction, File, File, Iterable, boolean, boolean, StoreFileType...)}
*/
public static Iterable<StoreFile> storeFiles( StoreFile... files )
{
return iterable( files );
}
}
| [
"[email protected]"
] | |
281d2af043ec29f88e77130d91ed4abd7a990053 | 216885c2835f0e1ab80b5ebebe15de10d2856528 | /primeNumber.java | 86efbeff60894ee2904d587c8fd9506804c6334a | [] | no_license | Udaichauhan284/Coding-Blocks-Java-Code | 70ad317b12acc37e0a5a1a2270423f32b212ea5f | eacde31ecac2b8672a05a8cf815d512c143f33dc | refs/heads/main | 2023-02-01T02:55:22.465924 | 2020-12-13T14:16:57 | 2020-12-13T14:16:57 | 321,076,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 462 | java | import java.util.Scanner;
class primeNumber{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int counter=0;
String primeNums="";
for(int i=0;i<n;i++)
{
for(int num=i;num>=1;num++)
{
if(i%num==0)
{
counter=counter+1;
}
}
if(counter==2)
{
primeNums=primeNums+i+" ";
}
}
System.out.println("Prime Number from 1 to "+n);
System.out.println(primeNums);
}
} | [
"[email protected]"
] | |
54a8ff91633b1bb0c73849d28e4c55e746d6a479 | 98b6ab83444c9a5e7e9a03145635ba396665423e | /woopra-reporting-sdk/src/main/java/com/woopra/java/sdk/entities/Filter.java | 622c62342ec876c04c9a879663315bb62248d253 | [] | no_license | asartawi/woopra-reporting-sdk | 50ba02fa60016c6ddbc3dad25d0343893c2ba29e | d68bd36bd6cf343c74a7ae6a7dcc3105045a66a0 | refs/heads/master | 2020-12-25T14:48:37.748745 | 2016-06-07T22:37:38 | 2016-06-07T22:37:38 | 60,650,590 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,974 | java | package com.woopra.java.sdk.entities;
import org.hibernate.validator.constraints.NotBlank;
/**
*
* @author abdulhafeth
*
*/
public class Filter {
@NotBlank
private String scope;
@NotBlank
private String match;
@NotBlank
private String value;
@NotBlank
private String key;
public String getScope() {
return scope;
}
public void setScope(String scope) {
this.scope = scope;
}
public String getMatch() {
return match;
}
public void setMatch(String match) {
this.match = match;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@Override
public String toString() {
return "Filter [scope=" + scope + ", match=" + match + ", value="
+ value + ", key=" + key + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((key == null) ? 0 : key.hashCode());
result = prime * result + ((match == null) ? 0 : match.hashCode());
result = prime * result + ((scope == null) ? 0 : scope.hashCode());
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Filter other = (Filter) obj;
if (key == null) {
if (other.key != null)
return false;
} else if (!key.equals(other.key))
return false;
if (match == null) {
if (other.match != null)
return false;
} else if (!match.equals(other.match))
return false;
if (scope == null) {
if (other.scope != null)
return false;
} else if (!scope.equals(other.scope))
return false;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
}
| [
"[email protected]"
] | |
a239d717afbff5536c31ab5e118b6cd3bae9cc41 | 2377f8724f2f1866cb6cc78a340502089665aa68 | /main/java/com/natura/rosette/block/BlockSeaShell.java | 4bd995c3a55108149883f15d9361429d3a71f415 | [] | no_license | linkisheroic/rosetteMod | 02ed8b598780869fd2d307af6d53d8849c1bb125 | 655385420f4e799dada8cd27b241437791c68236 | refs/heads/master | 2021-07-03T08:15:31.751602 | 2017-09-24T18:26:10 | 2017-09-24T18:26:10 | 104,543,289 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,544 | java | package com.natura.rosette.block;
import javax.annotation.Nullable;
import com.natura.rosette.Rosette;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockSeaShell extends BlockBase {
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
public BlockSeaShell() {
super(Material.GLASS, "sea_shell");
this.setCreativeTab(Rosette.decorationTab);
}
@Override
@Deprecated
public boolean isOpaqueCube(IBlockState state) {
return false;
}
@Override
@Deprecated
public boolean isFullCube(IBlockState state) {
return false;
}
@Override
public BlockSeaShell setCreativeTab(CreativeTabs tab) {
super.setCreativeTab(tab);
return this;
}
@Override
public BlockStateContainer createBlockState() {
return new BlockStateContainer(this, FACING);
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
EnumFacing entityFacing = entity.getHorizontalFacing();
if(!world.isRemote) {
if(entityFacing == EnumFacing.NORTH) {
entityFacing = EnumFacing.NORTH;
} else if(entityFacing == EnumFacing.EAST) {
entityFacing = EnumFacing.EAST;
} else if(entityFacing == EnumFacing.SOUTH) {
entityFacing = EnumFacing.SOUTH;
} else if(entityFacing == EnumFacing.WEST) {
entityFacing = EnumFacing.WEST;
}
world.setBlockState(pos, state.withProperty(FACING, entityFacing), 2);
}
}
@Nullable
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
{
return NULL_AABB;
}
@Override
public int getMetaFromState(IBlockState state) {
return ((EnumFacing)state.getValue(FACING)).getHorizontalIndex();
}
@Override
public IBlockState getStateFromMeta(int meta) {
return getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta));
}
}
| [
"[email protected]"
] | |
7c0a9be005e46ca42d7f04403d437571ab76b917 | d9809d61a42144f7dcce270ad9a0d73e8d815ee0 | /src/main/java/gy/finolo/springbootmybatisplus/controller/I18nController.java | b72e1955a82b8e19e147025c75701d6eedda15a2 | [] | no_license | finology/springboot-mybatis-plus | c0050689d6f0951c4ad0007111de459278791dea | a5c5f9c4680a612c934569a420764285880204c4 | refs/heads/master | 2021-08-26T01:17:50.044440 | 2021-08-16T08:39:53 | 2021-08-16T08:39:53 | 253,551,169 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 721 | java | package gy.finolo.springbootmybatisplus.controller;
import gy.finolo.springbootmybatisplus.handler.MessageSourceHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 国际化测试
* @author: Simon
* @date: 2020-08-31 11:06
*/
@RestController
@RequestMapping("/i18n")
public class I18nController {
@Autowired
private MessageSourceHandler messageSourceHandler;
@GetMapping("/m")
public String i18nMessage() {
return messageSourceHandler.getMessage("hello");
}
}
| [
"[email protected]"
] | |
03b5f8b8f0778d69e8b862428326f7c77783a0a2 | 3f39c3ab7d94f35e8a3919e6f24a7be35e261d85 | /src/main/java/cylon/combinator/Action.java | dc3a989aa051ef75df3aea1d931cd82fc90803b0 | [] | no_license | eungju/cylon | 68c833ec679026e6d84ebde2f12ef74ccc5e0945 | cb82bc7e17ed92d61427b556a2a41172e3af3aa8 | refs/heads/master | 2021-01-13T16:11:32.505127 | 2015-03-31T02:03:26 | 2015-03-31T02:03:26 | 22,243,018 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 237 | java | package cylon.combinator;
public interface Action {
public Object invoke(Object from);
public static final Action NOTHING = new Action() {
public Object invoke(Object from) {
return from;
}
};
}
| [
"eungju at gmail dot com"
] | eungju at gmail dot com |
2620857994c5fd28d128bd1f1ef7f70e2d6ef9ac | f15e57bd49b885cb27d50dd5f463c4a39ec3e03c | /SOFT252_Coursework/src/main/java/Secretary/orderMedicine.java | 8f2e257ecd0b49641ea27bceaa9aa8ef60d692ea | [] | no_license | LewisJones30/SOFT252-Coursework | 4f1ff998781c87a615ae340ae05405fed3070bb2 | 385602b99eeaccdbf3a922cb2105b5f5b26a8838 | refs/heads/master | 2020-09-28T06:04:38.557740 | 2020-01-09T10:26:44 | 2020-01-09T10:26:44 | 226,706,946 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 15,834 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Secretary;
import Interfaces.IWriteJSON;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import java.io.Reader;
import java.util.Iterator;
import java.io.IOException;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import javax.swing.JOptionPane;
/**
*
* @author Lewis
*/
public class orderMedicine extends javax.swing.JFrame implements IWriteJSON{
/**
* Creates new form orderMedicine
*/
public orderMedicine() {
initComponents();
fillMedicines();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
cbMedicines = new javax.swing.JComboBox<>();
jLabel3 = new javax.swing.JLabel();
tfQuantity = new javax.swing.JTextField();
chbMedicines = new javax.swing.JCheckBox();
jLabel4 = new javax.swing.JLabel();
tfNewMeds = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
setTitle("Order new medicines");
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
jLabel1.setText("Order new Medicine");
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel2.setText("Medicine to order:");
cbMedicines.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel3.setText("Quantity Required:");
tfQuantity.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
chbMedicines.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
chbMedicines.setText("New Medicine?");
chbMedicines.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chbMedicinesActionPerformed(evt);
}
});
jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel4.setText("New Medicine name:");
tfNewMeds.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
tfNewMeds.setText("N/A");
tfNewMeds.setEnabled(false);
jButton1.setText("Order Medicine");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("Close Window");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(82, 82, 82)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(chbMedicines))
.addComponent(jLabel1)))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jButton1)
.addComponent(jLabel4))
.addGap(43, 43, 43)
.addComponent(tfNewMeds, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(cbMedicines, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton2)
.addComponent(tfQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))))))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(chbMedicines)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(tfNewMeds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(cbMedicines, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(tfQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(26, 26, 26)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void chbMedicinesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chbMedicinesActionPerformed
// TODO add your handling code here:
if (chbMedicines.isSelected() == true)
{
tfNewMeds.setEnabled(true);
cbMedicines.setEnabled(false);
}
else
{
tfNewMeds.setEnabled(false);
cbMedicines.setEnabled(true);
}
}//GEN-LAST:event_chbMedicinesActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
JSONParser parser = new JSONParser();
try (Reader reader = new FileReader("JSON/MedicineInformation.json"))
{
JSONObject jsonObject = (JSONObject) parser.parse(reader); //Parse the JSON object
JSONArray medicines = (JSONArray) jsonObject.get("medicines");
if (chbMedicines.isSelected() == false)
{
for (int i = 0; i < medicines.size(); i++) {
JSONObject currentMed = (JSONObject) medicines.get(i);
if (currentMed.get("name").toString().equals(cbMedicines.getSelectedItem()))
{
int startingQuantity = Integer.parseInt(currentMed.get("quantity").toString());
currentMed.put("name", cbMedicines.getSelectedItem());
currentMed.put("quantity", startingQuantity + Integer.parseInt(tfQuantity.getText()));
//This code is here because the WriteToJSON will not override if there is one of the same name.
FileWriter JSONFile = new FileWriter("JSON/MedicineInformation.json");
String intro = ("{" + (char)34 + "medicines" + (char)34) + ":";
JSONFile.write(intro + medicines.toJSONString() + "}");
JSONFile.flush();
JSONFile.close();
}
}
}
else
{
JSONObject newMedicine = new JSONObject();
newMedicine.put("name", tfNewMeds.getText());
newMedicine.put("quantity", tfQuantity.getText());
medicines.add(newMedicine);
WriteToJSON("JSON/MedicineInformation.json", newMedicine, "medicines");
JOptionPane.showMessageDialog(null, "Successfully stocked the medicine!");
}
}//GEN-LAST:event_jButton1ActionPerformed
catch (IOException e)
{
e.printStackTrace();
}
catch (ParseException e)
{
e.printStackTrace();
}
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
new SecretaryDashboard().setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_jButton2ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(orderMedicine.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(orderMedicine.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(orderMedicine.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(orderMedicine.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new orderMedicine().setVisible(true);
}
});
}
private void fillMedicines()
{
JSONParser parser = new JSONParser();
try (Reader reader = new FileReader("JSON/MedicineInformation.json"))
{
JSONObject jsonObject = (JSONObject) parser.parse(reader); //Parse the JSON object
JSONArray medicines = (JSONArray) jsonObject.get("medicines");
for (int i = 0; i < medicines.size(); i++) {
JSONObject currentMedicine = (JSONObject) medicines.get(i);
cbMedicines.addItem(currentMedicine.get("name").toString());
}
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
catch (ParseException e)
{
e.printStackTrace();
}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox<String> cbMedicines;
private javax.swing.JCheckBox chbMedicines;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JTextField tfNewMeds;
private javax.swing.JTextField tfQuantity;
// End of variables declaration//GEN-END:variables
@Override
public boolean WriteToJSON(String fileName, JSONObject objectToWrite, String arrayName) {
JSONParser parser = new JSONParser();
try (Reader reader = new FileReader(fileName))
{
JSONObject jsonObject = (JSONObject) parser.parse(reader); //Parse the JSON object
JSONArray array = (JSONArray) jsonObject.get(arrayName);
array.add(objectToWrite);
FileWriter JSONFile = new FileWriter(fileName);
try
{
String intro = ("{" + (char)34 + arrayName + (char)34) + ":";
JSONFile.write(intro + array.toJSONString() + "}");
}
catch (IOException e)
{
e.printStackTrace();
}
JSONFile.flush();
JSONFile.close();
return true;
}
catch (FileNotFoundException e)
{
e.printStackTrace();
return false;
}
catch (IOException e)
{
e.printStackTrace();
return false;
}
catch (ParseException e)
{
e.printStackTrace();
}
return false;
}
}
| [
"[email protected]"
] | |
2ed9a04c3eb66165b7028b8f7b593fc9aa178186 | 14d083e172837377a0bc3e9b2b031c058e75a4aa | /src/Services/MaterialsServices/MultiTextureService.java | 4dd833bc30642846c65599ee5e17ef81839b9535 | [] | no_license | wgres101/NECROTEK3Dv2 | 478b708936b4dcfd9aa7f9b949e23bfa3e61bd43 | 4f57b5f56fc2fa6406d2ce6ed5fdce21964fd483 | refs/heads/master | 2020-12-18T18:58:42.660286 | 2017-08-10T23:23:29 | 2017-08-10T23:23:29 | 235,483,578 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 75 | java | package Services.MaterialsServices;
public class MultiTextureService {
}
| [
"[email protected]"
] | |
ced13a1c7c5a74838740d5be9d5a0bed53a454b2 | 60416ddfc2ec70451712c063157271001851767c | /app/src/main/java/com/example/guest999/firebasenotification/utilis/SqlDbHelper.java | c7ce5f6e8a01a7b4739ec06744368d5e7ff8fdce | [] | no_license | HIREN4131KINAL/ShareDemo | f2261e7fdfd31a15026d6e35ddad91a582dd07a2 | 19bb0f33cabc56ad4f09e35096d33675fef8fbd9 | refs/heads/master | 2021-01-12T06:00:41.171805 | 2016-12-16T08:52:00 | 2016-12-16T08:52:00 | 77,269,570 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,317 | java | package com.example.guest999.firebasenotification.utilis;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Environment;
import static android.R.attr.version;
public class SqlDbHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "FILE_SHARING";
private static final String DATABASE_FILE_PATH = String.valueOf(Environment.getExternalStorageDirectory());
private static final String SCRIPT_CREATE_DATABASE = "CREATE TABLE IF NOT EXISTS USER_LIST(_id INTEGER PRIMARY KEY AUTOINCREMENT,NAME TEXT,PHON TEXT,COUNT TEXT)";
SqlDbHelper(Context context, String databaseName, Object o, int databaseVersion) {
super(context,DATABASE_FILE_PATH + "/.PLdb/" + DATABASE_NAME, null , version);
// TODO Auto-generated constructor stub
//context.getExternalFilesDir(null).getAbsolutePath() + "/" + DATABASE_NAME, null, DATABASE_VERSION
}
@Override
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL(SCRIPT_CREATE_DATABASE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// TODO Auto-generated method stub
onCreate(db);
}
}
| [
"[email protected]"
] | |
db13fed7bfea5f7359d46e6d71247b7762c7dfd2 | 40f1949d03f2fb88af617d88915e89071b629209 | /sdk-common/src/com/android/ide/common/resources/FrameworkResources.java | 7dd362670e8d3b568ae74479755200667785a3ad | [] | no_license | multi-os-engine-community/moe-ui-designer | 804ca2ee31a013ce1b39a463be6e416a688d1235 | 6609fefee64e51759ac9f7b716d8f04c0dad8680 | refs/heads/master | 2021-01-20T23:36:57.321122 | 2016-08-24T11:04:57 | 2016-08-24T11:04:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,009 | java | /*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.ide.common.resources;
import com.android.SdkConstants;
import com.android.annotations.NonNull;
import com.android.annotations.Nullable;
import com.android.io.IAbstractFile;
import com.android.io.IAbstractFolder;
import com.android.resources.ResourceType;
import com.android.utils.ILogger;
import com.google.common.base.Charsets;
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParser;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.*;
/**
* Framework resources repository.
*
* This behaves the same as {@link ResourceRepository} except that it differentiates between
* resources that are public and non public.
* {@link #getResourceItemsOfType(ResourceType)} and {@link #hasResourcesOfType(ResourceType)} only return
* public resources. This is typically used to display resource lists in the UI.
*
* {@link #getConfiguredResources(com.android.ide.common.resources.configuration.FolderConfiguration)}
* returns all resources, even the non public ones so that this can be used for rendering.
*/
public class FrameworkResources extends ResourceRepository {
/**
* Map of {@link ResourceType} to list of items. It is guaranteed to contain a list for all
* possible values of ResourceType.
*/
protected final Map<ResourceType, List<ResourceItem>> mPublicResourceMap =
new EnumMap<ResourceType, List<ResourceItem>>(ResourceType.class);
public FrameworkResources(@NonNull IAbstractFolder resFolder) {
super(resFolder, true /*isFrameworkRepository*/);
}
/**
* Returns a {@link Collection} (always non null, but can be empty) of <b>public</b>
* {@link ResourceItem} matching a given {@link ResourceType}.
*
* @param type the type of the resources to return
* @return a collection of items, possibly empty.
*/
@Override
@NonNull
public List<ResourceItem> getResourceItemsOfType(@NonNull ResourceType type) {
return mPublicResourceMap.get(type);
}
/**
* Returns whether the repository has <b>public</b> resources of a given {@link ResourceType}.
* @param type the type of resource to check.
* @return true if the repository contains resources of the given type, false otherwise.
*/
@Override
public boolean hasResourcesOfType(@NonNull ResourceType type) {
return !mPublicResourceMap.get(type).isEmpty();
}
@Override
@NonNull
protected ResourceItem createResourceItem(@NonNull String name) {
return new FrameworkResourceItem(name);
}
/**
* Reads the public.xml file in data/res/values/ for a given resource folder and builds up
* a map of public resources.
*
* This map is a subset of the full resource map that only contains framework resources
* that are public.
*
* @param logger a logger to report issues to
*/
public void loadPublicResources(@Nullable ILogger logger) {
IAbstractFolder valueFolder = getResFolder().getFolder(SdkConstants.FD_RES_VALUES);
if (!valueFolder.exists()) {
return;
}
IAbstractFile publicXmlFile = valueFolder.getFile("public.xml"); //$NON-NLS-1$
if (publicXmlFile.exists()) {
Reader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(publicXmlFile.getContents(),
Charsets.UTF_8));
KXmlParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
parser.setInput(reader);
ResourceType lastType = null;
String lastTypeName = "";
while (true) {
int event = parser.next();
if (event == XmlPullParser.START_TAG) {
// As of API 15 there are a number of "java-symbol" entries here
if (!parser.getName().equals("public")) { //$NON-NLS-1$
continue;
}
String name = null;
String typeName = null;
for (int i = 0, n = parser.getAttributeCount(); i < n; i++) {
String attribute = parser.getAttributeName(i);
if (attribute.equals("name")) { //$NON-NLS-1$
name = parser.getAttributeValue(i);
if (typeName != null) {
// Skip id attribute processing
break;
}
} else if (attribute.equals("type")) { //$NON-NLS-1$
typeName = parser.getAttributeValue(i);
}
}
if (name != null && typeName != null) {
ResourceType type = null;
if (typeName.equals(lastTypeName)) {
type = lastType;
} else {
type = ResourceType.getEnum(typeName);
lastType = type;
lastTypeName = typeName;
}
if (type != null) {
ResourceItem match = null;
Map<String, ResourceItem> map = mResourceMap.get(type);
if (map != null) {
match = map.get(name);
}
if (match != null) {
List<ResourceItem> publicList = mPublicResourceMap.get(type);
if (publicList == null) {
// Pick initial size for the list to hold the public
// resources. We could just use map.size() here,
// but they're usually much bigger; for example,
// in one platform version, there are 1500 drawables
// and 1200 strings but only 175 and 25 public ones
// respectively.
int size;
switch (type) {
case STYLE: size = 500; break;
case ATTR: size = 1050; break;
case DRAWABLE: size = 200; break;
case ID: size = 50; break;
case LAYOUT:
case COLOR:
case STRING:
case ANIM:
case INTERPOLATOR:
size = 30;
break;
default:
size = 10;
break;
}
publicList = new ArrayList<ResourceItem>(size);
mPublicResourceMap.put(type, publicList);
}
publicList.add(match);
} else {
// log that there's a public resource that doesn't actually
// exist?
}
} else {
// log that there was a reference to a typo that doesn't actually
// exist?
}
}
} else if (event == XmlPullParser.END_DOCUMENT) {
break;
}
}
} catch (Exception e) {
if (logger != null) {
logger.error(e, "Can't read and parse public attribute list");
}
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException e) {
// Nothing to be done here - we don't care if it closed or not.
}
}
}
}
// put unmodifiable list for all res type in the public resource map
// this will simplify access
for (ResourceType type : ResourceType.values()) {
List<ResourceItem> list = mPublicResourceMap.get(type);
if (list == null) {
list = Collections.emptyList();
} else {
list = Collections.unmodifiableList(list);
}
// put the new list in the map
mPublicResourceMap.put(type, list);
}
}
}
| [
"[email protected]"
] | |
d337667d025a8e0e70514e4f8cbdde6be54db63a | 313faeb542dc76f944fc8f922bdf1949bb89636b | /SelfReferenceOneToManyAnnotation/src/main/java/net/viralpatel/hibernate/Example.java | 349e533a3ce7e34778a3f2afb0e5443c35ba30db | [] | no_license | sameer05515/office-SelfReferenceOneToManyAnnotation | 53a48922e7ca81dceda234736c19d7bb5f2016f5 | 80adf39433c1d640f11ed6dcbe548e6ce36e9ccb | refs/heads/master | 2021-06-14T03:06:37.771513 | 2017-02-28T13:44:57 | 2017-02-28T13:44:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,566 | java | package net.viralpatel.hibernate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name="EXAMPLE")
public class Example {
@Id
@Column(name="ID")
@GeneratedValue
private int id;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "WORD_ID", nullable = false)
private Word word;
@Column(name="EXAMPLE")
private String example;
/**
* @param id
* @param word
* @param example
*/
public Example(int id, Word word, String example) {
super();
this.id = id;
this.word = word;
this.example = example;
}
/**
*
*/
public Example() {
super();
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the word
*/
public Word getWord() {
return word;
}
/**
* @param word the word to set
*/
public void setWord(Word word) {
this.word = word;
}
/**
* @return the example
*/
public String getExample() {
return example;
}
/**
* @param example the example to set
*/
public void setExample(String example) {
this.example = example;
}
/**
* @param example
*/
public Example(String example) {
super();
this.example = example;
}
}
| [
"[email protected]"
] | |
b44d64403c446d1064e13f77d10b70fef611e2f8 | cd25267cb716af0e680b268993696e6f3729dc9f | /src/rx/Observer.java | fd7b82a2f30b7b2e35980d50b9a33665c80550b1 | [] | no_license | sandboxing/kotlinPlayground | d793fc210cc70b746f10a845a41f2ff9831815ef | 8d5c509140bbde4ae9da8a31ad25d8c761e52c9f | refs/heads/master | 2021-08-08T20:43:23.263975 | 2017-11-11T05:25:37 | 2017-11-11T05:25:37 | 107,670,754 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 127 | java | package rx;
public interface Observer<T> {
void onNext(T t);
void onError(Throwable throwable);
void onCompleted();
}
| [
"[email protected]"
] | |
c53d33e23074e6707ed3e66347fab0df5a055064 | c13990fa19c5f81fef7e3c25803dc564d670a235 | /canal-kafka-booter/src/main/java/com/caiya/ck/booter/configuration/KafkaConfiguration.java | b4d3948142e2057ab8ae6cab05b0b80fcd32efe5 | [] | no_license | shimaomao/canal-kafka | b5e798d1444d088d11df07b89a2f112e0b516f14 | ff5ef23938d8dd55afd73da44d17280aac066ee1 | refs/heads/master | 2020-08-24T08:10:46.775924 | 2019-04-10T11:35:17 | 2019-04-10T11:35:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,947 | java | package com.caiya.ck.booter.configuration;
import com.alibaba.otter.canal.protocol.Message;
import com.caiya.ck.common.kafka.MessageDeserializer;
import com.caiya.ck.common.kafka.MessageSerializer;
import com.caiya.ck.booter.component.KafkaProperties;
import com.caiya.kafka.*;
import com.caiya.kafka.spring.annotation.EnableKafka;
import com.caiya.kafka.spring.config.ConcurrentKafkaListenerContainerFactory;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
/**
* Kafka相关配置.
*
* @author wangnan
* @since 1.0
*/
@Configuration
@EnableKafka
public class KafkaConfiguration {
@Resource
private KafkaProperties kafkaProperties;
@Bean
public ProducerFactory<String, Message> producerFactory() {
return new DefaultKafkaProducerFactory<>(kafkaProperties.getProducerConfig(),
new StringSerializer(), new MessageSerializer());
}
@Bean
public KafkaTemplate<String, Message> kafkaTemplate() {
KafkaTemplate<String, Message> kafkaTemplate = new KafkaTemplate<>(producerFactory());
kafkaTemplate.setDefaultTopic(kafkaProperties.getCanalTopic());
return kafkaTemplate;
}
@Bean
public ConsumerFactory<String, Message> consumerFactory() {
return new DefaultKafkaConsumerFactory<>(kafkaProperties.getConsumerConfig(),
new StringDeserializer(), new MessageDeserializer());
}
@Bean
public ConcurrentKafkaListenerContainerFactory<String, Message> kafkaListenerContainerFactory() {
ConcurrentKafkaListenerContainerFactory<String, Message> factory = new ConcurrentKafkaListenerContainerFactory<>();
factory.setConsumerFactory(consumerFactory());
return factory;
}
}
| [
"[email protected]"
] | |
c652e9c681daec138b45c0c15d5fce9ef35c9fbb | e4a194cfe10ebd5ef6b77daa75733605eb7b3826 | /src/main/java/test/test.java | bfa421aee19784e10db46c53fee0747fd00c46f8 | [] | no_license | a88238327/Sellers | 934e5cff7f72cfbea8f54db16f133583cd20f426 | 09e472abd68c8a2bce1e23eb8ab6ba035c1f4b81 | refs/heads/master | 2022-07-04T00:14:23.506345 | 2019-05-15T02:05:26 | 2019-05-15T02:05:26 | 183,599,364 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 635 | java | package test;
import java.util.UUID;
import entity.downloadwximg;
public class test {
public static String getOrderIdByUUId() {
int machineId = 1;//最大支持1-9个集群机器部署
int hashCodeV = UUID.randomUUID().toString().hashCode();
if(hashCodeV < 0) {//有可能是负数
hashCodeV = - hashCodeV;
}
// 0 代表前面补充0
// 4 代表长度为4
// d 代表参数为正数型
return machineId + String.format("%010d", hashCodeV);
}
public static void main(String[] args) {
System.out.println(getOrderIdByUUId());
}
}
| [
"[email protected]"
] | |
88889c13e12bc2714b7ac101f34919f32cf38487 | 832f6fd8ecfdece4c9886503eae356bbd12c79ec | /src/Estrella.java | 1bcca1e2ce92c30a3f21d5d875bff6976be8fc6c | [] | no_license | victorantonio8/Tarea3 | 2f3463e3212c490f163fd10c6ed29ab87bd3764d | 50723a53062f8303551fe72378989317f8f761d7 | refs/heads/master | 2021-01-11T11:25:48.906816 | 2016-11-02T15:38:14 | 2016-11-02T15:38:14 | 72,654,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 190 | java |
public class Estrella extends CuerpoEstelar {
int luminosidad;
Estrella(int posicion, int masa, int luminosidad){
super(posicion,masa);
this.luminosidad = luminosidad;
}
}
| [
"[email protected]"
] | |
aca4c89b00a0399ac2e512647d46df29e25e7a67 | 57ef781ab620542b57bed8a8e0ee9d12eb0783a4 | /src/OopBasic/Floor.java | cb64b16b3d40de809fe37414657a13d5e56c5189 | [] | no_license | hamster4n/juja | 3003ffb276140f0fc922605a212ac4eec572e52a | 25b54534d5967fe7cdccc08f64f5c78d94bf860f | refs/heads/master | 2020-04-05T13:06:58.503305 | 2017-07-26T06:03:33 | 2017-07-26T06:03:33 | 95,097,198 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,892 | java | package OopBasic;
import OopBasic.apartment.Apartment;
import OopBasic.apartment.LivingApartment;
import OopBasic.apartment.TechnicalApartment;
import OopBasic.apartment.printer.SecureTextPrinter;
import OopBasic.apartment.printer.SimpleTextPrinter;
import OopBasic.staff.Cleaner;
/**
* Created by hamster on 22.06.2017.
*/
public class Floor {
private static final int DEFAULT_APARTMENT_CAPACITY = 4;
private int number;
private Apartment[] apartments;
private Cleaner cleaner;
public Floor(int number, int apartmentsCount, NumberGenerator numbers) {
this.number = number;
this.apartments = new Apartment[apartmentsCount];
this.apartments[0] = new TechnicalApartment(numbers.getNext());
for (int index = 1; index < apartmentsCount; index++) {
apartments[index] = new LivingApartment(numbers.getNext(), DEFAULT_APARTMENT_CAPACITY, new SecureTextPrinter());
}
}
public LivingApartment getFreeApartment() {
for (Apartment apartment: apartments) {
if (apartment instanceof LivingApartment && apartment.isFree()){
LivingApartment livingApartment = (LivingApartment) apartment;
if (!livingApartment.isSettled()){
cleaner.clean(apartment);
}
return livingApartment;
}
}
return null;
}
@Override
public String toString() {
String result = "==============================\n";
result += "Floor number " + number + "\n";
result += "------------------------------\n";
for (Apartment apartment: apartments) {
result += apartment.toString() + "\n";
}
result += "==============================\n";
return result;
}
public void setCleaner(Cleaner cleaner) {
this.cleaner = cleaner;
}
}
| [
"[email protected]"
] | |
59307f51dbf244fc50b853bedad95c0ca75f090a | f6f5bd03c464c7e63797ded44225c85ca6f65827 | /src/main/java/com/github/lmg/brave/http/rest_template/BraveSpringRestRequestInterceptor.java | 8da88afdfbf992d5d754f28d89b04e2be4048db8 | [] | no_license | paulzhu8597/brave-dubbox | bda07a1f0df24ce32a447cbec1c95f8e9e7a89fb | 51975338472d05eddf6676ae0bb68974990b6489 | refs/heads/master | 2020-03-26T13:56:38.089476 | 2017-06-12T09:49:55 | 2017-06-12T09:49:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,363 | java | package com.github.lmg.brave.http.rest_template;
import com.github.lmg.brave.http.internal.BraveHttpInterceptor;
import com.github.lmg.brave.http.internal.HttpRequestAdapter;
import com.github.lmg.brave.http.internal.HttpResponseAdapter;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import java.io.IOException;
/**
* Created by liaomengge on 17/4/16.
*/
public class BraveSpringRestRequestInterceptor extends BraveHttpInterceptor implements ClientHttpRequestInterceptor {
@Override
public ClientHttpResponse intercept(HttpRequest httpRequest, byte[] bytes, ClientHttpRequestExecution execution) throws IOException {
this.clientRequestInterceptor.handle(new HttpRequestAdapter(new SpringRestTemplateRequest(httpRequest), this.spanNameProvider));
try {
ClientHttpResponse response = execution.execute(httpRequest, bytes);
clientResponseInterceptor.handle(new HttpResponseAdapter(new SpringRestTemplateResponse(response.getRawStatusCode())));
return response;
} catch (Exception e) {
clientResponseInterceptor.handle(new HttpResponseAdapter(e));
throw e;
}
}
}
| [
"[email protected]"
] | |
125379ea16ea00c94f1634c62e20c4461d306755 | 20d87eb78f6992d432145054707fe4939a0938e1 | /src/main/java/kolt/zar/web/rest/vm/ManagedUserVM.java | b630fddb77baa2efd45be1ba45607a94084800f3 | [] | no_license | agaevaslan/fls | 40d374cc91f76067504736fad4a19eb312dbb396 | 56698c4f1d1e8a54d2e687dabf61624afe9ea56c | refs/heads/master | 2020-04-03T03:06:27.245184 | 2018-10-11T14:08:36 | 2018-10-11T14:08:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 822 | java | package kolt.zar.web.rest.vm;
import kolt.zar.service.dto.UserDTO;
import javax.validation.constraints.Size;
/**
* View Model extending the UserDTO, which is meant to be used in the user management UI.
*/
public class ManagedUserVM extends UserDTO {
public static final int PASSWORD_MIN_LENGTH = 4;
public static final int PASSWORD_MAX_LENGTH = 100;
@Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH)
private String password;
public ManagedUserVM() {
// Empty constructor needed for Jackson.
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
return "ManagedUserVM{" +
"} " + super.toString();
}
}
| [
"[email protected]"
] | |
d3edb99f1ef97ef191135cd816e55d3ec3d94a03 | a733646c7f2d5cc1c18acad3e2e92f5279fef668 | /src/main/java/com/mssoftech/springreact/dbflute/cbean/cq/bs/AbstractBsLoginCQ.java | ab7806e6c7738a5056acdc73fbfce6cddcd54723 | [] | no_license | mikeshimura/spring-react | 5e67c2b728899b6033d17a92a71c3f9e7540c032 | 290b55ecfcd48049956d306bc156e8587e18ca5a | refs/heads/master | 2020-05-28T13:30:20.531549 | 2015-01-30T04:55:54 | 2015-01-30T04:55:54 | 30,016,354 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 91,446 | java | package com.mssoftech.springreact.dbflute.cbean.cq.bs;
import java.util.*;
import org.dbflute.cbean.*;
import org.dbflute.cbean.chelper.*;
import org.dbflute.cbean.ckey.*;
import org.dbflute.cbean.coption.*;
import org.dbflute.cbean.cvalue.ConditionValue;
import org.dbflute.cbean.ordering.*;
import org.dbflute.cbean.scoping.*;
import org.dbflute.cbean.sqlclause.SqlClause;
import org.dbflute.dbmeta.DBMetaProvider;
import com.mssoftech.springreact.dbflute.allcommon.*;
import com.mssoftech.springreact.dbflute.cbean.*;
import com.mssoftech.springreact.dbflute.cbean.cq.*;
/**
* The abstract condition-query of login.
* @author DBFlute(AutoGenerator)
*/
public abstract class AbstractBsLoginCQ extends AbstractConditionQuery {
// ===================================================================================
// Constructor
// ===========
public AbstractBsLoginCQ(ConditionQuery referrerQuery, SqlClause sqlClause, String aliasName, int nestLevel) {
super(referrerQuery, sqlClause, aliasName, nestLevel);
}
// ===================================================================================
// DB Meta
// =======
@Override
protected DBMetaProvider xgetDBMetaProvider() {
return DBMetaInstanceHandler.getProvider();
}
public String asTableDbName() {
return "login";
}
// ===================================================================================
// Query
// =====
/**
* Equal(=). And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param id The value of id as equal. (NullAllowed: if null, no condition)
*/
public void setId_Equal(Integer id) {
doSetId_Equal(id);
}
protected void doSetId_Equal(Integer id) {
regId(CK_EQ, id);
}
/**
* NotEqual(<>). And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param id The value of id as notEqual. (NullAllowed: if null, no condition)
*/
public void setId_NotEqual(Integer id) {
doSetId_NotEqual(id);
}
protected void doSetId_NotEqual(Integer id) {
regId(CK_NES, id);
}
/**
* GreaterThan(>). And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param id The value of id as greaterThan. (NullAllowed: if null, no condition)
*/
public void setId_GreaterThan(Integer id) {
regId(CK_GT, id);
}
/**
* LessThan(<). And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param id The value of id as lessThan. (NullAllowed: if null, no condition)
*/
public void setId_LessThan(Integer id) {
regId(CK_LT, id);
}
/**
* GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param id The value of id as greaterEqual. (NullAllowed: if null, no condition)
*/
public void setId_GreaterEqual(Integer id) {
regId(CK_GE, id);
}
/**
* LessEqual(<=). And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param id The value of id as lessEqual. (NullAllowed: if null, no condition)
*/
public void setId_LessEqual(Integer id) {
regId(CK_LE, id);
}
/**
* RangeOf with various options. (versatile) <br>
* {(default) minNumber <= column <= maxNumber} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param minNumber The min number of id. (NullAllowed: if null, no from-condition)
* @param maxNumber The max number of id. (NullAllowed: if null, no to-condition)
* @param opLambda The callback for option of range-of. (NotNull)
*/
public void setId_RangeOf(Integer minNumber, Integer maxNumber, ConditionOptionCall<RangeOfOption> opLambda) {
setId_RangeOf(minNumber, maxNumber, xcROOP(opLambda));
}
/**
* RangeOf with various options. (versatile) <br>
* {(default) minNumber <= column <= maxNumber} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param minNumber The min number of id. (NullAllowed: if null, no from-condition)
* @param maxNumber The max number of id. (NullAllowed: if null, no to-condition)
* @param rangeOfOption The option of range-of. (NotNull)
*/
protected void setId_RangeOf(Integer minNumber, Integer maxNumber, RangeOfOption rangeOfOption) {
regROO(minNumber, maxNumber, xgetCValueId(), "id", rangeOfOption);
}
/**
* InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param idList The collection of id as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setId_InScope(Collection<Integer> idList) {
doSetId_InScope(idList);
}
protected void doSetId_InScope(Collection<Integer> idList) {
regINS(CK_INS, cTL(idList), xgetCValueId(), "id");
}
/**
* NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
* @param idList The collection of id as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setId_NotInScope(Collection<Integer> idList) {
doSetId_NotInScope(idList);
}
protected void doSetId_NotInScope(Collection<Integer> idList) {
regINS(CK_NINS, cTL(idList), xgetCValueId(), "id");
}
/**
* Set up ExistsReferrer (correlated sub-query). <br>
* {exists (select login_id from session where ...)} <br>
* session by login_id, named 'sessionAsOne'.
* <pre>
* cb.query().<span style="color: #CC4747">existsSession</span>(sessionCB <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* sessionCB.query().set...
* });
* </pre>
* @param subCBLambda The callback for sub-query of SessionList for 'exists'. (NotNull)
*/
public void existsSession(SubQuery<SessionCB> subCBLambda) {
assertObjectNotNull("subCBLambda", subCBLambda);
SessionCB cb = new SessionCB(); cb.xsetupForExistsReferrer(this);
lockCall(() -> subCBLambda.query(cb)); String pp = keepId_ExistsReferrer_SessionList(cb.query());
registerExistsReferrer(cb.query(), "id", "login_id", pp, "sessionList");
}
public abstract String keepId_ExistsReferrer_SessionList(SessionCQ sq);
/**
* Set up NotExistsReferrer (correlated sub-query). <br>
* {not exists (select login_id from session where ...)} <br>
* session by login_id, named 'sessionAsOne'.
* <pre>
* cb.query().<span style="color: #CC4747">notExistsSession</span>(sessionCB <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* sessionCB.query().set...
* });
* </pre>
* @param subCBLambda The callback for sub-query of Id_NotExistsReferrer_SessionList for 'not exists'. (NotNull)
*/
public void notExistsSession(SubQuery<SessionCB> subCBLambda) {
assertObjectNotNull("subCBLambda", subCBLambda);
SessionCB cb = new SessionCB(); cb.xsetupForExistsReferrer(this);
lockCall(() -> subCBLambda.query(cb)); String pp = keepId_NotExistsReferrer_SessionList(cb.query());
registerNotExistsReferrer(cb.query(), "id", "login_id", pp, "sessionList");
}
public abstract String keepId_NotExistsReferrer_SessionList(SessionCQ sq);
public void xsderiveSessionList(String fn, SubQuery<SessionCB> sq, String al, DerivedReferrerOption op) {
assertObjectNotNull("subQuery", sq);
SessionCB cb = new SessionCB(); cb.xsetupForDerivedReferrer(this);
lockCall(() -> sq.query(cb)); String pp = keepId_SpecifyDerivedReferrer_SessionList(cb.query());
registerSpecifyDerivedReferrer(fn, cb.query(), "id", "login_id", pp, "sessionList", al, op);
}
public abstract String keepId_SpecifyDerivedReferrer_SessionList(SessionCQ sq);
/**
* Prepare for (Query)DerivedReferrer (correlated sub-query). <br>
* {FOO <= (select max(BAR) from session where ...)} <br>
* session by login_id, named 'sessionAsOne'.
* <pre>
* cb.query().<span style="color: #CC4747">derivedSession()</span>.<span style="color: #CC4747">max</span>(sessionCB <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* sessionCB.specify().<span style="color: #CC4747">columnFoo...</span> <span style="color: #3F7E5E">// derived column by function</span>
* sessionCB.query().setBar... <span style="color: #3F7E5E">// referrer condition</span>
* }).<span style="color: #CC4747">greaterEqual</span>(123); <span style="color: #3F7E5E">// condition to derived column</span>
* </pre>
* @return The object to set up a function for referrer table. (NotNull)
*/
public HpQDRFunction<SessionCB> derivedSession() {
return xcreateQDRFunctionSessionList();
}
protected HpQDRFunction<SessionCB> xcreateQDRFunctionSessionList() {
return xcQDRFunc((fn, sq, rd, vl, op) -> xqderiveSessionList(fn, sq, rd, vl, op));
}
public void xqderiveSessionList(String fn, SubQuery<SessionCB> sq, String rd, Object vl, DerivedReferrerOption op) {
assertObjectNotNull("subQuery", sq);
SessionCB cb = new SessionCB(); cb.xsetupForDerivedReferrer(this);
lockCall(() -> sq.query(cb)); String sqpp = keepId_QueryDerivedReferrer_SessionList(cb.query()); String prpp = keepId_QueryDerivedReferrer_SessionListParameter(vl);
registerQueryDerivedReferrer(fn, cb.query(), "id", "login_id", sqpp, "sessionList", rd, vl, prpp, op);
}
public abstract String keepId_QueryDerivedReferrer_SessionList(SessionCQ sq);
public abstract String keepId_QueryDerivedReferrer_SessionListParameter(Object vl);
/**
* IsNull {is null}. And OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
*/
public void setId_IsNull() { regId(CK_ISN, DOBJ); }
/**
* IsNotNull {is not null}. And OnlyOnceRegistered. <br>
* id: {PK, ID, NotNull, serial(10)}
*/
public void setId_IsNotNull() { regId(CK_ISNN, DOBJ); }
protected void regId(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueId(), "id"); }
protected abstract ConditionValue xgetCValueId();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_Equal(String loginId) {
doSetLoginId_Equal(fRES(loginId));
}
protected void doSetLoginId_Equal(String loginId) {
regLoginId(CK_EQ, loginId);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_NotEqual(String loginId) {
doSetLoginId_NotEqual(fRES(loginId));
}
protected void doSetLoginId_NotEqual(String loginId) {
regLoginId(CK_NES, loginId);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_GreaterThan(String loginId) {
regLoginId(CK_GT, fRES(loginId));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_LessThan(String loginId) {
regLoginId(CK_LT, fRES(loginId));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_GreaterEqual(String loginId) {
regLoginId(CK_GE, fRES(loginId));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_LessEqual(String loginId) {
regLoginId(CK_LE, fRES(loginId));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginIdList The collection of loginId as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_InScope(Collection<String> loginIdList) {
doSetLoginId_InScope(loginIdList);
}
protected void doSetLoginId_InScope(Collection<String> loginIdList) {
regINS(CK_INS, cTL(loginIdList), xgetCValueLoginId(), "login_id");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginIdList The collection of loginId as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setLoginId_NotInScope(Collection<String> loginIdList) {
doSetLoginId_NotInScope(loginIdList);
}
protected void doSetLoginId_NotInScope(Collection<String> loginIdList) {
regINS(CK_NINS, cTL(loginIdList), xgetCValueLoginId(), "login_id");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)} <br>
* <pre>e.g. setLoginId_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param loginId The value of loginId as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setLoginId_LikeSearch(String loginId, ConditionOptionCall<LikeSearchOption> opLambda) {
setLoginId_LikeSearch(loginId, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)} <br>
* <pre>e.g. setLoginId_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param loginId The value of loginId as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setLoginId_LikeSearch(String loginId, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(loginId), xgetCValueLoginId(), "login_id", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setLoginId_NotLikeSearch(String loginId, ConditionOptionCall<LikeSearchOption> opLambda) {
setLoginId_NotLikeSearch(loginId, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* login_id: {UQ+, NotNull, varchar(40)}
* @param loginId The value of loginId as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setLoginId_NotLikeSearch(String loginId, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(loginId), xgetCValueLoginId(), "login_id", likeSearchOption);
}
protected void regLoginId(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueLoginId(), "login_id"); }
protected abstract ConditionValue xgetCValueLoginId();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setName_Equal(String name) {
doSetName_Equal(fRES(name));
}
protected void doSetName_Equal(String name) {
regName(CK_EQ, name);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setName_NotEqual(String name) {
doSetName_NotEqual(fRES(name));
}
protected void doSetName_NotEqual(String name) {
regName(CK_NES, name);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setName_GreaterThan(String name) {
regName(CK_GT, fRES(name));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setName_LessThan(String name) {
regName(CK_LT, fRES(name));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setName_GreaterEqual(String name) {
regName(CK_GE, fRES(name));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setName_LessEqual(String name) {
regName(CK_LE, fRES(name));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* name: {NotNull, varchar(40)}
* @param nameList The collection of name as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setName_InScope(Collection<String> nameList) {
doSetName_InScope(nameList);
}
protected void doSetName_InScope(Collection<String> nameList) {
regINS(CK_INS, cTL(nameList), xgetCValueName(), "name");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* name: {NotNull, varchar(40)}
* @param nameList The collection of name as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setName_NotInScope(Collection<String> nameList) {
doSetName_NotInScope(nameList);
}
protected void doSetName_NotInScope(Collection<String> nameList) {
regINS(CK_NINS, cTL(nameList), xgetCValueName(), "name");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* name: {NotNull, varchar(40)} <br>
* <pre>e.g. setName_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param name The value of name as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setName_LikeSearch(String name, ConditionOptionCall<LikeSearchOption> opLambda) {
setName_LikeSearch(name, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* name: {NotNull, varchar(40)} <br>
* <pre>e.g. setName_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param name The value of name as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setName_LikeSearch(String name, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(name), xgetCValueName(), "name", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setName_NotLikeSearch(String name, ConditionOptionCall<LikeSearchOption> opLambda) {
setName_NotLikeSearch(name, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* name: {NotNull, varchar(40)}
* @param name The value of name as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setName_NotLikeSearch(String name, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(name), xgetCValueName(), "name", likeSearchOption);
}
protected void regName(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueName(), "name"); }
protected abstract ConditionValue xgetCValueName();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_Equal(String password) {
doSetPassword_Equal(fRES(password));
}
protected void doSetPassword_Equal(String password) {
regPassword(CK_EQ, password);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_NotEqual(String password) {
doSetPassword_NotEqual(fRES(password));
}
protected void doSetPassword_NotEqual(String password) {
regPassword(CK_NES, password);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_GreaterThan(String password) {
regPassword(CK_GT, fRES(password));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_LessThan(String password) {
regPassword(CK_LT, fRES(password));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_GreaterEqual(String password) {
regPassword(CK_GE, fRES(password));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_LessEqual(String password) {
regPassword(CK_LE, fRES(password));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* password: {NotNull, varchar(40)}
* @param passwordList The collection of password as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_InScope(Collection<String> passwordList) {
doSetPassword_InScope(passwordList);
}
protected void doSetPassword_InScope(Collection<String> passwordList) {
regINS(CK_INS, cTL(passwordList), xgetCValuePassword(), "password");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* password: {NotNull, varchar(40)}
* @param passwordList The collection of password as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setPassword_NotInScope(Collection<String> passwordList) {
doSetPassword_NotInScope(passwordList);
}
protected void doSetPassword_NotInScope(Collection<String> passwordList) {
regINS(CK_NINS, cTL(passwordList), xgetCValuePassword(), "password");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* password: {NotNull, varchar(40)} <br>
* <pre>e.g. setPassword_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param password The value of password as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setPassword_LikeSearch(String password, ConditionOptionCall<LikeSearchOption> opLambda) {
setPassword_LikeSearch(password, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* password: {NotNull, varchar(40)} <br>
* <pre>e.g. setPassword_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param password The value of password as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setPassword_LikeSearch(String password, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(password), xgetCValuePassword(), "password", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setPassword_NotLikeSearch(String password, ConditionOptionCall<LikeSearchOption> opLambda) {
setPassword_NotLikeSearch(password, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* password: {NotNull, varchar(40)}
* @param password The value of password as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setPassword_NotLikeSearch(String password, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(password), xgetCValuePassword(), "password", likeSearchOption);
}
protected void regPassword(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValuePassword(), "password"); }
protected abstract ConditionValue xgetCValuePassword();
/**
* Equal(=). And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNo The value of versionNo as equal. (NullAllowed: if null, no condition)
*/
public void setVersionNo_Equal(Integer versionNo) {
doSetVersionNo_Equal(versionNo);
}
protected void doSetVersionNo_Equal(Integer versionNo) {
regVersionNo(CK_EQ, versionNo);
}
/**
* NotEqual(<>). And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNo The value of versionNo as notEqual. (NullAllowed: if null, no condition)
*/
public void setVersionNo_NotEqual(Integer versionNo) {
doSetVersionNo_NotEqual(versionNo);
}
protected void doSetVersionNo_NotEqual(Integer versionNo) {
regVersionNo(CK_NES, versionNo);
}
/**
* GreaterThan(>). And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNo The value of versionNo as greaterThan. (NullAllowed: if null, no condition)
*/
public void setVersionNo_GreaterThan(Integer versionNo) {
regVersionNo(CK_GT, versionNo);
}
/**
* LessThan(<). And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNo The value of versionNo as lessThan. (NullAllowed: if null, no condition)
*/
public void setVersionNo_LessThan(Integer versionNo) {
regVersionNo(CK_LT, versionNo);
}
/**
* GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNo The value of versionNo as greaterEqual. (NullAllowed: if null, no condition)
*/
public void setVersionNo_GreaterEqual(Integer versionNo) {
regVersionNo(CK_GE, versionNo);
}
/**
* LessEqual(<=). And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNo The value of versionNo as lessEqual. (NullAllowed: if null, no condition)
*/
public void setVersionNo_LessEqual(Integer versionNo) {
regVersionNo(CK_LE, versionNo);
}
/**
* RangeOf with various options. (versatile) <br>
* {(default) minNumber <= column <= maxNumber} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param minNumber The min number of versionNo. (NullAllowed: if null, no from-condition)
* @param maxNumber The max number of versionNo. (NullAllowed: if null, no to-condition)
* @param opLambda The callback for option of range-of. (NotNull)
*/
public void setVersionNo_RangeOf(Integer minNumber, Integer maxNumber, ConditionOptionCall<RangeOfOption> opLambda) {
setVersionNo_RangeOf(minNumber, maxNumber, xcROOP(opLambda));
}
/**
* RangeOf with various options. (versatile) <br>
* {(default) minNumber <= column <= maxNumber} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param minNumber The min number of versionNo. (NullAllowed: if null, no from-condition)
* @param maxNumber The max number of versionNo. (NullAllowed: if null, no to-condition)
* @param rangeOfOption The option of range-of. (NotNull)
*/
protected void setVersionNo_RangeOf(Integer minNumber, Integer maxNumber, RangeOfOption rangeOfOption) {
regROO(minNumber, maxNumber, xgetCValueVersionNo(), "version_no", rangeOfOption);
}
/**
* InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNoList The collection of versionNo as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setVersionNo_InScope(Collection<Integer> versionNoList) {
doSetVersionNo_InScope(versionNoList);
}
protected void doSetVersionNo_InScope(Collection<Integer> versionNoList) {
regINS(CK_INS, cTL(versionNoList), xgetCValueVersionNo(), "version_no");
}
/**
* NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br>
* version_no: {NotNull, int4(10)}
* @param versionNoList The collection of versionNo as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setVersionNo_NotInScope(Collection<Integer> versionNoList) {
doSetVersionNo_NotInScope(versionNoList);
}
protected void doSetVersionNo_NotInScope(Collection<Integer> versionNoList) {
regINS(CK_NINS, cTL(versionNoList), xgetCValueVersionNo(), "version_no");
}
protected void regVersionNo(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueVersionNo(), "version_no"); }
protected abstract ConditionValue xgetCValueVersionNo();
/**
* Equal(=). And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlag The value of delFlag as equal. (NullAllowed: if null, no condition)
*/
public void setDelFlag_Equal(Integer delFlag) {
doSetDelFlag_Equal(delFlag);
}
protected void doSetDelFlag_Equal(Integer delFlag) {
regDelFlag(CK_EQ, delFlag);
}
/**
* NotEqual(<>). And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlag The value of delFlag as notEqual. (NullAllowed: if null, no condition)
*/
public void setDelFlag_NotEqual(Integer delFlag) {
doSetDelFlag_NotEqual(delFlag);
}
protected void doSetDelFlag_NotEqual(Integer delFlag) {
regDelFlag(CK_NES, delFlag);
}
/**
* GreaterThan(>). And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlag The value of delFlag as greaterThan. (NullAllowed: if null, no condition)
*/
public void setDelFlag_GreaterThan(Integer delFlag) {
regDelFlag(CK_GT, delFlag);
}
/**
* LessThan(<). And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlag The value of delFlag as lessThan. (NullAllowed: if null, no condition)
*/
public void setDelFlag_LessThan(Integer delFlag) {
regDelFlag(CK_LT, delFlag);
}
/**
* GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlag The value of delFlag as greaterEqual. (NullAllowed: if null, no condition)
*/
public void setDelFlag_GreaterEqual(Integer delFlag) {
regDelFlag(CK_GE, delFlag);
}
/**
* LessEqual(<=). And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlag The value of delFlag as lessEqual. (NullAllowed: if null, no condition)
*/
public void setDelFlag_LessEqual(Integer delFlag) {
regDelFlag(CK_LE, delFlag);
}
/**
* RangeOf with various options. (versatile) <br>
* {(default) minNumber <= column <= maxNumber} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param minNumber The min number of delFlag. (NullAllowed: if null, no from-condition)
* @param maxNumber The max number of delFlag. (NullAllowed: if null, no to-condition)
* @param opLambda The callback for option of range-of. (NotNull)
*/
public void setDelFlag_RangeOf(Integer minNumber, Integer maxNumber, ConditionOptionCall<RangeOfOption> opLambda) {
setDelFlag_RangeOf(minNumber, maxNumber, xcROOP(opLambda));
}
/**
* RangeOf with various options. (versatile) <br>
* {(default) minNumber <= column <= maxNumber} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param minNumber The min number of delFlag. (NullAllowed: if null, no from-condition)
* @param maxNumber The max number of delFlag. (NullAllowed: if null, no to-condition)
* @param rangeOfOption The option of range-of. (NotNull)
*/
protected void setDelFlag_RangeOf(Integer minNumber, Integer maxNumber, RangeOfOption rangeOfOption) {
regROO(minNumber, maxNumber, xgetCValueDelFlag(), "del_flag", rangeOfOption);
}
/**
* InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlagList The collection of delFlag as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setDelFlag_InScope(Collection<Integer> delFlagList) {
doSetDelFlag_InScope(delFlagList);
}
protected void doSetDelFlag_InScope(Collection<Integer> delFlagList) {
regINS(CK_INS, cTL(delFlagList), xgetCValueDelFlag(), "del_flag");
}
/**
* NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br>
* del_flag: {+UQ, NotNull, int4(10), default=[0]}
* @param delFlagList The collection of delFlag as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setDelFlag_NotInScope(Collection<Integer> delFlagList) {
doSetDelFlag_NotInScope(delFlagList);
}
protected void doSetDelFlag_NotInScope(Collection<Integer> delFlagList) {
regINS(CK_NINS, cTL(delFlagList), xgetCValueDelFlag(), "del_flag");
}
protected void regDelFlag(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueDelFlag(), "del_flag"); }
protected abstract ConditionValue xgetCValueDelFlag();
/**
* Equal(=). And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* @param registerDatetime The value of registerDatetime as equal. (NullAllowed: if null, no condition)
*/
public void setRegisterDatetime_Equal(java.time.LocalDateTime registerDatetime) {
regRegisterDatetime(CK_EQ, registerDatetime);
}
/**
* GreaterThan(>). And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* @param registerDatetime The value of registerDatetime as greaterThan. (NullAllowed: if null, no condition)
*/
public void setRegisterDatetime_GreaterThan(java.time.LocalDateTime registerDatetime) {
regRegisterDatetime(CK_GT, registerDatetime);
}
/**
* LessThan(<). And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* @param registerDatetime The value of registerDatetime as lessThan. (NullAllowed: if null, no condition)
*/
public void setRegisterDatetime_LessThan(java.time.LocalDateTime registerDatetime) {
regRegisterDatetime(CK_LT, registerDatetime);
}
/**
* GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* @param registerDatetime The value of registerDatetime as greaterEqual. (NullAllowed: if null, no condition)
*/
public void setRegisterDatetime_GreaterEqual(java.time.LocalDateTime registerDatetime) {
regRegisterDatetime(CK_GE, registerDatetime);
}
/**
* LessEqual(<=). And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* @param registerDatetime The value of registerDatetime as lessEqual. (NullAllowed: if null, no condition)
*/
public void setRegisterDatetime_LessEqual(java.time.LocalDateTime registerDatetime) {
regRegisterDatetime(CK_LE, registerDatetime);
}
/**
* FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* <pre>e.g. setRegisterDatetime_FromTo(fromDate, toDate, op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">compareAsDate()</span>);</pre>
* @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of registerDatetime. (NullAllowed: if null, no from-condition)
* @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of registerDatetime. (NullAllowed: if null, no to-condition)
* @param opLambda The callback for option of from-to. (NotNull)
*/
public void setRegisterDatetime_FromTo(java.time.LocalDateTime fromDatetime, java.time.LocalDateTime toDatetime, ConditionOptionCall<FromToOption> opLambda) {
setRegisterDatetime_FromTo(fromDatetime, toDatetime, xcFTOP(opLambda));
}
/**
* FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* register_datetime: {NotNull, timestamp(29, 6)}
* <pre>e.g. setRegisterDatetime_FromTo(fromDate, toDate, new <span style="color: #CC4747">FromToOption</span>().compareAsDate());</pre>
* @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of registerDatetime. (NullAllowed: if null, no from-condition)
* @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of registerDatetime. (NullAllowed: if null, no to-condition)
* @param fromToOption The option of from-to. (NotNull)
*/
protected void setRegisterDatetime_FromTo(java.time.LocalDateTime fromDatetime, java.time.LocalDateTime toDatetime, FromToOption fromToOption) {
String nm = "register_datetime"; FromToOption op = fromToOption;
regFTQ(xfFTHD(fromDatetime, nm, op), xfFTHD(toDatetime, nm, op), xgetCValueRegisterDatetime(), nm, op);
}
protected void regRegisterDatetime(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueRegisterDatetime(), "register_datetime"); }
protected abstract ConditionValue xgetCValueRegisterDatetime();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_Equal(String registerUser) {
doSetRegisterUser_Equal(fRES(registerUser));
}
protected void doSetRegisterUser_Equal(String registerUser) {
regRegisterUser(CK_EQ, registerUser);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_NotEqual(String registerUser) {
doSetRegisterUser_NotEqual(fRES(registerUser));
}
protected void doSetRegisterUser_NotEqual(String registerUser) {
regRegisterUser(CK_NES, registerUser);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_GreaterThan(String registerUser) {
regRegisterUser(CK_GT, fRES(registerUser));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_LessThan(String registerUser) {
regRegisterUser(CK_LT, fRES(registerUser));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_GreaterEqual(String registerUser) {
regRegisterUser(CK_GE, fRES(registerUser));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_LessEqual(String registerUser) {
regRegisterUser(CK_LE, fRES(registerUser));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUserList The collection of registerUser as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_InScope(Collection<String> registerUserList) {
doSetRegisterUser_InScope(registerUserList);
}
protected void doSetRegisterUser_InScope(Collection<String> registerUserList) {
regINS(CK_INS, cTL(registerUserList), xgetCValueRegisterUser(), "register_user");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUserList The collection of registerUser as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterUser_NotInScope(Collection<String> registerUserList) {
doSetRegisterUser_NotInScope(registerUserList);
}
protected void doSetRegisterUser_NotInScope(Collection<String> registerUserList) {
regINS(CK_NINS, cTL(registerUserList), xgetCValueRegisterUser(), "register_user");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_user: {NotNull, varchar(30)} <br>
* <pre>e.g. setRegisterUser_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param registerUser The value of registerUser as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setRegisterUser_LikeSearch(String registerUser, ConditionOptionCall<LikeSearchOption> opLambda) {
setRegisterUser_LikeSearch(registerUser, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_user: {NotNull, varchar(30)} <br>
* <pre>e.g. setRegisterUser_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param registerUser The value of registerUser as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setRegisterUser_LikeSearch(String registerUser, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(registerUser), xgetCValueRegisterUser(), "register_user", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setRegisterUser_NotLikeSearch(String registerUser, ConditionOptionCall<LikeSearchOption> opLambda) {
setRegisterUser_NotLikeSearch(registerUser, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_user: {NotNull, varchar(30)}
* @param registerUser The value of registerUser as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setRegisterUser_NotLikeSearch(String registerUser, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(registerUser), xgetCValueRegisterUser(), "register_user", likeSearchOption);
}
protected void regRegisterUser(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueRegisterUser(), "register_user"); }
protected abstract ConditionValue xgetCValueRegisterUser();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_Equal(String registerProcess) {
doSetRegisterProcess_Equal(fRES(registerProcess));
}
protected void doSetRegisterProcess_Equal(String registerProcess) {
regRegisterProcess(CK_EQ, registerProcess);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_NotEqual(String registerProcess) {
doSetRegisterProcess_NotEqual(fRES(registerProcess));
}
protected void doSetRegisterProcess_NotEqual(String registerProcess) {
regRegisterProcess(CK_NES, registerProcess);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_GreaterThan(String registerProcess) {
regRegisterProcess(CK_GT, fRES(registerProcess));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_LessThan(String registerProcess) {
regRegisterProcess(CK_LT, fRES(registerProcess));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_GreaterEqual(String registerProcess) {
regRegisterProcess(CK_GE, fRES(registerProcess));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_LessEqual(String registerProcess) {
regRegisterProcess(CK_LE, fRES(registerProcess));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcessList The collection of registerProcess as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_InScope(Collection<String> registerProcessList) {
doSetRegisterProcess_InScope(registerProcessList);
}
protected void doSetRegisterProcess_InScope(Collection<String> registerProcessList) {
regINS(CK_INS, cTL(registerProcessList), xgetCValueRegisterProcess(), "register_process");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcessList The collection of registerProcess as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setRegisterProcess_NotInScope(Collection<String> registerProcessList) {
doSetRegisterProcess_NotInScope(registerProcessList);
}
protected void doSetRegisterProcess_NotInScope(Collection<String> registerProcessList) {
regINS(CK_NINS, cTL(registerProcessList), xgetCValueRegisterProcess(), "register_process");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_process: {NotNull, varchar(30)} <br>
* <pre>e.g. setRegisterProcess_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param registerProcess The value of registerProcess as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setRegisterProcess_LikeSearch(String registerProcess, ConditionOptionCall<LikeSearchOption> opLambda) {
setRegisterProcess_LikeSearch(registerProcess, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_process: {NotNull, varchar(30)} <br>
* <pre>e.g. setRegisterProcess_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param registerProcess The value of registerProcess as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setRegisterProcess_LikeSearch(String registerProcess, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(registerProcess), xgetCValueRegisterProcess(), "register_process", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setRegisterProcess_NotLikeSearch(String registerProcess, ConditionOptionCall<LikeSearchOption> opLambda) {
setRegisterProcess_NotLikeSearch(registerProcess, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* register_process: {NotNull, varchar(30)}
* @param registerProcess The value of registerProcess as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setRegisterProcess_NotLikeSearch(String registerProcess, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(registerProcess), xgetCValueRegisterProcess(), "register_process", likeSearchOption);
}
protected void regRegisterProcess(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueRegisterProcess(), "register_process"); }
protected abstract ConditionValue xgetCValueRegisterProcess();
/**
* Equal(=). And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* @param updateDatetime The value of updateDatetime as equal. (NullAllowed: if null, no condition)
*/
public void setUpdateDatetime_Equal(java.time.LocalDateTime updateDatetime) {
regUpdateDatetime(CK_EQ, updateDatetime);
}
/**
* GreaterThan(>). And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* @param updateDatetime The value of updateDatetime as greaterThan. (NullAllowed: if null, no condition)
*/
public void setUpdateDatetime_GreaterThan(java.time.LocalDateTime updateDatetime) {
regUpdateDatetime(CK_GT, updateDatetime);
}
/**
* LessThan(<). And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* @param updateDatetime The value of updateDatetime as lessThan. (NullAllowed: if null, no condition)
*/
public void setUpdateDatetime_LessThan(java.time.LocalDateTime updateDatetime) {
regUpdateDatetime(CK_LT, updateDatetime);
}
/**
* GreaterEqual(>=). And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* @param updateDatetime The value of updateDatetime as greaterEqual. (NullAllowed: if null, no condition)
*/
public void setUpdateDatetime_GreaterEqual(java.time.LocalDateTime updateDatetime) {
regUpdateDatetime(CK_GE, updateDatetime);
}
/**
* LessEqual(<=). And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* @param updateDatetime The value of updateDatetime as lessEqual. (NullAllowed: if null, no condition)
*/
public void setUpdateDatetime_LessEqual(java.time.LocalDateTime updateDatetime) {
regUpdateDatetime(CK_LE, updateDatetime);
}
/**
* FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* <pre>e.g. setUpdateDatetime_FromTo(fromDate, toDate, op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">compareAsDate()</span>);</pre>
* @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updateDatetime. (NullAllowed: if null, no from-condition)
* @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updateDatetime. (NullAllowed: if null, no to-condition)
* @param opLambda The callback for option of from-to. (NotNull)
*/
public void setUpdateDatetime_FromTo(java.time.LocalDateTime fromDatetime, java.time.LocalDateTime toDatetime, ConditionOptionCall<FromToOption> opLambda) {
setUpdateDatetime_FromTo(fromDatetime, toDatetime, xcFTOP(opLambda));
}
/**
* FromTo with various options. (versatile) {(default) fromDatetime <= column <= toDatetime} <br>
* And NullIgnored, OnlyOnceRegistered. <br>
* update_datetime: {NotNull, timestamp(29, 6)}
* <pre>e.g. setUpdateDatetime_FromTo(fromDate, toDate, new <span style="color: #CC4747">FromToOption</span>().compareAsDate());</pre>
* @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updateDatetime. (NullAllowed: if null, no from-condition)
* @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updateDatetime. (NullAllowed: if null, no to-condition)
* @param fromToOption The option of from-to. (NotNull)
*/
protected void setUpdateDatetime_FromTo(java.time.LocalDateTime fromDatetime, java.time.LocalDateTime toDatetime, FromToOption fromToOption) {
String nm = "update_datetime"; FromToOption op = fromToOption;
regFTQ(xfFTHD(fromDatetime, nm, op), xfFTHD(toDatetime, nm, op), xgetCValueUpdateDatetime(), nm, op);
}
protected void regUpdateDatetime(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueUpdateDatetime(), "update_datetime"); }
protected abstract ConditionValue xgetCValueUpdateDatetime();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_Equal(String updateUser) {
doSetUpdateUser_Equal(fRES(updateUser));
}
protected void doSetUpdateUser_Equal(String updateUser) {
regUpdateUser(CK_EQ, updateUser);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_NotEqual(String updateUser) {
doSetUpdateUser_NotEqual(fRES(updateUser));
}
protected void doSetUpdateUser_NotEqual(String updateUser) {
regUpdateUser(CK_NES, updateUser);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_GreaterThan(String updateUser) {
regUpdateUser(CK_GT, fRES(updateUser));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_LessThan(String updateUser) {
regUpdateUser(CK_LT, fRES(updateUser));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_GreaterEqual(String updateUser) {
regUpdateUser(CK_GE, fRES(updateUser));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_LessEqual(String updateUser) {
regUpdateUser(CK_LE, fRES(updateUser));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUserList The collection of updateUser as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_InScope(Collection<String> updateUserList) {
doSetUpdateUser_InScope(updateUserList);
}
protected void doSetUpdateUser_InScope(Collection<String> updateUserList) {
regINS(CK_INS, cTL(updateUserList), xgetCValueUpdateUser(), "update_user");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUserList The collection of updateUser as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateUser_NotInScope(Collection<String> updateUserList) {
doSetUpdateUser_NotInScope(updateUserList);
}
protected void doSetUpdateUser_NotInScope(Collection<String> updateUserList) {
regINS(CK_NINS, cTL(updateUserList), xgetCValueUpdateUser(), "update_user");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_user: {NotNull, varchar(30)} <br>
* <pre>e.g. setUpdateUser_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param updateUser The value of updateUser as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setUpdateUser_LikeSearch(String updateUser, ConditionOptionCall<LikeSearchOption> opLambda) {
setUpdateUser_LikeSearch(updateUser, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_user: {NotNull, varchar(30)} <br>
* <pre>e.g. setUpdateUser_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param updateUser The value of updateUser as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setUpdateUser_LikeSearch(String updateUser, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(updateUser), xgetCValueUpdateUser(), "update_user", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setUpdateUser_NotLikeSearch(String updateUser, ConditionOptionCall<LikeSearchOption> opLambda) {
setUpdateUser_NotLikeSearch(updateUser, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_user: {NotNull, varchar(30)}
* @param updateUser The value of updateUser as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setUpdateUser_NotLikeSearch(String updateUser, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(updateUser), xgetCValueUpdateUser(), "update_user", likeSearchOption);
}
protected void regUpdateUser(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueUpdateUser(), "update_user"); }
protected abstract ConditionValue xgetCValueUpdateUser();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_Equal(String updateProcess) {
doSetUpdateProcess_Equal(fRES(updateProcess));
}
protected void doSetUpdateProcess_Equal(String updateProcess) {
regUpdateProcess(CK_EQ, updateProcess);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_NotEqual(String updateProcess) {
doSetUpdateProcess_NotEqual(fRES(updateProcess));
}
protected void doSetUpdateProcess_NotEqual(String updateProcess) {
regUpdateProcess(CK_NES, updateProcess);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_GreaterThan(String updateProcess) {
regUpdateProcess(CK_GT, fRES(updateProcess));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_LessThan(String updateProcess) {
regUpdateProcess(CK_LT, fRES(updateProcess));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_GreaterEqual(String updateProcess) {
regUpdateProcess(CK_GE, fRES(updateProcess));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_LessEqual(String updateProcess) {
regUpdateProcess(CK_LE, fRES(updateProcess));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcessList The collection of updateProcess as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_InScope(Collection<String> updateProcessList) {
doSetUpdateProcess_InScope(updateProcessList);
}
protected void doSetUpdateProcess_InScope(Collection<String> updateProcessList) {
regINS(CK_INS, cTL(updateProcessList), xgetCValueUpdateProcess(), "update_process");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcessList The collection of updateProcess as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setUpdateProcess_NotInScope(Collection<String> updateProcessList) {
doSetUpdateProcess_NotInScope(updateProcessList);
}
protected void doSetUpdateProcess_NotInScope(Collection<String> updateProcessList) {
regINS(CK_NINS, cTL(updateProcessList), xgetCValueUpdateProcess(), "update_process");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_process: {NotNull, varchar(30)} <br>
* <pre>e.g. setUpdateProcess_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param updateProcess The value of updateProcess as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setUpdateProcess_LikeSearch(String updateProcess, ConditionOptionCall<LikeSearchOption> opLambda) {
setUpdateProcess_LikeSearch(updateProcess, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_process: {NotNull, varchar(30)} <br>
* <pre>e.g. setUpdateProcess_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param updateProcess The value of updateProcess as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setUpdateProcess_LikeSearch(String updateProcess, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(updateProcess), xgetCValueUpdateProcess(), "update_process", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setUpdateProcess_NotLikeSearch(String updateProcess, ConditionOptionCall<LikeSearchOption> opLambda) {
setUpdateProcess_NotLikeSearch(updateProcess, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* update_process: {NotNull, varchar(30)}
* @param updateProcess The value of updateProcess as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setUpdateProcess_NotLikeSearch(String updateProcess, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(updateProcess), xgetCValueUpdateProcess(), "update_process", likeSearchOption);
}
protected void regUpdateProcess(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueUpdateProcess(), "update_process"); }
protected abstract ConditionValue xgetCValueUpdateProcess();
/**
* Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as equal. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_Equal(String role) {
doSetRole_Equal(fRES(role));
}
protected void doSetRole_Equal(String role) {
regRole(CK_EQ, role);
}
/**
* NotEqual(<>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as notEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_NotEqual(String role) {
doSetRole_NotEqual(fRES(role));
}
protected void doSetRole_NotEqual(String role) {
regRole(CK_NES, role);
}
/**
* GreaterThan(>). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as greaterThan. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_GreaterThan(String role) {
regRole(CK_GT, fRES(role));
}
/**
* LessThan(<). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as lessThan. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_LessThan(String role) {
regRole(CK_LT, fRES(role));
}
/**
* GreaterEqual(>=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as greaterEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_GreaterEqual(String role) {
regRole(CK_GE, fRES(role));
}
/**
* LessEqual(<=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as lessEqual. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_LessEqual(String role) {
regRole(CK_LE, fRES(role));
}
/**
* InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* role: {varchar(20)}
* @param roleList The collection of role as inScope. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_InScope(Collection<String> roleList) {
doSetRole_InScope(roleList);
}
protected void doSetRole_InScope(Collection<String> roleList) {
regINS(CK_INS, cTL(roleList), xgetCValueRole(), "role");
}
/**
* NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br>
* role: {varchar(20)}
* @param roleList The collection of role as notInScope. (NullAllowed: if null (or empty), no condition)
*/
public void setRole_NotInScope(Collection<String> roleList) {
doSetRole_NotInScope(roleList);
}
protected void doSetRole_NotInScope(Collection<String> roleList) {
regINS(CK_NINS, cTL(roleList), xgetCValueRole(), "role");
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* role: {varchar(20)} <br>
* <pre>e.g. setRole_LikeSearch("xxx", op <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> op.<span style="color: #CC4747">likeContain()</span>);</pre>
* @param role The value of role as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setRole_LikeSearch(String role, ConditionOptionCall<LikeSearchOption> opLambda) {
setRole_LikeSearch(role, xcLSOP(opLambda));
}
/**
* LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br>
* role: {varchar(20)} <br>
* <pre>e.g. setRole_LikeSearch("xxx", new <span style="color: #CC4747">LikeSearchOption</span>().likeContain());</pre>
* @param role The value of role as likeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of like-search. (NotNull)
*/
protected void setRole_LikeSearch(String role, LikeSearchOption likeSearchOption) {
regLSQ(CK_LS, fRES(role), xgetCValueRole(), "role", likeSearchOption);
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param opLambda The callback for option of like-search. (NotNull)
*/
public void setRole_NotLikeSearch(String role, ConditionOptionCall<LikeSearchOption> opLambda) {
setRole_NotLikeSearch(role, xcLSOP(opLambda));
}
/**
* NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br>
* And NullOrEmptyIgnored, SeveralRegistered. <br>
* role: {varchar(20)}
* @param role The value of role as notLikeSearch. (NullAllowed: if null (or empty), no condition)
* @param likeSearchOption The option of not-like-search. (NotNull)
*/
protected void setRole_NotLikeSearch(String role, LikeSearchOption likeSearchOption) {
regLSQ(CK_NLS, fRES(role), xgetCValueRole(), "role", likeSearchOption);
}
/**
* IsNull {is null}. And OnlyOnceRegistered. <br>
* role: {varchar(20)}
*/
public void setRole_IsNull() { regRole(CK_ISN, DOBJ); }
/**
* IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered. <br>
* role: {varchar(20)}
*/
public void setRole_IsNullOrEmpty() { regRole(CK_ISNOE, DOBJ); }
/**
* IsNotNull {is not null}. And OnlyOnceRegistered. <br>
* role: {varchar(20)}
*/
public void setRole_IsNotNull() { regRole(CK_ISNN, DOBJ); }
protected void regRole(ConditionKey ky, Object vl) { regQ(ky, vl, xgetCValueRole(), "role"); }
protected abstract ConditionValue xgetCValueRole();
// ===================================================================================
// ScalarCondition
// ===============
/**
* Prepare ScalarCondition as equal. <br>
* {where FOO = (select max(BAR) from ...)
* <pre>
* cb.query().<span style="color: #CC4747">scalar_Equal()</span>.max(new SubQuery<LoginCB>() {
* public void query(LoginCB subCB) {
* subCB.specify().setXxx... <span style="color: #3F7E5E">// derived column for function</span>
* subCB.query().setYyy...
* }
* });
* </pre>
* @return The object to set up a function. (NotNull)
*/
public HpSSQFunction<LoginCB> scalar_Equal() {
return xcreateSSQFunction(CK_EQ, LoginCB.class);
}
/**
* Prepare ScalarCondition as equal. <br>
* {where FOO <> (select max(BAR) from ...)
* <pre>
* cb.query().<span style="color: #CC4747">scalar_NotEqual()</span>.max(new SubQuery<LoginCB>() {
* public void query(LoginCB subCB) {
* subCB.specify().setXxx... <span style="color: #3F7E5E">// derived column for function</span>
* subCB.query().setYyy...
* }
* });
* </pre>
* @return The object to set up a function. (NotNull)
*/
public HpSSQFunction<LoginCB> scalar_NotEqual() {
return xcreateSSQFunction(CK_NES, LoginCB.class);
}
/**
* Prepare ScalarCondition as greaterThan. <br>
* {where FOO > (select max(BAR) from ...)
* <pre>
* cb.query().<span style="color: #CC4747">scalar_GreaterThan()</span>.max(new SubQuery<LoginCB>() {
* public void query(LoginCB subCB) {
* subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
* subCB.query().setBar...
* }
* });
* </pre>
* @return The object to set up a function. (NotNull)
*/
public HpSSQFunction<LoginCB> scalar_GreaterThan() {
return xcreateSSQFunction(CK_GT, LoginCB.class);
}
/**
* Prepare ScalarCondition as lessThan. <br>
* {where FOO < (select max(BAR) from ...)
* <pre>
* cb.query().<span style="color: #CC4747">scalar_LessThan()</span>.max(new SubQuery<LoginCB>() {
* public void query(LoginCB subCB) {
* subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
* subCB.query().setBar...
* }
* });
* </pre>
* @return The object to set up a function. (NotNull)
*/
public HpSSQFunction<LoginCB> scalar_LessThan() {
return xcreateSSQFunction(CK_LT, LoginCB.class);
}
/**
* Prepare ScalarCondition as greaterEqual. <br>
* {where FOO >= (select max(BAR) from ...)
* <pre>
* cb.query().<span style="color: #CC4747">scalar_GreaterEqual()</span>.max(new SubQuery<LoginCB>() {
* public void query(LoginCB subCB) {
* subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
* subCB.query().setBar...
* }
* });
* </pre>
* @return The object to set up a function. (NotNull)
*/
public HpSSQFunction<LoginCB> scalar_GreaterEqual() {
return xcreateSSQFunction(CK_GE, LoginCB.class);
}
/**
* Prepare ScalarCondition as lessEqual. <br>
* {where FOO <= (select max(BAR) from ...)
* <pre>
* cb.query().<span style="color: #CC4747">scalar_LessEqual()</span>.max(new SubQuery<LoginCB>() {
* public void query(LoginCB subCB) {
* subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span>
* subCB.query().setBar...
* }
* });
* </pre>
* @return The object to set up a function. (NotNull)
*/
public HpSSQFunction<LoginCB> scalar_LessEqual() {
return xcreateSSQFunction(CK_LE, LoginCB.class);
}
@SuppressWarnings("unchecked")
protected <CB extends ConditionBean> void xscalarCondition(String fn, SubQuery<CB> sq, String rd, HpSSQOption<CB> op) {
assertObjectNotNull("subQuery", sq);
LoginCB cb = xcreateScalarConditionCB(); sq.query((CB)cb);
String pp = keepScalarCondition(cb.query()); // for saving query-value
op.setPartitionByCBean((CB)xcreateScalarConditionPartitionByCB()); // for using partition-by
registerScalarCondition(fn, cb.query(), pp, rd, op);
}
public abstract String keepScalarCondition(LoginCQ sq);
protected LoginCB xcreateScalarConditionCB() {
LoginCB cb = newMyCB(); cb.xsetupForScalarCondition(this); return cb;
}
protected LoginCB xcreateScalarConditionPartitionByCB() {
LoginCB cb = newMyCB(); cb.xsetupForScalarConditionPartitionBy(this); return cb;
}
// ===================================================================================
// MyselfDerived
// =============
public void xsmyselfDerive(String fn, SubQuery<LoginCB> sq, String al, DerivedReferrerOption op) {
assertObjectNotNull("subQuery", sq);
LoginCB cb = new LoginCB(); cb.xsetupForDerivedReferrer(this);
lockCall(() -> sq.query(cb)); String pp = keepSpecifyMyselfDerived(cb.query()); String pk = "id";
registerSpecifyMyselfDerived(fn, cb.query(), pk, pk, pp, "myselfDerived", al, op);
}
public abstract String keepSpecifyMyselfDerived(LoginCQ sq);
/**
* Prepare for (Query)MyselfDerived (correlated sub-query).
* @return The object to set up a function for myself table. (NotNull)
*/
public HpQDRFunction<LoginCB> myselfDerived() {
return xcreateQDRFunctionMyselfDerived(LoginCB.class);
}
@SuppressWarnings("unchecked")
protected <CB extends ConditionBean> void xqderiveMyselfDerived(String fn, SubQuery<CB> sq, String rd, Object vl, DerivedReferrerOption op) {
assertObjectNotNull("subQuery", sq);
LoginCB cb = new LoginCB(); cb.xsetupForDerivedReferrer(this); sq.query((CB)cb);
String pk = "id";
String sqpp = keepQueryMyselfDerived(cb.query()); // for saving query-value.
String prpp = keepQueryMyselfDerivedParameter(vl);
registerQueryMyselfDerived(fn, cb.query(), pk, pk, sqpp, "myselfDerived", rd, vl, prpp, op);
}
public abstract String keepQueryMyselfDerived(LoginCQ sq);
public abstract String keepQueryMyselfDerivedParameter(Object vl);
// ===================================================================================
// MyselfExists
// ============
/**
* Prepare for MyselfExists (correlated sub-query).
* @param subCBLambda The implementation of sub-query. (NotNull)
*/
public void myselfExists(SubQuery<LoginCB> subCBLambda) {
assertObjectNotNull("subCBLambda", subCBLambda);
LoginCB cb = new LoginCB(); cb.xsetupForMyselfExists(this);
lockCall(() -> subCBLambda.query(cb)); String pp = keepMyselfExists(cb.query());
registerMyselfExists(cb.query(), pp);
}
public abstract String keepMyselfExists(LoginCQ sq);
// ===================================================================================
// Manual Order
// ============
/**
* Order along manual ordering information.
* <pre>
* cb.query().addOrderBy_Birthdate_Asc().<span style="color: #CC4747">withManualOrder</span>(<span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">op</span>.<span style="color: #CC4747">when_GreaterEqual</span>(priorityDate); <span style="color: #3F7E5E">// e.g. 2000/01/01</span>
* });
* <span style="color: #3F7E5E">// order by </span>
* <span style="color: #3F7E5E">// case</span>
* <span style="color: #3F7E5E">// when BIRTHDATE >= '2000/01/01' then 0</span>
* <span style="color: #3F7E5E">// else 1</span>
* <span style="color: #3F7E5E">// end asc, ...</span>
*
* cb.query().addOrderBy_MemberStatusCode_Asc().<span style="color: #CC4747">withManualOrder</span>(<span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>></span> {
* <span style="color: #553000">op</span>.<span style="color: #CC4747">when_GreaterEqual</span>(priorityDate); <span style="color: #3F7E5E">// e.g. 2000/01/01</span>
* <span style="color: #553000">op</span>.<span style="color: #CC4747">when_Equal</span>(CDef.MemberStatus.Withdrawal);
* <span style="color: #553000">op</span>.<span style="color: #CC4747">when_Equal</span>(CDef.MemberStatus.Formalized);
* <span style="color: #553000">op</span>.<span style="color: #CC4747">when_Equal</span>(CDef.MemberStatus.Provisional);
* });
* <span style="color: #3F7E5E">// order by </span>
* <span style="color: #3F7E5E">// case</span>
* <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'WDL' then 0</span>
* <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'FML' then 1</span>
* <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'PRV' then 2</span>
* <span style="color: #3F7E5E">// else 3</span>
* <span style="color: #3F7E5E">// end asc, ...</span>
* </pre>
* <p>This function with Union is unsupported!</p>
* <p>The order values are bound (treated as bind parameter).</p>
* @param opLambda The callback for option of manual-order containing order values. (NotNull)
*/
public void withManualOrder(ManualOrderOptionCall opLambda) { // is user public!
xdoWithManualOrder(cMOO(opLambda));
}
// ===================================================================================
// Small Adjustment
// ================
// ===================================================================================
// Very Internal
// =============
protected LoginCB newMyCB() {
return new LoginCB();
}
// very internal (for suppressing warn about 'Not Use Import')
protected String xabUDT() { return Date.class.getName(); }
protected String xabCQ() { return LoginCQ.class.getName(); }
protected String xabLSO() { return LikeSearchOption.class.getName(); }
protected String xabSSQS() { return HpSSQSetupper.class.getName(); }
protected String xabSCP() { return SubQuery.class.getName(); }
}
| [
"[email protected]"
] | |
fe20d9e3e4ebf7e0b132d337744d420e85a3608a | 732624c8b4175d1ef2d0bb80df678c8872340564 | /src/com/qizx/xquery/ext/XfnLike.java | 5796bfa2562b95af9babb0686f66aa495be3653e | [] | no_license | omarbenhamid/Qizx | 3fcd3ae5630a1fee5838454c8391c6b5b7a79ec9 | 9ae227c16145c468e502be6124ef2d3085399f1a | refs/heads/master | 2021-01-20T21:46:32.440205 | 2016-01-12T11:11:08 | 2016-01-12T11:11:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,656 | java | /*
* Qizx/open 4.1
*
* This code is the open-source version of Qizx.
* Copyright (C) 2004-2009 Axyana Software -- All rights reserved.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is Xavier Franc - Axyana Software.
*
*/
package com.qizx.xquery.ext;
import com.qizx.api.DataModelException;
import com.qizx.api.EvaluationException;
import com.qizx.api.Node;
import com.qizx.api.QName;
import com.qizx.util.SqlLikePattern;
import com.qizx.util.StringPattern;
import com.qizx.xdm.IQName;
import com.qizx.xquery.EvalContext;
import com.qizx.xquery.Focus;
import com.qizx.xquery.XQType;
import com.qizx.xquery.XQValue;
import com.qizx.xquery.fn.Function;
import com.qizx.xquery.fn.Prototype;
import com.qizx.xquery.op.Expression;
/**
* Implementation of function x:like.
*/
public class XfnLike extends ExtensionFunction
{
private static QName qfname =
IQName.get(EXTENSION_NS, "like");
private static Prototype[] protos = {
new Prototype(qfname, XQType.BOOLEAN.opt, Exec.class)
.arg("pattern", XQType.STRING).arg("context", XQType.NODE.star),
new Prototype(qfname, XQType.BOOLEAN.opt, Exec.class)
.arg("pattern", XQType.STRING)
};
public Prototype[] getProtos() { return protos; }
public static class Exec extends Function.BoolCall
{
public Expression subDomain; // supplem arg
StringPattern previousPattern;
String previous;
EvalContext previousContext;
protected StringPattern preparePattern(String pattern,
EvalContext context)
{
if (context == previousContext && pattern.equals(previous))
return previousPattern;
previousPattern = new SqlLikePattern(pattern);
previous = pattern;
previousContext = context;
return previousPattern;
}
public StringPattern preparedPattern(EvalContext context)
throws EvaluationException
{
if (args.length > 1)
subDomain = args[1];
return preparePattern(args[0].evalAsString(null, context), context);
}
public boolean evalAsBoolean(Focus focus, EvalContext context)
throws EvaluationException
{
StringPattern pattern = preparedPattern(context);
try {
if (args.length > 1) {
XQValue seq = args[1].eval(focus, context);
// stop on first matching node:
for (; seq.next();) {
Node node = seq.getNode();
if (pattern.matches(node.getStringValue()))
return true;
}
return false;
}
else {
checkFocus(focus, context);
return pattern.matches(focus.currentItem().getNode().getStringValue());
}
}
catch (DataModelException e) {
dmError(context, e);
return false; // dummy
}
}
}
}
| [
"[email protected]"
] | |
164f0bdf189f7bef851d5c8e947dce9bae938162 | 8cdeb9f86701f475aca2657b089e7e1661fdf46a | /Project/HDLT/Byzantine/src/test/java/pt/tecnico/ulisboa/hds/hdlt/byzantine/BaseTests.java | 768d61e1f2e673b42166fda1604b9a2fe7b4f7a8 | [
"MIT"
] | permissive | Opty-MSc/HDS | 50d7ef0292576aa1c0296956198e33eee2d16c2f | 5ffff7908d185bbbf57cef4b9516ecd4b4ac70c8 | refs/heads/main | 2023-05-04T13:40:34.051956 | 2021-05-25T16:51:40 | 2021-05-25T16:51:40 | 347,386,396 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,473 | java | package pt.tecnico.ulisboa.hds.hdlt.byzantine;
/* User's Vicinity on Grid
User1: ['User2', 'User3', 'User4', 'User6', 'User7', 'User10']
User2: ['User1', 'User4', 'User7']
User3: ['User1', 'User5', 'User6', 'User8', 'User10']
User4: ['User1', 'User2', 'User6', 'User7']
User5: ['User3', 'User8', 'User9', 'User10']
User6: ['User1', 'User3', 'User4', 'User10']
User7: ['User1', 'User2', 'User4']
User8: ['User3', 'User5', 'User9']
User9: ['User5', 'User8']
User10: ['User1', 'User3', 'User5', 'User6']
*/
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import static pt.tecnico.ulisboa.hds.hdlt.lib.common.Common.parseURLs;
public class BaseTests {
private static final String TEST_PROP_FILE = "/test.properties";
protected static String myUserKSDirPath;
protected static String myServerKSDirPath;
protected static String myUserCrtDirPath;
protected static String myServerCrtDirPath;
protected static String myHACrtPath;
protected static Integer myNByzantineServers;
protected static Integer myNByzantineUsers;
protected static Integer myMaxDistance;
protected static String myGridPath;
protected static Map<String, String> myUsersURLs;
protected static Map<String, String> myServersURLs;
protected static Integer mySessionTime;
protected static Integer myEpochLifeTime;
protected static Integer myPowDifficulty;
protected static String myKeyStoreAlias;
protected static String myKeyStorePwd;
protected static Integer myCallTimeout;
protected static Integer myMaxNRetries;
@BeforeAll
public static void oneTimeSetup() throws IOException {
Properties testProps = new Properties();
try {
testProps.load(BaseTests.class.getResourceAsStream(TEST_PROP_FILE));
} catch (IOException e) {
final String msg = String.format("Could not load properties file %s", TEST_PROP_FILE);
System.out.println(msg);
throw e;
}
System.out.println("Properties:");
System.out.println(testProps);
myUserKSDirPath = testProps.getProperty("myUserKSDirPath");
myServerKSDirPath = testProps.getProperty("myServerKSDirPath");
myUserCrtDirPath = testProps.getProperty("myUserCrtDirPath");
myServerCrtDirPath = testProps.getProperty("myServerCrtDirPath");
myHACrtPath = testProps.getProperty("myHACrtPath");
myNByzantineServers = Integer.parseInt(testProps.getProperty("myNByzantineServers"));
myNByzantineUsers = Integer.parseInt(testProps.getProperty("myNByzantineUsers"));
myMaxDistance = Integer.parseInt(testProps.getProperty("myMaxDistance"));
myGridPath = testProps.getProperty("myGridPath");
myUsersURLs = parseURLs(testProps.getProperty("myUsersURLsPath"), null);
myServersURLs =
parseURLs(testProps.getProperty("myServersURLsPath"), 3 * myNByzantineServers + 1);
mySessionTime = Integer.parseInt(testProps.getProperty("mySessionTime"));
myEpochLifeTime = Integer.parseInt(testProps.getProperty("myEpochLifeTime"));
myPowDifficulty = Integer.parseInt(testProps.getProperty("myPowDifficulty"));
myKeyStoreAlias = testProps.getProperty("myKeyStoreAlias");
myKeyStorePwd = testProps.getProperty("myKeyStorePwd");
myCallTimeout = Integer.parseInt(testProps.getProperty("myCallTimeout"));
myMaxNRetries = Integer.parseInt(testProps.getProperty("myMaxNRetries"));
}
@AfterAll
public static void cleanup() {}
}
| [
"[email protected]"
] | |
5f47468d6e874cceacc21066feee73d17ec0a423 | 05742a5e6a42df13fa7f04e260611387dcb082cd | /katalogfilm/app/src/main/java/com/madukubah/katalogfilm2/service/SchedulerService.java | fa0d3708feecad20d4d39fd39f0313e86b38ff13 | [] | no_license | madukubah/dicoding | 498260e64507cbc9037bffe10097021e9a1197e3 | 335c27c653785d7ac74002e35c872a7bf356d8e3 | refs/heads/master | 2020-04-27T20:14:27.863645 | 2019-03-09T05:06:54 | 2019-03-09T05:06:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,555 | java | package com.madukubah.katalogfilm2.service;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.widget.Toast;
import com.google.android.gms.gcm.GcmNetworkManager;
import com.google.android.gms.gcm.GcmTaskService;
import com.google.android.gms.gcm.TaskParams;
import com.google.gson.Gson;
import com.madukubah.katalogfilm2.R;
import com.madukubah.katalogfilm2.api.ApiUtils;
import com.madukubah.katalogfilm2.api.MovieService;
import com.madukubah.katalogfilm2.model.Movie;
import com.madukubah.katalogfilm2.model.response.MovieResponse;
import com.madukubah.katalogfilm2.view.activity.detail.DetailMovieActivity;
import java.util.List;
import java.util.Random;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class SchedulerService
extends GcmTaskService
{
public static String TAG_TASK_UPCOMING = "upcoming movies";
public static final int NOTIFICAITION_ID = 1;
public static String CHANNEL_ID = "channel_01";
public static CharSequence CHANNEL_NAME = "dicoding channel";
private MovieService movieService;
@Override
public int onRunTask(TaskParams taskParams) {
int result = 0;
if (taskParams.getTag().equals(TAG_TASK_UPCOMING)) {
loadData();
result = GcmNetworkManager.RESULT_SUCCESS;
}
return result;
}
private void loadData() {
movieService = ApiUtils.movieService();
Call<MovieResponse> call = movieService.getUpComing();
call.enqueue(new Callback<MovieResponse>(){
@Override
public void onResponse(Call<MovieResponse> call, Response<MovieResponse> response) {
if (response.isSuccessful()) {
List<Movie> items = response.body().getResults();
int index = new Random().nextInt(items.size());
Movie movie = items.get( index ) ;
int notifId = 200;
showNotification(
getApplicationContext(),
movie.getTitle(),
movie.getOverview(),
notifId,
movie
);
}else{
loadFailed();
}
}
@Override
public void onFailure(Call<MovieResponse> call, Throwable t) {
Log.d("AAA", "terjadi kesalahan"+ t);
}
});
}
private void loadFailed() {
Toast.makeText(this, R.string.err_load_failed, Toast.LENGTH_SHORT).show();
}
private void showNotification(Context context, String title, String message, int notifId, Movie item)
{
NotificationManager notificationManagerCompat = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Intent intent = new Intent(context, DetailMovieActivity.class);
intent.putExtra(DetailMovieActivity.MOVIE, item );
PendingIntent pendingIntent = PendingIntent.getActivity(context, notifId, intent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)
.setSmallIcon(R.mipmap.ic_launcher_round)
.setContentTitle(title)
.setContentText(message)
.setColor(ContextCompat.getColor(context, android.R.color.transparent))
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.setVibrate(new long[]{1000, 1000, 1000, 1000, 1000})
.setSound(alarmSound);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
builder.setChannelId(CHANNEL_ID);
if (notificationManagerCompat != null) {
notificationManagerCompat.createNotificationChannel(channel);
}
}
notificationManagerCompat.notify(notifId, builder.build());
}
}
| [
"[email protected]"
] | |
cc70718e7a942e3035ed388be8b57e1948188fb6 | e0d18cfb343eaf3244ca5f1bd83dc9912fe0c973 | /src/main/java/italo/explab/analisador/sintatico/var/LeituraVarAnalisadorSintatico.java | 5df82065f3aaaf4cd51b2b265f2eea1268324f0e | [] | no_license | italoherbert/explab | 99c0a01c9b59fbd4f22bc45b5a2305b8cd37d34c | 78076fe2a859a6bd1420996a1a4d7d2ad6ffc157 | refs/heads/master | 2021-04-03T10:44:23.226567 | 2020-10-14T18:09:22 | 2020-10-14T18:09:22 | 248,345,096 | 1 | 0 | null | 2020-10-14T00:18:40 | 2020-03-18T21:17:46 | Java | UTF-8 | Java | false | false | 780 | java | package italo.explab.analisador.sintatico.var;
import italo.explab.analisador.sintatico.AnalisadorSintaticoManager;
import italo.explab.analisador.sintatico.AnaliseResult;
import italo.explab.codigo.Codigo;
public class LeituraVarAnalisadorSintatico extends AbstractLeituraVarAnalisadorSintatico {
public LeituraVarAnalisadorSintatico(AnalisadorSintaticoManager manager) {
super( manager );
}
@Override
public AnaliseResult analisaValor( Codigo codigo, int i ) {
AnaliseResult result = manager.getValorAnalisador().analisa( codigo, i );
if ( result.getJ() > 0 || result.getErro() != null )
return result;
return manager.getLeituraFuncValorAnalisador().analisa( codigo, i );
}
}
| [
"[email protected]"
] | |
d40a87d418bdc59f73687cef9f7ec379e14ca968 | 94dcc291dba0fa978d3f392aff26a4c7e5efc0ad | /src/imageviewer/persistence/filesystem/FileImageLoader.java | e9683292e4707cbb52491afb258536501784136d | [] | no_license | SarahSL/ImageViewer | 038833d0c549b52231d72340630d3430fa759aa6 | ed2cd5230a06ccc42d7231721d9111829acf2599 | refs/heads/master | 2021-01-13T12:59:12.626172 | 2017-01-12T21:29:09 | 2017-01-12T21:29:09 | 78,788,385 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,605 | java | package imageviewer.persistence.filesystem;
import imageviewer.model.Image;
import imageviewer.persistence.ImageLoader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FilenameFilter;
import java.io.InputStream;
public class FileImageLoader implements ImageLoader {
private final File[] files;
public FileImageLoader(String folder) {
this.files = new File(folder).listFiles(withImageExtension());
}
@Override
public Image load() {
return imageAt(0);
}
private FilenameFilter withImageExtension() {
return new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".jpg");
}
};
}
private Image imageAt(final int pos) {
return new Image() {
@Override
public InputStream stream() {
try {
return new FileInputStream(files[pos]);
} catch (FileNotFoundException ex) {
return null;
}
}
@Override
public Image getPrev() {
if (pos == 0) return imageAt(files.length - 1);
return imageAt(pos - 1);
}
@Override
public Image getNext() {
if (pos == files.length - 1) return imageAt(0);
return imageAt(pos + 1);
}
};
}
}
| [
"Sarah@DESKTOP-VQH35FS"
] | Sarah@DESKTOP-VQH35FS |
47eed47d630ccbfb4b26a5885b89a0717ad87c97 | 609be7f063391b79b7c2e1ae3f47f1cb64751bf5 | /src/de/ecspride/sourcesinkfinder/features/MethodInvocationOnParameterFeature.java | 71d7912e95afb213e4cf5fd829f93556dea84de6 | [] | no_license | Mac85/SuSi | 14e26428368f4fe82d9bb2c0527a039adc37be86 | 2c3e9de8de840c3ef3db849839bab5d6a7a94ea6 | refs/heads/develop | 2020-04-08T19:55:08.359503 | 2015-12-04T15:45:54 | 2015-12-04T15:45:54 | 50,909,865 | 1 | 0 | null | 2016-02-02T09:37:17 | 2016-02-02T09:37:17 | null | UTF-8 | Java | false | false | 2,092 | java | package de.ecspride.sourcesinkfinder.features;
import java.util.HashSet;
import java.util.Set;
import soot.SootMethod;
import soot.Unit;
import soot.Value;
import soot.jimple.IdentityStmt;
import soot.jimple.InstanceInvokeExpr;
import soot.jimple.ParameterRef;
import soot.jimple.Stmt;
import soot.jimple.infoflow.android.data.AndroidMethod;
/**
* Feature that checks whether a method starting with a specific string is
* invoked on one of the parameters
*
* @author Steven Arzt, Siegfried Rasthofer
*
*/
public class MethodInvocationOnParameterFeature extends AbstractSootFeature {
private final String methodName;
public MethodInvocationOnParameterFeature(String androidJAR, String methodName) {
super(androidJAR);
this.methodName = methodName;
}
@Override
public Type appliesInternal(AndroidMethod method) {
SootMethod sm = getSootMethod(method);
if (sm == null) {
System.err.println("Method not declared: " + method);
return Type.NOT_SUPPORTED;
}
// We are only interested in setters
if (!sm.isConcrete())
return Type.NOT_SUPPORTED;
try {
Set<Value> paramVals = new HashSet<Value>();
for (Unit u : sm.retrieveActiveBody().getUnits()) {
// Collect the parameters
if (u instanceof IdentityStmt) {
IdentityStmt id = (IdentityStmt) u;
if (id.getRightOp() instanceof ParameterRef)
paramVals.add(id.getLeftOp());
}
// Check for invocations
if (u instanceof Stmt) {
Stmt stmt = (Stmt) u;
if (stmt.containsInvokeExpr())
if (stmt.getInvokeExpr() instanceof InstanceInvokeExpr) {
InstanceInvokeExpr iinv = (InstanceInvokeExpr) stmt.getInvokeExpr();
if (paramVals.contains(iinv.getBase()))
if (iinv.getMethod().getName().startsWith(methodName))
return Type.TRUE;
}
}
}
return Type.FALSE;
}catch (Exception ex) {
System.err.println("Something went wrong:");
ex.printStackTrace();
return Type.NOT_SUPPORTED;
}
}
@Override
public String toString() {
return "<Method " + methodName + "invoked on parameter object>";
}
}
| [
"[email protected]"
] | |
eb972f034f5c63d9aff204a6beb142c27e965afa | fe3d3e84da926da44351f84ae66c0583c64bbe83 | /InstructionsScreen.java | bd65437235a10cf4b3fa64d2576d718aa85497ed | [] | no_license | AndiLi99/Tanker-Man | 201ddbf384efc44d3e52b1df0306b0b9abbc8e01 | 83de0da768a2a5089f27fe023fbd99b0ed80ce5b | refs/heads/master | 2021-05-31T23:22:39.358036 | 2016-06-16T15:30:49 | 2016-06-16T15:30:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,237 | java | package tankermanz;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.io.File;
import java.io.IOException;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class InstructionsScreen extends JPanel implements MouseMotionListener, MouseListener{
Font ARBERKLEY;
static final int tankX = 725; static final int tankY = 85;
static final int angleTank = 335;
static final int tankHeight = 18;
static final int tankArmAngle = 325;
static final int landDrawY = 400;
int backLabelLength = 120; int backLabelHeight = 50;
int backLabelX = 815; int backLabelY = 405;
final int TEXT_SIZE = 50;
boolean inBackButton = false;
JLabel backButton;
public InstructionsScreen() {
try {
ARBERKLEY = Font.createFont(Font.TRUETYPE_FONT, new File ("ARBERKLEY.ttf"));
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
ge.registerFont(ARBERKLEY);
} catch (FontFormatException e) {
System.out.println("no font found");
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
setLayout(null);
MenuScreen.setTitle();
add(MenuScreen.gameTitleTanker);
add(MenuScreen.gameTitleManz);
setBackButton();
add(backButton);
setFocusable(true);
addMouseMotionListener(this);
addMouseListener(this);
}
public void paintComponent (Graphics g) {
Graphics2D g2 = (Graphics2D) g;
// Draw background
g2.setPaint(new GradientPaint(0, 0, new Color (1, 1, 13), 0, Terrain.HEIGHT, new Color (4, 8, 55)));
g.fillRect(0, 0, Terrain.LENGTH, Terrain.HEIGHT);
// Draw land
g2.setPaint(new GradientPaint(0, landDrawY, new Color (124, 203, 255), 0, Terrain.HEIGHT, new Color (0, 0, 75)));
g2.fillRect(0, landDrawY, Terrain.LENGTH, Terrain.HEIGHT - landDrawY);
DrawTank.colorGreen();
DrawTank.drawDefaultTank(g2, tankX, tankY, tankHeight, angleTank, tankArmAngle);
g.setColor(Color.WHITE);
g.setFont(new Font ("AR BERKLEY", Font.PLAIN, 40));
g.setColor(new Color (0, 105, 149));
g.drawString("A,D - Move Tank", 160, 180);
g.drawString("W,S - Change Weapon", 160, 230);
g.drawString("Left Right Arrows - Move Tank Arm", 160, 280);
g.drawString("Up Down Arrows - Change Power", 160, 330);
g.drawString("Space - Fire Weapon", 160, 380);
}
public void setBackButton () {
backButton = new JLabel("Back");
backButton.setFont(new Font("AR BERKLEY", Font.BOLD, TEXT_SIZE));
backButton.setForeground(new Color (2, 10, 33));
backButton.setSize(backLabelLength, backLabelHeight);
backButton.setLocation(backLabelX, backLabelY);
}
public void setColorBackButton () {
if (inBackButton)
backButton.setForeground(new Color (191, 208, 255));
else
backButton.setForeground(new Color (2, 10, 33));
}
public void mouseMoved(MouseEvent e) {
int mouseX = e.getX(); int mouseY = e.getY();
setInBackButton(mouseX, mouseY);
setColorBackButton();
}
public void mouseReleased(MouseEvent e) {
if (inBackButton)
Screen.changeScreen(Screen.MENU_SCREEN);
}
// Getters
public boolean getInBackButton () { return inBackButton; }
// Setters
public void setInBackButton (int mouseX, int mouseY) {
if (mouseX > backLabelX && mouseX < backLabelX + backLabelLength) {
if (mouseY > backLabelY && mouseY < backLabelY + backLabelHeight)
inBackButton = true;
else
inBackButton = false;
}
else
inBackButton = false;
}
// Unused auto generated methods
public void mouseClicked(MouseEvent e) {
}
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
}
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
}
public void mousePressed(MouseEvent e) {
// TODO Auto-generated method stub
}
public void mouseDragged(MouseEvent e) {
// TODO Auto-generated method stub
}
}
| [
"[email protected]"
] | |
bb4d911e96a11451e227f4316b6cb0ad558cfe50 | d42bb2e77211a6c909ae32631808284168c33e59 | /src/main/java/com/sks/execution/WriteFileWriterJava6.java | aee9134be12b74a86710a05abec1f684d47ee79f | [] | no_license | skeres/files_read_write | b82c017ab2551f527ef36089c5d34255b60facc0 | 4733b79510f9aa64c36fad1d0424220fc2ba3b19 | refs/heads/master | 2023-08-01T05:55:26.424307 | 2021-09-15T16:05:56 | 2021-09-15T16:05:56 | 406,827,920 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,128 | java | package com.sks.execution;
import com.sks.utils.Util;
import org.apache.commons.lang3.RandomStringUtils;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
public class WriteFileWriterJava6 {
public static void main(String[] args) {
WriteFileWriterJava6 clazz=new WriteFileWriterJava6();
clazz.writeFile();
}
public void writeFile(){
//generate directories
Util util=new Util();
util.generatePath("42");
util.generateRandomDatasAsList();
String myFileName="simpleTextfile.01";
try (FileWriter fw = new FileWriter(util.getDirectory()+"/"+myFileName, Charset.forName("UTF8"));
BufferedWriter bw = new BufferedWriter(fw)) {
for (String s : util.getStringList()) {
bw.write(s);
bw.newLine();
}
}
catch (Exception e) {
System.out.println(e.getMessage());
} finally {
System.out.println("ending");
}
}
}
| [
"[email protected]"
] | |
e52efa8882accacfbf25f10a885ec85947570755 | 18e262a6945cedd131baf3ff8e89e7ebd89f970d | /src/test/java/com/service/exchange/ExchangeApplicationTests.java | 7bdc3d4470017f72ee1d39ff3e539c1597798124 | [] | no_license | dhayanth-dharma/exchange-rate-service | 57f944822c3db5a5066e165d951c5088bf129c57 | 8eba8fa09fc87ec8fcd8f51f1f30b10323dffbc2 | refs/heads/main | 2023-06-05T16:33:57.638820 | 2021-06-20T18:15:44 | 2021-06-20T18:15:44 | 378,670,092 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 214 | java | package com.service.exchange;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ExchangeApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
982800da3055d47bed05fe7f5d82df204d755948 | 315598f27a60baf859c805736af795d332013c2f | /src/com/zj/zjgameplane/bullettype/BombBulletType.java | 1f659e9d3dbab3600206c8a05ad96202c0b4d302 | [] | no_license | zhongjian3344/ZJGamePlane | b60ff696c72b3f51aa537eaf35c0460d4ec8354a | 795986fb36c3b4de723daa2854b208593989e96e | refs/heads/master | 2021-01-18T16:13:21.847738 | 2016-01-05T11:38:10 | 2016-01-05T11:38:10 | 48,932,133 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 444 | java | package com.zj.zjgameplane.bullettype;
import org.andengine.opengl.texture.region.ITiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;
public class BombBulletType extends AbstractBulletType
{
public BombBulletType(float pX, float pY,ITiledTextureRegion pTiledTextureRegion,VertexBufferObjectManager pVertexBufferObjectManager)
{
super(pX, pY, pTiledTextureRegion, pVertexBufferObjectManager);
}
}
| [
"zhongjian@zhongjian-PC"
] | zhongjian@zhongjian-PC |
7a16733f8f488b6f8c60db55d3ad8f9318c29ee4 | e442c0cc1393ec5ccc3e165dc9d33941244281f2 | /src/inicial/jFSisCMP.java | 1ffe261b10b16683c9ce2e0cbdc7278db0a07c21 | [] | no_license | victorsampaio/ConsultaPrecoMercantil | 39da37af12f58c2acce10c391a322fe399c519ec | 3adbc74076a506aa10955e5b6a3ae881809cde94 | refs/heads/master | 2020-06-06T17:23:01.992662 | 2013-12-05T16:33:55 | 2013-12-05T16:33:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,694 | java |
package inicial;
import clientes.iFclientes;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import usuarios.iFusuarios;
import estabelecimentos.iFestabelecimentos;
import movimentos.iFmovimentos;
import produtos.iFprodutos;
public class jFSisCMP extends javax.swing.JFrame {
/** Creates new form jFSisCMP */
public jFSisCMP() {
initComponents();
this.setExtendedState(jFSisCMP.MAXIMIZED_BOTH);
}
/** This method is ca lled from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jDescritorio = new javax.swing.JDesktopPane();
jMenuBar1 = new javax.swing.JMenuBar();
jMpesquisa = new javax.swing.JMenu();
jMenu1 = new javax.swing.JMenu();
jMusuario = new javax.swing.JMenuItem();
jMcliente = new javax.swing.JMenuItem();
jMproduto = new javax.swing.JMenuItem();
jMestabelecimento = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jMpesquisa.setText("Pesquisa");
jMpesquisa.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
jMpesquisaMousePressed(evt);
}
});
jMenuBar1.add(jMpesquisa);
jMenu1.setText("Cadastros");
jMusuario.setText("Cad. Usuários");
jMusuario.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
jMusuarioMousePressed(evt);
}
});
jMenu1.add(jMusuario);
jMcliente.setText("Cad. Clientes");
jMcliente.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
jMclienteMousePressed(evt);
}
});
jMenu1.add(jMcliente);
jMproduto.setText("Cad. Produtos");
jMproduto.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
jMprodutoMousePressed(evt);
}
});
jMenu1.add(jMproduto);
jMestabelecimento.setText("Cad. Estabelecimentos");
jMestabelecimento.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
jMestabelecimentoMousePressed(evt);
}
});
jMenu1.add(jMestabelecimento);
jMenuBar1.add(jMenu1);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDescritorio, javax.swing.GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDescritorio, javax.swing.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jMusuarioMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMusuarioMousePressed
// TODO add your handling code here:
iFusuarios iFusu = new iFusuarios();
jDescritorio.add(iFusu);
iFusu.show();
}//GEN-LAST:event_jMusuarioMousePressed
private void jMclienteMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMclienteMousePressed
// TODO add your handling code here:
iFclientes iFcli = new iFclientes();
jDescritorio.add(iFcli);
iFcli.show();
}//GEN-LAST:event_jMclienteMousePressed
private void jMestabelecimentoMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMestabelecimentoMousePressed
// TODO add your handling code here:
iFestabelecimentos iFest = new iFestabelecimentos();
jDescritorio.add(iFest);
iFest.show();
}//GEN-LAST:event_jMestabelecimentoMousePressed
private void jMprodutoMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMprodutoMousePressed
// TODO add your handling code here:
iFprodutos iFpro = null;
try {
iFpro = new iFprodutos();
} catch (SQLException ex) {
Logger.getLogger(jFSisCMP.class.getName()).log(Level.SEVERE, null, ex);
}
jDescritorio.add(iFpro);
iFpro.show();
}//GEN-LAST:event_jMprodutoMousePressed
private void jMpesquisaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMpesquisaMousePressed
// TODO add your handling code here:
iFmovimentos iFmov = null;
try {
iFmov = new iFmovimentos();
} catch (SQLException ex) {
Logger.getLogger(jFSisCMP.class.getName()).log(Level.SEVERE, null, ex);
}
jDescritorio.add(iFmov);
iFmov.show();
}//GEN-LAST:event_jMpesquisaMousePressed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(jFSisCMP.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(jFSisCMP.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(jFSisCMP.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(jFSisCMP.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
new jFSisCMP().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JDesktopPane jDescritorio;
private javax.swing.JMenuItem jMcliente;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMestabelecimento;
private javax.swing.JMenu jMpesquisa;
private javax.swing.JMenuItem jMproduto;
private javax.swing.JMenuItem jMusuario;
// End of variables declaration//GEN-END:variables
}
| [
"[email protected]"
] | |
2f37b04bba9c128683fb3ad5e76afd34f0dd66a9 | 503942ede488f2fe8338b55f972f118229635c7f | /Lab4/src/Main.java | a21ba2965b9e8557c773f7f73e424026023234bc | [] | no_license | Toolf/Java-Something-like-OOP | 13b0037f6e046d997a11f085cce59cfa708cb8a5 | c36f689f2cd8c7945897104bb66ae4b413eece02 | refs/heads/master | 2020-04-23T11:05:15.117415 | 2019-02-25T16:10:26 | 2019-02-25T16:10:26 | 171,124,064 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java |
public class Main {
public static class Student{
String firstname;
String lastname;
String group;
byte course;
Student(String firstname,String lastname,String group,byte course,byte age){
this.firstname = firstname;
this.lastname = lastname;
this.group = group;
this.course = course;
}
}
public static void main(String[] args) {
}
}
| [
"[email protected]"
] | |
2398a92c5fd33eb8a3b53b8464d89c8b75c27bdb | eff3e74085664ccf90f4666b240bba9fee835393 | /src/com/smartcard/ReadJson.java | 49d9c2c189bca75ff7df91d231759dad14f1b118 | [] | no_license | vinay170490/SmartCard_ShoppingBill | d600957d480bed2ad9146399e8d93b96ee5aa2d3 | 15aae823e806572d58fa83cc01581f6185c0d7d1 | refs/heads/master | 2020-05-22T08:22:51.984937 | 2019-05-14T01:13:39 | 2019-05-14T01:13:39 | 186,276,614 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,370 | java | package com.smartcard;
import java.util.List;
import org.json.simple.JSONArray;
import com.smartcard.Exception.SmartCardException;
import com.smartcard.model.Bill;
import com.smartcard.service.CalculateBill;
import com.smartcard.service.ProductList;
public class ReadJson extends ProductList {
public static void main(String[] args) throws SmartCardException {
ProductList products = new ProductList();
CalculateBill calculateBill = new CalculateBill();
JSONArray productList = products.getProductList();
JSONArray selproductList = products.getSelectedProductList();
List<Bill> totalItems = calculateBill.addProductsToBill(productList);
if(totalItems.size()==0) {
throw new SmartCardException("No products in the bill");
}
System.out.println("Total No. of Products are: ");
System.out.println("-------------------------------");
for (int i = 0; i < totalItems.size(); i++) {
System.out.println(" productName : " + totalItems.get(i).getProductName()
+ " || Selected No. of products : " + totalItems.get(i).getNoOfItems()
+ " || Actual value of each product : " + totalItems.get(i).getEachProductCost()
+ " || Total Cost of selected no. of products : " + totalItems.get(i).getProductCost()
+ " || ProductTax for selected no. of products : " + totalItems.get(i).getProductTax()
+ " || Actual total value of the selected products : " + totalItems.get(i).getTotalValue());
}
List<Bill> billItems = calculateBill.addProductsToBill(selproductList);
System.out.println("\nSelected Items are :");
System.out.println("-------------------------------");
double totalCost = 0;
double serviceTax = 0;
for (int i = 0; i < billItems.size(); i++) {
System.out.println(" Product Name : " + billItems.get(i).getProductName() + " || No. Of Items : "
+ billItems.get(i).getNoOfItems() + " || Price : " + billItems.get(i).getProductCost());
serviceTax = serviceTax + billItems.get(i).getProductTax();
totalCost = totalCost + billItems.get(i).getProductCost();
}
totalCost = totalCost + serviceTax;
System.out.println("-------------------------------");
System.out.println("Service Tax : " + serviceTax);
System.out.println("-------------------------------");
System.out.println("Total Bill : " + totalCost);
}
}
| [
"kowko@DESKTOP-5K33MMA"
] | kowko@DESKTOP-5K33MMA |
9bc6ede0896ea2c563fa8ad4c6738946bc045cd3 | 0daf8c189450402ea85c49c88eff90aa095269d0 | /fragmentBuilders/FragmentDirector.java | ac8261ea0b227714476d8b814aa346d4bc46cf1a | [] | no_license | NorseDreki/demo-code-for-timehop | 1d7e1430453d764fd38c58a925ae9999c362f331 | 9c1d84db0fbcc69a6b7b383f4c37a427028a0eac | refs/heads/master | 2023-03-10T02:03:57.645354 | 2014-03-14T18:40:56 | 2014-03-14T18:40:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 667 | java | package sg.shopster.android.frags.builders;
import sg.shopster.android.frags.ListLoaderFragment;
import android.support.v4.app.Fragment;
public class FragmentDirector<T> {
private IFragmentBuilder<T> fb;
public FragmentDirector(IFragmentBuilder<T> fb) {
this.fb = fb;
}
public Fragment buildFragment() {
ListLoaderFragment<T> result = fb.getFragment();
result.setAdapter(fb.getAdapter());
result.setLoader(fb.getLoader());
result.setItemClick(fb.getOnItemClickListener());
result.setEntityClass(fb.getEntityClass());
result.setSearchInfoProvider(fb.getSearchInfoProvider());
result.setEmptyView(fb.getEmptyView());
return result;
}
}
| [
"[email protected]"
] | |
c303334d39203f2b4985b21acd652c8c29a838ae | 4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d | /src/main/java/com/alipay/api/domain/SubButton.java | b139329b8b9943f534506f7cfcddc6079d9bb639 | [
"Apache-2.0"
] | permissive | weizai118/payment-alipay | 042898e172ce7f1162a69c1dc445e69e53a1899c | e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1 | refs/heads/master | 2020-04-05T06:29:57.113650 | 2018-11-06T11:03:05 | 2018-11-06T11:03:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,639 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 子菜单对象模型
*
* @author auto create
* @since 1.0, 2017-10-31 19:50:53
*/
public class SubButton extends AlipayObject {
private static final long serialVersionUID = 2788537788412516961L;
/**
* 当actionType为link时,该参数为url链接;
当actionType为out时,该参数为用户自定义参数;
当actionType为tel时,该参数为电话号码。
当action_type为map时,该参数为查看地图的关键字。
当action_type为consumption时,该参数可不传。
该参数最长255个字符,不允许冒号等特殊字符。
*/
@ApiField("action_param")
private String actionParam;
/**
* 菜单类型:
out——事件型菜单;
link——链接型菜单;
tel——点击拨打电话;
map——点击查看地图;
consumption——点击查看用户与生活号管理员账号之间的消费记录
*/
@ApiField("action_type")
private String actionType;
/**
* icon图片url,必须是http协议的url,尺寸为60X60,最大不超过5M,请先调用<a href="https://docs.open.alipay.com/api_3/alipay.offline.material.image.upload"> 图片上传接口</a>获得图片url
*/
@ApiField("icon")
private String icon;
/**
* 菜单名称,icon菜单名称不超过5个汉字,文本菜单名称不超过9个汉字,编码格式为GBK
*/
@ApiField("name")
private String name;
/**
* Gets action param.
*
* @return the action param
*/
public String getActionParam() {
return this.actionParam;
}
/**
* Sets action param.
*
* @param actionParam the action param
*/
public void setActionParam(String actionParam) {
this.actionParam = actionParam;
}
/**
* Gets action type.
*
* @return the action type
*/
public String getActionType() {
return this.actionType;
}
/**
* Sets action type.
*
* @param actionType the action type
*/
public void setActionType(String actionType) {
this.actionType = actionType;
}
/**
* Gets icon.
*
* @return the icon
*/
public String getIcon() {
return this.icon;
}
/**
* Sets icon.
*
* @param icon the icon
*/
public void setIcon(String icon) {
this.icon = icon;
}
/**
* Gets name.
*
* @return the name
*/
public String getName() {
return this.name;
}
/**
* Sets name.
*
* @param name the name
*/
public void setName(String name) {
this.name = name;
}
}
| [
"[email protected]"
] | |
1510ce9230106d7987636907c88e567e1f195bfb | 14f016e1881331df0f1df9a7094a04fc9f27b9e1 | /developer-salary-api/src/test/java/com/example/developersalaryapi/DemoApplicationTests.java | 2f3109466bad24a971d95f5a95924b12fca1b79b | [] | no_license | DTaitt/ednext | 235f766d9c419987c478ed4845ab24ba95341a98 | e97aad5e65ddfb805478915bfe7d1c2652618508 | refs/heads/master | 2020-03-09T15:17:14.390498 | 2018-03-22T22:05:28 | 2018-03-22T22:05:28 | 128,855,220 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | package com.example.developersalaryapi;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class DemoApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"[email protected]"
] | |
5a25ed222202f1dfad392ee06524a1b2293b98a3 | d664b8327cffbb63bc9e51a710276d3bc2aa8a82 | /src/main/java/com/writty/service/CommentService.java | 1cb3a66fff4a8a42c2125f43e40c4bf76839577b | [] | no_license | hellokaton/writty | f068fbf4f0a7afe0b54ce39ef49b93932ecb7ace | 985b6040970b77c0f20d2ddb82316a7fb3f28fa1 | refs/heads/master | 2021-11-29T14:04:11.954483 | 2016-05-22T15:23:20 | 2016-05-22T15:23:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.writty.service;
import java.util.List;
import java.util.Map;
import com.writty.model.Comment;
public interface CommentService {
Comment getComment(Integer id);
List<Map<String, Object>> getCommentListMap(String pid);
boolean save(String pid, Long cid, Long uid, Long to_uid, Long post_uid, String content, String ip);
}
| [
"[email protected]"
] | |
026ec53923c1d8183e52794e4fc9adad77dae1c5 | 96b75fb498421b6d94fa934c63bc81fc788b0d85 | /app/src/main/java/babbabazrii/com/bababazri/Activities/MyApplication.java | 1a52c68f7f864fdcb196eea895cba5dea7ec4cc4 | [] | no_license | mukesh249/BabbaBazriUser | 645735802644722481be050bc47f021d1909a88f | 8de5e7f388c361894864f12f12aaf9c894518db0 | refs/heads/master | 2020-05-15T16:06:14.974651 | 2019-04-20T09:15:47 | 2019-04-20T09:15:47 | 182,383,723 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package babbabazrii.com.bababazri.Activities;
import android.content.Context;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;
public class MyApplication extends MultiDexApplication {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
} | [
"[email protected]"
] | |
c9093a38d208ece4c468ba65c629004358de79c0 | 2c8c6c9a9cf3ec07a06ef97477a624a540b61900 | /vendas/src/main/java/com/gasparbarancelli/vendas/config/JacksonConfiguration.java | 08bb92b63e814929acff778f4ace248ce4021c33 | [] | no_license | gasparbarancelli/microservices | cd88e263dd04c1717af5b0765854d1cb2c44fd43 | 836b30330da7a9be208c89a741aeca755130221a | refs/heads/master | 2023-03-13T12:56:20.654562 | 2021-03-15T18:51:57 | 2021-03-15T18:51:57 | 315,703,535 | 1 | 5 | null | null | null | null | UTF-8 | Java | false | false | 636 | java | package com.gasparbarancelli.vendas.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.openapitools.jackson.nullable.JsonNullableModule;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
@Configuration
public class JacksonConfiguration {
private final ObjectMapper objectMapper;
public JacksonConfiguration(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
@PostConstruct
public ObjectMapper jacksonObjectMapper() {
objectMapper.registerModule(new JsonNullableModule());
return objectMapper;
}
}
| [
"G45p4r19121987"
] | G45p4r19121987 |
15f50dc6b349d0a01359c397f740e2adb79971ed | df134b422960de6fb179f36ca97ab574b0f1d69f | /net/minecraft/server/v1_16_R2/WorldGenSurfaceNether.java | 7eaf5b1c71625c33901415be3c15fdfa8b778fa6 | [] | no_license | TheShermanTanker/NMS-1.16.3 | bbbdb9417009be4987872717e761fb064468bbb2 | d3e64b4493d3e45970ec5ec66e1b9714a71856cc | refs/heads/master | 2022-12-29T15:32:24.411347 | 2020-10-08T11:56:16 | 2020-10-08T11:56:16 | 302,324,687 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,139 | java | /* */ package net.minecraft.server.v1_16_R2;
/* */
/* */ import com.mojang.serialization.Codec;
/* */ import java.util.Random;
/* */ import java.util.stream.IntStream;
/* */
/* */ public class WorldGenSurfaceNether
/* */ extends WorldGenSurface<WorldGenSurfaceConfigurationBase> {
/* 9 */ private static final IBlockData c = Blocks.CAVE_AIR.getBlockData();
/* 10 */ private static final IBlockData d = Blocks.GRAVEL.getBlockData();
/* 11 */ private static final IBlockData e = Blocks.SOUL_SAND.getBlockData();
/* */ protected long a;
/* */ protected NoiseGeneratorOctaves b;
/* */
/* */ public WorldGenSurfaceNether(Codec<WorldGenSurfaceConfigurationBase> codec) {
/* 16 */ super(codec);
/* */ }
/* */
/* */ public void a(Random random, IChunkAccess ichunkaccess, BiomeBase biomebase, int i, int j, int k, double d0, IBlockData iblockdata, IBlockData iblockdata1, int l, long i1, WorldGenSurfaceConfigurationBase worldgensurfaceconfigurationbase) {
/* 20 */ int j1 = l;
/* 21 */ int k1 = i & 0xF;
/* 22 */ int l1 = j & 0xF;
/* 23 */ double d1 = 0.03125D;
/* 24 */ boolean flag = (this.b.a(i * 0.03125D, j * 0.03125D, 0.0D) * 75.0D + random.nextDouble() > 0.0D);
/* 25 */ boolean flag1 = (this.b.a(i * 0.03125D, 109.0D, j * 0.03125D) * 75.0D + random.nextDouble() > 0.0D);
/* 26 */ int i2 = (int)(d0 / 3.0D + 3.0D + random.nextDouble() * 0.25D);
/* 27 */ BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
/* 28 */ int j2 = -1;
/* 29 */ IBlockData iblockdata2 = worldgensurfaceconfigurationbase.a();
/* 30 */ IBlockData iblockdata3 = worldgensurfaceconfigurationbase.b();
/* */
/* 32 */ for (int k2 = k; k2 >= 0; k2--) {
/* 33 */ blockposition_mutableblockposition.d(k1, k2, l1);
/* 34 */ IBlockData iblockdata4 = ichunkaccess.getType(blockposition_mutableblockposition);
/* */
/* 36 */ if (iblockdata4.isAir()) {
/* 37 */ j2 = -1;
/* 38 */ } else if (iblockdata4.a(iblockdata.getBlock())) {
/* 39 */ if (j2 == -1) {
/* 40 */ boolean flag2 = false;
/* */
/* 42 */ if (i2 <= 0) {
/* 43 */ flag2 = true;
/* 44 */ iblockdata3 = worldgensurfaceconfigurationbase.b();
/* 45 */ } else if (k2 >= j1 - 4 && k2 <= j1 + 1) {
/* 46 */ iblockdata2 = worldgensurfaceconfigurationbase.a();
/* 47 */ iblockdata3 = worldgensurfaceconfigurationbase.b();
/* 48 */ if (flag1) {
/* 49 */ iblockdata2 = d;
/* 50 */ iblockdata3 = worldgensurfaceconfigurationbase.b();
/* */ }
/* */
/* 53 */ if (flag) {
/* 54 */ iblockdata2 = e;
/* 55 */ iblockdata3 = e;
/* */ }
/* */ }
/* */
/* 59 */ if (k2 < j1 && flag2) {
/* 60 */ iblockdata2 = iblockdata1;
/* */ }
/* */
/* 63 */ j2 = i2;
/* 64 */ if (k2 >= j1 - 1) {
/* 65 */ ichunkaccess.setType(blockposition_mutableblockposition, iblockdata2, false);
/* */ } else {
/* 67 */ ichunkaccess.setType(blockposition_mutableblockposition, iblockdata3, false);
/* */ }
/* 69 */ } else if (j2 > 0) {
/* 70 */ j2--;
/* 71 */ ichunkaccess.setType(blockposition_mutableblockposition, iblockdata3, false);
/* */ }
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */ public void a(long i) {
/* 80 */ if (this.a != i || this.b == null) {
/* 81 */ this.b = new NoiseGeneratorOctaves(new SeededRandom(i), IntStream.rangeClosed(-3, 0));
/* */ }
/* */
/* 84 */ this.a = i;
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\WorldGenSurfaceNether.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/ | [
"[email protected]"
] | |
8242cc3eb6f9c6fba93d109b4315ed3c112103f5 | 7a29ba7e4e79fc98fd31f8bdaa8664a12f057dbe | /Ejercicio_Evaluacion_Tema_5_Libreria/src/main/java/app/modelo/Autor.java | e63867be101de22f853dc51db19c4559c8551268 | [] | no_license | dquesadaarroyo/Master_Desarrollo_Java-JEE-Avanzado | 0f21168ff91ab70175c27aadc1c095067313538f | 15840f9086f46db3f4c677b8c44e5c8f974f7413 | refs/heads/master | 2016-09-06T16:51:59.654793 | 2014-11-18T07:44:16 | 2014-11-18T07:44:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,486 | java | package app.modelo;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
public class Autor implements Serializable{
private static final long serialVersionUID = 1L;
private Long id;
private String nombre;
private String nacionalidad;
private String comentarios;
private Set<Libro> libros = new HashSet<Libro>();
public void addLibros(Libro l){
libros.add(l);
l.getAutores().add(this);
}
public Autor() {
}
public Autor(String nombre, String nacionalidad, String comentarios,
Set<Libro> libros) {
this.nombre = nombre;
this.nacionalidad = nacionalidad;
this.comentarios = comentarios;
this.libros = libros;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getNacionalidad() {
return nacionalidad;
}
public void setNacionalidad(String nacionalidad) {
this.nacionalidad = nacionalidad;
}
public String getComentarios() {
return comentarios;
}
public void setComentarios(String comentarios) {
this.comentarios = comentarios;
}
public Set<Libro> getLibros() {
return libros;
}
public void setLibros(Set<Libro> libros) {
this.libros = libros;
}
@Override
public String toString() {
return "Autor [id=" + id + ", nombre=" + nombre + ", nacionalidad="
+ nacionalidad + ", comentarios=" + comentarios + "]";
}
}
| [
"[email protected]"
] | |
0591971dd327990eb102a7531c7f4915796cf357 | 4fc407740fc9eecd83215b0c278aba86496804a4 | /app/src/main/java/com/example/digitalWatch/secondActivity.java | 4dc0f5472c2a62e525e0bf21d06dd967748d9bc8 | [] | no_license | bkumaranbk/Android-Digital-Clock | 394b1257d8bf382ab61aa8dba1ba757987f27209 | 67e877c4ea0b38bc8886a514f8ded5086a236ac2 | refs/heads/master | 2023-07-29T10:49:13.104719 | 2021-09-12T17:03:01 | 2021-09-12T17:03:01 | 405,674,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 774 | java | package com.example.digitalWatch;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
public class secondActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
public void switchActivity(View view) {
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
}
} | [
"[email protected]"
] | |
1019c495e7dcd32403c5505ac04f3f981fe474a0 | 183f640b0ab6a6da85da1b09290965618083d874 | /samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java | 7c1853566ff75978494e6f1ed0ac33ff1c147411 | [] | no_license | apache/tuscany-sca-1.x | 8543e4434f4d8650630bddf26b040d48aee789e9 | 3eb5a6521521398d167f32da995c868ac545163b | refs/heads/trunk | 2023-09-04T10:37:39.056392 | 2011-12-14T12:09:11 | 2011-12-14T12:09:11 | 390,001 | 4 | 18 | null | 2023-08-29T21:44:23 | 2009-11-30T09:00:10 | Java | UTF-8 | Java | false | false | 1,574 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package helloworld;
import org.apache.tuscany.sca.host.embedded.SCADomain;
import org.osoa.sca.annotations.EagerInit;
import org.osoa.sca.annotations.Init;
import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Scope;
/**
* The HelloWorld client implementation
*/
@Scope("COMPOSITE") @EagerInit
public class HelloWorldClient5 {
@Reference
public HelloWorldService helloWorldService;
public final static void main(String[] args) throws Exception {
SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient5.composite");
scaDomain.close();
}
@Init
public void doit() {
String value = helloWorldService.getGreetings("World");
System.out.println(value);
}
} | [
"[email protected]"
] | |
c8e37ba702afd3a13830fca70919d5473a4c1d7d | acb9948c15d995781e0fd3cbbaad1383d5d712bb | /Lab4_UILabs/app/src/main/java/course/labs/todomanager/AddToDoActivity.java | 57bdc5a76646059c7be21617c5394d04d68549d9 | [] | no_license | tamaslang/android-sandbox | bdc37400f71bdd9c0fa22c7c372337af789fa39d | 4e08fb3de348ebdec6fc82bfab5b13e6ac3b2477 | refs/heads/master | 2021-01-19T14:30:14.816648 | 2015-06-10T17:47:42 | 2015-06-10T17:47:42 | 35,422,142 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,597 | java | package course.labs.todomanager;
import java.util.Calendar;
import java.util.Date;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.TimePicker;
import course.labs.todomanager.ToDoItem.Priority;
import course.labs.todomanager.ToDoItem.Status;
public class AddToDoActivity extends Activity {
// 7 days in milliseconds - 7 * 24 * 60 * 60 * 1000
private static final int SEVEN_DAYS = 604800000;
private static final String TAG = "Lab-UserInterface";
private static String timeString;
private static String dateString;
private static TextView dateView;
private static TextView timeView;
private Date mDate;
private RadioGroup mPriorityRadioGroup;
private RadioGroup mStatusRadioGroup;
private EditText mTitleText;
private RadioButton mDefaultStatusButton;
private RadioButton mDefaultPriorityButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.add_todo);
mTitleText = (EditText) findViewById(R.id.title);
mDefaultStatusButton = (RadioButton) findViewById(R.id.statusNotDone);
mDefaultPriorityButton = (RadioButton) findViewById(R.id.medPriority);
mPriorityRadioGroup = (RadioGroup) findViewById(R.id.priorityGroup);
mStatusRadioGroup = (RadioGroup) findViewById(R.id.statusGroup);
dateView = (TextView) findViewById(R.id.date);
timeView = (TextView) findViewById(R.id.time);
// Set the default date and time
setDefaultDateTime();
// OnClickListener for the Date button, calls showDatePickerDialog() to
// show the Date dialog
final Button datePickerButton = (Button) findViewById(R.id.date_picker_button);
datePickerButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showDatePickerDialog();
}
});
// OnClickListener for the Time button, calls showTimePickerDialog() to
// show the Time Dialog
final Button timePickerButton = (Button) findViewById(R.id.time_picker_button);
timePickerButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showTimePickerDialog();
}
});
// OnClickListener for the Cancel Button,
final Button cancelButton = (Button) findViewById(R.id.cancelButton);
cancelButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
setResult(RESULT_CANCELED);
finish();
}
});
// TODO - Set up OnClickListener for the Reset Button
final Button resetButton = (Button) findViewById(R.id.resetButton);
resetButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mTitleText.setText("");
mPriorityRadioGroup.check(R.id.medPriority);
mStatusRadioGroup.check(R.id.statusNotDone);
// reset date and time
setDefaultDateTime();
}
});
// Set up OnClickListener for the Submit Button
final Button submitButton = (Button) findViewById(R.id.submitButton);
submitButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Priority priority = getPriority();
Status status = getStatus();
String titleString = mTitleText.getText().toString();
// Construct the Date string
String fullDate = dateString + " " + timeString;
// Package ToDoItem data into an Intent
Intent data = new Intent();
ToDoItem.packageIntent(data, titleString, priority, status,
fullDate);
setResult(RESULT_OK,data);
finish();
}
});
}
// Do not modify below this point.
private void setDefaultDateTime() {
// Default is current time + 7 days
mDate = new Date();
mDate = new Date(mDate.getTime() + SEVEN_DAYS);
Calendar c = Calendar.getInstance();
c.setTime(mDate);
setDateString(c.get(Calendar.YEAR), c.get(Calendar.MONTH),
c.get(Calendar.DAY_OF_MONTH));
dateView.setText(dateString);
setTimeString(c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE),
c.get(Calendar.MILLISECOND));
timeView.setText(timeString);
}
private static void setDateString(int year, int monthOfYear, int dayOfMonth) {
// Increment monthOfYear for Calendar/Date -> Time Format setting
monthOfYear++;
String mon = "" + monthOfYear;
String day = "" + dayOfMonth;
if (monthOfYear < 10)
mon = "0" + monthOfYear;
if (dayOfMonth < 10)
day = "0" + dayOfMonth;
dateString = year + "-" + mon + "-" + day;
}
private static void setTimeString(int hourOfDay, int minute, int mili) {
String hour = "" + hourOfDay;
String min = "" + minute;
if (hourOfDay < 10)
hour = "0" + hourOfDay;
if (minute < 10)
min = "0" + minute;
timeString = hour + ":" + min + ":00";
}
private Priority getPriority() {
switch (mPriorityRadioGroup.getCheckedRadioButtonId()) {
case R.id.lowPriority: {
return Priority.LOW;
}
case R.id.highPriority: {
return Priority.HIGH;
}
default: {
return Priority.MED;
}
}
}
private Status getStatus() {
switch (mStatusRadioGroup.getCheckedRadioButtonId()) {
case R.id.statusDone: {
return Status.DONE;
}
default: {
return Status.NOTDONE;
}
}
}
private String getToDoTitle() {
return mTitleText.getText().toString();
}
// DialogFragment used to pick a ToDoItem deadline date
public static class DatePickerFragment extends DialogFragment implements
DatePickerDialog.OnDateSetListener {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the current date as the default date in the picker
final Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day = c.get(Calendar.DAY_OF_MONTH);
// Create a new instance of DatePickerDialog and return it
return new DatePickerDialog(getActivity(), this, year, month, day);
}
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
setDateString(year, monthOfYear, dayOfMonth);
dateView.setText(dateString);
}
}
// DialogFragment used to pick a ToDoItem deadline time
public static class TimePickerFragment extends DialogFragment implements
TimePickerDialog.OnTimeSetListener {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the current time as the default values for the picker
final Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR_OF_DAY);
int minute = c.get(Calendar.MINUTE);
// Create a new instance of TimePickerDialog and return
return new TimePickerDialog(getActivity(), this, hour, minute, true);
}
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
setTimeString(hourOfDay, minute, 0);
timeView.setText(timeString);
}
}
private void showDatePickerDialog() {
DialogFragment newFragment = new DatePickerFragment();
newFragment.show(getFragmentManager(), "datePicker");
}
private void showTimePickerDialog() {
DialogFragment newFragment = new TimePickerFragment();
newFragment.show(getFragmentManager(), "timePicker");
}
}
| [
"[email protected]"
] | |
3f4e25d8a1a8808c8d7807d4f1851cd91afab651 | f81625b26f84f567254512c69a63b449465bb89d | /weather_rest_application/src/test/java/ua/danit/rest/weatherapp/test/WeatherApiTest.java | 01c2da1e68389a33f65fcb8c92d0d0668909fd58 | [] | no_license | djandrewd/rest-application | febd836932e59c460d384cd2ba2ae7f144ad3fbc | f558be3be0c16722b317cd88aa0564ca3d186cc3 | refs/heads/master | 2021-05-02T12:06:11.634587 | 2018-02-08T08:53:47 | 2018-02-08T08:53:47 | 120,735,911 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,316 | java | package ua.danit.rest.weatherapp.test;
import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import static javax.servlet.http.HttpServletResponse.SC_OK;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static ua.danit.rest.core.ApplicationBuilder.builder;
import java.nio.charset.Charset;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Collections;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.ByteStreams;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
import ua.danit.rest.core.RestApplication;
import ua.danit.rest.core.parsing.ReflectionServiceParser;
import ua.danit.rest.weatherapp.entity.Measure;
import ua.danit.rest.weatherapp.entity.WeatherCode;
import ua.danit.rest.weatherapp.ext.MeasurementService;
import ua.danit.rest.weatherapp.resources.WeatherSelectResource;
import ua.danit.rest.weatherapp.resources.WeatherStoreResource;
/**
* Tests for matching weather API during implementation.
*
* @author Andrey Minov
*/
@Ignore
public class WeatherApiTest {
private static final String SERVICE_URLS = "/resources/*";
private static final int SERVICE_PORT = 3434;
private static final int HTTP_TIMEOUT = 1000;
private static final String SERVER_URI_PATTERN = "http://localhost:%1$d%2$s";
private static RestApplication application;
private static MeasurementService measurementService;
private static CloseableHttpClient httpClient;
@BeforeClass
public static void initApplication() throws Exception {
measurementService = mock(MeasurementService.class);
ReflectionServiceParser parser = new ReflectionServiceParser();
application = builder().withPort(SERVICE_PORT).withMatchingUrls(SERVICE_URLS)
.withServiceInstance(new WeatherSelectResource(measurementService))
.withServiceInstance(new WeatherStoreResource(measurementService))
.build(Mockito::mock, parser::parse);
application.start(false);
httpClient = HttpClientBuilder.create().build();
}
@BeforeClass
public static void closeApplication() throws Exception {
if (application != null) {
application.stop();
}
if (httpClient != null) {
httpClient.close();
}
}
private static Response callGet(String uri, Map<String, String> parameters) throws Exception {
URIBuilder builder = new URIBuilder(String.format(SERVER_URI_PATTERN, SERVICE_PORT, uri));
if (parameters != null) {
parameters.forEach(builder::addParameter);
}
HttpGet get = new HttpGet(builder.build());
get.setConfig(RequestConfig.custom().setConnectTimeout(HTTP_TIMEOUT).build());
try (CloseableHttpResponse response = httpClient.execute(get)) {
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != SC_OK) {
return new Response(statusCode, null);
}
byte[] bytes = ByteStreams.toByteArray(response.getEntity().getContent());
return new Response(statusCode, new String(bytes, Charset.forName("UTF-8")));
}
}
private static Response callPost(String uri, Map<String, String> parameters,
String entity) throws Exception {
URIBuilder builder = new URIBuilder(String.format(SERVER_URI_PATTERN, SERVICE_PORT, uri));
if (parameters != null) {
parameters.forEach(builder::addParameter);
}
HttpPost post = new HttpPost(builder.build());
post.setEntity(new StringEntity(entity));
post.setConfig(RequestConfig.custom().setConnectTimeout(HTTP_TIMEOUT).build());
try (CloseableHttpResponse response = httpClient.execute(post)) {
return new Response(response.getStatusLine().getStatusCode(), null);
}
}
@Test
public void testNotFoundOnNotExistedService() throws Exception {
Response response = callGet("/resources/cars", Collections.emptyMap());
assertEquals("Not correct status code!", SC_NOT_FOUND, response.getCode());
}
@Test
public void testCityParameterMissing() throws Exception {
// Call must be made for /resources/weather/byCity
Response response = callGet("/resources/weather/get/byCity", ImmutableMap
.of("country", "Ukraine"));
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testCountryParameterMissing() throws Exception {
// Call must be made for /resources/weather/byCity
Response response = callGet("/resources/weather/get/byCity", ImmutableMap.of("city", "Kiev"));
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testLongitudeParamMissing() throws Exception {
// Call must be made for /resources/weather/byLocation
Response response = callGet("/resources/weather/get/byLocation", ImmutableMap
.of("latitude", "51.0"));
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testLatutudeParamMissing() throws Exception {
// Call must be made for /resources/weather/byLocation
Response response = callGet("/resources/weather/get/byLocation", ImmutableMap
.of("longitude", "31.0"));
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testCountryParamMissedOnSave() throws Exception {
String measurement = "{\"city\":\"Kiev\",\"weatherCode\":\"CLOUDY\","
+ "\"temperature\":7.0,\"measureTime\":\"2017-11-11T10:00:00\"}";
// Call must be made for /resources/weather/byCity
Response response = callPost("/resources/weather/submit/measurement", Collections
.emptyMap(), measurement);
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testLocationParamMissedOnSave() throws Exception {
String measurement = "{\"weatherCode\":\"CLOUDY\","
+ "\"temperature\":7.0,\"measureTime\":\"2017-11-11T10:00:00\"}";
// Call must be made for /resources/weather/byCity
Response response = callPost("/resources/weather/submit/measurement", Collections
.emptyMap(), measurement);
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testCityParamMissedOnSave() throws Exception {
String measurement = "{\"country\":\"Ukraine\",\"weatherCode\":\"CLOUDY\","
+ "\"temperature\":7.0,\"measureTime\":\"2017-11-11T10:00:00\"}";
// Call must be made for /resources/weather/byCity
Response response = callPost("/resources/weather/submit/measurement", Collections
.emptyMap(), measurement);
assertEquals("Not correct status code!", SC_BAD_REQUEST, response.getCode());
}
@Test
public void testGetKievMeasument() throws Exception {
Measure measure = new Measure(10.0, WeatherCode.SUNNY, LocalDateTime
.parse("2017-01-01T00:00:00").atZone(ZoneOffset.UTC));
when(measurementService.getCurrentWeather("Kiev", "Ukraine")).thenReturn(measure);
// Call must be made for /resources/weather/byCity
Response response = callGet("/resources/weather/get/byCity", ImmutableMap
.of("city", "Kiev", "country", "Ukraine"));
assertEquals("Not correct status code!", SC_OK, response.getCode());
assertEquals("{\"city\":\"Kiev\",\"country\":\"Ukraine\",\"weatherCode\":\"SUNNY\","
+ "\"temperature\":10.0,\"measureTime\":\"2017-01-01T00:00:00\"}", response
.getResponse());
}
@Test
public void testGetSomeLocationMeasument() throws Exception {
Measure measure = new Measure(15.0, WeatherCode.CLOUDY, LocalDateTime
.parse("2017-05-12T00:00:00").atZone(ZoneOffset.UTC));
when(measurementService.getCurrentWeather(31.0, 51.0)).thenReturn(measure);
// Call must be made for /resources/weather/byLocation
Response response = callGet("/resources/weather/get/byLocation", ImmutableMap
.of("longitude", "31.0", "latitude", "51.0"));
assertEquals("Not correct status code!", SC_OK, response.getCode());
assertEquals("{\"location\":{\"longitude\":31.0,\"latitude\":51.0},"
+ "\"weatherCode\":\"CLOUDY\",\"temperature\":15.0,"
+ "\"measureTime\":\"2017-05-12T00:00:00\"}", response.getResponse());
}
@Test
public void testSaveKievMeasument() throws Exception {
String measurement = "{\"city\":\"Kiev\",\"country\":\"Ukraine\",\"weatherCode\":\"CLOUDY\","
+ "\"temperature\":7.0,\"measureTime\":\"2017-11-11T10:00:00\"}";
// Call must be made for /resources/weather/byCity
Response response = callPost("/resources/weather/submit/measurement", Collections
.emptyMap(), measurement);
assertEquals("Not correct status code!", SC_OK, response.getCode());
verify(measurementService, times(1))
.storeMeasure("Kiev", "Ukraine", new Measure(7.0, WeatherCode.CLOUDY, LocalDateTime
.parse("2017-11-11T10:00:00").atZone(ZoneOffset.UTC)));
}
@Test
public void testSaveLocationMeasument() throws Exception {
String measurement =
"{\"location\":{\"longitude\":24.0,\"latitude\":67.0},\"weatherCode\":\"HEAVY_RAIN\","
+ "\"temperature\":17.0,\"measureTime\":\"2016-03-31T10:00:00\"}";
// Call must be made for /resources/weather/byCity
Response response = callPost("/resources/weather/submit/measurement", Collections
.emptyMap(), measurement);
assertEquals("Not correct status code!", SC_OK, response.getCode());
verify(measurementService, times(1))
.storeMeasure(24.0, 67.0, new Measure(17.0, WeatherCode.HEAVY_RAIN, LocalDateTime
.parse("2016-03-31T10:00:00").atZone(ZoneOffset.UTC)));
}
@Test
public void testInternalError() throws Exception {
when(measurementService.getCurrentWeather("Odessa", "Ukraine"))
.thenThrow(new IllegalArgumentException());
// Call must be made for /resources/weather/byCity
Response response = callGet("/resources/weather/get/byCity", ImmutableMap
.of("city", "Odessa", "country", "Ukraine"));
assertEquals("Not correct status code!", SC_INTERNAL_SERVER_ERROR, response.getCode());
}
private static class Response {
private int code;
private String response;
Response(int code, String response) {
this.code = code;
this.response = response;
}
int getCode() {
return code;
}
String getResponse() {
return response;
}
}
}
| [
"[email protected]"
] | |
ea22e1b74671ec9a4323c0a50435a09b9228c0dd | 3ba6bbe435adaac452aa14a5b656b64c5a137cdb | /rcp/src/rcp/ApplicationWorkbenchAdvisor.java | 3bc953bc98fb14128678ce73b68190c4bf88a829 | [] | no_license | wyq9527/test | 59e553d45fde4d44b3d671daf2a3b71b088b8276 | 32ea6a28c250fe4b44037aff0f05a302dd8b0986 | refs/heads/master | 2016-09-05T16:13:53.138694 | 2013-12-07T08:55:39 | 2013-12-07T08:55:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 571 | java | package rcp;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
private static final String PERSPECTIVE_ID = "rcp.perspective";
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
public String getInitialWindowPerspectiveId() {
return PERSPECTIVE_ID;
}
}
| [
"[email protected]"
] | |
f14f4821af0becf108675940289fd10800673e6f | 643520557d3ad53126374535a1464ea3aef40afb | /src/main/java/com/library/mdct/dao/LibraryDAO.java | 6cfbca9e0beb7004323017a62abba7b1fb960439 | [] | no_license | luckyjyp/mdctpro | 3052cd602e0e365ce239d68f47dc48fba4bd58b5 | a7bb4afdf0f9ed5d6245bbbefa455a8e163b4941 | refs/heads/master | 2021-01-22T05:42:41.079304 | 2017-06-19T08:54:02 | 2017-06-19T08:54:02 | 92,488,299 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 628 | java | package com.library.mdct.dao;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.library.mdct.dto.BookVO;
import com.library.mdct.dto.LibraryVO;
public interface LibraryDAO {
//전체리스트
public List<? extends Object> searchList() throws Exception;
//상세정보조회
public Object oneSearch(String obj) throws Exception;
//정보삽입
public void insert(Map<String, String> map) throws Exception;
//정보변경
public void update(Map<String, String> map) throws Exception;
//정보삭제
public void delete(String obj) throws Exception;
}
| [
"[email protected]"
] | |
329755b3b0e9c848a5fe3d7f0eaf6c7356c7b41c | fffc8497ffbdfbe25c5d7ce22b20604d5ccfb25a | /baseanti/src/main/java/com/jdcloud/sdk/service/baseanti/model/DescribeIpResourceInfoResponse.java | a67e71b4886341432b8ee6b39a10111dedea6de9 | [
"Apache-2.0"
] | permissive | edwinlly/jdcloud-sdk-java | 71cca4c5232d6162abd00d1f86ecb03a606864f5 | 2ba0cf0bf16f17c7b7ead7c7abecd4e918379f80 | refs/heads/master | 2020-04-09T03:13:59.854171 | 2018-11-29T06:56:29 | 2018-11-29T06:56:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,112 | java | /*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* DDoS基础防护相关接口
* DDoS基础防护相关接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.baseanti.model;
import com.jdcloud.sdk.service.JdcloudResponse;
/**
* 查询公网Ip基本信息
*/
public class DescribeIpResourceInfoResponse extends JdcloudResponse<DescribeIpResourceInfoResult> implements java.io.Serializable {
private static final long serialVersionUID = 1L;
} | [
"[email protected]"
] | |
e9c477f98bce08bc37ca5c7545e1c5705886487b | 64c82f85d6d6183184287539617418add513a353 | /src/阶段性案例/Main3V2.java | 5ae04118814e09ed92ef094a7ac562144d8df13c | [] | no_license | weixianfei/xx.java.wyzc | a2470bfdb63b5dd896b5a79aa0bd40c25cab05b9 | 066ad24906e3bc59b21b08cb5c35739927a7fb17 | refs/heads/master | 2021-01-10T01:39:48.150417 | 2015-09-30T14:32:43 | 2015-09-30T14:32:43 | 43,438,637 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,086 | java | package 阶段性案例;
import java.util.Scanner;
public class Main3V2 {
public static void main(String[] args) {
Scanner scanner= new Scanner(System.in);
Student student =new Student();
System.out.println("请输入学生姓名:");
student.setName(scanner.nextLine());
System.out.println("请输入学生数学成绩:");
student.setMath(scanner.nextFloat());
System.out.println("请输入学生英语成绩:");
student.setEnglish(scanner.nextFloat());
System.out.println("请输入学生计算机成绩:");
student.setComputer(scanner.nextFloat());
System.out.println(student);//如果要用这种方法一次输出学生所有信息,要用到toString方法
System.out.println("三科总成绩:");
System.out.println(student.getScoreSum());
System.out.println("最好成绩:");
System.out.println(student.getMax());
System.out.println("最差成绩:");
System.out.println(student.getMin());
System.out.println("三科平均成绩:");
System.out.println(student.getScoreAvg());
}
}
| [
"Administrator@WXF-T430i"
] | Administrator@WXF-T430i |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.