blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
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
684M
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
132 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
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
62e7cc6337d94be95de5e859317c2945f3a9dc1e
1bbd2e653317da390af5ba7eace7109bd52895fa
/src/com/company/ProductsInRow.java
82ddbd4680fbd084175ffc9bc2ba35e474e17823
[]
no_license
xchoavagyan/Vending_Machine
5e4455545a29d9e1f7d7b4952a4638412a88a3a1
e9c1a8f231a98623fe466a543f67f7029ae129c6
refs/heads/master
2020-12-26T06:20:22.164116
2020-01-31T11:47:28
2020-01-31T11:47:28
237,415,270
0
0
null
null
null
null
UTF-8
Java
false
false
1,823
java
package com.company; import com.company.products.Product; import java.util.ArrayList; public class ProductsInRow { //region Properties private ArrayList<ProductList> productListsInRow; //endregion //region Constructors public ProductsInRow(Product product1, Product product2, Product product3) { makeProductsRow(product1, product2, product3); } //endregion //region public Methods private ArrayList<ProductList> makeProductsRow(Product product1, Product product2, Product product3) { this.productListsInRow = new ArrayList<ProductList>(); this.productListsInRow.add(new ProductList(product1)); this.productListsInRow.add(new ProductList(product2)); this.productListsInRow.add(new ProductList(product3)); return productListsInRow; } //endregion //region Getters and Setters public ArrayList<ProductList> getProductListsInRow() { return productListsInRow; } public void setProductListsInRow(ArrayList<ProductList> productListsInRow) { this.productListsInRow = productListsInRow; } //endregion //region Equals HashCode toString @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ProductsInRow that = (ProductsInRow) o; return productListsInRow != null ? productListsInRow.equals(that.productListsInRow) : that.productListsInRow == null; } @Override public int hashCode() { return productListsInRow != null ? productListsInRow.hashCode() : 0; } @Override public String toString() { return "ProductsInRow{" + "productListsInRow=" + productListsInRow + '}'; } //endregion }
[ "khchoavagyan@gmail.com" ]
khchoavagyan@gmail.com
e1467c641daf3d30a70263569185be558dc70b88
1275b896a8fece1603fee1556238fee870385fe4
/src/net/scapeemulator/game/msg/handler/item/GroundItemOptionMessageHandler.java
32ab5ba7fe2def610feb2a844fb2515de7286515
[ "ISC" ]
permissive
Ashi/moparscape530
ca02dfa8f0a4c111fe086b22536129c99f8748df
b473826481b1fcf7e7f09aa3ad50ac8c48bf70ca
refs/heads/master
2021-01-21T18:50:41.512604
2014-10-05T20:57:39
2014-10-05T20:57:39
27,652,156
1
0
null
null
null
null
UTF-8
Java
false
false
2,047
java
/** * Copyright (c) 2012, Hadyn Richard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package net.scapeemulator.game.msg.handler.item; import net.scapeemulator.game.dispatcher.grounditem.GroundItemDispatcher; import net.scapeemulator.game.model.Position; import net.scapeemulator.game.model.player.Player; import net.scapeemulator.game.msg.MessageHandler; import net.scapeemulator.game.msg.impl.grounditem.GroundItemOptionMessage; /** * Created by Hadyn Richard */ public final class GroundItemOptionMessageHandler extends MessageHandler<GroundItemOptionMessage> { private final GroundItemDispatcher dispatcher; public GroundItemOptionMessageHandler(GroundItemDispatcher dispatcher) { this.dispatcher = dispatcher; } @Override public void handle(Player player, GroundItemOptionMessage message) { dispatcher.handle(player, message.getId(), new Position(message.getX(), message.getY()), message.getOption()); } }
[ "davidtheinsley@comcast.net" ]
davidtheinsley@comcast.net
a794dbeb363b03b1a2699e5524a05e53356e0617
f2bd083ebc26faa924f563f3db5685e75ef93f71
/tddl-group/src/main/java/com/taobao/tddl/group/exception/TAtomDataSourceException.java
5f74e45ce4dd20806878d38fbdbd7a84d232202e
[ "Apache-2.0" ]
permissive
hejianzxl/TDDL-1
bf942c10d8e42d4a8f3e3eadb0c262fcaa03f299
33ab99c37ae8b927f1cd3294d1ec8aa31b71c84b
refs/heads/master
2022-07-01T08:56:47.798878
2015-08-18T02:55:16
2015-08-18T02:55:16
144,922,536
0
0
Apache-2.0
2022-06-21T04:20:21
2018-08-16T01:48:15
Java
UTF-8
Java
false
false
657
java
package com.taobao.tddl.group.exception; //jdk1.5 java.sql.SQLException没有带Throwable cause的构造函数 //public class TAtomDataSourceException extends java.sql.SQLException { /** * @author yangzhu */ public class TAtomDataSourceException extends RuntimeException { private static final long serialVersionUID = -1L; public TAtomDataSourceException(){ super(); } public TAtomDataSourceException(String msg){ super(msg); } public TAtomDataSourceException(Throwable cause){ super(cause); } public TAtomDataSourceException(String msg, Throwable cause){ super(msg, cause); } }
[ "mengshi.sunmengshi@taobao.com" ]
mengshi.sunmengshi@taobao.com
4b256f8fe4ce51ee6dd888dcb13879de9a2b7b9f
e4964a40fa6880c3557a24cb6f0bcacd97a05a54
/src/main/java/hu/simplesoft/dualis/library/configuration/PersistenceJPAConfig.java
28f5cb19386af877aa53d73d65f3f3380591a73c
[]
no_license
molnar75/Library
5c01dbc1a81eac634c08aceb970724f126540d64
99f2fdfa5534163e33ad54d7b627f11a07ec0402
refs/heads/master
2020-04-08T23:39:38.401463
2019-01-24T12:05:52
2019-01-24T12:05:52
159,794,962
0
0
null
null
null
null
UTF-8
Java
false
false
2,901
java
package hu.simplesoft.dualis.library.configuration; import java.util.Properties; import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.orm.jpa.JpaTransactionManager; import org.springframework.orm.jpa.JpaVendorAdapter; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @EnableTransactionManagement @EnableWebMvc @ComponentScan ({"hu.simplesoft.dualis.library"}) public class PersistenceJPAConfig implements WebMvcConfigurer { @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); em.setDataSource(dataSource()); em.setPackagesToScan(new String[] { "hu.simplesoft.dualis.library.data.entity" }); JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); em.setJpaVendorAdapter(vendorAdapter); em.setJpaProperties(additionalProperties()); return em; } @Bean public DataSource dataSource(){ DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost:3306/library?serverTimezone=Europe/Budapest"); dataSource.setUsername( "username" ); dataSource.setPassword( "password" ); return dataSource; } @Bean public PlatformTransactionManager transactionManager( EntityManagerFactory emf){ JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(emf); return transactionManager; } @Bean public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){ return new PersistenceExceptionTranslationPostProcessor(); } Properties additionalProperties() { Properties properties = new Properties(); properties.setProperty("hibernate.hbm2ddl.auto", "update"); properties.setProperty( "hibernate.dialect", "org.hibernate.dialect.MySQL5Dialect"); return properties; } }
[ "molnar.fanni@simplesoft.hu" ]
molnar.fanni@simplesoft.hu
b4e2f208ad796af10b652e50cde84ef9af3ceec8
e2ebc0c49911288fb316c046976fdc17a0613714
/CSD201/CSDEquation/src/csdequation/Equation.java
73b5e00a29c6cd12020a4ce656c1b19910a40bd7
[]
no_license
LuuPhuongUyen/Java
be4849777ccb1bf30c791376d9395fd99b954001
4603db2bc75d791b3d36cbb29c822172af164177
refs/heads/master
2023-01-30T16:50:04.534382
2020-12-17T17:07:55
2020-12-17T17:07:55
322,339,657
1
0
null
null
null
null
UTF-8
Java
false
false
1,657
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 csdequation; /** * * @author PC */ public class Equation { public double quadracticEquation() { while (true) { System.out.print("\nEnter a = "); double a = Validation.checkInputDouble(); System.out.print("Enter b = "); double b = Validation.checkInputDouble(); System.out.print("Enter c = "); double c = Validation.checkInputDouble(); if (a == 0) { if (b == 0) { if (c == 0) { System.out.println("True with all x"); } else { System.out.println("No root"); } } else { double x = -c / b; System.out.println("One solution x = " + x); } } else { double delta = b * b - 4 * a * c; if (delta < 0) { System.out.println("No root"); } else if (delta == 0) { double x = -b / (2 * a); System.out.println("Two roots x1 = x2 = " + x); } else { double x1 = (-b + Math.sqrt(delta)) / (2 * a); double x2 = (-b - Math.sqrt(delta)) / (2 * a); System.out.println("Two distinct roots x1 = " + x1 + ", x2 = " + x2); } return 0; } } } }
[ "luuphuonguyen1485@gmail.com" ]
luuphuonguyen1485@gmail.com
8bae1ef5102e3d64b3580d7a0edbb40971660f2e
9d6c509a96239a642d4893f7276a9b510cbd8d00
/src/main/java/com/github/onsdigital/index/enrichment/model/request/EnrichResourceRequest.java
c51f47fee24cdbb9bbab0238b6d3841f3b5b1f86
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
ONSdigital/dp-publish-enrich-search
8efe2171a3f8430a0f500493adad9d4d96f259bf
42211173b683d81eba4af77c5c0df31cf948d748
refs/heads/develop
2021-01-09T05:46:58.733548
2017-02-20T13:43:33
2017-02-20T13:43:33
80,831,753
2
1
null
2019-08-18T11:27:27
2017-02-03T13:32:59
Java
UTF-8
Java
false
false
1,504
java
package com.github.onsdigital.index.enrichment.model.request; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Request the enrichment of a document based on a file resource */ public class EnrichResourceRequest implements PipelineRequest { private String s3Location; private String fileLocation; public String getS3Location() { return s3Location; } public EnrichResourceRequest setS3Location(final String s3Location) { this.s3Location = s3Location; return this; } public String getFileLocation() { return fileLocation; } public EnrichResourceRequest setFileLocation(final String fileLocation) { this.fileLocation = fileLocation; return this; } @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final EnrichResourceRequest that = (EnrichResourceRequest) o; return new EqualsBuilder() .append(getS3Location(), that.getS3Location()) .append(getFileLocation(), that.getFileLocation()) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(17, 37) .append(getS3Location()) .append(getFileLocation()) .toHashCode(); } }
[ "james.fawke@g4pas.co.uk" ]
james.fawke@g4pas.co.uk
52267103681e7c602f5609378cdb5e188acfb5ac
c45face9d2d8944110ab56ecaa14a80e84d448a1
/src/main/java/com/phei/netty/basic/TimeServerHandler.java
9fb3c3f61ce71a467f254126b8288d5b5761e723
[]
no_license
nquanhao001/netty-in-action
7d7ea579c5a19be2270a659ad6b89d072dcb1380
2e497496ca5b5173763565c5386a490810160769
refs/heads/master
2021-01-01T03:39:24.656178
2016-09-19T07:37:59
2016-09-19T07:37:59
56,896,743
5
0
null
null
null
null
UTF-8
Java
false
false
2,242
java
/* * Copyright 2012 The Netty Project * * The Netty 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 com.phei.netty.basic; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; /** * @author lilinfeng * @version 1.0 * @date 2014年2月14日 */ public class TimeServerHandler extends ChannelHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { ByteBuf buf = (ByteBuf) msg; int count = buf.readableBytes();//获取缓冲区可读的字节数 byte[] req = new byte[count]; buf.readBytes(req);//把缓冲区的字节数组复制到新建的req数组 String body = new String(req, "UTF-8"); System.out.println("The time server receive order : " + body); String currentTime = "QUERY TIME ORDER".equalsIgnoreCase(body) ? new java.util.Date( System.currentTimeMillis()).toString() : "BAD ORDER"; ByteBuf resp = Unpooled.copiedBuffer(currentTime.getBytes()); ctx.write(resp);//为了防止频繁唤醒Selector进行消息发送,write方法并不直接将消息写入SocketChannel中,调用write方法只是把待发送消息放到发送缓冲数组中,flus才会把缓冲区数据写到scoketChannel中 } @Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { ctx.flush();//把消息发送队列中的消息写入到socketChannel中发送出去 } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { ctx.close(); } }
[ "407361943@qq.com" ]
407361943@qq.com
8ffa37cde1dd4efe675f3124fb0861a61475534c
35c3bc23c4def46a836eace121fbce5e405cacea
/app/src/main/java/com/br/sweetmusic/pojos/Tracks.java
253c326ca2aa1fc664e295ebceb54f5e3675ff1f
[]
no_license
sweetmusicapp/SweetMusic
759eaabc591d6c7ca6fb50b1debb8a0e9c1ce72b
7ea89c29742becbe96221ed403e4dfb69746679b
refs/heads/desenvolvimento
2020-07-19T03:45:14.135657
2019-12-06T01:34:18
2019-12-06T01:34:18
206,368,296
3
0
null
2019-12-06T01:09:56
2019-09-04T16:51:37
Java
UTF-8
Java
false
false
318
java
package com.br.sweetmusic.pojos; import com.google.gson.annotations.Expose; import java.util.List; public class Tracks { @Expose private List<Track> track; public List<Track> getTrack() { return track; } public void setTrack(List<Track> track) { this.track = track; } }
[ "limas.mayara@gmail.com" ]
limas.mayara@gmail.com
529ce30a2ce1811de05f14572830c8bd50ae501a
690ab1b4edc08bf2489fb8aa10e644f55d4ec6d1
/app/src/main/java/com/example/cxx/learnrecyclerview/MainActivity.java
3e1ea328372e2ead3d5105673dd38e7d5b77e10f
[]
no_license
Simolf/LearnRecyclerView
7bf393d449605de9ed2945f49a3d5309cf45b79f
0ad61e365faaf6e396ceed52140b291534aac8be
refs/heads/master
2021-01-10T15:45:05.416727
2016-04-10T15:46:20
2016-04-10T15:46:20
55,907,849
0
0
null
null
null
null
UTF-8
Java
false
false
1,605
java
package com.example.cxx.learnrecyclerview; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutCompat; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.Toast; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //获取RecyclerView对象 final RecyclerView recyclerView = (RecyclerView)findViewById(R.id.recycler); //创建线性布局管理器(默认垂直布局) final LinearLayoutManager layoutManager = new LinearLayoutManager(this); //为RecyclerView指定布局管理对象 recyclerView.setLayoutManager(layoutManager); //创建Adapter MyAdapter myAdapter= new MyAdapter(); recyclerView.setAdapter(myAdapter); //设置分割线 recyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST)); //设置自定义点击事件 myAdapter.setOnItemCliclListener(new MyAdapter.OnRecyclerViewItemClickListener() { @Override public void onItemClick(View view, String data) { Toast.makeText(MainActivity.this,data,Toast.LENGTH_SHORT).show(); } }); } }
[ "964648168@qq.com" ]
964648168@qq.com
d023f044bbc565276d15cdeff120ed687903f77b
5941aa98b0cb69dc6d8ec7cdff0fc86d96c7d213
/app/src/main/java/vision/genesis/ui/UiComponent.java
b3b537cf4f340b76b811d9a4a44bff4ddd3ce833
[]
no_license
SergeiVasilenko/borrow-friend-android
e4a63c42d95a0697c30a081e04e9b55b2b0e1a22
68f0fe87fb9c1517d78417a408b2830285423879
refs/heads/master
2021-01-20T03:53:47.113647
2017-04-27T14:01:56
2017-04-27T14:01:56
89,603,812
1
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package vision.genesis.ui; import dagger.Subcomponent; import vision.genesis.ui.auth.AuthActivity; import vision.genesis.ui.common.BaseActivity; import vision.genesis.ui.insert.InsertActivity; import vision.genesis.ui.main.MainActivity; import vision.genesis.ui.main.dashboard.DashboardPresenter; import vision.genesis.ui.main.loan.AskListPresenter; import vision.genesis.ui.main.loan.OfferListPresenter; import vision.genesis.ui.order.DealActivity; import vision.genesis.ui.order.HeaderPresenter; @UiScope @Subcomponent public interface UiComponent { void injectToBaseActivity(BaseActivity activity); void inject(MainActivity activity); void inject(AuthActivity authActivity); void inject(OfferListPresenter offerListPresenter); void inject(AskListPresenter askListPresenter); void inject(InsertActivity insertActivity); void inject(DealActivity dealActivity); void inject(HeaderPresenter headerPresenter); void inject(DashboardPresenter presenter); @Subcomponent.Builder interface UiComponentBuilder { UiComponent build(); } }
[ "vasilenko.sn@gmail.com" ]
vasilenko.sn@gmail.com
b71af19f2d8abda90f52d7bded3b7a6da2d0ee09
b6ba1bea35dcaa6b72a8df96f51dfeb20c2fe14a
/src/study/序列化/SerializableDemo.java
5b7f07ca1c0579000b4d699010d0e1cbba927aaf
[]
no_license
YinWangPing/algorithm-study
31896d7f488e261c18448f080fa3849d2ec94df8
4843b972fad06b5232836769e33e924520b69c94
refs/heads/master
2021-01-03T04:35:50.491579
2020-06-29T01:32:19
2020-06-29T01:32:19
239,924,456
0
0
null
null
null
null
UTF-8
Java
false
false
2,546
java
package study.序列化; import java.io.*; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; class Student implements Serializable{ private static final long serialVersionUID = 1L; private String name; transient private String address; private Integer age; private static String tel="177712333854"; private String tag; public Student(){} public Student(String name, String address, Integer age) { this.name = name; this.address = address; this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public static String getTel() { return tel; } public static void setTel(String tel) { Student.tel = tel; } public String getTag() { return tag; } public void setTag(String tag) { this.tag = tag; } @Override public String toString() { return "Student{" + "name='" + name + '\'' + ", address='" + address + '\'' + ", age=" + age + '}'; } } public class SerializableDemo { public static void main(String[] args) throws IOException, ClassNotFoundException { // Student student=new Student("张三","湖南省隆回县",20); // ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream("C:\\Users\\cug125\\Desktop\\a.txt")); // oos.writeObject(student); // ObjectInputStream ooi=new ObjectInputStream(new FileInputStream("C:\\Users\\cug125\\Desktop\\a.txt")); //// Student student1= (Student) ooi.readObject(); //// System.out.println(student1); ArrayList<Integer> list1=new ArrayList<>(150); for (int i = 0; i <100 ; i++) { list1.add(i); } ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream("C:\\Users\\cug125\\Desktop\\a.txt")); oos.writeObject(list1); ObjectInputStream ooi=new ObjectInputStream(new FileInputStream("C:\\Users\\cug125\\Desktop\\a.txt")); ArrayList<Integer>list2=(ArrayList<Integer>) ooi.readObject(); for (int x:list2) { System.out.print(x+"\t"); } } }
[ "1648771485@qq.com" ]
1648771485@qq.com
61dbada8c13d4e6832e081d2d37c965ac0e53b06
995f73d30450a6dce6bc7145d89344b4ad6e0622
/MATE-20_EMUI_11.0.0/src/main/java/com/huawei/displayengine/$$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE.java
324a6c054ee654f91c5f9a787afc7e6d634839f8
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
806
java
package com.huawei.displayengine; import com.huawei.displayengine.ImageProcessor; import java.util.function.Consumer; /* renamed from: com.huawei.displayengine.-$$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE reason: invalid class name */ /* compiled from: lambda */ public final /* synthetic */ class $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE implements Consumer { public static final /* synthetic */ $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE INSTANCE = new $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE(); private /* synthetic */ $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE() { } @Override // java.util.function.Consumer public final void accept(Object obj) { ((ImageProcessor.BitmapConfigTransformer) obj).doPreTransform(); } }
[ "dstmath@163.com" ]
dstmath@163.com
dbf8b40f1029b59bf36b5b2434ba15a58ba1931b
fceee6b1c44fd20cc3157eee594daf6c47aa9e36
/src/BasicAlgorithm/Graph/BfsPractice.java
4a1820b18316f3e5da3aa41d9a17554c8c596e47
[]
no_license
sysout-achieve/Algorithm
3ac5015d4f45e162826bdbba8305cbdd6ba17c7d
d36e7734c8bff3e767bd78baa4e0124581b2cdc7
refs/heads/master
2023-05-08T22:04:57.148039
2021-05-16T08:54:25
2021-05-16T08:54:25
299,278,622
0
1
null
null
null
null
UTF-8
Java
false
false
3,161
java
package BasicAlgorithm.Graph; import java.util.ArrayDeque; import java.util.Queue; import java.util.Scanner; public class BfsPractice { static int n; static int[] nx = {1, -1, 0, 0}; static int[] ny = {0, 0, 1, -1}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int landNum = 0; int result = Integer.MAX_VALUE; n = sc.nextInt(); int[][] land = new int[n][n]; int[][] group = new int[n][n]; boolean[][] visited = new boolean[n][n]; Queue<int[]> q = new ArrayDeque<>(); for (int j = 0; j < n; j++) { for (int i = 0; i < n; i++) { int input = sc.nextInt(); land[i][j] = input; if (input == 1) { visited[i][j] = true; q.offer(new int[]{i, j}); } } } for (int j = 0; j < n; j++) { for (int i = 0; i < n; i++) { Queue<int[]> groupQ = new ArrayDeque<>(); if (land[i][j] == 1 && group[i][j] == 0) { groupQ.offer(new int[]{i, j}); landNum++; group[i][j] = landNum; while (!groupQ.isEmpty()) { int[] p = groupQ.remove(); for (int k = 0; k < 4; k++) { int dx = p[0] + nx[k]; int dy = p[1] + ny[k]; if (dx >= 0 && dy >= 0 && dx < n && dy < n) { if (land[dx][dy] == 1 && group[dx][dy] == 0) { group[dx][dy] = landNum; groupQ.offer(new int[]{dx, dy}); } } } } } } } while (!q.isEmpty()) { int[] p =q.remove(); for (int k = 0; k < 4; k++) { int dx = p[0] + nx[k]; int dy = p[1] + ny[k]; if (dx >= 0 && dy >= 0 && dx < n && dy < n) { if (!visited[dx][dy]) { group[dx][dy]= group[p[0]][p[1]]; q.offer(new int[]{dx, dy}); visited[dx][dy] = true; } } } } System.out.print(result); System.out.print("\n"); System.out.print("\n"); System.out.print("\n"); for (int j = 0; j < n; j++) { for (int i = 0; i < n; i++) { System.out.print(land[i][j] + " "); } System.out.print("\n"); } for (int j = 0; j < n; j++) { for (int i = 0; i < n; i++) { System.out.print(group[i][j] + " "); } System.out.print("\n"); } // for (int j = 0; j < n; j++) { // for (int i = 0; i < n; i++) { // System.out.print(dist[i][j] + " "); // } // System.out.print("\n"); // } } }
[ "0408gun@gmail.com" ]
0408gun@gmail.com
b3702fbb66f7354a5b2232365802216dd1d10810
769bb4fe63250c004f317356fbc91246851131be
/app/src/main/java/com/shuvo/usad/Asad.java
4bb8973a49736c515af5a0b078f36307b2006249
[]
no_license
mahodiatik/USAD
7db5a3bcf1d0c21eb2be492ba1611c8eb9e85e41
cf426a2ff79962c2b38c2213c6ce80536c6571ce
refs/heads/master
2020-09-21T07:03:51.251039
2019-12-06T14:10:16
2019-12-06T14:10:16
224,718,675
0
0
null
null
null
null
UTF-8
Java
false
false
1,293
java
package com.shuvo.usad; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.text.util.Linkify; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Asad extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_asad); Button call = (Button)findViewById(R.id.call); call.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent calli=new Intent(Intent.ACTION_DIAL); calli.setData(Uri.parse("tel:01758069434")); startActivity(calli); } }); Button fb = (Button)findViewById(R.id.fb); fb.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String url = "https://www.facebook.com/profile.php?id=100009241333640"; Intent i=new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); } }); } }
[ "mahodiatik@users.noreply.github.com" ]
mahodiatik@users.noreply.github.com
ceb535379e7c2737600f1f04d45137a7adf055a8
df81eb4063a09417000107ae494c156b174eb666
/src/br/com/sys/bean/Pedidos_comandasBean.java
94b4080c96a0ed836dd1d60bb101b72a47e21295
[]
no_license
FtriL/tcc
fb4877d09d995b712a10a2e917740876b0ccb2b3
4283f31f2d1c809610ac3dd5dd245bf1b3697962
refs/heads/master
2020-03-25T12:27:09.133210
2018-08-13T16:55:58
2018-08-13T16:55:58
143,777,134
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package br.com.sys.bean; public class Pedidos_comandasBean { private int idPedido_Comanda; private int idPedido; private int idComanda; public int getIdPedido_Comanda() { return idPedido_Comanda; } public void setIdPedido_Comanda(int idPedido_Comanda) { this.idPedido_Comanda = idPedido_Comanda; } public int getIdPedido() { return idPedido; } public void setIdPedido(int idPedido) { this.idPedido = idPedido; } public int getIdComanda() { return idComanda; } public void setIdComanda(int idComanda) { this.idComanda = idComanda; } }
[ "100392@SALA119.proway.treina" ]
100392@SALA119.proway.treina
99f880f7d37482737aa27db6e0279a8024123dcc
fb56bbda14e07ef7ae180bf61c109383b328a629
/app/src/main/java/com/example/news/bean/Note.java
b92f87ec0ca8f83e24ecb8bbb0302445197d5824
[]
no_license
likeyewan/news
392d427f16acbe34405df623775be588928c2de4
ae035ca291145c4d4ec5b1639e4baaa21c23972d
refs/heads/master
2022-11-11T19:35:30.325964
2020-07-01T02:40:08
2020-07-01T02:40:08
276,264,326
0
0
null
null
null
null
UTF-8
Java
false
false
3,022
java
package com.example.news.bean; import org.litepal.crud.LitePalSupport; import org.litepal.exceptions.DataSupportException; import java.io.Serializable; /** * Created by ${WLX} on 2019/5/12. */ public class Note extends LitePalSupport implements Serializable{ private int id; //笔记ID private String groupName;//笔记分组,便于管理 private String content; //笔记内容 private String title; //笔记标题,用于在RecyclerView中展示 private String previewContent; //笔记预览显示的内容,也是用于Recyclerview private String createTime; //笔记日期 private int year; private int month; private int day; private int hour; private int minute; private int isAlarm;//是否设置了闹铃 private int isRepeat;//是否每天重复 private String username; private String password; public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public int getIsRepeat() { return isRepeat; } public void setIsRepeat(int isRepeat) { this.isRepeat = isRepeat; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public int getMonth() { return month; } public void setMonth(int month) { this.month = month; } public int getDay() { return day; } public void setDay(int day) { this.day = day; } public int getHour() { return hour; } public void setHour(int hour) { this.hour = hour; } public int getMinute() { return minute; } public void setMinute(int minute) { this.minute = minute; } public int getIsAlarm() { return isAlarm; } public void setIsAlarm(int isAlarm) { this.isAlarm = isAlarm; } public String getGroupName() { return groupName; } public void setGroupName(String groupName) { this.groupName = groupName; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getPreviewContent() { return previewContent; } public void setPreviewContent(String previewContent) { this.previewContent = previewContent; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } }
[ "1581758352@qq.com" ]
1581758352@qq.com
e1e4d50c74597cb0d7845c7f1decd4f99a212e98
7be475d8f2eeb30acfb63f5c034b464433e416ff
/zuihou-backend/zuihou-demo/zuihou-demo-server/src/main/java/com/github/zuihou/demo/config/ExceptionConfiguration.java
adc48e78def62b77e9f1368139d5d823080ead27
[ "Apache-2.0" ]
permissive
jollroyer/zuihou-admin-cloud
34b7f7766ca6bd231b3b57e7eab5336e9b0439e0
673ea6a5d845c8cd5006c0cd0b570b08a3596be0
refs/heads/master
2020-12-03T22:19:27.334015
2020-01-03T03:23:20
2020-01-03T03:23:20
231,504,256
0
0
Apache-2.0
2020-01-03T03:21:51
2020-01-03T03:21:51
null
UTF-8
Java
false
false
679
java
package com.github.zuihou.demo.config; import com.github.zuihou.common.handler.DefaultGlobalExceptionHandler; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; /** * 全局异常处理 * * @author zuihou * @date 2020年01月02日17:19:27 */ @Configuration @ControllerAdvice(annotations = {RestController.class, Controller.class}) @ResponseBody public class ExceptionConfiguration extends DefaultGlobalExceptionHandler { }
[ "244387066@qq.com" ]
244387066@qq.com
80ed8166acb3a2ff883128991c48abdd921622d0
a937f69841aaeb884976e7280e0aa4724f6f1c9b
/web-api/src/test/java/marxo/test/local/TenantApiTests.java
2b2870dbdc0d34c009a3b9d842a2d2e5c90a6c31
[]
no_license
yyfearth/marxo
89cc3f85b3e6bab6433ea5f413aa08d402e6f7a0
d8dbe0ac3417632bfda5ee0499273563aa6b8146
refs/heads/master
2021-01-22T06:58:14.573575
2013-12-20T01:13:37
2013-12-20T01:14:00
15,350,813
0
0
null
null
null
null
UTF-8
Java
false
false
1,066
java
package marxo.test.local; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.net.MediaType; import marxo.entity.user.Tenant; import marxo.test.ApiTestConfiguration; import marxo.test.ApiTester; import marxo.test.BasicApiTests; import org.testng.Assert; import org.testng.annotations.Test; import java.util.List; @SuppressWarnings("unchecked") @ApiTestConfiguration public class TenantApiTests extends BasicApiTests { @Test public void getTenants() throws Exception { try (ApiTester apiTester = new ApiTester().basicAuth(email, password)) { apiTester .httpGet(baseUrl + "tenants") .send(); apiTester .isOk() .matchContentType(MediaType.JSON_UTF_8); List<Tenant> tenants = apiTester.getContent(new TypeReference<List<Tenant>>() { }); Assert.assertNotNull(tenants); boolean doesContainThisUser = false; for (Tenant tenant : tenants) { if (tenant.id.equals(reusedUser.tenantId)) { doesContainThisUser = true; break; } } Assert.assertTrue(doesContainThisUser); } } }
[ "masonwan@gmail.com" ]
masonwan@gmail.com
5734064208ff887c9876372af14aa46d6296fe24
e32e34b8630d66b9025c55a654cacaec9dacbae1
/App1_Lab3/app/src/main/java/pl/pollub/app1_lab3/RecivedData.java
f727017eb4ee2f469ec57d0dc8dae8b2a141b2ba
[]
no_license
BadWolfeee/testAndroid
202e92328ee327f460ceb2ab1ed0a34203d8c5a4
859a4449321850becbda83b4a6fe4178695029b9
refs/heads/master
2021-01-23T07:50:38.721708
2017-05-09T11:26:50
2017-05-09T11:26:50
86,456,330
0
0
null
2017-05-09T11:26:50
2017-03-28T12:17:45
Java
UTF-8
Java
false
false
1,450
java
package pl.pollub.app1_lab3; import android.os.Bundle; import android.app.Activity; import android.widget.TextView; import android.widget.EditText; import android.content.Intent; public class RecivedData extends Activity { String inputString, inputString2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recived_data); TextView view = (TextView) findViewById(R.id.displayintentextra); Bundle extras = getIntent().getExtras(); inputString = extras.getString("key"); view.setText(inputString); TextView view1 = (TextView) findViewById(R.id.displayintentextra2); inputString2 = extras.getString("key2"); view1.setText(inputString2); } public void finish() { Intent intent = new Intent(); float x= Float.parseFloat(inputString); float y= Float.parseFloat(inputString2); float ad, sub, mul, div; ad=x+y; sub=x-y; mul=x*y; div=x/y; String a,s,m,d; a= String.valueOf(ad); s= String.valueOf(sub); m= String.valueOf(mul); d= String.valueOf(div); intent.putExtra("returna", a); intent.putExtra("returns", s); intent.putExtra("returnm", m); intent.putExtra("returnd", d); setResult(RESULT_OK, intent); super.finish(); } }
[ "doseofmilka@gmail.com" ]
doseofmilka@gmail.com
6afde2b4c0586667944a50d266d1a7832a66ebb8
04174ddb97f50a1d8292527d89e2716aff1593bb
/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractSingleBeanDefinitionParser.java
1af76f6d90539f35f21a1298de1e7b30c105bdd4
[ "Apache-2.0" ]
permissive
long-64/spring-framework-5.1.10.RELEASE
fef5eb5c00e829fde901183dd6b427a27c5622b3
ed259bb6baa04b6f8ff8cb4d8a55dc33b05ef100
refs/heads/master
2023-04-25T13:46:23.397297
2021-05-03T07:14:10
2021-05-03T07:14:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,371
java
/* * Copyright 2002-2017 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 * * https://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.springframework.beans.factory.xml; import org.w3c.dom.Element; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.lang.Nullable; /** * Base class for those {@link BeanDefinitionParser} implementations that * need to parse and define just a <i>single</i> {@code BeanDefinition}. * * <p>Extend this parser class when you want to create a single bean definition * from an arbitrarily complex XML element. You may wish to consider extending * the {@link AbstractSimpleBeanDefinitionParser} when you want to create a * single bean definition from a relatively simple custom XML element. * * <p>The resulting {@code BeanDefinition} will be automatically registered * with the {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}. * Your job simply is to {@link #doParse parse} the custom XML {@link Element} * into a single {@code BeanDefinition}. * * @author Rob Harrop * @author Juergen Hoeller * @author Rick Evans * @since 2.0 * @see #getBeanClass * @see #getBeanClassName * @see #doParse */ public abstract class AbstractSingleBeanDefinitionParser extends AbstractBeanDefinitionParser { /** * Creates a {@link BeanDefinitionBuilder} instance for the * {@link #getBeanClass bean Class} and passes it to the * {@link #doParse} strategy method. * @param element the element that is to be parsed into a single BeanDefinition * @param parserContext the object encapsulating the current state of the parsing process * @return the BeanDefinition resulting from the parsing of the supplied {@link Element} * @throws IllegalStateException if the bean {@link Class} returned from * {@link #getBeanClass(org.w3c.dom.Element)} is {@code null} * @see #doParse * * * 解析bean 定义的模板方法。 */ @Override protected final AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(); String parentName = getParentName(element); if (parentName != null) { builder.getRawBeanDefinition().setParentName(parentName); } Class<?> beanClass = getBeanClass(element); if (beanClass != null) { builder.getRawBeanDefinition().setBeanClass(beanClass); } else { String beanClassName = getBeanClassName(element); if (beanClassName != null) { builder.getRawBeanDefinition().setBeanClassName(beanClassName); } } builder.getRawBeanDefinition().setSource(parserContext.extractSource(element)); BeanDefinition containingBd = parserContext.getContainingBeanDefinition(); if (containingBd != null) { // Inner bean definition must receive same scope as containing bean. builder.setScope(containingBd.getScope()); } if (parserContext.isDefaultLazyInit()) { // Default-lazy-init applies to custom bean definitions as well. builder.setLazyInit(true); } doParse(element, parserContext, builder); return builder.getBeanDefinition(); } /** * Determine the name for the parent of the currently parsed bean, * in case of the current bean being defined as a child bean. * <p>The default implementation returns {@code null}, * indicating a root bean definition. * @param element the {@code Element} that is being parsed * @return the name of the parent bean for the currently parsed bean, * or {@code null} if none */ @Nullable protected String getParentName(Element element) { return null; } /** * Determine the bean class corresponding to the supplied {@link Element}. * <p>Note that, for application classes, it is generally preferable to * override {@link #getBeanClassName} instead, in order to avoid a direct * dependence on the bean implementation class. The BeanDefinitionParser * and its NamespaceHandler can be used within an IDE plugin then, even * if the application classes are not available on the plugin's classpath. * @param element the {@code Element} that is being parsed * @return the {@link Class} of the bean that is being defined via parsing * the supplied {@code Element}, or {@code null} if none * @see #getBeanClassName */ @Nullable protected Class<?> getBeanClass(Element element) { return null; } /** * Determine the bean class name corresponding to the supplied {@link Element}. * @param element the {@code Element} that is being parsed * @return the class name of the bean that is being defined via parsing * the supplied {@code Element}, or {@code null} if none * @see #getBeanClass */ @Nullable protected String getBeanClassName(Element element) { return null; } /** * Parse the supplied {@link Element} and populate the supplied * {@link BeanDefinitionBuilder} as required. * <p>The default implementation delegates to the {@code doParse} * version without ParserContext argument. * @param element the XML element being parsed * @param parserContext the object encapsulating the current state of the parsing process * @param builder used to define the {@code BeanDefinition} * @see #doParse(Element, BeanDefinitionBuilder) */ protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { doParse(element, builder); } /** * Parse the supplied {@link Element} and populate the supplied * {@link BeanDefinitionBuilder} as required. * <p>The default implementation does nothing. * @param element the XML element being parsed * @param builder used to define the {@code BeanDefinition} */ protected void doParse(Element element, BeanDefinitionBuilder builder) { } }
[ "17037159+cat0927@users.noreply.github.com" ]
17037159+cat0927@users.noreply.github.com
5f52afaf7fc11c337028e48244d7e6cec6350060
21017a76c972c0d1220bba05a9ffeb75fa620403
/Cadastro/CAPESCadastroBOFachada/src/main/java/br/com/sicoob/capes/cadastro/fachada/bem/BemFachada.java
b1f805aa1481ca1dec745fa95aba8b32e568eee5
[]
no_license
pabllo007/cpes
a1b3b8920c9b591b702156ae36663483cd62a880
f4fc8dce3d487df89ac8f88c41023bc8db91b0c2
refs/heads/master
2022-11-28T02:55:07.675359
2019-10-27T22:17:53
2019-10-27T22:17:53
217,923,554
0
0
null
2022-11-24T06:24:02
2019-10-27T22:13:09
Java
ISO-8859-1
Java
false
false
5,530
java
package br.com.sicoob.capes.cadastro.fachada.bem; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import javax.ejb.EJBTransactionRolledbackException; import javax.persistence.EntityNotFoundException; import javax.persistence.PersistenceException; import br.com.bancoob.excecao.BancoobException; import br.com.bancoob.negocio.dto.ConsultaDto; import br.com.bancoob.persistencia.excecao.ViolacaoIntegridadeException; import br.com.bancoob.sisbrweb.dto.RequisicaoReqDTO; import br.com.bancoob.sisbrweb.dto.RetornoDTO; import br.com.sicoob.capes.cadastro.fachada.EntidadeCadastroFachada; import br.com.sicoob.capes.cadastro.negocio.delegates.AutorizacaoCadastroDelegate; import br.com.sicoob.capes.cadastro.negocio.delegates.BemDelegate; import br.com.sicoob.capes.cadastro.negocio.delegates.CAPESCadastroFabricaDelegates; import br.com.sicoob.capes.cadastro.negocio.vo.DefinicoesComponenteGedVO; import br.com.sicoob.capes.comum.util.Constantes; import br.com.sicoob.capes.negocio.entidades.bem.Bem; /** * Fachada base para as classes que herdam de {@link Bem} * * @author bruno.carneiro * * @param <T> * A classe que herda de {@link Bem} */ public abstract class BemFachada extends EntidadeCadastroFachada<Bem> { protected static final String CHAVE_BEM = "bem"; /** * Construtor padrão da fachada. * * @param chaveMapa */ public BemFachada(String chaveMapa) { super(chaveMapa); } /** * {@inheritDoc} */ @Override protected Bem obterEntidade(RequisicaoReqDTO dto) { return (Bem) dto.getDados().get(chaveMapa); } /** * Método utilizado pelo componente de pesquisa de bens para recuperar o bem * a partir do seu código. * * @param dto * @return * @throws BancoobException */ public RetornoDTO obterPorCodigo(RequisicaoReqDTO dto) throws BancoobException { RetornoDTO retorno = new RetornoDTO(); try { Bem entidade = obterEntidade(dto); ConsultaDto<Bem> criterios = new ConsultaDto<Bem>(); criterios.setFiltro(entidade); retorno.getDados().put(NOME_PADRAO_LISTA, obterDelegate().pesquisar(criterios).getResultado()); } catch (NullPointerException e) { registrarLogNullPointerException(e, dto); } catch (ViolacaoIntegridadeException e) { registrarLogViolacaoIntegridadeException(e, dto); } catch (EJBTransactionRolledbackException e) { registrarLogTransactionRolledbackException(e, dto); } catch (EntityNotFoundException e) { registrarLogEntityNotFoundException(e, dto); } catch (PersistenceException e) { registrarLogPersistenceException(e, dto); } catch (Exception e) {//nosonar registrarLogException(e, dto); } return retorno; } /** * {@inheritDoc} */ @Override protected BemDelegate obterDelegate() { return CAPESCadastroFabricaDelegates.getInstance().criarBemDelegate(); } /** * {@inheritDoc} */ @Override public RetornoDTO obterDados(RequisicaoReqDTO dto) throws BancoobException { try { Bem entidade = obterEntidade(dto); Bem entidadePersistente = consultarEntidade(entidade); AutorizacaoCadastroDelegate autorizacaoCadastroDelegate = obterFabricaDelegates().criarAutorizacaoCadastroDelegate(); entidadePersistente.setDocumentosComprobatorios(autorizacaoCadastroDelegate.obterDocumentosComprobatorios(entidadePersistente)); return obterMapRetorno(this.chaveMapa, entidadePersistente); } catch (NullPointerException e) { registrarLogNullPointerException(e, dto); } catch (ViolacaoIntegridadeException e) { registrarLogViolacaoIntegridadeException(e, dto); } catch (EJBTransactionRolledbackException e) { registrarLogTransactionRolledbackException(e, dto); } catch (EntityNotFoundException e) { registrarLogEntityNotFoundException(e, dto); } catch (PersistenceException e) { registrarLogPersistenceException(e, dto); } catch (Exception e) {//nosonar registrarLogException(e, dto); } return null; } /** * Obtém as definições do GED (Siglas das chaves de negócio). * * @param dto * @return */ protected List<DefinicoesComponenteGedVO> obterDefinicoesGED(RequisicaoReqDTO dto) { Integer codTipoPessoa = (Integer) dto.getDados().get("idTipoPessoa"); List<DefinicoesComponenteGedVO> listaDefinicoesGed = new ArrayList<DefinicoesComponenteGedVO>(); if(codTipoPessoa != null) { Set<String> chavesNegocio = new LinkedHashSet<String>(); chavesNegocio.add(Constantes.Negocio.GED_SIGLA_CHAVE_DOCUMENTO_GRUPO_COMPARTILHAMENTO); chavesNegocio.add(Constantes.Negocio.GED_CHAVE_TIPO_CLASSIFICACAO_BEM); chavesNegocio.add(Constantes.Negocio.GED_CHAVE_TIPO_BEM); List<String> listaSiglas = new ArrayList<String>(); listaSiglas.add(Constantes.Negocio.GED_SIGLA_TIPO_DOCUMENTO_BEM); listaSiglas.add(Constantes.Negocio.GED_SIGLA_LAUDO_AVALIACAO_BEM); listaSiglas.add(Constantes.Negocio.GED_SIGLA_CERTIFICADO_CADASTRO_IMOVEL_RURAL); listaSiglas.add(Constantes.Negocio.GED_SIGLA_IMPOSTO_SOBRE_PROPRIEDADE_TERRITORIAL); listaSiglas.add(Constantes.Negocio.GED_SIGLA_CONTRATO_POSSE_USO_IMOVEL_BENEFICIADO); for (String sigla : listaSiglas) { DefinicoesComponenteGedVO definicaoComponenteGedVO = new DefinicoesComponenteGedVO(); definicaoComponenteGedVO.setIdTipoPessoa(codTipoPessoa.shortValue()); definicaoComponenteGedVO.setSiglaTipoDocumento(sigla); definicaoComponenteGedVO.setChavesNegocio(chavesNegocio); listaDefinicoesGed.add(definicaoComponenteGedVO); } } return listaDefinicoesGed; } }
[ "=" ]
=
41712a83dff9249e15ed541781f4cca71d083d89
65eb977a78ec2ade39e00658665f220cbd32a616
/src/test/java/chap07/section2/StubUserRepository.java
cb1da7fd3a0fce577d27423083c4ebc191cf585b
[]
no_license
S1000f/learn-junit5
dd7eb95bace6b1b98c14dfb7226eb94ba8e21276
336af51913b8717939aec3fc1edf9799dc2bf020
refs/heads/master
2022-12-02T05:16:36.451862
2020-08-14T13:34:37
2020-08-14T13:34:37
272,065,286
0
0
null
null
null
null
UTF-8
Java
false
false
382
java
package chap07.section2; import java.util.HashMap; import java.util.Map; public class StubUserRepository implements UserRepository { private Map<String, User> userMap = new HashMap<>(); @Override public void save(User user) { userMap.put(user.getId(), user); } @Override public User findById(String id) { return userMap.get(id); } }
[ "dohp.kim@gmail.com" ]
dohp.kim@gmail.com
77a40354b308c0bfb8375c0f1025be7ef0379179
fea32f64a65f0c410c9300e5886b50835e8eb059
/SharedWhiteBoard/src/LineBreakSample.java
fd5d6c034dc39415f7dbbff9851456b2723ab882
[]
no_license
acherking/DistributedSharedWhiteBoard
793f6abbf2db4cbf3f95d725a99018ec96b933a7
963b45ac5873908dfbfe8a915da10e16231128d4
refs/heads/master
2023-06-22T07:47:05.867589
2021-07-20T01:33:08
2021-07-20T01:33:08
208,952,305
0
1
null
null
null
null
UTF-8
Java
false
false
3,154
java
import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.font.FontRenderContext; import java.awt.font.LineBreakMeasurer; import java.awt.font.TextLayout; import java.text.AttributedCharacterIterator; import java.awt.Color; /** * This class demonstrates how to line-break and draw a paragraph * of text using LineBreakMeasurer and TextLayout. * * This class constructs a LineBreakMeasurer from an * AttributedCharacterIterator. It uses the LineBreakMeasurer * to create and draw TextLayouts (lines of text) which fit within * the Component's width. */ public class LineBreakSample extends Component { // The LineBreakMeasurer used to line-break the paragraph. private LineBreakMeasurer lineMeasurer; // The index in the LineBreakMeasurer of the first character // in the paragraph. private int paragraphStart; // The index in the LineBreakMeasurer of the first character // after the end of the paragraph. private int paragraphEnd; public LineBreakSample(AttributedCharacterIterator paragraph) { FontRenderContext frc = SampleUtils.getDefaultFontRenderContext(); paragraphStart = paragraph.getBeginIndex(); paragraphEnd = paragraph.getEndIndex(); // Create a new LineBreakMeasurer from the paragraph. lineMeasurer = new LineBreakMeasurer(paragraph, frc); } public void paint(Graphics g) { Graphics2D graphics2D = (Graphics2D) g; // Set formatting width to width of Component. Dimension size = getSize(); float formatWidth = (float) size.width; float drawPosY = 0; lineMeasurer.setPosition(paragraphStart); // Get lines from lineMeasurer until the entire // paragraph has been displayed. while (lineMeasurer.getPosition() < paragraphEnd) { // Retrieve next layout. TextLayout layout = lineMeasurer.nextLayout(formatWidth); // Move y-coordinate by the ascent of the layout. drawPosY += layout.getAscent(); // Compute pen x position. If the paragraph is // right-to-left, we want to align the TextLayouts // to the right edge of the panel. float drawPosX; if (layout.isLeftToRight()) { drawPosX = 0; } else { drawPosX = formatWidth - layout.getAdvance(); } // Draw the TextLayout at (drawPosX, drawPosY). layout.draw(graphics2D, drawPosX, drawPosY); // Move y-coordinate in preparation for next layout. drawPosY += layout.getDescent() + layout.getLeading(); } } public static void main(String[] args) { // If no command-line arguments, use these: if (args.length == 0) { args = new String[] { "-text", "longenglish" }; } AttributedCharacterIterator text = SampleUtils.getText(args); Component sample = new LineBreakSample(text); SampleUtils.showComponentInFrame(sample, "Line Break Sample"); } }
[ "wzxfate@gmail.com" ]
wzxfate@gmail.com
522d53613c96ff2dc6327ac0b7a59f99d67c01b2
356de93600e968abebd7efdfded0775c93a84230
/src/main/java/com/lijie/shopping/modules/service/UmsMemberRuleSettingService.java
aa1b1c646b7e6f9f72c5f58dbb0fded7da60a383
[]
no_license
tianandli/shopping
511027f3bcbfc16a077beb2a4395edb3c250d1de
d441c4e802278078f9d3ce8cc8ca6d1d5931813f
refs/heads/master
2023-08-27T21:20:50.212623
2021-11-05T09:21:26
2021-11-05T09:21:26
370,205,574
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.lijie.shopping.modules.service; import com.lijie.shopping.modules.model.UmsMemberRuleSetting; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 会员积分成长规则表 服务类 * </p> * * @author lijie * @since 2021-05-13 */ public interface UmsMemberRuleSettingService extends IService<UmsMemberRuleSetting> { }
[ "949620260@qq.com" ]
949620260@qq.com
7565032549825814ba36cbea6ebbc367b1a571d4
a0eb97fa249bd9390c28404d7c3fe857677cde7b
/EDC/localux/Formule.java
2fd9c373822aa7b36ac3f03c1505fc9f3ac69c4f
[]
no_license
LevezoErell/EDC_Localux
0705ac51fe1c4d067dc2c203177f6b7f56b2cca8
2cc4739a754edfe2bb109e904c6d5f898b23a65e
refs/heads/master
2021-04-21T06:28:34.429788
2020-03-24T16:28:49
2020-03-24T16:28:49
249,757,177
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package localux; abstract class Formule { /** * Variables */ public int id; public String libelle; /** * Constructeur vide */ public Formule() { } /** * Constructeur * * @param unId * @param unLibelle */ public Formule(int unId, String unLibelle) { this.id = unId; this.libelle = unLibelle; } /** * Mutateurs et accesseurs * @return id */ public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLibelle() { return libelle; } public void setLibelle(String libelle) { this.libelle = libelle; } }
[ "erell.levezo@laposte.net" ]
erell.levezo@laposte.net
744acfd1e8693731cffa1a97794414ce8dd14a79
0fa775315b2f1c88a542cd18481355fc564f3a25
/englishWord/src/findPermutation/dictionary.java
4fecf1c565f6670aa0e952b04a4bc23a99f9f9ed
[]
no_license
devaki18/DictionaryProject
5e0cf0980065e9c7a839e8b3d275f83f7b71dff3
1f375bb5896f267b26e97ae36a4c95e32b72ef84
refs/heads/master
2023-03-30T18:48:40.346463
2021-04-08T02:54:08
2021-04-08T02:54:08
355,666,399
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package findPermutation; public final class dictionary { static boolean isEnglishWord(String checkWord) { String[] validWords = { "apple", "mango", "and", "is", "with", "work", "king", "ring", "row", "know", "or", "in", "wing", "for" }; for (int i = 0; i < validWords.length; i++) { if (validWords[i].toLowerCase().equals(checkWord.toLowerCase())) { return true; } } return false; } }
[ "Administrator@MININT-VE1SM6K.hitronhub.home" ]
Administrator@MININT-VE1SM6K.hitronhub.home
9aa7a3ef360866b91f544266980dc7eb2c90b0e4
947c4bbf5dbdeea1be2bd6633d8fc1f37c60f6ba
/Pz-s/D/D123.java
d083783f52eb922e0ba0464055b3f19a340d10e4
[]
no_license
k-takase36/skill_judgment
b056e51cc7edae999383cc60fdbcc7a233d12701
fe1cae79e58a2cc165381603de87d6aa305681b7
refs/heads/master
2023-09-02T01:43:52.209828
2021-10-13T09:51:50
2021-10-13T09:51:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package D; import java.util.Scanner; public class D123 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Scannerクラスのインスタンスを作成、引数で標準入力System.inを指定 int x = sc.nextInt(); //nextInt()メソッドで数値として取得 sc.nextLine(); //nextLine()メソッドで改行 //結果を出力 if (x < 10000) { System.out.println(x + 10000); } else { System.out.println(x); } } }
[ "yasaiseikatu0306@gmail.com" ]
yasaiseikatu0306@gmail.com
185d6a9ad89db8035cf6b584d8a64741cffcc6b8
bd13a356d6db0784dad6231360f9c53009011cc5
/src/main/java/net/laflash/msscbrewery/web/controller/BeerController.java
e8c7b6e197b64a61960ea811dce9c4221f1d7e49
[]
no_license
JLaFlash/mssc-brewery
1bcfc8b109b4bb7ba25d226a28abb36992ba2ded
193330eb30f98bcdc88b838df2d7aeab26c6271c
refs/heads/master
2020-12-05T16:48:28.190770
2020-01-09T02:01:24
2020-01-09T02:01:24
232,177,348
0
0
null
null
null
null
UTF-8
Java
false
false
1,748
java
package net.laflash.msscbrewery.web.controller; import net.laflash.msscbrewery.services.BeerService; import net.laflash.msscbrewery.web.model.BeerDto; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.UUID; @RequestMapping("api/v1/beer") @RestController public class BeerController { private final BeerService beerService; public BeerController(BeerService beerService) { this.beerService = beerService; } @GetMapping("/{beerId}") public ResponseEntity<BeerDto> getBeer(@PathVariable(name = "beerId" ) UUID beerId){ return new ResponseEntity<>(beerService.getBeerById(beerId), HttpStatus.OK); } @PostMapping("/") public ResponseEntity<BeerDto> handlePost(@Valid @RequestBody() BeerDto beerDto){ BeerDto newbeerDto = beerService.saveNewBeer(beerDto); HttpHeaders headers = new HttpHeaders(); headers.add("Location", "api/v1/beer/" + newbeerDto.getId().toString()); return new ResponseEntity(headers, HttpStatus.CREATED); } @PutMapping("/{beerId}") public ResponseEntity handleUpdate(@PathVariable(name = "beerId") UUID id, @Valid @RequestBody() BeerDto beerDto){ beerService.updateBeer(id, beerDto); return new ResponseEntity(HttpStatus.NO_CONTENT); } @DeleteMapping("/{beerId}") @ResponseStatus(HttpStatus.NO_CONTENT) public void daleteBeer(@PathVariable(name = "beerId") UUID id){ beerService.daleteById(id); } }
[ "jodylaflash@outlook.com" ]
jodylaflash@outlook.com
86ff7a389f8618d822587f88096fd344eea488bf
48395b3679c84571f61c3bf53b6bce0ed3fc66e7
/homework3/calculator/CalculatorWithMemoryDecorator.java
10a728df081b11df1ef32614e6088ed5a9ebd02a
[]
no_license
MarZinchenko/HomeWorks
0f53b264d1f6a7ca0ff7a055900d3802401e0b65
eb87405d6cce54aae70efa35e30b61b0bafc5614
refs/heads/master
2023-02-07T20:40:35.080596
2021-01-03T22:02:48
2021-01-03T22:02:48
321,421,445
0
0
null
null
null
null
UTF-8
Java
false
false
1,300
java
//8 package homework2.arrays.homework3.calculator; public class CalculatorWithMemoryDecorator implements ICalculator { private double memory; private double lastValue; ICalculator calculator; public CalculatorWithMemoryDecorator(ICalculator calculator){ this.calculator = calculator; } public ICalculator getCalculator(){ return this.calculator; } public void bringToMemory(double a){ this.memory = a; } public double getFromMemory(){ this.lastValue = this.memory; this.memory = 0; return lastValue ; } public double getLastValue(){ return this.lastValue; } public double div(double a, double b){ return this.calculator.div(a, b); } public double mult(double a, double b){ return this.calculator.mult(a, b); } public double plus(double a, double b){ return this.calculator.plus(a, b); } public double minus(double a, double b){ return this.calculator.minus(a, b); } public double pow(double a, int b){ return this.calculator.pow(a, b); } public double abs(double a){ return this.calculator.abs(a); } public double sqrt(double a){ return this.calculator.sqrt(a); } }
[ "8487marina@gmail.com" ]
8487marina@gmail.com
906c740e4b0dd340f604cc7ef3c4c2ecf4519f9d
a99eadf1c1fcdbeb5b3d8b892fa10f6976e28b0c
/src/main/java/wang/yobbo/common/appengine/plugin/NtCacheConstants.java
9716c68020aa3eb9fa84f357b9874fb5f2934a22
[]
no_license
yobbo-wang/Nextrobot
d525ffe283db6649cf148fb6a7aedaa2aeb671c4
48716d7e32ed1a2d4854f75ea30e11964c2d2ef0
refs/heads/master
2021-01-24T11:34:55.973873
2018-03-30T09:26:04
2018-03-30T09:26:04
123,086,784
1
0
null
null
null
null
UTF-8
Java
false
false
294
java
package wang.yobbo.common.appengine.plugin; public interface NtCacheConstants { String CACHE_FILTER_CHAINMANAGER="CACHE_FILTER_CHAINMANAGER"; String CACHE_SYS="NT_SYS_CACHE"; String CACHE_URL_ROLE = "CACHE_URL_ROLE"; String CACHE_SHIRO_KICKOUT_SESSION="shiroKickoutSession"; }
[ "yobbo_wang@163.com" ]
yobbo_wang@163.com
22cf368b9ed580a4fd1ac6c5814f4d491f711fde
1bd95dfc6d0cf71259569c1b520f1526fd273661
/src/main/java/com/sg/assignment/common/exception/InvalidUserException.java
0fecbd7704db6d15c30b0c4fd03e070e98a11960
[]
no_license
sg-object/sg-board
01849498188bfc5c9b138c59684514a4f519d3ec
ff45320241dbb504674c4b9a8834c164aa0d49af
refs/heads/master
2022-11-22T15:26:59.689176
2020-07-22T08:09:08
2020-07-22T08:09:08
280,802,009
0
0
null
2020-07-22T08:09:09
2020-07-19T05:55:38
Java
UTF-8
Java
false
false
291
java
package com.sg.assignment.common.exception; public class InvalidUserException extends AbstractException { private static final long serialVersionUID = -7537204630780202406L; @Override public String getErrorCode() { // TODO Auto-generated method stub return INVALID_USER_CODE; } }
[ "sg.object@gmail.com" ]
sg.object@gmail.com
9d705d1075e664f8cd86c2e6f7a7c1b282378eb4
54049f14d790bdc6532bece8b59cce9a8410dfff
/beast-mcmc-srp/src/dr/app/beagle/evomodel/treelikelihood/AbstractTreeLikelihood.java
a09e35b7a2a4314389adec238dc53c71e72291c5
[]
no_license
RodrigoLab/snowgoose
82674a6e4e38cb3e453dc24fc721f653c67e13b3
c780adc2c219f65bd571f664eeff112b1be592b7
refs/heads/develop
2021-01-17T07:01:18.844096
2016-10-27T20:41:02
2016-10-27T20:41:02
16,417,069
0
0
null
2016-10-27T20:41:02
2014-01-31T18:51:21
Java
UTF-8
Java
false
false
8,871
java
/* * AbstractTreeLikelihood.java * * Copyright (c) 2002-2013 Alexei Drummond, Andrew Rambaut and Marc Suchard * * This file is part of BEAST. * See the NOTICE file distributed with this work for additional * information regarding copyright ownership and licensing. * * BEAST is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * BEAST 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with BEAST; if not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA */ package dr.app.beagle.evomodel.treelikelihood; import dr.evolution.alignment.PatternList; import dr.evolution.datatype.DataType; import dr.evolution.tree.NodeRef; import dr.evomodel.tree.TreeModel; import dr.inference.model.*; import dr.xml.Reportable; /** * AbstractTreeLikelihood - a base class for likelihood calculators of sites on a tree. * * @author Andrew Rambaut * @author Marc Suchard * @version $Id: AbstractTreeLikelihood.java,v 1.16 2005/06/07 16:27:39 alexei Exp $ */ public abstract class AbstractTreeLikelihood extends AbstractModelLikelihood implements Reportable { protected static final boolean COUNT_TOTAL_OPERATIONS = false; public AbstractTreeLikelihood(String name, PatternList patternList, TreeModel treeModel) { super(name); this.patternList = patternList; this.dataType = patternList.getDataType(); patternCount = patternList.getPatternCount(); stateCount = dataType.getStateCount(); patternWeights = patternList.getPatternWeights(); this.treeModel = treeModel; addModel(treeModel); nodeCount = treeModel.getNodeCount(); updateNode = new boolean[nodeCount]; for (int i = 0; i < nodeCount; i++) { updateNode[i] = true; } likelihoodKnown = false; } /** * Set update flag for a node and its children */ protected void updateNode(NodeRef node) { updateNode[node.getNumber()] = true; likelihoodKnown = false; } /** * Set update flag for a node and its direct children */ protected void updateNodeAndChildren(NodeRef node) { updateNode[node.getNumber()] = true; for (int i = 0; i < treeModel.getChildCount(node); i++) { NodeRef child = treeModel.getChild(node, i); updateNode[child.getNumber()] = true; } likelihoodKnown = false; } /** * Set update flag for a node and all its descendents */ protected void updateNodeAndDescendents(NodeRef node) { updateNode[node.getNumber()] = true; for (int i = 0; i < treeModel.getChildCount(node); i++) { NodeRef child = treeModel.getChild(node, i); updateNodeAndDescendents(child); } likelihoodKnown = false; } /** * Set update flag for all nodes */ protected void updateAllNodes() { for (int i = 0; i < nodeCount; i++) { updateNode[i] = true; } likelihoodKnown = false; } /** * Set update flag for a pattern */ protected void updatePattern(int i) { if (updatePattern != null) { updatePattern[i] = true; } likelihoodKnown = false; } /** * Set update flag for all patterns */ protected void updateAllPatterns() { if (updatePattern != null) { for (int i = 0; i < patternCount; i++) { updatePattern[i] = true; } } likelihoodKnown = false; } public final double[] getPatternWeights() { return patternWeights; } // ************************************************************** // VariableListener IMPLEMENTATION // ************************************************************** protected void handleVariableChangedEvent(Variable variable, int index, Parameter.ChangeType type) { // do nothing } // ************************************************************** // Model IMPLEMENTATION // ************************************************************** protected void handleModelChangedEvent(Model model, Object object, int index) { if (COUNT_TOTAL_OPERATIONS) totalModelChangedCount++; likelihoodKnown = false; } /** * Stores the additional state other than model components */ protected void storeState() { storedLikelihoodKnown = likelihoodKnown; storedLogLikelihood = logLikelihood; } /** * Restore the additional stored state */ protected void restoreState() { likelihoodKnown = storedLikelihoodKnown; logLikelihood = storedLogLikelihood; } protected void acceptState() { } // nothing to do // ************************************************************** // Likelihood IMPLEMENTATION // ************************************************************** public final Model getModel() { return this; } public final double getLogLikelihood() { if (COUNT_TOTAL_OPERATIONS) totalGetLogLikelihoodCount++; if (CompoundLikelihood.DEBUG_PARALLEL_EVALUATION) { System.err.println((likelihoodKnown ? "lazy" : "evaluate")); } if (!likelihoodKnown) { if (COUNT_TOTAL_OPERATIONS) totalCalculateLikelihoodCount++; logLikelihood = calculateLogLikelihood(); likelihoodKnown = true; } return logLikelihood; } /** * Forces a complete recalculation of the likelihood next time getLikelihood is called */ public void makeDirty() { if (COUNT_TOTAL_OPERATIONS) totalMakeDirtyCount++; likelihoodKnown = false; updateAllNodes(); updateAllPatterns(); } protected abstract double calculateLogLikelihood(); public String getReport() { if (hasInitialized) { String rtnValue = getClass().getName() + "(" + getLogLikelihood() + ")"; if (COUNT_TOTAL_OPERATIONS) rtnValue += " total operations = " + totalOperationCount + " matrix updates = " + totalMatrixUpdateCount + " model changes = " + totalModelChangedCount + " make dirties = " + totalMakeDirtyCount + " calculate likelihoods = " + totalCalculateLikelihoodCount + " get likelihoods = " + totalGetLogLikelihoodCount + " all rate updates = " + totalRateUpdateAllCount + " partial rate updates = " + totalRateUpdateSingleCount; return rtnValue; } else { return getClass().getName() + "(uninitialized)"; } } // ************************************************************** // INSTANCE VARIABLES // ************************************************************** /** * the tree */ protected TreeModel treeModel = null; /** * the patternList */ protected PatternList patternList = null; protected DataType dataType = null; /** * the pattern weights */ protected double[] patternWeights; /** * the number of patterns */ protected int patternCount; /** * the number of states in the data */ protected int stateCount; /** * the number of nodes in the tree */ protected int nodeCount; /** * Flags to specify which patterns are to be updated */ protected boolean[] updatePattern = null; /** * Flags to specify which nodes are to be updated */ protected boolean[] updateNode; private double logLikelihood; private double storedLogLikelihood; protected boolean likelihoodKnown = false; private boolean storedLikelihoodKnown = false; protected boolean hasInitialized = false; protected int totalOperationCount = 0; protected int totalMatrixUpdateCount = 0; protected int totalGetLogLikelihoodCount = 0; protected int totalModelChangedCount = 0; protected int totalMakeDirtyCount = 0; protected int totalCalculateLikelihoodCount = 0; protected int totalRateUpdateAllCount = 0; protected int totalRateUpdateSingleCount = 0; }
[ "stevenhwu@gmail.com" ]
stevenhwu@gmail.com
c4dd28b315647f9908999d162947bc3e954de631
97faab88539c707483d7de5aaedbf7e1a551889e
/src/com/leetcode/ValidAnagram.java
f42fadcf2db0e58736254b23441e9bec9739ecfc
[]
no_license
syedirfan33/ProblemSolving
83cf047c1f08ed089553401e61561e7e560e4712
07f0e565f3f6d39d10d3464f2aafe5b6de6bc3e5
refs/heads/master
2023-08-15T12:53:53.922113
2021-09-25T04:04:26
2021-09-25T04:04:26
261,063,747
1
1
null
null
null
null
UTF-8
Java
false
false
598
java
package com.leetcode; import java.util.HashMap; import java.util.Map; public class ValidAnagram { // To solve the follow up, can use hashtable instead of char array public boolean isAnagram(String s, String t) { if (s.length() != t.length()) return false; Map<Character, Integer> map = new HashMap<>(); for (char c : s.toCharArray()) map.put(c, map.getOrDefault(c, 0) + 1); for (char c : t.toCharArray()) { if (!map.containsKey(c) || map.get(c) == 0) return false; map.put(c, map.get(c) - 1); } return true; } }
[ "syed.irfan@maybank.com" ]
syed.irfan@maybank.com
4c0582f18e1692767c794e2092675116ea4ddc2c
aa90cb116edbf586cb769797c49f4c46a0a0caed
/src/main/java/org/squiddev/plethora/api/module/AbstractModuleHandler.java
8c5902255ee3057a7b5ec7a93bbf8afd10872a2d
[ "MIT" ]
permissive
SquidDev-CC/plethora
c1cda54f9fc9ca163def4c4e78ddb69392e9f545
3c9b41561a3dcc45d08a9167f6e471638cf2e170
refs/heads/minecraft-1.12
2021-08-29T09:44:58.781157
2021-08-06T18:24:26
2021-08-06T18:24:26
61,070,151
64
56
MIT
2021-08-22T13:27:36
2016-06-13T21:14:19
Java
UTF-8
Java
false
false
588
java
package org.squiddev.plethora.api.module; import org.squiddev.plethora.api.method.IContextBuilder; import javax.annotation.Nonnull; /** * Some default implementations for {@link IModuleHandler} methods. * * It is recommended that all implementations extend this class: it allows additional methods * to be added to the module handler without introducing abstract method errors occurring. */ public abstract class AbstractModuleHandler implements IModuleHandler { @Override public void getAdditionalContext(@Nonnull IModuleAccess access, @Nonnull IContextBuilder builder) { } }
[ "bonzoweb@hotmail.co.uk" ]
bonzoweb@hotmail.co.uk
62f14ad51f9f3f626323cb128e0000ee412ea6ba
676e021e420959a22f8eb326068576f93efe1f41
/src/main/java/com/diogorolins/battleShip/config/security/SecurityConfig.java
1159432c58f902c69be9e18155154be12e5a083b
[]
no_license
diogorolins/battleship-backend-old
d72c748d2566068463a63ddb3d3158b2daa13b44
f35ae039dfbd36e0efcaea3afaf5ff9583192161
refs/heads/master
2023-04-15T23:20:59.203086
2020-08-07T14:06:39
2020-08-07T14:06:39
278,490,519
0
0
null
2021-04-26T20:28:02
2020-07-09T23:13:33
Java
UTF-8
Java
false
false
3,488
java
package com.diogorolins.battleShip.config.security; import java.util.Arrays; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; @EnableWebSecurity @Configuration @EnableGlobalMethodSecurity(prePostEnabled = true) public class SecurityConfig extends WebSecurityConfigurerAdapter{ @Autowired private Environment env; @Autowired private AuthConfig authConfig; @Autowired private TokenService tokenService; private static final String[] PUBLIC_MATCHERS_POST = { "/players", "/auth" }; private static final String[] PUBLIC_MATCHERS_GET = { "/ships" }; private static final String[] PUBLIC_MATCHERS = { "/h2-console/**" }; @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(authConfig).passwordEncoder(bCryptPasswordEncoder()); } @Override protected void configure(HttpSecurity http) throws Exception { if(Arrays.asList(env.getActiveProfiles()).contains("dev")) { http.headers().frameOptions().disable(); } http.cors().and().csrf().disable(); http.authorizeRequests() .antMatchers(HttpMethod.POST,PUBLIC_MATCHERS_POST).permitAll() .antMatchers(HttpMethod.POST,PUBLIC_MATCHERS_GET).permitAll() .antMatchers(PUBLIC_MATCHERS).permitAll() .anyRequest().authenticated(); http.addFilter(new JWTAuthenticationFilter(authenticationManager(), tokenService)); http.addFilter(new JWTAuthorizationFilter(authenticationManager(), tokenService, authConfig)); http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); } @Override public void configure(WebSecurity web) throws Exception { } @Override @Bean protected AuthenticationManager authenticationManager() throws Exception { return super.authenticationManager(); } @Bean public BCryptPasswordEncoder bCryptPasswordEncoder() { return new BCryptPasswordEncoder(); } @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration().applyPermitDefaultValues(); config.setAllowedMethods(Arrays.asList("POST", "GET", "PUT", "DELETE", "OPTIONS", "PATCH")); final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", config); return source; } }
[ "=" ]
=
4b1da4d01fe060e9a1392a94d105be86f76759a5
b8654a4a4459a43861dc87b21e7985f2f5b6f27a
/app/src/main/java/com/breadwallet/tools/manager/BRSharedPrefs.java
4c5b0e0c9dec902353405d1d180bba80f2024f92
[ "MIT" ]
permissive
bitdinar/bitdinarwallet
e68b6ed3c1a63a9bd2b6a6d736a685361885dd59
ba2b1a376316904ffd0b4622e7c743dcf5200a33
refs/heads/master
2021-01-24T04:36:23.013028
2018-02-26T09:25:20
2018-02-26T09:25:20
122,740,925
0
0
null
null
null
null
UTF-8
Java
false
false
20,829
java
package com.breadwallet.tools.manager; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import com.breadwallet.tools.util.BRConstants; import org.json.JSONArray; import java.util.ArrayList; import java.util.Currency; import java.util.List; import java.util.Locale; import java.util.UUID; import static com.breadwallet.tools.util.BRConstants.GEO_PERMISSIONS_REQUESTED; import static com.breadwallet.tools.util.BRConstants.receive; /** * BreadWallet * <p> * Created by Mihail Gutan <mihail@breadwallet.com> on 6/13/16. * Copyright (c) 2016 breadwallet LLC * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * <p> * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * <p> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ public class BRSharedPrefs { public static final String TAG = BRSharedPrefs.class.getName(); public static List<OnIsoChangedListener> isoChangedListeners = new ArrayList<>(); public interface OnIsoChangedListener { void onIsoChanged(String iso); } public static void addIsoChangedListener(OnIsoChangedListener listener) { if (isoChangedListeners == null) { isoChangedListeners = new ArrayList<>(); } if (!isoChangedListeners.contains(listener)) isoChangedListeners.add(listener); } public static void removeListener(OnIsoChangedListener listener) { if (isoChangedListeners == null) { isoChangedListeners = new ArrayList<>(); } isoChangedListeners.remove(listener); } public static String getIso(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); String defIso; try { defIso = "TND";// Currency.getInstance(Locale.getDefault()).getCurrencyCode(); } catch (IllegalArgumentException e) { e.printStackTrace(); defIso = "TND";// Currency.getInstance(Locale.US).getCurrencyCode(); } return settingsToGet.getString(BRConstants.CURRENT_CURRENCY, defIso); } public static void putIso(Context context, String code) { SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putString(BRConstants.CURRENT_CURRENCY, code.equalsIgnoreCase(Locale.getDefault().getISO3Language()) ? null : code); editor.apply(); for (OnIsoChangedListener listener : isoChangedListeners) { if (listener != null) listener.onIsoChanged(code); } } public static boolean getPhraseWroteDown(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean(BRConstants.PHRASE_WRITTEN, false); } public static void putPhraseWroteDown(Context context, boolean check) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(BRConstants.PHRASE_WRITTEN, check); editor.apply(); } public static boolean getGreetingsShown(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean("greetingsShown", false); } public static void putGreetingsShown(Context context, boolean shown) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("greetingsShown", shown); editor.apply(); } public static int getCurrencyListPosition(Context context) { SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); return settings.getInt(BRConstants.POSITION, 0); } public static void putCurrencyListPosition(Context context, int lastItemsPosition) { SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putInt(BRConstants.POSITION, lastItemsPosition); editor.apply(); } public static String getReceiveAddress(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getString(BRConstants.RECEIVE_ADDRESS, ""); } public static void putReceiveAddress(Context ctx, String tmpAddr) { SharedPreferences.Editor editor = ctx.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE).edit(); editor.putString(BRConstants.RECEIVE_ADDRESS, tmpAddr); editor.apply(); } public static String getWalletName(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getString(BRConstants.WALLET_NAME, "My Bread"); } public static void putWalletName(Context ctx, String name) { SharedPreferences.Editor editor = ctx.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE).edit(); editor.putString(BRConstants.WALLET_NAME, name); editor.apply(); } public static String getFirstAddress(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getString(BRConstants.FIRST_ADDRESS, ""); } public static void putFirstAddress(Context context, String firstAddress) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString(BRConstants.FIRST_ADDRESS, firstAddress); editor.apply(); } public static long getFeePerKb(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getLong(BRConstants.FEE_KB_PREFS, 0); } public static void putFeePerKb(Context context, long fee) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putLong(BRConstants.FEE_KB_PREFS, fee); editor.apply(); } public static long getEconomyFeePerKb(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getLong(BRConstants.ECONOMY_FEE_KB_PREFS, 0); } public static void putEconomyFeePerKb(Context context, long fee) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putLong(BRConstants.ECONOMY_FEE_KB_PREFS, fee); editor.apply(); } public static long getCatchedBalance(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getLong("balance", 0); } public static void putCatchedBalance(Context context, long fee) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putLong("balance", fee); editor.apply(); } public static long getSecureTime(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getLong(BRConstants.SECURE_TIME_PREFS, System.currentTimeMillis() / 1000); } //secure time from the server public static void putSecureTime(Context activity, long date) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putLong(BRConstants.SECURE_TIME_PREFS, date); editor.apply(); } public static long getLastSyncTime(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getLong("lastSyncTime", 0); } public static void putLastSyncTime(Context activity, long time) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putLong("lastSyncTime", time); editor.apply(); } public static long getFeeTime(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getLong("feeTime", 0); } public static void putFeeTime(Context activity, long feeTime) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putLong("feeTime", feeTime); editor.apply(); } public static List<Integer> getBitIdNonces(Context activity, String key) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); String result = prefs.getString(key, null); List<Integer> list = new ArrayList<>(); try { JSONArray arr = new JSONArray(result); for (int i = 0; i < arr.length(); i++) { int a = arr.getInt(i); Log.d("found a nonce: ", a + ""); list.add(a); } } catch (Exception e) { e.printStackTrace(); } return list; } public static void putBitIdNonces(Context activity, List<Integer> nonces, String key) { JSONArray arr = new JSONArray(); arr.put(nonces); SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString(key, arr.toString()); editor.apply(); } public static boolean getAllowSpend(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean(BRConstants.ALLOW_SPEND, true); } public static void putAllowSpend(Context activity, boolean allow) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(BRConstants.ALLOW_SPEND, allow); editor.apply(); } //if the user prefers all in bitcoin units, not other currencies public static boolean getPreferredBTC(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean("priceSetToBitcoin", true); } //if the user prefers all in bitcoin units, not other currencies public static void putPreferredBTC(Context activity, boolean b) { Log.e(TAG, "putPreferredBTC: " + b); SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("priceSetToBitcoin", b); editor.apply(); } //if the user prefers all in bitcoin units, not other currencies public static boolean getUseFingerprint(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean("useFingerprint", false); } //if the user prefers all in bitcoin units, not other currencies public static void putUseFingerprint(Context activity, boolean use) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("useFingerprint", use); editor.apply(); } public static boolean getFeatureEnabled(Context activity, String feature) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean(feature, false); } public static void putFeatureEnabled(Context activity, boolean enabled, String feature) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(feature, enabled); editor.apply(); } public static boolean getGeoPermissionsRequested(Context activity) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getBoolean(GEO_PERMISSIONS_REQUESTED, false); } public static void putGeoPermissionsRequested(Context activity, boolean requested) { SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(GEO_PERMISSIONS_REQUESTED, requested); editor.apply(); } public static int getStartHeight(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); return settingsToGet.getInt(BRConstants.START_HEIGHT, 0); } public static void putStartHeight(Context context, int startHeight) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putInt(BRConstants.START_HEIGHT, startHeight); editor.apply(); } public static int getLastBlockHeight(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); return settingsToGet.getInt(BRConstants.LAST_BLOCK_HEIGHT, 0); } public static void putLastBlockHeight(Context context, int lastHeight) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putInt(BRConstants.LAST_BLOCK_HEIGHT, lastHeight); editor.apply(); } public static boolean getScanRecommended(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); return settingsToGet.getBoolean("scanRecommended", false); } public static void putScanRecommended(Context context, boolean recommended) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putBoolean("scanRecommended", recommended); editor.apply(); } public static int getCurrencyUnit(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); return settingsToGet.getInt(BRConstants.CURRENT_UNIT, BRConstants.CURRENT_UNIT_BITCOINS); } public static void putCurrencyUnit(Context context, int unit) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putInt(BRConstants.CURRENT_UNIT, unit); editor.apply(); } public static String getDeviceId(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); String deviceId = settingsToGet.getString(BRConstants.USER_ID, ""); if (deviceId.isEmpty()) setDeviceId(context, UUID.randomUUID().toString()); return (settingsToGet.getString(BRConstants.USER_ID, "")); } private static void setDeviceId(Context context, String uuid) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putString(BRConstants.USER_ID, uuid); editor.apply(); } public static void clearAllPrefs(Context activity) { SharedPreferences.Editor editor = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE).edit(); editor.clear(); editor.apply(); } public static boolean getShowNotification(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return settingsToGet.getBoolean("showNotification", false); } public static void putShowNotification(Context context, boolean show) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putBoolean("showNotification", show); editor.apply(); } public static boolean getShareData(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return settingsToGet.getBoolean("shareData", false); } public static void putShareData(Context context, boolean show) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putBoolean("shareData", show); editor.apply(); } public static boolean getShareDataDismissed(Context context) { SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return settingsToGet.getBoolean("shareDataDismissed", false); } public static void putShareDataDismissed(Context context, boolean dismissed) { if (context == null) return; SharedPreferences settings = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putBoolean("shareDataDismissed", dismissed); editor.apply(); } public static String getBCHTxId(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getString("bchTxId", ""); } public static void putBCHTxId(Context context, String txId) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("bchTxId", txId); editor.apply(); } public static String getTrustNode(Context context) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); return prefs.getString("trustNode", ""); } public static void putTrustNode(Context context, String trustNode) { SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("trustNode", trustNode); editor.apply(); } }
[ "bitdinar@icloud.com" ]
bitdinar@icloud.com
daf2b350b08a5b0536e0bb8c12b52e90b6a4f87f
30876e27edec62989a8274c19c24810251da99f2
/src/java/beans/AntivirusController.java
cfbd35be37663466aee6cf4eeaddc57a60ed52c5
[]
no_license
sarracent/records-manager
52d4f22ec2e1c1cdf9ee6d7dd98dbfe7ba9273df
88ebc3b1c9c0bd528e7a692ff0ed32057c4e583a
refs/heads/master
2020-04-02T11:19:39.315423
2018-10-23T10:28:01
2018-10-23T10:28:01
154,382,131
0
0
null
null
null
null
UTF-8
Java
false
false
5,522
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 beans; import beans.util.JsfUtil; import beans.util.JsfUtil.PersistAction; import static beans.util.JsfUtil.addErrorMessage; import java.io.Serializable; import java.util.List; import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger; import javax.ejb.EJB; import javax.ejb.EJBException; import javax.inject.Named; import javax.enterprise.context.SessionScoped; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; import javax.faces.convert.FacesConverter; @Named("antivirusController") @SessionScoped public class AntivirusController implements Serializable { @EJB private beans.AntivirusFacade ejbFacade; private List<Antivirus> items = null; private Antivirus selected; public AntivirusController() { } public Antivirus getSelected() { return selected; } public void setSelected(Antivirus selected) { this.selected = selected; } protected void setEmbeddableKeys() { } protected void initializeEmbeddableKey() { } private AntivirusFacade getFacade() { return ejbFacade; } public Antivirus prepareCreate() { selected = new Antivirus(); initializeEmbeddableKey(); return selected; } public void create() { persist(PersistAction.CREATE, ResourceBundle.getBundle("/Bundle").getString("AntivirusCreated")); if (!JsfUtil.isValidationFailed()) { items = null; // Invalidate list of items to trigger re-query. } } public void update() { persist(PersistAction.UPDATE, ResourceBundle.getBundle("/Bundle").getString("AntivirusUpdated")); } public void destroy() { persist(PersistAction.DELETE, ResourceBundle.getBundle("/Bundle").getString("AntivirusDeleted")); if (!JsfUtil.isValidationFailed()) { selected = null; // Remove selection items = null; // Invalidate list of items to trigger re-query. } } public List<Antivirus> getItems() { if (items == null) { items = getFacade().findAll(); } return items; } private void persist(PersistAction persistAction, String successMessage) { if (selected != null) { setEmbeddableKeys(); try { if (persistAction != PersistAction.DELETE) { getFacade().edit(selected); } else { getFacade().remove(selected); } JsfUtil.addSuccessMessage(successMessage); } catch (EJBException ex) { String msg = ""; Throwable cause = ex.getCause(); if (cause != null) { msg = cause.getLocalizedMessage(); } if (msg.length() > 0) { addErrorMessage("El Antivirus ya existe, introduzca uno nuevo"); } else { JsfUtil.addErrorMessage(ex, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured")); } } catch (Exception ex) { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex); JsfUtil.addErrorMessage(ex, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured")); } } } public Antivirus getAntivirus(java.lang.Integer id) { return getFacade().find(id); } public List<Antivirus> getItemsAvailableSelectMany() { return getFacade().findAll(); } public List<Antivirus> getItemsAvailableSelectOne() { return getFacade().findAll(); } @FacesConverter(forClass = Antivirus.class) public static class AntivirusControllerConverter implements Converter { @Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { if (value == null || value.length() == 0) { return null; } AntivirusController controller = (AntivirusController) facesContext.getApplication().getELResolver(). getValue(facesContext.getELContext(), null, "antivirusController"); return controller.getAntivirus(getKey(value)); } java.lang.Integer getKey(String value) { java.lang.Integer key; key = Integer.valueOf(value); return key; } String getStringKey(java.lang.Integer value) { StringBuilder sb = new StringBuilder(); sb.append(value); return sb.toString(); } @Override public String getAsString(FacesContext facesContext, UIComponent component, Object object) { if (object == null) { return null; } if (object instanceof Antivirus) { Antivirus o = (Antivirus) object; return getStringKey(o.getId()); } else { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "object {0} is of type {1}; expected type: {2}", new Object[]{object, object.getClass().getName(), Antivirus.class.getName()}); return null; } } } }
[ "damiansarracent89@gmail.com" ]
damiansarracent89@gmail.com
4e1e279ae65f8fdea69741471828c50e37b3c175
96448b53a15b5172483151dc7cf926e3f39363c2
/ledger/nuls-ledger/src/main/java/io/nuls/ledger/rpc/cmd/ValidatorCmd.java
b199f03044f6bc78a36783352c89be01d62519c0
[ "MIT" ]
permissive
wangko27/nuls_2.0
352f2d34143a48bec9fbd33bac5951fefda86c0f
09e95498909c01b85c07b604553eb6ed3577964f
refs/heads/develop
2020-04-04T22:19:23.261370
2018-12-14T08:24:33
2018-12-14T08:24:33
156,319,589
2
1
MIT
2018-12-14T03:02:19
2018-11-06T03:19:54
Java
UTF-8
Java
false
false
2,567
java
/*- * ⁣⁣ * MIT License * ⁣⁣ * Copyright (C) 2017 - 2018 nuls.io * ⁣⁣ * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * ⁣⁣ */ package io.nuls.ledger.rpc.cmd; import io.nuls.ledger.validator.CoinDataValidator; import io.nuls.rpc.cmd.BaseCmd; import io.nuls.rpc.model.CmdAnnotation; import io.nuls.rpc.model.message.Response; import io.nuls.tools.core.annotation.Autowired; import io.nuls.tools.core.annotation.Component; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.math.BigInteger; import java.util.Map; /** * Created by wangkun23 on 2018/11/22. */ @Component public class ValidatorCmd extends BaseCmd { final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired CoinDataValidator coinDataValidator; /** * validate coin data * * @param params * @return */ @CmdAnnotation(cmd = "lg_validateCoinData", version = 1.0, scope = "private", minEvent = 0, minPeriod = 0, description = "test getHeight 1.0") public Response validateCoinData(Map params) { //TODO.. 验证参数个数和格式 String address = (String) params.get("address"); Integer chainId = (Integer) params.get("chainId"); Integer assetId = (Integer) params.get("assetId"); BigInteger amount = (BigInteger) params.get("amount"); String nonce = (String) params.get("nonce"); Boolean result = coinDataValidator.validate(address, chainId, assetId, amount, nonce); return success(result); } }
[ "wangkun@nuls.io" ]
wangkun@nuls.io
45edeae0512d5fe6e58d35df3a2aae727387c4a3
3cc849f555953147e8051f623b8552ac17854399
/src/com/rds/bacera/mapper/RdsBaceraCTDnaMapper.java
2472762a4d6656881917d7815c7cdfcec24d957a
[]
no_license
clownlin22/judicial-web
c8444b17f16ec9a567d43786efce6ff8ce0c967b
6350aa62353187dc1ee5dac5b1f6322e5c2982c8
refs/heads/master
2020-05-07T22:23:21.426381
2019-04-12T06:07:00
2019-04-12T06:07:00
180,913,232
0
0
null
null
null
null
UTF-8
Java
false
false
276
java
package com.rds.bacera.mapper; import java.util.Map; import org.springframework.stereotype.Component; @Component("RdsBaceraCTDnaMapper") public interface RdsBaceraCTDnaMapper extends RdsBaceraBaseMapper { @SuppressWarnings("rawtypes") public int queryNumExit(Map map); }
[ "17512580364@163.com" ]
17512580364@163.com
74391eb8d4dbd024f3423c5486c3dbbee9c72208
2fda0a2f1f5f5d4e7d72ff15a73a4d3e1e93abeb
/proFL-plugin-2.0.3/org/pitest/reloc/antlr/common/preprocessor/Tool.java
d287d588ed84e60ed0185a11e2a8becce7f2a70f
[ "MIT" ]
permissive
ycj123/Research-Project
d1a939d99d62dc4b02d9a8b7ecbf66210cceb345
08296e0075ba0c13204944b1bc1a96a7b8d2f023
refs/heads/main
2023-05-29T11:02:41.099975
2021-06-08T13:33:26
2021-06-08T13:33:26
374,899,147
0
0
null
null
null
null
UTF-8
Java
false
false
4,984
java
// // Decompiled by Procyon v0.5.36 // package org.pitest.reloc.antlr.common.preprocessor; import java.io.File; import java.util.Enumeration; import java.io.IOException; import java.io.FileNotFoundException; import org.pitest.reloc.antlr.common.collections.impl.Vector; public class Tool { protected Hierarchy theHierarchy; protected String grammarFileName; protected String[] args; protected int nargs; protected Vector grammars; protected org.pitest.reloc.antlr.common.Tool antlrTool; public Tool(final org.pitest.reloc.antlr.common.Tool antlrTool, final String[] array) { this.antlrTool = antlrTool; this.processArguments(array); } public static void main(final String[] array) { final Tool tool = new Tool(new org.pitest.reloc.antlr.common.Tool(), array); tool.preprocess(); final String[] preprocessedArgList = tool.preprocessedArgList(); for (int i = 0; i < preprocessedArgList.length; ++i) { System.out.print(" " + preprocessedArgList[i]); } System.out.println(); } public boolean preprocess() { if (this.grammarFileName == null) { this.antlrTool.toolError("no grammar file specified"); return false; } if (this.grammars != null) { this.theHierarchy = new Hierarchy(this.antlrTool); final Enumeration elements = this.grammars.elements(); while (elements.hasMoreElements()) { final String str = elements.nextElement(); try { this.theHierarchy.readGrammarFile(str); continue; } catch (FileNotFoundException ex) { this.antlrTool.toolError("file " + str + " not found"); return false; } break; } } if (!this.theHierarchy.verifyThatHierarchyIsComplete()) { return false; } this.theHierarchy.expandGrammarsInFile(this.grammarFileName); final GrammarFile file = this.theHierarchy.getFile(this.grammarFileName); final String nameForExpandedGrammarFile = file.nameForExpandedGrammarFile(this.grammarFileName); if (nameForExpandedGrammarFile.equals(this.grammarFileName)) { this.args[this.nargs++] = this.grammarFileName; } else { try { file.generateExpandedFile(); this.args[this.nargs++] = this.antlrTool.getOutputDirectory() + System.getProperty("file.separator") + nameForExpandedGrammarFile; } catch (IOException ex2) { this.antlrTool.toolError("cannot write expanded grammar file " + nameForExpandedGrammarFile); return false; } } return true; } public String[] preprocessedArgList() { final String[] args = new String[this.nargs]; System.arraycopy(this.args, 0, args, 0, this.nargs); return this.args = args; } private void processArguments(final String[] array) { this.nargs = 0; this.args = new String[array.length]; for (int i = 0; i < array.length; ++i) { if (array[i].length() == 0) { this.antlrTool.warning("Zero length argument ignoring..."); } else if (array[i].equals("-glib")) { if (File.separator.equals("\\") && array[i].indexOf(47) != -1) { this.antlrTool.warning("-glib cannot deal with '/' on a PC: use '\\'; ignoring..."); } else { final org.pitest.reloc.antlr.common.Tool antlrTool = this.antlrTool; this.grammars = org.pitest.reloc.antlr.common.Tool.parseSeparatedList(array[i + 1], ';'); ++i; } } else if (array[i].equals("-o")) { this.args[this.nargs++] = array[i]; if (i + 1 >= array.length) { this.antlrTool.error("missing output directory with -o option; ignoring"); } else { ++i; this.args[this.nargs++] = array[i]; this.antlrTool.setOutputDirectory(array[i]); } } else if (array[i].charAt(0) == '-') { this.args[this.nargs++] = array[i]; } else { this.grammarFileName = array[i]; if (this.grammars == null) { this.grammars = new Vector(10); } this.grammars.appendElement(this.grammarFileName); if (i + 1 < array.length) { this.antlrTool.warning("grammar file must be last; ignoring other arguments..."); break; } } } } }
[ "chijiang.yang@student.unimelb.edu.au" ]
chijiang.yang@student.unimelb.edu.au
bb018bf114d8acc60a0a750575566dd605fe03f8
db75c2977498151e949971627c5b6b111e7f6f69
/GuideProject/step/v28_04/src/main/java/com/eomcs/lms/handler/LessonDeleteCommand.java
81cac28fa26d2affc459554e46e50cbea8575274
[]
no_license
yh0921k/GuideProject
5bd7eb1882d07281ccafafb30bdfe5775bcd80ab
b8bba0025acc6086926e810b31ee2dc14efd207c
refs/heads/master
2020-11-26T03:12:27.536475
2020-04-20T09:06:27
2020-04-21T00:51:53
228,948,427
0
1
null
null
null
null
UTF-8
Java
false
false
855
java
package com.eomcs.lms.handler; import java.util.List; import com.eomcs.lms.domain.Lesson; import com.eomcs.util.Prompt; public class LessonDeleteCommand implements Command { List<Lesson> lessonList; Prompt prompt; public LessonDeleteCommand(Prompt prompt, List<Lesson> list) { this.prompt = prompt; this.lessonList = list; } @Override public void execute() { int index = indexOfLesson(prompt.inputInt("번호? ")); if (index == -1) { System.out.println("해당 번호의 수업이 없습니다."); return; } this.lessonList.remove(index); System.out.println("수업을 삭제했습니다."); } private int indexOfLesson(int no) { for (int i = 0; i < this.lessonList.size(); i++) { if (this.lessonList.get(i).getNo() == no) { return i; } } return -1; } }
[ "yh0921k@gmail.com" ]
yh0921k@gmail.com
58c2a0c19b689b03345177390c0096958b67e028
ca021ff2fb3d5abdaf7f65fbaab776e869ccd7a5
/src/fundationStructure/NextGreaterElement2.java
2c19bc4f077160d8b26fd8c6885ba5fe2a18a4be
[]
no_license
teddywang1992/leetcode
56ab4c072c9f0f2db31a0721294b1619a12856cd
7d676f2e67a1a2ba073a5c11fc5f17e8c6b77e69
refs/heads/master
2021-01-22T18:07:23.152614
2018-11-24T22:46:09
2018-11-24T22:46:09
100,737,117
0
0
null
null
null
null
UTF-8
Java
false
false
839
java
package fundationStructure; //take care of the corner case that two digit are same //so we need to store each time. so we can't use hashmap to do that. import java.util.Arrays; import java.util.Stack; public class NextGreaterElement2 { public int[] nextGreaterElements(int[] nums) { if (nums == null || nums.length == 0) { return new int[]{}; } int[] result = new int[nums.length]; Stack<Integer> stack = new Stack<>(); int n = nums.length; Arrays.fill(result, -1); for (int i = 1; i < 2 * n; i++) { if (i < n + 1) { stack.push(i - 1); } while(!stack.isEmpty() && nums[(i % n)] > nums[stack.peek()]) { result[stack.pop()] = nums[i % n]; } } return result; } }
[ "443909723@qq.com" ]
443909723@qq.com
896ceb346210c0ad4d09fb5dcfb73875f1ec98ba
578b9174779d5bd62c4996a70efde0fe22c7982e
/library/passwordinput/src/main/java/com/ethanco/lib/PasswordInput.java
106edfb0785eb09e7ccdc7e5666ef0f060820b56
[]
no_license
zhn2174/icebroken
b83bd951143d0fbc2152e1aa12bf291c0b24660b
c0c5699c7662ef37e284bf4f5f0c55d5dddf6db1
refs/heads/master
2020-04-25T07:31:26.275435
2019-03-08T14:51:47
2019-03-08T14:51:47
172,616,751
0
0
null
null
null
null
UTF-8
Java
false
false
15,181
java
package com.ethanco.lib; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.support.annotation.ColorInt; import android.support.annotation.NonNull; import android.support.v7.widget.AppCompatEditText; import android.text.InputFilter; import android.text.InputType; import android.text.method.MovementMethod; import android.util.AttributeSet; import android.util.Log; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.LinearInterpolator; import android.view.animation.OvershootInterpolator; import static com.ethanco.lib.utils.Utils.dp2px; import static com.ethanco.lib.utils.Utils.getColor; /** * Created by EthanCo on 2016/7/25. */ public class PasswordInput extends AppCompatEditText { private static final String TAG = "Z-SimplePasswordInput"; //============================= Z-边框 ==============================/ @ColorInt private int borderNotFocusedColor; //边框未选中时的颜色 @ColorInt private int borderFocusedColor; //边框选中时的颜色 private int borderWidth; //边框宽度 //============================= Z-圆点 ==============================/ @ColorInt private int dotNotFocusedColor; //圆点未选中时的颜色 @ColorInt private int dotFocusedColor; //圆点选中时的颜色 private float dotRadius; //圆点半径 //============================= Z-背景 ==============================/ @ColorInt private int backgroundColor = Color.WHITE; //背景色 //============================= Z-画笔 ==============================/ private Paint mBorderPaint; //边框画笔 private Paint mDotPaint; //圆点画笔 private Paint mBackgroundPaint; //背景画笔 //============================= Z-方块 ==============================/ private int boxCount = 4; //字符方块的数量 private float boxMarge; //字符方块的marge private float boxRadius; //字符方块的边角圆弧 private float[] scans; //字符方块缩放比例数组 private int[] alphas; //字符方块透明度数组 //============================= Z-其他 ==============================/ private int currTextLen = 0; //现在输入Text长度 private boolean focusColorChangeEnable = true; //获得焦点时颜色是否改变 private static final InputFilter[] NO_FILTERS = new InputFilter[0]; private boolean isFinishInflate = false; //inflate layout 是否已结束 private RectF mBorderRect = new RectF(); public PasswordInput(Context context) { this(context, null); } public PasswordInput(Context context, AttributeSet attrs) { super(context, attrs); //获取默认属性 getDefaultVar(); //初始化自定义属性 initAttrVar(context, attrs); //初始化动画存储数组 initAnimArr(); //初始化画笔 initPaint(); //初始化EditText initView(); } private void getDefaultVar() { borderNotFocusedColor = getColor(getContext(), R.color.password_input_border_not_focused); borderFocusedColor = getColor(getContext(), R.color.password_input_border_focused); } private void initAttrVar(Context context, AttributeSet attrs) { TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.PasswordInput); backgroundColor = ta.getColor(R.styleable.PasswordInput_backgroundColor, backgroundColor); int focusedColor = ta.getColor(R.styleable.PasswordInput_focusedColor, borderFocusedColor); int notFocusedColor = ta.getColor(R.styleable.PasswordInput_notFocusedColor, borderNotFocusedColor); boxCount = ta.getInt(R.styleable.PasswordInput_boxCount, boxCount); focusColorChangeEnable = ta.getBoolean(R.styleable.PasswordInput_focusColorChangeEnable, true); dotRadius = ta.getDimension(R.styleable.PasswordInput_dotRaduis, dp2px(context, 11)); ta.recycle(); borderFocusedColor = focusedColor; borderNotFocusedColor = notFocusedColor; dotFocusedColor = focusedColor; dotNotFocusedColor = notFocusedColor; borderWidth = dp2px(context, 1); boxRadius = dp2px(context, 3); boxMarge = dp2px(context, 3); } private void initAnimArr() { scans = new float[boxCount]; alphas = new int[boxCount]; for (int i = 0; i < alphas.length; i++) { alphas[i] = 255; } } private void initPaint() { mBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mBorderPaint.setStrokeWidth(borderWidth); mBorderPaint.setColor(borderNotFocusedColor); mBorderPaint.setStyle(Paint.Style.STROKE); mDotPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mDotPaint.setColor(dotNotFocusedColor); mDotPaint.setStyle(Paint.Style.FILL); mBackgroundPaint = new Paint(); mBackgroundPaint.setColor(backgroundColor); mBackgroundPaint.setStyle(Paint.Style.FILL); } private void initView() { setCursorVisible(false); //光标不可见 setInputType(InputType.TYPE_CLASS_NUMBER); //设置输入的是数字 //设置输入最大长度 setMaxLen(boxCount); setTextIsSelectable(false);//设置文字不可选中 } private void setMaxLen(int maxLength) { if (maxLength >= 0) { setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)}); } else { setFilters(NO_FILTERS); } } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); int height = getHeight(); int width = getWidth(); canvas.save(); //绘制背景 drawBackGround(canvas, height, width); //绘制边框 drawBorder(canvas, height, width); //绘制圆点 drawDot(canvas, height, width); canvas.restore(); } private void drawBackGround(Canvas canvas, int height, int width) { canvas.drawRect(0, 0, width, height, mBackgroundPaint); } private void drawBorder(Canvas canvas, int height, int width) { for (int i = 0; i < boxCount; i++) { RectF rect = generationSquareBoxRectF(height, width, i); canvas.drawRoundRect(rect, boxRadius, boxRadius, mBorderPaint); } } private void drawDot(Canvas canvas, int height, int width) { float cx, cy = height / 2; float half = width / boxCount / 2; for (int i = 0; i < boxCount; i++) { mDotPaint.setAlpha(alphas[i]); cx = width * i / boxCount + half; Log.i(TAG, "onDraw scans[" + i + "]: " + scans[i]); canvas.drawCircle(cx, cy, dotRadius * scans[i], mDotPaint); } } @NonNull private RectF generationSquareBoxRectF(int height, int width, int i) { float boxWidth = (width / boxCount); float boxHeight = height; float left = boxMarge + boxWidth * i; float right = boxWidth * (i + 1) - boxMarge; float top = boxMarge; float bottom = boxHeight - boxMarge; float min = Math.min(boxWidth, boxHeight); float dw = (boxWidth - min) / 2F; float dh = (boxHeight - min) / 2F; left += dw; right -= dw; top += dh; bottom -= dh; mBorderRect.set(left, top, right, bottom); return mBorderRect; } @Override protected void onFinishInflate() { super.onFinishInflate(); isFinishInflate = true; } @Override protected MovementMethod getDefaultMovementMethod() { //关闭 copy/paste/cut 长按文字菜单,使文字不可长按选中 //Note: 需 setTextIsSelectable(false) 才会生效 return null; } @Override protected void onTextChanged(CharSequence text, final int start, int lengthBefore, int lengthAfter) { super.onTextChanged(text, start, lengthBefore, lengthAfter); if (start != text.length()) { moveCursorToTheEnd(); } // Log.i(TAG, "onTextChanged currTextLen:" + currTextLen+" id:"+getId()); // if (null == scans) return; // Log.i(TAG, "==>onTextChanged currTextLen:" + currTextLen+" id:"+getId()); // if (isFristChangeText) { // isFristChangeText = false; // return; // } if (!isFinishInflate) { return; } this.currTextLen = text.toString().length(); final boolean isAdd = lengthAfter - lengthBefore > 0; // new Thread() { // @Override // public void run() { // Log.i(TAG, "currTextLen:" + currTextLen); // for (int i = 0; i < currTextLen; i++) { // scans[i] = 1; // } // postInvalidate(); // } // }.start(); startTextChangedAnim(isAdd); //通知TextChangeListen notifyTextChangeListener(text); } /** * 清除 * */ public void Clear(){ if (currTextLen>0){ for (int i = currTextLen-1; i > 0; i--) { alphas[i] = 0; postInvalidate(); } setText(""); } } /** * 开始TextChanged动画 * * @param isAdd true:字符从小到大 (增加) false:字符从大到小 (删除) */ private void startTextChangedAnim(boolean isAdd) { final ValueAnimator scanAnim; final ValueAnimator alphaAnim; final int index; if (isAdd) { index = currTextLen - 1; scanAnim = ValueAnimator.ofFloat(0F, 1F); alphaAnim = ValueAnimator.ofInt(0, 255); } else { index = currTextLen; scanAnim = ValueAnimator.ofFloat(1F, 0F); alphaAnim = ValueAnimator.ofInt(255, 0); } if (scans.length >= currTextLen) { scanAnim.setDuration(750); scanAnim.setRepeatCount(0); scanAnim.setInterpolator(new OvershootInterpolator()); scanAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator valueAnimator) { float scale = (float) valueAnimator.getAnimatedValue(); scans[index] = scale; postInvalidate(); } }); alphaAnim.setDuration(750); alphaAnim.setRepeatCount(0); alphaAnim.setInterpolator(new LinearInterpolator()); alphaAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator valueAnimator) { int alpha = (int) valueAnimator.getAnimatedValue(); alphas[index] = alpha; postInvalidate(); } }); scanAnim.start(); alphaAnim.start(); } } private void notifyTextChangeListener(CharSequence text) { if (null != textLenChangeListener) { textLenChangeListener.onTextLenChange(text, currTextLen); } } @Override protected void onFocusChanged(final boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { moveCursorToTheEnd(); } if (focusColorChangeEnable) { startFocusChangedAnim(focused); } } /** * 开始FocusChanged动画 * * @param focused 是否获得焦点 */ private void startFocusChangedAnim(final boolean focused) { final ValueAnimator scanAnim; scanAnim = ValueAnimator.ofFloat(1F, 0.1F, 1F); scanAnim.setDuration(750); scanAnim.setRepeatCount(0); scanAnim.setInterpolator(new AccelerateDecelerateInterpolator()); scanAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator valueAnimator) { float scale = (float) valueAnimator.getAnimatedValue(); for (int i = 0; i < scans.length; i++) { if (scans[i] != 0) { scans[i] = scale; } } if (scale <= 0.15) { if (focused) { mBorderPaint.setColor(borderFocusedColor); mDotPaint.setColor(dotFocusedColor); } else { mBorderPaint.setColor(borderNotFocusedColor); mDotPaint.setColor(dotNotFocusedColor); } } postInvalidate(); } }); scanAnim.start(); } @Override protected void onSelectionChanged(int selStart, int selEnd) { super.onSelectionChanged(selStart, selEnd); if (selEnd != getText().length()) { moveCursorToTheEnd(); } } private void moveCursorToTheEnd() { setSelection(getText().length()); } public interface TextLenChangeListener { void onTextLenChange(CharSequence text, int len); } private TextLenChangeListener textLenChangeListener; /** * 设置Text长度改变监听 * * @param lenListener 监听 */ public void setTextLenChangeListener(TextLenChangeListener lenListener) { textLenChangeListener = lenListener; } public void setBorderNotFocusedColor(@ColorInt int borderNotFocusedColor) { this.borderNotFocusedColor = borderNotFocusedColor; } public void setBorderFocusedColor(@ColorInt int borderFocusedColor) { this.borderFocusedColor = borderFocusedColor; } public void setBorderWidth(int borderWidth) { this.borderWidth = borderWidth; } public void setDotNotFocusedColor(@ColorInt int dotNotFocusedColor) { this.dotNotFocusedColor = dotNotFocusedColor; } public void setDotFocusedColor(@ColorInt int dotFocusedColor) { this.dotFocusedColor = dotFocusedColor; } public void setDotRadius(float dotRadius) { this.dotRadius = dotRadius; } @Override public void setBackgroundColor(@ColorInt int backgroundColor) { this.backgroundColor = backgroundColor; } public void setBoxCount(int boxCount) { this.boxCount = boxCount; } public void setBoxMarge(float boxMarge) { this.boxMarge = boxMarge; } public void setBoxRadius(float boxRadius) { this.boxRadius = boxRadius; } public void setFocusColorChangeEnable(boolean focusColorChangeEnable) { this.focusColorChangeEnable = focusColorChangeEnable; } }
[ "zhn2174@gmail.com" ]
zhn2174@gmail.com
894e1379e74e3eeed314cb8e999c626491a8a928
3000f3e038b7257ee418837ff079b65e3185bf9a
/assignment2/Calculator/src/testcase/CalculatorTest.java
32064796ee551b4c4aa9eb6555224199833edacd
[]
no_license
tvidyadhari/epam
065dfaf3fa2c386c102b9ee2ecc5f8c5f638e69b
4f0156462b088eb790e4d44bd61aa135406f2f8a
refs/heads/master
2020-05-03T10:04:11.305053
2019-06-29T08:46:01
2019-06-29T08:46:01
178,570,491
0
0
null
null
null
null
UTF-8
Java
false
false
755
java
package testcase; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import logic.Calculator; class CalculatorTest { @Test void testAdd() { assertEquals(0, Calculator.add(-1, 1)); assertEquals(55, Calculator.add(45, 10)); assertEquals(10, Calculator.add(5, 5)); } @Test void testMultiply() { assertEquals(15, Calculator.multiply(3, 5)); assertEquals(0, Calculator.multiply(3, 0)); assertEquals(-15, Calculator.multiply(3, -5)); } @Test void testDivide() { assertEquals(0, Calculator.divide(0, 1)); assertEquals(5, Calculator.divide(25, 5)); assertEquals(2, Calculator.divide(25, 11)); assertThrows(ArithmeticException.class, () -> { Calculator.divide(1, 0); }); } }
[ "tvidyadhari22@gmail.com" ]
tvidyadhari22@gmail.com
cf360a318d5983e8ac98ad7480be7cacef411690
32e67f8c6e6cd1c2c18178f15d350f9050141f42
/com.appunta.sample.MainActivity/src/com/appunta/android/ui/EyeView.java
644731538245f15758d77e3c9e6c086d0156ad83
[]
no_license
liqy/appunta
c8c0460c98cf3584b6d8b9ad09a97b83062b916a
85e41e075bd8f188ebe36e5cd231908723a60cc9
refs/heads/master
2021-01-25T08:43:08.096363
2012-09-20T00:51:27
2012-09-20T00:51:27
5,880,026
5
3
null
null
null
null
WINDOWS-1250
Java
false
false
3,914
java
/* Copyright Sergi Martínez (@sergiandreplace) 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.appunta.android.ui; import android.content.Context; import android.graphics.Canvas; import android.util.AttributeSet; import com.appunta.android.math3d.Math3dUtil; import com.appunta.android.math3d.Trig1; import com.appunta.android.math3d.Trig3; import com.appunta.android.math3d.Vector1; import com.appunta.android.math3d.Vector2; import com.appunta.android.math3d.Vector3; import com.appunta.android.point.Point; public class EyeView extends AppuntaView { private static final int SCREEN_DEPTH = 1; private Vector3 camRot=new Vector3(); private Trig3 camTrig=new Trig3(); private Vector3 camPos=new Vector3(); private Vector3 pointPos=new Vector3(); private Vector3 relativePos=new Vector3(); private Vector3 relativeRotPos=new Vector3(); private Vector3 screenRatio=new Vector3(); private Vector2 screenPos=new Vector2(); private Vector2 screenSize=new Vector2(); private Vector1 screenRot=new Vector1(); private Trig1 screenRotTrig=new Trig1(); private boolean drawn; public EyeView(Context context) { super(context); init(); } public EyeView(Context context, AttributeSet attrs) { super(context, attrs); init(); } EyeView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } private void init() { screenRatio.z=SCREEN_DEPTH; } @Override protected void preRender(Canvas canvas) { // For the moment we stablish a square as ratio. Size is arithmetic mean of width and height screenRatio.y=(getWidth()+getHeight())/2; screenRatio.x=(getWidth()+getHeight())/2; // Get the current size of the window screenSize.y=getHeight(); screenSize.x=getWidth(); //Obtain the current camera rotation and related calculations based on phone orientation and rotation Math3dUtil.getCamRotation(getOrientation(), getPhoneRotation(), camRot, camTrig, screenRot, screenRotTrig); //Transform current camera location into a position object; Math3dUtil.convertLocationToPosition(getLocation(), camPos); } @Override protected void calculatePointCoordinates(Point point) { //Transform point Location into a Position object Math3dUtil.convertLocationToPosition(point.getLocation(), pointPos); //Calculate relative position to the camera. Transforms angles of latitude and longitude into meters of distance. Math3dUtil.getRelativeTranslationInMeters(pointPos, camPos, relativePos); //Rotates the point around the camera in order to stablish the camera rotation to <0,0,0> Math3dUtil.getRelativeRotation(relativePos, camTrig, relativeRotPos); //Converts a 3d position into a 2d position on screen drawn=Math3dUtil.convert3dTo2d(relativeRotPos, screenSize, screenRatio, screenRotTrig, screenPos); //If drawn is false, the point is behind us, so no need to paint if (drawn) { point.setX((float) screenPos.x); point.setY((float) screenPos.y); } point.setDrawn(drawn); } @Override protected void postRender(Canvas canvas) { // TODO Auto-generated method stub } }
[ "liqingyi@outlook.com" ]
liqingyi@outlook.com
27c8ee2416c528c3cc96ce17d904b06505dd6282
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_fc0a5b87f58b138fc889e0a01bc2fb36b7fcba09/EventServiceImpl/24_fc0a5b87f58b138fc889e0a01bc2fb36b7fcba09_EventServiceImpl_s.java
e16246f1ec23c8b1768dc008fae7803e5fa3bbf9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
31,117
java
/* * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved. * * 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.hazelcast.spi.impl; import com.hazelcast.core.HazelcastException; import com.hazelcast.instance.MemberImpl; import com.hazelcast.instance.Node; import com.hazelcast.logging.ILogger; import com.hazelcast.nio.Address; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.Packet; import com.hazelcast.nio.serialization.Data; import com.hazelcast.nio.serialization.DataSerializable; import com.hazelcast.nio.serialization.IdentifiedDataSerializable; import com.hazelcast.spi.*; import com.hazelcast.spi.annotation.PrivateApi; import com.hazelcast.util.Clock; import com.hazelcast.util.ConcurrencyUtil; import com.hazelcast.util.ConstructorFunction; import com.hazelcast.util.executor.StripedExecutor; import com.hazelcast.util.executor.StripedRunnable; import java.io.IOException; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; /** * @author mdogan 12/14/12 */ public class EventServiceImpl implements EventService, PostJoinAwareService { private static final EventRegistration[] EMPTY_REGISTRATIONS = new EventRegistration[0]; private final ILogger logger; private final NodeEngineImpl nodeEngine; private final ConcurrentMap<String, EventServiceSegment> segments; private final StripedExecutor eventExecutor; EventServiceImpl(NodeEngineImpl nodeEngine) { this.nodeEngine = nodeEngine; logger = nodeEngine.getLogger(EventService.class.getName()); final Node node = nodeEngine.getNode(); int eventThreadCount = node.getGroupProperties().EVENT_THREAD_COUNT.getInteger(); eventExecutor = new StripedExecutor(nodeEngine.executionService.getCachedExecutor(), eventThreadCount); segments = new ConcurrentHashMap<String, EventServiceSegment>(); } public EventRegistration registerLocalListener(String serviceName, String topic, Object listener) { return registerListenerInternal(serviceName, topic, new EmptyFilter(), listener, true); } public EventRegistration registerLocalListener(String serviceName, String topic, EventFilter filter, Object listener) { return registerListenerInternal(serviceName, topic, filter, listener, true); } public EventRegistration registerListener(String serviceName, String topic, Object listener) { return registerListenerInternal(serviceName, topic, new EmptyFilter(), listener, false); } public EventRegistration registerListener(String serviceName, String topic, EventFilter filter, Object listener) { return registerListenerInternal(serviceName, topic, filter, listener, false); } private EventRegistration registerListenerInternal(String serviceName, String topic, EventFilter filter, Object listener, boolean localOnly) { if (listener == null) { throw new IllegalArgumentException("Listener required!"); } if (filter == null) { throw new IllegalArgumentException("EventFilter required!"); } EventServiceSegment segment = getSegment(serviceName, true); Registration reg = new Registration(UUID.randomUUID().toString(), serviceName, topic, filter, nodeEngine.getThisAddress(), listener, localOnly); if (segment.addRegistration(topic, reg)) { if (!localOnly) { invokeRegistrationOnOtherNodes(serviceName, reg); } return reg; } else { return null; } } private boolean handleRegistration(Registration reg) { EventServiceSegment segment = getSegment(reg.serviceName, true); return segment.addRegistration(reg.topic, reg); } public boolean deregisterListener(String serviceName, String topic, Object id) { final EventServiceSegment segment = getSegment(serviceName, false); if (segment != null) { final Registration reg = segment.removeRegistration(topic, String.valueOf(id)); if (reg != null && !reg.isLocalOnly()) { invokeDeregistrationOnOtherNodes(serviceName, topic, String.valueOf(id)); } return reg != null; } return false; } public void deregisterAllListeners(String serviceName, String topic) { final EventServiceSegment segment = getSegment(serviceName, false); if (segment != null) { segment.removeRegistrations(topic); } } private void deregisterSubscriber(String serviceName, String topic, String id) { final EventServiceSegment segment = getSegment(serviceName, false); if (segment != null) { segment.removeRegistration(topic, id); } } private void invokeRegistrationOnOtherNodes(String serviceName, Registration reg) { Collection<MemberImpl> members = nodeEngine.getClusterService().getMemberList(); Collection<Future> calls = new ArrayList<Future>(members.size()); for (MemberImpl member : members) { if (!member.localMember()) { Invocation inv = nodeEngine.getOperationService().createInvocationBuilder(serviceName, new RegistrationOperation(reg), member.getAddress()).build(); calls.add(inv.invoke()); } } for (Future f : calls) { try { f.get(5, TimeUnit.SECONDS); } catch (InterruptedException ignored) { } catch (TimeoutException ignored) { } catch (ExecutionException e) { throw new HazelcastException(e); } } } private void invokeDeregistrationOnOtherNodes(String serviceName, String topic, String id) { Collection<MemberImpl> members = nodeEngine.getClusterService().getMemberList(); Collection<Future> calls = new ArrayList<Future>(members.size()); for (MemberImpl member : members) { if (!member.localMember()) { Invocation inv = nodeEngine.getOperationService().createInvocationBuilder(serviceName, new DeregistrationOperation(topic, id), member.getAddress()).build(); calls.add(inv.invoke()); } } for (Future f : calls) { try { f.get(5, TimeUnit.SECONDS); } catch (InterruptedException ignored) { } catch (TimeoutException ignored) { } catch (ExecutionException e) { throw new HazelcastException(e); } } } public EventRegistration[] getRegistrationsAsArray(String serviceName, String topic) { final EventServiceSegment segment = getSegment(serviceName, false); if (segment != null) { final Collection<Registration> registrations = segment.getRegistrations(topic, false); return registrations != null && !registrations.isEmpty() ? registrations.toArray(new Registration[registrations.size()]) : EMPTY_REGISTRATIONS; } return EMPTY_REGISTRATIONS; } public Collection<EventRegistration> getRegistrations(String serviceName, String topic) { final EventServiceSegment segment = getSegment(serviceName, false); if (segment != null) { final Collection<Registration> registrations = segment.getRegistrations(topic, false); return registrations != null && !registrations.isEmpty() ? Collections.<EventRegistration>unmodifiableCollection(registrations) : Collections.<EventRegistration>emptySet(); } return Collections.emptySet(); } public void publishEvent(String serviceName, EventRegistration registration, Object event, int orderKey) { if (!(registration instanceof Registration)) { throw new IllegalArgumentException(); } final Registration reg = (Registration) registration; if (reg.isLocal()) { executeLocal(serviceName, event, reg, orderKey); } else { final Address subscriber = registration.getSubscriber(); sendEventPacket(subscriber, new EventPacket(registration.getId(), serviceName, event), orderKey); } } public void publishEvent(String serviceName, Collection<EventRegistration> registrations, Object event, int orderKey) { final Iterator<EventRegistration> iter = registrations.iterator(); Data eventData = null; while (iter.hasNext()) { EventRegistration registration = iter.next(); if (!(registration instanceof Registration)) { throw new IllegalArgumentException(); } final Registration reg = (Registration) registration; if (reg.isLocal()) { executeLocal(serviceName, event, reg, orderKey); } else { if (eventData == null) { eventData = nodeEngine.toData(event); } final Address subscriber = registration.getSubscriber(); sendEventPacket(subscriber, new EventPacket(registration.getId(), serviceName, eventData), orderKey); } } } private void executeLocal(String serviceName, Object event, Registration reg, int orderKey) { if (nodeEngine.isActive()) { try { eventExecutor.execute(new LocalEventDispatcher(serviceName, event, reg.listener, orderKey)); } catch (RejectedExecutionException e) { logger.log(Level.WARNING, e.toString()); } } } private void sendEventPacket(Address subscriber, EventPacket eventPacket, int orderKey) { final String serviceName = eventPacket.serviceName; final EventServiceSegment segment = getSegment(serviceName, true); boolean sync = segment.incrementPublish() % 100000 == 0; if (sync) { Invocation inv = nodeEngine.getOperationService().createInvocationBuilder(serviceName, new SendEventOperation(eventPacket, orderKey), subscriber).setTryCount(50).build(); try { inv.invoke().get(3, TimeUnit.SECONDS); } catch (Exception ignored) { } } else { final Packet packet = new Packet(nodeEngine.toData(eventPacket), orderKey, nodeEngine.getSerializationContext()); packet.setHeader(Packet.HEADER_EVENT); nodeEngine.send(packet, subscriber); } } private EventServiceSegment getSegment(String service, boolean forceCreate) { EventServiceSegment segment = segments.get(service); if (segment == null && forceCreate) { return ConcurrencyUtil.getOrPutIfAbsent(segments, service, new ConstructorFunction<String, EventServiceSegment>() { public EventServiceSegment createNew(String key) { return new EventServiceSegment(key); } }); } return segment; } @PrivateApi void executeEvent(Runnable eventRunnable) { if (nodeEngine.isActive()) { try { eventExecutor.execute(eventRunnable); } catch (RejectedExecutionException e) { logger.log(Level.WARNING, e.toString()); } } } @PrivateApi void handleEvent(Packet packet) { try { eventExecutor.execute(new RemoteEventPacketProcessor(packet)); } catch (RejectedExecutionException e) { logger.log(Level.WARNING, e.toString()); } } public PostJoinRegistrationOperation getPostJoinOperation() { final Collection<Registration> registrations = new LinkedList<Registration>(); for (EventServiceSegment segment : segments.values()) { for (Registration reg : segment.registrationIdMap.values()) { if (!reg.isLocalOnly()) { registrations.add(reg); } } } return registrations.isEmpty() ? null : new PostJoinRegistrationOperation(registrations); } void shutdown() { logger.log(Level.FINEST, "Stopping event executor..."); eventExecutor.shutdown(); for (EventServiceSegment segment : segments.values()) { segment.clear(); } segments.clear(); } void onMemberLeft(MemberImpl member) { final Address address = member.getAddress(); for (EventServiceSegment segment : segments.values()) { segment.onMemberLeft(address); } } private static class EventServiceSegment { final String serviceName; final ConcurrentMap<String, Collection<Registration>> registrations = new ConcurrentHashMap<String, Collection<Registration>>(); final ConcurrentMap<String, Registration> registrationIdMap = new ConcurrentHashMap<String, Registration>(); final AtomicInteger totalPublishes = new AtomicInteger(); EventServiceSegment(String serviceName) { this.serviceName = serviceName; } private Collection<Registration> getRegistrations(String topic, boolean forceCreate) { Collection<Registration> listenerList = registrations.get(topic); if (listenerList == null && forceCreate) { return ConcurrencyUtil.getOrPutIfAbsent(registrations, topic, new ConstructorFunction<String, Collection<Registration>>() { public Collection<Registration> createNew(String key) { return Collections.newSetFromMap(new ConcurrentHashMap<Registration, Boolean>()); } }); } return listenerList; } private boolean addRegistration(String topic, Registration registration) { final Collection<Registration> registrations = getRegistrations(topic, true); if (registrations.add(registration)) { registrationIdMap.put(registration.id, registration); return true; } return false; } private Registration removeRegistration(String topic, String id) { final Registration registration = registrationIdMap.remove(id); if (registration != null) { final Collection<Registration> all = registrations.get(topic); if (all != null) { all.remove(registration); } } return registration; } void removeRegistrations(String topic) { final Collection<Registration> all = registrations.remove(topic); if (all != null) { for (Registration reg : all) { registrationIdMap.remove(reg.getId()); } } } void clear() { registrations.clear(); registrationIdMap.clear(); } void onMemberLeft(Address address) { for (Collection<Registration> all : registrations.values()) { Iterator<Registration> iter = all.iterator(); while (iter.hasNext()) { Registration reg = iter.next(); if (address.equals(reg.getSubscriber())) { iter.remove(); registrationIdMap.remove(reg.id); } } } } int incrementPublish() { return totalPublishes.incrementAndGet(); } } private class EventPacketProcessor implements StripedRunnable { private EventPacket eventPacket; int orderKey; private EventPacketProcessor() { } public EventPacketProcessor(EventPacket packet, int orderKey) { this.eventPacket = packet; this.orderKey = orderKey; } public void run() { process(eventPacket); } void process(EventPacket eventPacket) { Object eventObject = eventPacket.event; if (eventObject instanceof Data) { eventObject = nodeEngine.toObject(eventObject); } final String serviceName = eventPacket.serviceName; EventPublishingService<Object, Object> service = nodeEngine.getService(serviceName); if (service == null) { logger.log(Level.WARNING, "There is no service named: " + serviceName); return; } EventServiceSegment segment = getSegment(serviceName, false); if (segment == null) { logger.log(Level.WARNING, "No service registration found for " + serviceName); return; } Registration registration = segment.registrationIdMap.get(eventPacket.id); if (registration == null) { logger.log(Level.WARNING, "No registration found for " + serviceName + " / " + eventPacket.id); return; } if (!registration.isLocal()) { logger.log(Level.WARNING, "Invalid target for " + registration); return; } dispatchEvent(service, eventObject, registration.listener); } public int getKey() { return orderKey; } } private class RemoteEventPacketProcessor extends EventPacketProcessor implements StripedRunnable { private Packet packet; public RemoteEventPacketProcessor(Packet packet) { this.packet = packet; this.orderKey = packet.getPartitionId(); } public void run() { Data data = packet.getData(); EventPacket eventPacket = (EventPacket) nodeEngine.toObject(data); process(eventPacket); } } private class LocalEventDispatcher implements StripedRunnable { final String serviceName; final Object event; final Object listener; final int orderKey; private LocalEventDispatcher(String serviceName, Object event, Object listener, int orderKey) { this.serviceName = serviceName; this.event = event; this.listener = listener; this.orderKey = orderKey; } public final void run() { final EventPublishingService<Object, Object> service = nodeEngine.getService(serviceName); if (service != null) { dispatchEvent(service, event, listener); } else { if (nodeEngine.isActive()) { throw new IllegalArgumentException("Service[" + serviceName + "] could not be found!"); } } } public int getKey() { return orderKey; } } private void dispatchEvent(EventPublishingService<Object, Object> service, Object event, Object listener) { final long start = Clock.currentTimeMillis(); service.dispatchEvent(event, listener); final long end = Clock.currentTimeMillis(); if ((end - start) > 100) { logger.log(Level.WARNING, "Caution: Off-load event processing to your own thread-pool, don't use event thread! Listener: " + listener); } } public static class Registration implements EventRegistration { private String id; private String serviceName; private String topic; private EventFilter filter; private Address subscriber; private transient boolean localOnly; private transient Object listener; public Registration() { } public Registration(String id, String serviceName, String topic, EventFilter filter, Address subscriber, Object listener, boolean localOnly) { this.filter = filter; this.id = id; this.listener = listener; this.serviceName = serviceName; this.topic = topic; this.subscriber = subscriber; this.localOnly = localOnly; } public EventFilter getFilter() { return filter; } public String getId() { return id; } public Address getSubscriber() { return subscriber; } public boolean isLocalOnly() { return localOnly; } private boolean isLocal() { return listener != null; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Registration that = (Registration) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false; if (topic != null ? !topic.equals(that.topic) : that.topic != null) return false; if (filter != null ? !filter.equals(that.filter) : that.filter != null) return false; if (subscriber != null ? !subscriber.equals(that.subscriber) : that.subscriber != null) return false; return true; } @Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0); result = 31 * result + (topic != null ? topic.hashCode() : 0); result = 31 * result + (filter != null ? filter.hashCode() : 0); result = 31 * result + (subscriber != null ? subscriber.hashCode() : 0); return result; } public void writeData(ObjectDataOutput out) throws IOException { out.writeUTF(id); out.writeUTF(serviceName); out.writeUTF(topic); subscriber.writeData(out); out.writeObject(filter); } public void readData(ObjectDataInput in) throws IOException { id = in.readUTF(); serviceName = in.readUTF(); topic = in.readUTF(); subscriber = new Address(); subscriber.readData(in); filter = in.readObject(); } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("Registration"); sb.append("{filter=").append(filter); sb.append(", id='").append(id).append('\''); sb.append(", serviceName='").append(serviceName).append('\''); sb.append(", subscriber=").append(subscriber); sb.append(", listener=").append(listener); sb.append('}'); return sb.toString(); } } public final static class EventPacket implements IdentifiedDataSerializable { private String id; private String serviceName; private Object event; public EventPacket() { } EventPacket(String id, String serviceName, Object event) { this.event = event; this.id = id; this.serviceName = serviceName; } public void writeData(ObjectDataOutput out) throws IOException { out.writeUTF(id); out.writeUTF(serviceName); out.writeObject(event); } public void readData(ObjectDataInput in) throws IOException { id = in.readUTF(); serviceName = in.readUTF(); event = in.readObject(); } public int getFactoryId() { return SpiDataSerializerHook.F_ID; } public int getId() { return SpiDataSerializerHook.EVENT_PACKET; } } public static final class EmptyFilter implements EventFilter, DataSerializable { public boolean eval(Object arg) { return true; } public void writeData(ObjectDataOutput out) throws IOException { } public void readData(ObjectDataInput in) throws IOException { } @Override public boolean equals(Object obj) { return obj instanceof EmptyFilter; } @Override public int hashCode() { return 0; } } public static class SendEventOperation extends AbstractOperation { private EventPacket eventPacket; private int orderKey; public SendEventOperation() { } public SendEventOperation(EventPacket eventPacket, int orderKey) { this.eventPacket = eventPacket; this.orderKey = orderKey; } public void run() throws Exception { EventServiceImpl eventService = (EventServiceImpl) getNodeEngine().getEventService(); eventService.executeEvent(eventService.new EventPacketProcessor(eventPacket, orderKey)); } public boolean returnsResponse() { return true; } protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); eventPacket.writeData(out); out.writeInt(orderKey); } protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); eventPacket = new EventPacket(); eventPacket.readData(in); orderKey = in.readInt(); } } public static class RegistrationOperation extends AbstractOperation { private Registration registration; private transient boolean response = false; public RegistrationOperation() { } private RegistrationOperation(Registration registration) { this.registration = registration; } public void run() throws Exception { EventServiceImpl eventService = (EventServiceImpl) getNodeEngine().getEventService(); response = eventService.handleRegistration(registration); } @Override public Object getResponse() { return response; } @Override public boolean returnsResponse() { return true; } @Override protected void writeInternal(ObjectDataOutput out) throws IOException { registration.writeData(out); } @Override protected void readInternal(ObjectDataInput in) throws IOException { registration = new Registration(); registration.readData(in); } } public static class DeregistrationOperation extends AbstractOperation { private String topic; private String id; DeregistrationOperation() { } private DeregistrationOperation(String topic, String id) { this.topic = topic; this.id = id; } public void run() throws Exception { EventServiceImpl eventService = (EventServiceImpl) getNodeEngine().getEventService(); eventService.deregisterSubscriber(getServiceName(), topic, id); } @Override public Object getResponse() { return true; } @Override public boolean returnsResponse() { return true; } @Override protected void writeInternal(ObjectDataOutput out) throws IOException { out.writeUTF(topic); out.writeUTF(id); } @Override protected void readInternal(ObjectDataInput in) throws IOException { topic = in.readUTF(); id = in.readUTF(); } } public static class PostJoinRegistrationOperation extends AbstractOperation { private Collection<Registration> registrations; public PostJoinRegistrationOperation() { } public PostJoinRegistrationOperation(Collection<Registration> registrations) { this.registrations = registrations; } @Override public void run() throws Exception { if (registrations != null && registrations.size() > 0) { NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); EventServiceImpl eventService = nodeEngine.eventService; for (Registration reg : registrations) { eventService.handleRegistration(reg); } } } @Override public boolean returnsResponse() { return false; } @Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); int len = registrations != null ? registrations.size() : 0; out.writeInt(len); if (len > 0) { for (Registration reg : registrations) { reg.writeData(out); } } } @Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); int len = in.readInt(); if (len > 0) { registrations = new ArrayList<Registration>(len); for (int i = 0; i < len; i++) { Registration reg = new Registration(); registrations.add(reg); reg.readData(in); } } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c791b8ac513afd1706cfd5e80557d67efb59d646
252fce0244897d2b387d5be3d84deec78e7c524f
/LiteratureManage/src/com/teamghz/action/PanelAction.java
7a368e7cd8e9f57fa15d6c2ebdcc45407d5cc14d
[]
no_license
gaohuangzhang/LiteratureReadingNotes
9f23f096415bb390959a3f8f577713495f11d50b
bfc64b9bce5ad893b49638c8b8af2be85a02ec6d
refs/heads/master
2021-01-19T04:38:43.345007
2016-12-14T10:49:43
2016-12-14T10:49:43
69,084,988
4
8
null
2016-12-13T13:38:59
2016-09-24T06:32:23
Java
UTF-8
Java
false
false
565
java
package com.teamghz.action; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.teamghz.configure.*; import com.teamghz.connecter.*; public class PanelAction { public String signOut() { ServletRequest request = ServletActionContext.getRequest(); HttpServletRequest req = (HttpServletRequest) request; HttpSession session = req.getSession(); session.invalidate(); System.out.println("SignOut"); return "SUCCESS"; } }
[ "dongchangzhang@gmail.com" ]
dongchangzhang@gmail.com
474b73a719623d984d3cc3f7a145e6210fd4959c
70aa8a1a5fc9ecc683b8526fedfcf20fcc2d77a5
/src/main/java/pl/edu/agh/cs/kraksim/main/ConsoleSimulationVisualizer.java
88337cb26619e0a6692ab23ff83ce0af455ff0b2
[]
no_license
Pysiokot/kraksim
cd837453b80bf1625da331e60385a6e3a7f1bcf3
398082b6ab6d43114bd331e73a6f0925c45202ea
refs/heads/master
2022-12-20T04:21:19.862986
2020-09-29T16:32:30
2020-09-29T16:32:30
237,761,884
0
1
null
null
null
null
UTF-8
Java
false
false
1,438
java
package pl.edu.agh.cs.kraksim.main; import pl.edu.agh.cs.kraksim.core.City; import pl.edu.agh.cs.kraksim.main.gui.SimulationVisualizer; import pl.edu.agh.cs.kraksim.ministat.CityMiniStatExt; import pl.edu.agh.cs.kraksim.ministat.MiniStatEView; import java.io.PrintWriter; class ConsoleSimulationVisualizer implements SimulationVisualizer { private final CityMiniStatExt stat; private final PrintWriter writer = new PrintWriter(System.out); public ConsoleSimulationVisualizer(final City city, final MiniStatEView statView) { stat = statView.ext(city); // System.out.println( "\n\n Starting Krasim Simulation " ); // System.out.println( "------------------------------------" ); // System.out.println( "Akademia Gorniczo Hutnicza 2005-2007\n\n" ); } public void startLearningPhase(final int phaseNum) { writer.printf("LEARNING PHASE: %d\n", phaseNum + 1); } public void startTestingPhase() { writer.printf("TESTING PHASE\n"); } public void endPhase() { writer.printf("\n"); } public void end(long elapsed) { writer.printf("Simulation time:" + (elapsed / 1000.0) + "\nTHE END\n"); writer.close(); } public void update(final int turn) { // if ( turn % 100 == 0 ) { writer.printf("\rturn: %6d %6d %6d %6.2f %6.2f", turn, stat.getTravelCount(), stat.getCarCount(), stat.getAvgVelocity(), stat.getTravelLength() / 1000); // } } }
[ "szcz.bart@gmail.com" ]
szcz.bart@gmail.com
0ca8e18107070e26cc22f84d4681d65e0e2b3206
eb0174136bfb94fcd53f990ead3a4f94d4f6bc3d
/spring-boot-controller/src/main/java/com/li/controller/view/HelloController.java
1dcbbce74bd724ef74191d2ff0d89a3bc228c8dc
[]
no_license
jianyli/spring-boot
9022720d3dc51076a3e53681712556aea930a2c0
097afd875b490c5bd36fe4a44aa1df0ac1dbcfea
refs/heads/master
2022-06-22T19:48:26.699408
2021-01-25T04:46:20
2021-01-25T04:46:20
228,300,446
0
0
null
2022-06-17T03:30:33
2019-12-16T04:10:26
Java
UTF-8
Java
false
false
1,303
java
package com.li.controller.view; import com.google.common.collect.Lists; import com.li.domain.Student; import com.li.domain.UserFriend; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import java.util.Date; import java.util.List; /** * @Author ljy * @Date 2021/1/24 13:28 * @description */ @Controller //@RequestMapping( "view") public class HelloController { @RequestMapping(value = "/") public String index(ModelMap map) { List<Student> students = Lists.newArrayList(); Student s1 = new Student(); Student s2 = new Student(); Student s3 = new Student(); s1.setName("li1"); s2.setName("li2"); s3.setName("li3"); s1.setSex("男"); s2.setSex("男"); s3.setSex("男"); students.add(s1); students.add(s2); students.add(s3); map.put("message"," test message"); map.put("username","李建有"); map.put("username1","甘密"); map.put("flag","yes"); map.put("students", students); map.put("date", new Date()); map.put("books",Lists.newArrayList("sd","fed","fsde")); map.put("age",34); return "index"; } }
[ "lijianyou@vortexinfo.cn" ]
lijianyou@vortexinfo.cn
626e3664c9668ea5e785ba5ba7c5acd23593da1a
0b588f7110f5b026cc6eb3af98f68f5b7174f5d1
/src/main/java/datastructures/minpriorityqueue/FibonacciHeap/FibonacciHeap.java
51b3d5114d8508dfbdd528d2a7b47d9d7a8c0377
[ "MIT" ]
permissive
nikhilc1527/Algorithms
e391b934d46d0c9a06aad0754ab109e938480364
9b756811186f3ad9fb5c1fff9705fee329c4baa8
refs/heads/master
2022-11-18T03:19:25.486026
2020-07-14T07:07:49
2020-07-14T07:07:49
265,966,641
0
0
null
2020-05-21T22:43:15
2020-05-21T22:43:14
null
UTF-8
Java
false
false
4,341
java
package datastructures.minpriorityqueue.FibonacciHeap; import java.util.HashMap; import java.util.HashSet; import java.util.Objects; public class FibonacciHeap { private final HashMap<Integer, Node> references; private Node min; public FibonacciHeap() { references = new HashMap<>(); } public static void main(String[] args) { FibonacciHeap h = new FibonacciHeap(); for (int i = 0; i < 10; i++) { h.insert(i); } h.delete(5); while (!h.isEmpty()) { System.out.println(h.extractMin()); } System.out.println(h); } public void insert(int val) { Node newNode = new Node(val); references.put(val, newNode); if (min == null) { min = newNode; min.left = min; min.right = min; } else { min.insert(newNode); if (newNode.val < min.val) { min = newNode; } } } public int extractMin() { int toReturn = min.val; references.remove(toReturn); if (min.left == min && min.child == null) { min = null; } else { min.safeUnlink(); min = min.left; consolidate(); } return toReturn; } public void delete(int val) { Node nodeForm = references.get(val); nodeForm.val = Integer.MIN_VALUE; min = nodeForm; extractMin(); } public boolean isEmpty() { return min == null; } private void consolidate() { Node[] degrees = new Node[45]; Node dummy = min; HashSet<Node> visited = new HashSet<>(); do { if (visited.contains(dummy)) { break; } if (dummy.val < min.val) { min = dummy; } while (degrees[dummy.degree] != null) { Node other = degrees[dummy.degree]; if (other.val < dummy.val) { Node temp = other; other = dummy; dummy = temp; } dummy.link(other); degrees[dummy.degree - 1] = null; } degrees[dummy.degree] = dummy; visited.add(dummy); dummy = dummy.right; } while (dummy != min); } @Override public String toString() { StringBuilder sb = new StringBuilder(); if (min != null) { Node dummy = min; do { sb.append(dummy.val).append(" "); dummy = dummy.right; } while (dummy != min); } return sb.toString(); } private static class Node { public int val; public Node left, right, child; public int degree; public boolean mark; public Node(int _val) { val = _val; } public void insert(Node other) { if (left == this) { left = other; right = other; left.right = this; left.left = this; } else { Node temp = left; left = other; left.right = this; left.left = temp; temp.right = left; } } public void unlink() { left.right = right; right.left = left; } public void safeUnlink() { saveChildren(); unlink(); } public void link(Node other) { other.unlink(); if (child == null) { child = new Node(other.val); child.left = child; child.right = child; } else { child.insert(other); } other.mark = false; degree++; } public void saveChildren() { if (child != null) { Node dummy = child; do { Node tempNext = dummy.right; insert(dummy); dummy = tempNext; } while (dummy != child); child = null; } } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Node node = (Node) o; return val == node.val && degree == node.degree && mark == node.mark && Objects.equals(left, node.left) && Objects.equals(right, node.right) && Objects.equals(child, node.child); } @Override public int hashCode() { return Objects.hash(val); } @Override public String toString() { return val + ""; } } }
[ "nishantc1527@gmail.com" ]
nishantc1527@gmail.com
68fa64afed6976aea6d0065649b9dc1deb625060
501d3bc27325bc74f4197a5f7f4139fbcac7b5cb
/exercici Git/src/Pujar.java
6dd4a92cb21e929abeaa6ed34a245ae7fd5f1424
[]
no_license
toRRRz/repo1
5ef1709d0c6a64babd5e974e205556666bb6cf17
a5d89098fd6a7551573fe5f8344177377ba20e85
refs/heads/master
2021-01-19T16:12:39.517597
2017-04-14T10:50:36
2017-04-14T10:50:36
88,256,001
0
0
null
2017-04-14T10:53:59
2017-04-14T09:52:37
Java
UTF-8
Java
false
false
29
java
public class Pujar { }
[ "sting68@hotmail.com" ]
sting68@hotmail.com
85c4616b0ad7558dd95ce3ac8fa996c8f5c7f5fa
6e77bd058376fd0013cd647c1f5b0addae9cc114
/src/com/edu/realestate/yelp/YelpBusiness.java
60adf5ec47896704518f9b45606006bce6e2cd9a
[]
no_license
pgtissot/immo
c4dbe381bafe8c6ce456c4897a599401ceb310e6
eed433f5e936e7b025cac010054854162dc9510f
refs/heads/master
2022-06-27T11:24:37.051017
2019-08-30T16:38:06
2019-08-30T16:38:06
198,404,493
0
0
null
2022-05-25T06:59:43
2019-07-23T10:06:10
Java
UTF-8
Java
false
false
1,221
java
package com.edu.realestate.yelp; public class YelpBusiness extends YelpElement { private String image_url; private String categories; private double rating; private double distance; public YelpBusiness(String name, String url, String image_url, String categories, double rating, double distance, String address) { super(name, url, address); this.image_url = image_url; this.categories = categories; this.rating = rating; this.distance = distance; } public String getImage_url() { return image_url; } public void setImage_url(String image_url) { this.image_url = image_url; } public String getCategories() { return categories; } public void setCategories(String categories) { this.categories = categories; } public double getRating() { return rating; } public void setRating(double rating) { this.rating = rating; } public double getDistance() { return distance; } public void setDistance(double distance) { this.distance = distance; } @Override public String toString() { return "YelpBusiness [" + super.toString() + ", image_url=" + image_url + ", categories=" + categories + ", rating=" + rating + ", distance=" + distance + "]"; } }
[ "pgtissot15@gmail.com" ]
pgtissot15@gmail.com
045f785c1a08f0fe95a177688df430e3644e4d15
ec5d445e19c69c196097d266efb4a6a83b3588ca
/graph/src/main/java/graph/DFSAdjMatrix.java
bd0ee472a9dd500f4835bd93d98d76ec38e7a91e
[]
no_license
managerwhocodes/Data-Structures-Algorithms
b1061f7069bb7638ffabd84e7a5eb21f92515b68
ee83f935d30308f6c3b73ac31af1f4f4afdbe0fd
refs/heads/master
2021-08-29T05:06:39.322419
2021-08-17T20:27:51
2021-08-17T20:27:51
250,962,888
0
0
null
2021-08-17T20:27:52
2020-03-29T05:45:11
Java
UTF-8
Java
false
false
2,303
java
package graph; import java.util.ArrayList; import java.util.Stack; public class DFSAdjMatrix{ private ArrayList<GraphNode> nodeList = new ArrayList<GraphNode>(); private int [][] adjMatrix; private DFSAdjMatrix(ArrayList<GraphNode> nodeList){ this.nodeList = nodeList; this.adjMatrix = new int[nodeList.size()][nodeList.size()]; } private void bfs(GraphNode node){ Stack<GraphNode> stack = new Stack<GraphNode>(); stack.add(node); while(!stack.isEmpty()){ GraphNode presentNode = stack.pop(); presentNode.setVisited(true); System.out.print(presentNode.getName()+" "); presentNode.setNeighbours(getNeighbors(presentNode)); for(GraphNode neighbour : presentNode.getNeighbours()) { if(!neighbour.isVisited()) { stack.push(neighbour); neighbour.setVisited(true); } } } } private void addUndirectedEdge(int i, int j){ adjMatrix[i][j] = 1; adjMatrix[j][i] = 1; } private ArrayList<GraphNode> getNeighbors(GraphNode node) { ArrayList<GraphNode> neighbors = new ArrayList<GraphNode>(); int nodeIndex = node.getIndex(); for(int i=0; i<adjMatrix.length;i++) { if(adjMatrix[nodeIndex][i]==1) { neighbors.add(nodeList.get(i)); } } return neighbors; } public static void main(String args[]){ ArrayList<GraphNode> nodeList = new ArrayList<GraphNode>(); for(int i=0;i<10;i++){ nodeList.add(new GraphNode("V"+i,i)); } DFSAdjMatrix graph = new DFSAdjMatrix(nodeList); graph.addUndirectedEdge(0,1); graph.addUndirectedEdge(0,3); graph.addUndirectedEdge(1,2); graph.addUndirectedEdge(1,4); graph.addUndirectedEdge(2,5); graph.addUndirectedEdge(2,9); graph.addUndirectedEdge(3,6); graph.addUndirectedEdge(4,7); graph.addUndirectedEdge(5,8); graph.addUndirectedEdge(6,7); graph.addUndirectedEdge(7,8); graph.addUndirectedEdge(8,9); System.out.println("Printing BFS from source: "+nodeList.get(0).getName()); graph.bfs(nodeList.get(0)); } }
[ "managerwhocodes@gmail.com" ]
managerwhocodes@gmail.com
39ffddc854dd151ff80c1e8d12360238b15add08
739dfb48691757f013ec0f3e272c046b746bbd7e
/jcommon/src/main/java/com/cmp/common/id/UUID.java
904e786d78b7a37a9bdeb3cdb6057d1bbb91e03b
[]
no_license
kangdawei/javadev-ideas
57b84b6c4745bf4191d9c371ed24f4503a733b39
a14df4a410a773fd9504ceb45303c77fae50ddb6
refs/heads/master
2021-01-13T03:00:50.035757
2016-12-19T12:13:36
2016-12-19T12:13:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,650
java
package com.cmp.common.id; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.TimeUnit; /** * ID生成策略:64位ID (42(毫秒)+5(机器ID)+5(业务编码)+12(重复累加)) 每秒26W ID * * @author HongjianZ */ public class UUID { private static long twepoch = 1288834974657L; // 机器标识位数 private static long workerIdBits = 5L; // 数据中心标识位数 private static long datacenterIdBits = 5L; // 毫秒内自增位 private static long sequenceBits = 12L; // 机器ID偏左移12位 private static long workerIdShift = sequenceBits; // 数据中心ID左移17位 private static long datacenterIdShift = sequenceBits + workerIdBits; // 时间毫秒左移22位 private static long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits; private static long sequenceMask = -1L ^ (-1L << sequenceBits); private static long lastTimestamp = -1L; private long sequence = 0L; private long workerId; private long datacenterId; public long getWorkerId() { return workerId; } public void setWorkerId(long workerId) { this.workerId = workerId; } public long getDatacenterId() { return datacenterId; } public void setDatacenterId(long datacenterId) { this.datacenterId = datacenterId; } public synchronized long nextID() { long timestamp = timeGen(); if (timestamp < lastTimestamp) { try { throw new Exception("Clock moved backwards. Refusing to generate id for " + (lastTimestamp - timestamp) + " milliseconds"); } catch (Exception e) { e.printStackTrace(); } } if (lastTimestamp == timestamp) { // 当前毫秒内,则+1 sequence = (sequence + 1) & sequenceMask; if (sequence == 0) { // 当前毫秒内计数满了,则等待下一秒 timestamp = tilNextMillis(lastTimestamp); } } else { sequence = 0; } lastTimestamp = timestamp; // ID偏移组合生成最终的ID return ((timestamp - twepoch) << timestampLeftShift) | (datacenterId << datacenterIdShift) | (workerId << workerIdShift) | sequence; } private long tilNextMillis(final long lastTimestamp) { long timestamp = this.timeGen(); while (timestamp <= lastTimestamp) { timestamp = this.timeGen(); } return timestamp; } private long timeGen() { return System.currentTimeMillis(); } // TEST public static void main(String[] args) { // 机器ID和数据中心ID UUID w = new UUID(); w.setWorkerId(2); w.setDatacenterId(2); final CyclicBarrier cdl = new CyclicBarrier(100); for (int i = 0; i < 1000; i++) { System.out.println(i + 1); new Thread(new Runnable() { @Override public void run() { try { cdl.await(); } catch (InterruptedException e) { e.printStackTrace(); } catch (BrokenBarrierException e) { e.printStackTrace(); } System.out.println(w.nextID()); } }).start(); } try { TimeUnit.SECONDS.sleep(5); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "yanliangliang123" ]
yanliangliang123
87a70ff726f943a561541a01b3eff5d88e4d29bd
0916b7b92eb92627b023e776d5a5119f4b16d827
/hciDesktop/src/mainPackage/Main.java
3fbfd4ee016dc2301f3a5ca75fe7064c58a5cd79
[]
no_license
ddome/tphci2009c2
130e3c538171b6600828d4e7bd7818f744e44ef4
136fdb36faebe692beb64bb64ab1286a8c1d0ccb
refs/heads/master
2021-01-10T11:55:04.463576
2009-11-24T03:48:29
2009-11-24T03:48:29
53,597,276
0
0
null
null
null
null
UTF-8
Java
false
false
5,086
java
package mainPackage; import java.awt.event.ActionListener; import java.util.Locale; import org.jdesktop.application.*; import javax.swing.*; import utils.LanguageSession; import utils.Session; import servicesHandler.LogoutHandler; public class Main extends SingleFrameApplication{ static JMenuBar mbar= new JMenuBar(); static JMenu searchD = new JMenu(); static JMenu userD = new JMenu(); static JMenuItem menuItemLanguaje= new JMenuItem(); static JMenuItem login = new JMenuItem(); static JMenuItem register = new JMenuItem(); static JMenuItem password = new JMenuItem(); static JMenuItem account = new JMenuItem(); static JMenuItem logout = new JMenuItem(); static JMenuItem search = new JMenuItem(); static String confirmExitTitle; static String confirmExitMsg; static JFrame main; public static JFrame myFrame; @SuppressWarnings("deprecation") protected void startup() { myFrame = getMainFrame(); myFrame.setName("mainFrame"); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(Password.class); confirmExitTitle=resourceMap.getString("confirmExitTitle.text"); confirmExitMsg=resourceMap.getString("confirmExitMsg.text"); new Session(); searchD.setName("searchMenu"); userD.setName("userMenu"); login.setName("loginDialog"); password.setName("passwordDialog"); account.setName("accountDialog"); register.setName("registerDialog"); logout.setName("logoutAction"); search.setName("searchDialog"); login.addActionListener(new ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JFrame mainFrame = getMainFrame(); mainFrame.setEnabled(false); Login login = new Login(); login.setLocationRelativeTo(mainFrame); login.setVisible(true); login.setResizable(false); }; }); search.addActionListener(new ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JFrame mainFrame = getMainFrame(); Search login = new Search(); login.setLocationRelativeTo(mainFrame); login.setVisible(true); login.setResizable(false); }; }); register.addActionListener(new ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JFrame mainFrame = getMainFrame(); mainFrame.setEnabled(false); Register register = new Register(); register.setLocationRelativeTo(mainFrame); register.setVisible(true); register.setResizable(false); }; }); password.addActionListener(new ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JFrame mainFrame = getMainFrame(); mainFrame.setEnabled(false); Password password = new Password(); password.setLocationRelativeTo(mainFrame); password.setVisible(true); password.setResizable(false); }; }); account.addActionListener(new ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JFrame mainFrame = getMainFrame(); mainFrame.setEnabled(false); UpdateAccount account = new UpdateAccount(); account.setLocationRelativeTo(mainFrame); account.setVisible(true); account.setResizable(false); }; }); logout.addActionListener(new ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { int option = JOptionPane.showConfirmDialog(null,confirmExitMsg,confirmExitTitle, JOptionPane.YES_NO_OPTION); if(JOptionPane.NO_OPTION==option){ return; } new LogoutHandler(Session.getSession().username,Session.getSession().token); toggleLoginOff(); Session.getSession().CloseSession(); }; }); userD.add(register); userD.add(login); searchD.add(search); userD.add(password).hide(); userD.add(account).hide(); userD.add(logout).hide(); mbar.add(searchD); mbar.add(userD); main = getMainFrame(); getMainFrame().setJMenuBar(mbar); getMainFrame().add((new JScrollPane()).add(new TabbedPanel())); show(getMainFrame()); } public static void main(String[] args) { new LenguajeSelector(null); if(LanguageSession.getActualLangugeName().compareToIgnoreCase("English")==0){ Locale.setDefault(new Locale("en","US")); } else{ Locale.setDefault(new Locale("es","AR")); } launch(Main.class, args); } @SuppressWarnings("deprecation") public static void toggleLoginOn(){ userD.getMenuComponent(1).hide(); userD.getMenuComponent(0).hide(); userD.getMenuComponent(2).show(); userD.getMenuComponent(3).show(); userD.getMenuComponent(4).show(); } @SuppressWarnings("deprecation") public static void toggleLoginOff(){ userD.getMenuComponent(1).show(); userD.getMenuComponent(0).show(); userD.getMenuComponent(2).hide(); userD.getMenuComponent(3).hide(); userD.getMenuComponent(4).hide(); } }
[ "bombax@77f57708-cd88-11de-8d2e-8bf2cb4fc7ae" ]
bombax@77f57708-cd88-11de-8d2e-8bf2cb4fc7ae
91c85a4a39f883b61ffb6a2fa172d88fee151cc3
9684339b5fb6913b21c0f00d21c8b4d202c848f5
/Jarvis/app/src/main/java/edu/depaul/csc595/jarvis/detection/gcm/JarvisInstanceIdListenerService.java
42f4939a9fc63929d49f3bdf811bb2557e864950
[]
no_license
csc595g1/hrpd
bd40aae9e6a2986817c03dc87d3c438ae945d603
a45453ce2b79c4955cfce2064848ddfaa1e10662
refs/heads/master
2021-01-10T13:20:06.059057
2016-04-05T00:26:32
2016-04-05T00:26:32
49,824,129
1
14
null
2016-04-05T00:26:32
2016-01-17T15:57:56
Java
UTF-8
Java
false
false
545
java
package edu.depaul.csc595.jarvis.detection.gcm; import android.content.Intent; import com.google.android.gms.iid.InstanceIDListenerService; /** * JarvisInstanceIdListenerService.java * Jarvis */ public class JarvisInstanceIdListenerService extends InstanceIDListenerService { @Override public void onTokenRefresh() { // Fetch updated InstanceID token and notify our app's server of any changes (if applicable). Intent intent = new Intent(this, TokenUpdateIntentService.class); startService(intent); } }
[ "dhavaljoshi008@gmail.com" ]
dhavaljoshi008@gmail.com
3c392387bf401b95189e6c0b7e1c5e5ffd0975a6
a86ab8748ca3ea091de240d3950b221ca622c74e
/src/main/java/hello/Controller/User_Controller.java
3495638517c80d58d6759266a5f70c60279b48a2
[]
no_license
sandyema/AlarmProject
b261066ef6388508cc8568ae660eb89da1796eaf
7d254ad221a63c6032ea7e77a0333582714a8d4f
refs/heads/master
2023-07-30T11:08:36.215916
2021-09-19T21:38:08
2021-09-19T21:38:08
404,603,946
0
0
null
null
null
null
UTF-8
Java
false
false
18,719
java
package hello.Controller; import hello.Domain.Alarm; import hello.Domain.Alarm_User; import hello.Domain.UserAlarm; import hello.Repository.AlarmUser_Repository; import hello.Repository.Alarm_Repository; import hello.Repository.User_Repository; import net.minidev.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.math.RoundingMode; import java.text.DecimalFormat; import java.io.*; import java.net.*; import java.util.*; import javax.mail.*; import javax.mail.Authenticator; import javax.mail.PasswordAuthentication; import javax.mail.internet.*; import javax.activation.*; import javax.mail.Session; import javax.mail.Transport; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; @Controller @RequestMapping("/StockAlarms") public class User_Controller { @Autowired private User_Repository user_repository; @Autowired private Alarm_Repository alarm_repository; @Autowired private AlarmUser_Repository alarmUser_repository; private static DecimalFormat df2 = new DecimalFormat("#.##"); @Scheduled(fixedRate = 50000) public void scheduleFixedTask(){ String alarmName,destinationEmail=""; Double price=0.0; for (UserAlarm userAlarm : alarmUser_repository.findAll()) { for (Alarm_User user : user_repository.findAll()) { for (Alarm alarm : alarm_repository.findAll()) { if (userAlarm.getId_alarm().equals(alarm.getId()) && userAlarm.getId_user().equals(user.getId()) && alarm.getActive().equals(1)) { try { alarmName=alarm.getAlarm_name(); price=getPriceStock(alarmName); if((alarm.getOver_price().equals(1) && alarm.getActive().equals(1)&& df2.format(price).equals(df2.format(alarm.getInitial_price()*(1+alarm.getWanted_percent()/100)))) || (alarm.getLess_price().equals(1) && alarm.getActive().equals(1)&& df2.format(price).equals(df2.format(alarm.getInitial_price()*(1-alarm.getWanted_percent()/100))))) { destinationEmail=user.getEmail(); String htmlCode = "<h1> CONGRATULATION </h1> <br/> <h2><b>Your stock "+alarmName+" have the price "+ price +" now "+"</b></h2>"; sendMail(destinationEmail,htmlCode); alarm.setActive(0); } } catch (Exception e) { e.printStackTrace(); } } } } } } @RequestMapping(value = "/login", method = RequestMethod.POST) public @ResponseBody JSONObject login(@RequestBody JSONObject user) { //System.out.println("Try to login for :" + user.getAsString("email") + " : " + user.getAsString("pass")); HashMap<String, String> response = new HashMap<String, String>(); String user_email = user.getAsString("email"); String user_pass = user.getAsString("pass"); System.out.println(user_email + user_pass + "\n"); System.out.println(user_pass + "\n"); Alarm_User user_found = user_repository.findByEmailAndPass(user_email, user_pass); if (user_found != null) { response.put("response", "true"); //response.put("token", TokenManager.generateToken(username)); System.out.println("Succes to login for " + user_email + " : " + user_pass); } else { response.put("response", "false"); // System.out.println("Failed to login for " + user_email + " : " + user_pass); } return new JSONObject(response); } @RequestMapping(value = "/register", method = RequestMethod.POST) public @ResponseBody JSONObject addStudent(@RequestBody JSONObject user) { System.out.println("Try to add user :" + user.getAsString("first_name") + " : " + user.getAsString("last_name") + " : " + user.getAsString("email") + " : " + user.getAsString("pass")); HashMap<String, String> response = new HashMap<String, String>(); String user_firstname = user.getAsString("first_name"); String user_lastname = user.getAsString("last_name"); String user_email = user.getAsString("email"); String user_pass = user.getAsString("pass"); Alarm_User user_registed = user_repository.save(new Alarm_User(user_firstname, user_lastname, user_email, user_pass)); if (user_registed != null) { response.put("response", "true"); response.put("id_user", String.valueOf(user_registed.getId())); System.out.println("Succes to add for " + user_firstname + user_lastname + " : " + user_pass); } else { response.put("response", "false"); System.out.println("Error to add for " + user_firstname + user_lastname + " : " + user_pass); } return new JSONObject(response); } @RequestMapping(value = "/resetPass", method = RequestMethod.POST) public @ResponseBody JSONObject resetPass(@RequestBody JSONObject user) { System.out.println("Try to modify for :" + user.getAsString("user_email")); HashMap<String, String> response = new HashMap<String, String>(); String user_email = user.getAsString("user_email"); String new_pass = user.getAsString("new_pass"); System.out.println(user_email + "\n"); System.out.println("____PASS___"+new_pass); String htmlCode = "<h1> NEW PASSWORD </h1> <br/> <h2><b>Your password is now "+new_pass+"</b></h2>"; try { user_repository.resetPass(user_email, new_pass); response.put("response", "true"); sendMail(user_email,htmlCode); }catch (Exception ex){ System.out.println(ex); } return new JSONObject(response); } @RequestMapping(value = "/findID", method = RequestMethod.POST) public @ResponseBody JSONObject findID(@RequestBody JSONObject user) { System.out.println("Try to find id for :" + user.getAsString("email") + " : " + user.getAsString("pass")); HashMap<String, Integer> response = new HashMap<String, Integer>(); String user_email = user.getAsString("email"); String user_pass = user.getAsString("pass"); System.out.println(user_email + user_pass + "\n"); System.out.println(user_pass + "\n"); Alarm_User user_found = user_repository.findByEmailAndPass(user_email, user_pass); System.out.println(user_found.getEmail()); System.out.println(user_found.getPass()); System.out.println(user_found.getFirst_name()); System.out.println(user_found.toString()); if (user_found != null) { response.put("response", user_found.getId()); //response.put("token", TokenManager.generateToken(username)); System.out.println("Succes to find id for " + user_email + " : " + user_pass + " : " + user_found.getId()); } else { response.put("response", -1); System.out.println("Failed to find id for " + user_email + " : " + user_pass); } return new JSONObject(response); } @ResponseBody @RequestMapping(value = "/getAllAlarms", method = RequestMethod.GET) public ResponseEntity<JSONObject> getAllAlarms() { List<Alarm> list = alarm_repository.findAll(); JSONObject object = new JSONObject(); object.put("Alarms", list); return new ResponseEntity<JSONObject>(object, HttpStatus.OK); } private Double getPriceStock(String stockName) throws IOException{ String price="not found"; Double priceInDouble=0.0; URL url=new URL("https://www.google.com/finance/quote/"+stockName+":NYSE?ei=ga4QWNiFOobBe4LShnAF"); URLConnection urlConnection=url.openConnection(); InputStreamReader inStream=new InputStreamReader(urlConnection.getInputStream()); BufferedReader bufferedReader=new BufferedReader(inStream); String line=bufferedReader.readLine(); while(line!=null) { if(line.contains("[\""+stockName+"\",")){ int target=line.indexOf(("[\""+stockName+"\",")); int deci=line.indexOf(".",target); int start=deci; while(line.charAt(start)!='\"'){ start--; } price= line.substring(start+3,deci+3); } line=bufferedReader.readLine(); } priceInDouble=Double.valueOf(price); return priceInDouble; } @ResponseBody @RequestMapping(value = "/getAllAlarms/{id_user}", method = RequestMethod.GET) public ResponseEntity<JSONObject> getAlarms(@PathVariable Integer id_user) { List<Alarm> alarmsList = new ArrayList<>(); JSONObject object = new JSONObject(); Double price=0.0; for (UserAlarm userAlarm : alarmUser_repository.findAll()) { for (Alarm_User user : user_repository.findAll()) { for (Alarm alarm : alarm_repository.findAll()) { if (userAlarm.getId_user().equals(id_user) && userAlarm.getId_alarm().equals(alarm.getId()) && userAlarm.getId_user().equals(user.getId())) { try { price=getPriceStock(alarm.getAlarm_name()); alarm.setCurrent_price(price); alarmsList.add(alarm); if(alarm.getOver_price().equals(1) && df2.format(alarm.getCurrent_price()).equals(df2.format(alarm.getInitial_price()*(1+alarm.getWanted_percent()/100)))) { alarm.setActive(0); } if(alarm.getLess_price().equals(1) && df2.format(alarm.getCurrent_price()).equals(df2.format(alarm.getInitial_price()*(1-alarm.getWanted_percent()/100)))) { alarm.setActive(0); } } catch (IOException e) { e.printStackTrace(); } } } } } object.put("Alarms", alarmsList); return new ResponseEntity<JSONObject>(object, HttpStatus.OK); } // @RequestMapping(value = "/addAlarm", method = RequestMethod.POST) // public @ResponseBody // JSONObject addAlarm(@RequestBody JSONObject alarm) { // System.out.println("Try to add alarm :" + " : " + alarm.getAsString("alarm_name")+ " : " + alarm.getAsString("initial_price")+ " : " + alarm.getAsString("wanted_percent")); // HashMap<String, String> response = new HashMap<String, String>(); // // String alarm_name = alarm.getAsString("alarm_name"); // Double initial_price=(Double) alarm.getAsNumber("initial_price") ; // Double wanted_percent=(Double)alarm.getAsNumber("wanted_percent"); // Integer over_price= Integer.valueOf(alarm.getAsString("over_price")); // Integer less_price= Integer.valueOf(alarm.getAsString("less_price")); // // Alarm alarm_added = alarm_repository.save(new Alarm(alarm_name,initial_price,wanted_percent,over_price,less_price)); // // if (alarm_added != null) { // response.put("response", "true"); // System.out.println("Succes to add for " + alarm_name ); // } else { // response.put("response", "false"); // System.out.println("Error to add for " + alarm_name); // } // // return new JSONObject(response); // } @ResponseBody @RequestMapping(value = "/editAlarm", method = RequestMethod.POST) public ResponseEntity<JSONObject> editAlarm(@RequestBody JSONObject alarm) { System.out.println("Try to edit alarm :" + " : " + alarm.getAsString("alarm_name")+ " : " + alarm.getAsString("wanted_percent")); JSONObject response = new JSONObject(); Integer id= Integer.valueOf(alarm.getAsString("id")); String alarm_name = alarm.getAsString("alarm_name"); Double wanted_percent=Double.valueOf(alarm.getAsString("wanted_percent")); Integer over_price= Integer.valueOf(alarm.getAsString("over_price")); Integer less_price= Integer.valueOf(alarm.getAsString("less_price")); try { alarm_repository.update(alarm_name,wanted_percent,over_price,less_price,id); response.put("response", "true"); } catch (Exception e){ response.put("response", "false"); }; return new ResponseEntity<JSONObject>(response, HttpStatus.OK); } @ResponseBody @RequestMapping(value = "/deleteAlarm", method = RequestMethod.POST) public JSONObject deleteAlarm(@RequestBody JSONObject alarm) { System.out.println("Try to delete alarm :" + alarm.getAsString("id_alarm")+ alarm.getAsString("id_user")); Integer id_alarm=Integer.valueOf(alarm.getAsString("id_alarm")); Integer id_user=Integer.valueOf(alarm.getAsString("id_user")); Boolean deleted = false; HashMap<String, String> response = new HashMap<String, String>(); ArrayList<UserAlarm> useralarms = (ArrayList<UserAlarm>) alarmUser_repository.findAll(); ArrayList<Alarm> alarms = (ArrayList<Alarm>) alarm_repository.findAll(); ArrayList<Alarm_User> users = (ArrayList<Alarm_User>) user_repository.findAll(); for (UserAlarm a : useralarms) { System.out.println(useralarms); if (a.getId_user().equals(id_user) ) { for (Alarm aa : alarms) { System.out.println(alarms.toString()); if (aa.getId().equals(a.getId_alarm()) && aa.getId().equals(id_alarm)) { for (Alarm_User u : users) { System.out.println(users); if (u.getId().equals(a.getId_user())) { alarmUser_repository.delete(a); deleted = true; break; } } } } } } if (deleted) { response.put("response", "true"); System.out.println("Succes to delete for " + alarm.getAsString("id_alarm")+ alarm.getAsString("id_user")); } else { response.put("response", "false"); System.out.println("Error to delete for " + alarm.getAsString("id_alarm")+ alarm.getAsString("id_user")); } return new JSONObject(response); } @RequestMapping(value = "/addAlarm", method = RequestMethod.POST) public @ResponseBody JSONObject addAlarm(@RequestBody JSONObject alarm) throws IOException { System.out.println("Try to add alarm :" + alarm.getAsString("idUser") + " : " + alarm.getAsString("alarmName")); HashMap<String, String> response = new HashMap<String, String>(); String alarmName = alarm.getAsString("alarmName"); Double wantedPercente = Double.valueOf(alarm.getAsString("wantedPercente")); Integer idUser = Integer.valueOf(alarm.getAsString("idUser")); Integer over = Integer.valueOf(alarm.getAsString("over")); Integer less = Integer.valueOf(alarm.getAsString("less")); Double initial_price=getPriceStock(alarmName); Alarm alarm_added = alarm_repository.save(new Alarm(alarmName,initial_price,initial_price,wantedPercente,over,less,1)); if (alarm_added != null) { alarmUser_repository.save(new UserAlarm(alarm_added.getId(),idUser)); response.put("response", "true"); System.out.println("Succes to add for " + alarm.getAsString("idUser") + " : " + alarm.getAsString("alarmName")); } else { response.put("response", "false"); System.out.println("Error to add for " + alarm.getAsString("idUser") + " : " + alarm.getAsString("alarmName")); } return new JSONObject(response); } public static void sendMail(String recepient,String htmlCode) throws Exception { System.out.println("Preparing to send email"); Properties properties = new Properties(); //Enable authentication properties.put("mail.smtp.auth", "true"); //Set TLS encryption enabled properties.put("mail.smtp.starttls.enable", "true"); //Set SMTP host properties.put("mail.smtp.host", "smtp.gmail.com"); //Set smtp port properties.put("mail.smtp.port", "587"); properties.put("mail.smtp.ssl.trust", "smtp.gmail.com"); //Your gmail address String myAccountEmail = "sandyema43@gmail.com"; //Your gmail password String password = "*****"; //Create a session with account credentials Session session = Session.getInstance(properties, new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(myAccountEmail, password); } }); //Prepare email message Message message = prepareMessage(session, myAccountEmail, recepient,htmlCode); //Send mail Transport.send(message); System.out.println("Message sent successfully"); } private static Message prepareMessage(Session session, String myAccountEmail, String recepient,String htmlCode) { try { Message message = new MimeMessage(session); message.setFrom(new InternetAddress(myAccountEmail)); message.setRecipient(Message.RecipientType.TO, new InternetAddress(recepient)); message.setSubject("Alarms stock"); message.setContent(htmlCode, "text/html"); return message; } catch (Exception ex) { System.out.println(ex); } return null; } }
[ "sandy_your_angel@yahoo.com" ]
sandy_your_angel@yahoo.com
4bd54a9899ed1aa1e1fd7d641b19afc31780ac53
339259c9aa2e39d042f4c5668ecf2a85fd52f42e
/src/test/java/NewTest.java
6c4ecfbefb7918a37d1e1dd48a03660563f55583
[]
no_license
nb2628/Selenium
b60158305c17b26675957796f47b997be80af2a0
c00b0e2fe54f0da6a3c02b37894d898d696f527c
refs/heads/master
2020-03-17T20:23:39.818150
2018-05-18T07:01:41
2018-05-18T07:01:41
133,907,239
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
import org.testng.annotations.Test; import org.testng.annotations.DataProvider; public class NewTest { @Test(dataProvider ="LoginData") public void f(Integer n, String s) { System.out.println("username is"+n); System.out.println("password is"+s); System.out.println(n+" "+s); } @DataProvider(name="LoginData") public String [][] dp(){ return new String [][] { new String[] {"user1","pass1"}, new String[] {"user2","pass2"} }; } }
[ "A06438_P5.Training@P5-H81KX52.dir.svc.accenture.com" ]
A06438_P5.Training@P5-H81KX52.dir.svc.accenture.com
21447fbec170d97fcd66e7103423313720ad0842
78f790c822f797088a27f73f23502bcd4e518256
/src/test/java/nfm/subway/cli/CLITestMainTest.java
f96699098042aabc9fafccea6d9a1db4a2bceb88
[]
no_license
XiaoqingWang/esper-sensor
acdd663effbae2061f0e20b1404f0e9725c04dc4
85d91a2da9a361b431f29747559fe9bd336bd324
refs/heads/master
2020-12-25T21:00:40.178289
2014-01-26T12:10:35
2014-01-26T12:10:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
798
java
package nfm.subway.cli; import org.junit.Test; import static org.junit.Assert.*; public class CLITestMainTest { @Test public void 시분초새시간이모두높을때() { String newDate = "20140115130118"; String oldDate = "20140115130103"; int waitTime = CLITestMain.getDelayTime(newDate, oldDate); assertEquals(15, waitTime); } @Test public void 초가새시간이느릴때() { String newDate = "20140115130103"; String oldDate = "20140115130050"; int waitTime = CLITestMain.getDelayTime(newDate, oldDate); assertEquals(13, waitTime); } @Test public void 초분새시간이모두느릴때() { String newDate = "20140115150002"; String oldDate = "20140115145950"; int waitTime = CLITestMain.getDelayTime(newDate, oldDate); assertEquals(12, waitTime); } }
[ "jwj0831@gmail.com" ]
jwj0831@gmail.com
94eee313f5bcfbeac01a5b3cdae4d3f9f7510bbf
1873c209131857089a75d56e68b403c70473edca
/src/main/java/com/wjp/designmode/create/prototype/ProtoType.java
60b28f7f4e6b9f5272f27f8e3fef2c62d742482b
[]
no_license
weijupeng/msb
6fdedff01fdb4b2537661da67f6ad17302e46a4f
18fc126ec5636969547cda1043f60d469dd31f84
refs/heads/master
2022-06-26T21:15:37.195557
2020-06-11T01:37:52
2020-06-11T01:37:52
254,317,946
0
0
null
2022-06-17T03:14:30
2020-04-09T08:44:59
Java
UTF-8
Java
false
false
306
java
package com.wjp.designmode.create.prototype; /** * @author wjp * @date 2020/6/9 14:46 */ public class ProtoType implements Cloneable { @Override public Object clone() throws CloneNotSupportedException { ProtoType protoType = (ProtoType) super.clone(); return protoType; } }
[ "275526034@qq.com" ]
275526034@qq.com
bb1a3f30cfea7c6c8307beb8af77f93e52b2c9a7
400fa6f7950fcbc93f230559d649a7bfc50975fe
/src/com/jagex/SocketProvider.java
42f55b12118c12f608833126f10bc25d6198bd76
[]
no_license
Rune-Status/Major--Renamed-839
bd242a9b230c104a4021ec679e527fe752c27c4f
0e9039aa22f7ecd0ebcf2473a4acb5e91f6c8f76
refs/heads/master
2021-07-15T08:58:15.963040
2017-10-22T20:14:35
2017-10-22T20:14:35
107,897,914
1
0
null
null
null
null
UTF-8
Java
false
false
2,670
java
package com.jagex; import java.io.IOException; import java.net.Socket; public abstract class SocketProvider { public static String toUrlSafe(CharSequence sequence) { int length = sequence.length(); StringBuilder builder = new StringBuilder(length); for (int index = 0; index < length; index++) { char character = sequence.charAt(index); if (character >= 'a' && character <= 'z' || character >= 'A' && character <= 'Z' || character >= '0' && character <= '9' || character == '.' || character == '-' || character == '*' || character == '_') { builder.append(character); } else if (character == ' ') { builder.append('+'); } else { int b = Class483.charToByte(character); builder.append('%'); int packed = b >> 4 & 0xf; if (packed >= 10) { builder.append((char) (packed + 55)); } else { builder.append((char) (packed + 48)); } packed = b & 0xf; if (packed >= 10) { builder.append((char) (55 + packed)); } else { builder.append((char) (packed + 48)); } } } return builder.toString(); } public static void method13763() { if (Class31.loginStep * -1087837371 == 108) { Class31.loginStep = -781018025; } } static void method13762(int plane, int localX, int localZ, int group, int i_7_, int type, Class540 class540) { Class480_Sub12 class480_sub12 = null; for (Class480_Sub12 class480_sub12_10_ = (Class480_Sub12) Class480_Sub12.aClass644_10067.head(); null != class480_sub12_10_; class480_sub12_10_ = (Class480_Sub12) Class480_Sub12.aClass644_10067 .next()) { if (plane == class480_sub12_10_.plane * -618261599 && localX == 1155137153 * class480_sub12_10_.localX && localZ == 51547319 * class480_sub12_10_.localZ && group == -677397461 * class480_sub12_10_.group) { class480_sub12 = class480_sub12_10_; break; } } if (class480_sub12 == null) { class480_sub12 = new Class480_Sub12(); class480_sub12.plane = plane * 1586008161; class480_sub12.group = -1555094909 * group; class480_sub12.localX = localX * -1064812159; class480_sub12.localZ = localZ * 1342836999; Class480_Sub12.aClass644_10067.pushBack(class480_sub12); } class480_sub12.id = i_7_ * 340568737; class480_sub12.type = -1339454739 * type; class480_sub12.aClass540_10066 = class540; class480_sub12.aBool10069 = true; class480_sub12.aBool10063 = false; } int port; String host; SocketProvider() { } public abstract Socket provide() throws IOException; Socket direct() throws IOException { return new Socket(host, 147585685 * port); } }
[ "iano2k4@hotmail.com" ]
iano2k4@hotmail.com
63fe04d8e55c87105c453e082bd20a587d070228
2a6ddb2cb7152486ea72092995657db84a7b45b2
/src/main/java/org/support/generator/CustomAbstractXmlElementGenerator.java
f5d9a4fff9041a40bb4de40b552436bcf2de3b28
[]
no_license
sustzq/hello-world
7b07987341dff70db9bfa252354ac37196fc7597
88a3d6fda1d7c1001383d2f7ecd5b3565853889c
refs/heads/main
2023-04-08T15:42:10.088937
2021-04-18T13:09:20
2021-04-18T13:09:20
354,770,817
0
0
null
2021-04-05T08:50:27
2021-04-05T08:40:03
null
UTF-8
Java
false
false
3,785
java
package org.support.generator; import org.mybatis.generator.api.IntrospectedColumn; import org.mybatis.generator.api.dom.xml.Attribute; import org.mybatis.generator.api.dom.xml.TextElement; import org.mybatis.generator.api.dom.xml.XmlElement; import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities; import org.mybatis.generator.codegen.mybatis3.xmlmapper.elements.AbstractXmlElementGenerator; public class CustomAbstractXmlElementGenerator extends AbstractXmlElementGenerator { @Override public void addElements(XmlElement parentElement) { // 增加base_query XmlElement sql = new XmlElement("sql"); sql.addAttribute(new Attribute("id", "base_query")); //在这里添加where条件 XmlElement selectTrimElement = new XmlElement("trim"); //设置trim标签 selectTrimElement.addAttribute(new Attribute("prefix", "WHERE")); selectTrimElement.addAttribute(new Attribute("prefixOverrides", "AND | OR")); //添加where和and StringBuilder sb = new StringBuilder(); for(IntrospectedColumn introspectedColumn : introspectedTable.getAllColumns()) { XmlElement selectNotNullElement = new XmlElement("if"); //$NON-NLS-1$ sb.setLength(0); sb.append("null != "); sb.append(introspectedColumn.getJavaProperty()); selectNotNullElement.addAttribute(new Attribute("test", sb.toString())); sb.setLength(0); // 添加and sb.append(" and "); // 添加别名t sb.append("t."); sb.append(MyBatis3FormattingUtilities.getEscapedColumnName(introspectedColumn)); // 添加等号 sb.append(" = "); sb.append(MyBatis3FormattingUtilities.getParameterClause(introspectedColumn)); selectNotNullElement.addElement(new TextElement(sb.toString())); selectTrimElement.addElement(selectNotNullElement); } sql.addElement(selectTrimElement); parentElement.addElement(sql); // 公用select sb.setLength(0); sb.append("select "); sb.append("t.* "); sb.append("from "); sb.append(introspectedTable.getFullyQualifiedTableNameAtRuntime()); sb.append(" t"); TextElement selectText = new TextElement(sb.toString()); // 公用include XmlElement include = new XmlElement("include"); include.addAttribute(new Attribute("refid", "base_query")); // 增加find XmlElement find = new XmlElement("select"); find.addAttribute(new Attribute("id", "find")); find.addAttribute(new Attribute("resultMap", "BaseResultMap")); find.addAttribute(new Attribute("parameterType", introspectedTable.getBaseRecordType())); find.addElement(selectText); find.addElement(include); parentElement.addElement(find); // 增加list XmlElement list = new XmlElement("select"); list.addAttribute(new Attribute("id", "list")); list.addAttribute(new Attribute("resultMap", "BaseResultMap")); list.addAttribute(new Attribute("parameterType", introspectedTable.getBaseRecordType())); list.addElement(selectText); list.addElement(include); parentElement.addElement(list); // 增加pageList XmlElement pageList = new XmlElement("select"); pageList.addAttribute(new Attribute("id", "pageList")); pageList.addAttribute(new Attribute("resultMap", "BaseResultMap")); pageList.addAttribute(new Attribute("parameterType", introspectedTable.getBaseRecordType())); pageList.addElement(selectText); pageList.addElement(include); parentElement.addElement(pageList); } }
[ "1150383939@qq.com" ]
1150383939@qq.com
e048ef3204d6b21c921d71c07d112a2f879ab0df
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/LiabilityQuoteInfo.java
fbbd6e51520477917b5f8c25f849a2709bebae79
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,048
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 责任报价信息 * * @author auto create * @since 1.0, 2020-06-28 19:21:16 */ public class LiabilityQuoteInfo extends AlipayObject { private static final long serialVersionUID = 5861218518931987841L; /** * 保司返回的起保时间,格式yyyy-MM-dd HH:mm:ss */ @ApiField("effect_end_time") private String effectEndTime; /** * 保司返回的起保时间,格式yyyy-MM-dd HH:mm:ss */ @ApiField("effect_start_time") private String effectStartTime; /** * 不计免赔保费,单位分 */ @ApiField("iop_premium") private String iopPremium; /** * 责任编码 */ @ApiField("liability_no") private String liabilityNo; /** * 责任保费,单位分 */ @ApiField("liability_premium") private String liabilityPremium; /** * 责任保额,单位分 */ @ApiField("sum_insured") private String sumInsured; public String getEffectEndTime() { return this.effectEndTime; } public void setEffectEndTime(String effectEndTime) { this.effectEndTime = effectEndTime; } public String getEffectStartTime() { return this.effectStartTime; } public void setEffectStartTime(String effectStartTime) { this.effectStartTime = effectStartTime; } public String getIopPremium() { return this.iopPremium; } public void setIopPremium(String iopPremium) { this.iopPremium = iopPremium; } public String getLiabilityNo() { return this.liabilityNo; } public void setLiabilityNo(String liabilityNo) { this.liabilityNo = liabilityNo; } public String getLiabilityPremium() { return this.liabilityPremium; } public void setLiabilityPremium(String liabilityPremium) { this.liabilityPremium = liabilityPremium; } public String getSumInsured() { return this.sumInsured; } public void setSumInsured(String sumInsured) { this.sumInsured = sumInsured; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
496e4f7ad94e17d5fc17521120f543fad2961ce1
5f53b055f9c48767ffb692a4f36579ec3f4ec132
/src/main/java/SeleniumSessions/TotalImages.java
40abee53ba68a1c7efb55560c6ad43c5c53349a5
[]
no_license
kavimunigati/Oct2020kavitha
50bfd372f2366224fd721db8a16b0d034a0cb3dc
cd26517cf8020b648f6e7a606791b3e3b4acf879
refs/heads/master
2023-02-23T12:21:21.599342
2021-01-27T21:50:27
2021-01-27T21:50:27
333,565,221
0
0
null
null
null
null
UTF-8
Java
false
false
1,724
java
package SeleniumSessions; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import io.github.bonigarcia.wdm.WebDriverManager; public class TotalImages { static WebDriver driver; public static void main(String[] args) { // print total no. of images on the page //print the url of each image WebDriverManager.chromedriver().setup(); driver =new ChromeDriver(); driver.get("https://www.amazon.com/"); List<WebElement> imagelist = driver.findElements(By.tagName("img"));// img is the tag for image in html System.out.println(imagelist.size());// printing the no. of images on the list // for printing the list of images we are using for each loop /** for(int i=0; i<imagelist.size(); i++) { String image = imagelist.get(i).getText(); System.out.println(image); }*/ // or we can use the foreach loop /**syntax for each loop * for (Object e :list); * System.out.println(e); * object = WebElement * e = reference for webElement * list = image list , in which we have to search }*/ for(WebElement e : imagelist) { String srcUrl = e.getAttribute("src"); System.out.println(srcUrl); } /** for (WebElement e: imagelist) //e.getAttribute("src");// .getAttribute returns String so initiating String with srcUrl as reference. String srcUrl = e.getAttribute("src");//src is the property in html for image link. System.out.println(srcUrl);// stcurl is the reference for the String */ } }
[ "kavimunigati@gmail.com" ]
kavimunigati@gmail.com
4b252a68c58f7fcf821ae9c52ad0aea1c8740d1b
57138c9e3873081f5a75f907589d36e39ad2dd62
/application/sshapp/src/main/java/org/ssh/app/example/entity/Disc_1.java
d63c8b8bd2e5539a51baed43643e2b9c6b516b23
[ "Apache-2.0" ]
permissive
parth2691/sshapp
f329b5bdacac37c72fa226772aa4efdd74bdaf81
20a573490663f00eb0981c9f758e2281fe13f105
refs/heads/master
2021-01-22T01:18:27.824518
2012-06-02T12:05:26
2012-06-02T12:05:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,504
java
package org.ssh.app.example.entity; import java.io.Serializable; import javax.persistence.DiscriminatorColumn; import javax.persistence.DiscriminatorType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.TableGenerator; @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "DISC_TYPE", discriminatorType = DiscriminatorType.STRING) public class Disc_1 implements Serializable { private static final long serialVersionUID = 4096693525922121897L; private Long id; private String name; private Integer price; @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "Id_Generator") @TableGenerator(name = "Id_Generator", table = "ID_GENERATOR", pkColumnName = "GEN_NAME", valueColumnName = "GEN_VAL", pkColumnValue = "Disc_1", initialValue = 1, allocationSize = 1) public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getPrice() { return price; } public void setPrice(Integer price) { this.price = price; } }
[ "young.jiandong@gmail.com" ]
young.jiandong@gmail.com
4ac8aea2bd8d9ea8c264e00578c6e4c852d2bbe3
c6a164d2defb875c13e822a4b0b8080677b8fe12
/app/src/main/java/com/example/tp1login/request/ApiClient.java
b94676698681125944aebf056189dc7a8290f68f
[]
no_license
Nahuel-Scerca/TP1_Login_SP
602de83b822f7916247111fb26975d6ae09b8dd3
94749965e859759c1b44d7bad7cf0fc5cc253351
refs/heads/master
2022-12-31T13:31:15.406020
2020-10-21T16:59:44
2020-10-21T16:59:44
306,157,432
0
0
null
null
null
null
UTF-8
Java
false
false
1,931
java
package com.example.tp1login.request; import android.content.Context; import android.content.SharedPreferences; import com.example.tp1login.model.Usuario; public class ApiClient { private static SharedPreferences sp; private static SharedPreferences conectar(Context context){ if(sp==null){ sp= context.getSharedPreferences("datos",0); } return sp; } public static void guardar(Context context , Usuario usuario){ SharedPreferences sp= conectar(context); SharedPreferences.Editor editor= sp.edit(); editor.putLong("dni",usuario.getDni()); editor.putString("apellido",usuario.getApellido()); editor.putString("nombre",usuario.getNombre()); editor.putString("mail",usuario.getMail()); editor.putString("password",usuario.getPassword()); editor.commit(); } public static Usuario leer(Context context){ SharedPreferences sp= conectar(context); Long dni = sp.getLong("dni",-1); String apellido = sp.getString("apellido","-1"); String nombre = sp.getString("nombre","-1"); String mail = sp.getString("mail","-1"); String password = sp.getString("password","-1"); Usuario usuario = new Usuario(dni,apellido,nombre,mail,password); return usuario; } public static Usuario login(Context context, String email, String password){ Usuario usuario = null; SharedPreferences sp= conectar(context); Long dni = sp.getLong("dni",-1); String apellido = sp.getString("apellido","-1"); String nombre = sp.getString("nombre","-1"); String mail = sp.getString("mail","-1"); String pass = sp.getString("password","-1"); if(email.equals(mail) && password.equals(pass)){ usuario = new Usuario(dni,apellido,nombre,mail,pass); } return usuario; } }
[ "56772334+Nahuel-Scerca@users.noreply.github.com" ]
56772334+Nahuel-Scerca@users.noreply.github.com
84882145fa00fe0ab4bf01cd614f74b90e84ff34
5cc01dec9ec1c6dde262d56d42c40dd8acfe2010
/PTSCMC/src/java/com/venus/mc/contract/order/SearchMaterialAction.java
a9286a76b1b2376fdc7537ddbdb1481c836409be
[]
no_license
phuongtu1983/mc
6defa0c94a02e2ff5ce9886ee87a219396d54ac0
0966390950a911e9fdb75484701bdede381a3042
refs/heads/master
2020-03-11T11:50:15.387384
2018-04-18T00:42:25
2018-04-18T00:42:25
129,980,464
0
0
null
null
null
null
UTF-8
Java
false
false
1,445
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.venus.mc.contract.order; import com.venus.core.util.StringUtil; import com.venus.core.util.LogUtil; import com.venus.mc.bean.SearchFormBean; import com.venus.mc.core.SpineAction; import com.venus.mc.dao.MaterialDAO; import com.venus.mc.util.Constants; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; /** * * @author Mai vinh loc */ public class SearchMaterialAction extends SpineAction { @Override public boolean doAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { SearchFormBean formBean = (SearchFormBean) form; int fieldid = formBean.getSearchid(); String strFieldvalue = formBean.getSearchvalue(); ArrayList materialList = null; try { MaterialDAO materialDAO = new MaterialDAO(); materialList = materialDAO.searchMaterial(fieldid, StringUtil.encodeHTML(strFieldvalue)); } catch (Exception ex) { LogUtil.error("FAILED:Material:search-" + ex.getMessage()); ex.printStackTrace(); } request.setAttribute(Constants.MATERIAL_LIST, materialList); return true; } }
[ "phuongtu1983@gmail.com" ]
phuongtu1983@gmail.com
51a313067399483d9d0aaeddd087f367b79c0fc2
171ab1d2148b70c27bf8b25cf8a51a510643f18b
/pro-seata/server/src/main/java/io/seata/server/store/DbcpDataSourceGenerator.java
494cccdfcc7972eae371d905aab4b9cc925c6222
[ "Apache-2.0" ]
permissive
lptnyy/spring-cloud-project
aa71cf0de4ceacbc21bcac2a8b00dc33ab04f309
4b7370ea3967814b6356c988ef57ef8023493e84
refs/heads/master
2022-11-22T06:45:23.828617
2020-05-10T17:50:04
2020-05-10T17:50:04
147,296,922
5
3
Apache-2.0
2022-11-16T09:22:40
2018-09-04T06:15:01
Java
UTF-8
Java
false
false
2,008
java
/* * Copyright 1999-2019 Seata.io Group. * * 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 io.seata.server.store; import javax.sql.DataSource; import io.seata.common.loader.LoadLevel; import io.seata.core.store.db.AbstractDataSourceGenerator; import org.apache.commons.dbcp2.BasicDataSource; /** * The type Dbcp data source generator. * * @author zhangsen * @author ggndnn */ @LoadLevel(name = "dbcp") public class DbcpDataSourceGenerator extends AbstractDataSourceGenerator { @Override public DataSource generateDataSource() { BasicDataSource ds = new BasicDataSource(); ds.setDriverClassName(getDriverClassName()); // DriverClassLoader works if upgrade commons-dbcp to at least 1.3.1. // https://issues.apache.org/jira/browse/DBCP-333 ds.setDriverClassLoader(getDriverClassLoader()); ds.setUrl(getUrl()); ds.setUsername(getUser()); ds.setPassword(getPassword()); ds.setInitialSize(getMinConn()); ds.setMaxTotal(getMaxConn()); ds.setMinIdle(getMinConn()); ds.setMaxIdle(getMinConn()); ds.setMaxWaitMillis(getMaxWait()); ds.setTimeBetweenEvictionRunsMillis(120000); ds.setNumTestsPerEvictionRun(1); ds.setTestWhileIdle(true); ds.setValidationQuery(getValidationQuery(getDBType())); ds.setConnectionProperties("useUnicode=yes;characterEncoding=utf8;socketTimeout=5000;connectTimeout=500"); return ds; } }
[ "wangyang19" ]
wangyang19
dc49d77a723299fbc10e01733009359fe91267fb
4ba49c89d7d64dc40c8a722cc708a55501e22dcf
/SCP/src/main/java/zdoctor/scp/items/ItemBlockDeco.java
88c32e6bcc1c70b2f6eab05b5f62bb80fd891bac
[]
no_license
Z-Doctor/SCP
effcd44fd3557e6184958478f350d1aacec005f5
611ed19bbc80b9bfced8912dc277dd41d4cc97be
refs/heads/master
2021-01-19T12:55:17.073258
2017-08-30T22:52:27
2017-08-30T22:52:27
100,817,041
0
0
null
null
null
null
UTF-8
Java
false
false
792
java
package zdoctor.scp.items; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemBlockDeco extends ItemBlock { static final String[] subBlocks = { "ctile", "ctileg", "floortile", "wallbottom", "wallmiddle", "walltop", "1162wall", "1162walla", "concrete", "pdfloor", "pdwallbottom", "pdwallmiddle", "pdwalltop", "red", "vent" }; public ItemBlockDeco(Block dogshit) { super(dogshit); setHasSubtypes(true); } public String getUnlocalizedName(ItemStack itemstack) { int i = itemstack.getMetadata(); if ((i < 0) || (i >= subBlocks.length)) { i = 0; } return super.getUnlocalizedName() + "." + subBlocks[i]; } public int getMetadata(int meta) { return meta; } }
[ "seedofdiscovery@gmail.com" ]
seedofdiscovery@gmail.com
0f19cb7e4fe5e58a243ef82caf5f3882aac4539c
25e90779bf473aeb04b6987474fd2b3c0394e98b
/cityGML/src/main/java/it/sinergis/jaxb/EndUseUnitPropertyType.java
71e62a25e7953f06c877c86ffb2848c9deecc571
[]
no_license
SunshineProject/BuildingEfficiencyPre-certificationService
9d36123eb2294e441c1f95decf5e1df05426bc36
82a5688ac37f914fa10916845468649c402e949f
refs/heads/master
2021-01-10T14:08:58.797049
2016-02-17T10:37:43
2016-02-17T10:37:43
51,445,327
0
0
null
null
null
null
UTF-8
Java
false
false
7,177
java
package it.sinergis.jaxb; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import org.w3._1999.xlink.ActuateType; import org.w3._1999.xlink.ShowType; import org.w3._1999.xlink.TypeType; /** * <p>Java class for EndUseUnitPropertyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="EndUseUnitPropertyType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence minOccurs="0"> * &lt;element ref="{http://www.sig3d.org/citygml/2.0/energy/0.5.0}EndUseUnit"/> * &lt;/sequence> * &lt;attGroup ref="{http://www.opengis.net/gml}AssociationAttributeGroup"/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "EndUseUnitPropertyType", propOrder = { "endUseUnit" }) public class EndUseUnitPropertyType { @XmlElement(name = "EndUseUnit") protected EndUseUnitType endUseUnit; @XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml") @XmlSchemaType(name = "anyURI") protected String remoteSchema; @XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink") protected TypeType type; @XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink") protected String href; @XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink") protected String role; @XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink") protected String arcrole; @XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink") protected String title; @XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink") protected ShowType show; @XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink") protected ActuateType actuate; /** * Gets the value of the endUseUnit property. * * @return * possible object is * {@link EndUseUnitType } * */ public EndUseUnitType getEndUseUnit() { return endUseUnit; } /** * Sets the value of the endUseUnit property. * * @param value * allowed object is * {@link EndUseUnitType } * */ public void setEndUseUnit(EndUseUnitType value) { this.endUseUnit = value; } public boolean isSetEndUseUnit() { return (this.endUseUnit!= null); } /** * Gets the value of the remoteSchema property. * * @return * possible object is * {@link String } * */ public String getRemoteSchema() { return remoteSchema; } /** * Sets the value of the remoteSchema property. * * @param value * allowed object is * {@link String } * */ public void setRemoteSchema(String value) { this.remoteSchema = value; } public boolean isSetRemoteSchema() { return (this.remoteSchema!= null); } /** * Gets the value of the type property. * * @return * possible object is * {@link TypeType } * */ public TypeType getType() { if (type == null) { return TypeType.SIMPLE; } else { return type; } } /** * Sets the value of the type property. * * @param value * allowed object is * {@link TypeType } * */ public void setType(TypeType value) { this.type = value; } public boolean isSetType() { return (this.type!= null); } /** * Gets the value of the href property. * * @return * possible object is * {@link String } * */ public String getHref() { return href; } /** * Sets the value of the href property. * * @param value * allowed object is * {@link String } * */ public void setHref(String value) { this.href = value; } public boolean isSetHref() { return (this.href!= null); } /** * Gets the value of the role property. * * @return * possible object is * {@link String } * */ public String getRole() { return role; } /** * Sets the value of the role property. * * @param value * allowed object is * {@link String } * */ public void setRole(String value) { this.role = value; } public boolean isSetRole() { return (this.role!= null); } /** * Gets the value of the arcrole property. * * @return * possible object is * {@link String } * */ public String getArcrole() { return arcrole; } /** * Sets the value of the arcrole property. * * @param value * allowed object is * {@link String } * */ public void setArcrole(String value) { this.arcrole = value; } public boolean isSetArcrole() { return (this.arcrole!= null); } /** * Gets the value of the title property. * * @return * possible object is * {@link String } * */ public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * */ public void setTitle(String value) { this.title = value; } public boolean isSetTitle() { return (this.title!= null); } /** * Gets the value of the show property. * * @return * possible object is * {@link ShowType } * */ public ShowType getShow() { return show; } /** * Sets the value of the show property. * * @param value * allowed object is * {@link ShowType } * */ public void setShow(ShowType value) { this.show = value; } public boolean isSetShow() { return (this.show!= null); } /** * Gets the value of the actuate property. * * @return * possible object is * {@link ActuateType } * */ public ActuateType getActuate() { return actuate; } /** * Sets the value of the actuate property. * * @param value * allowed object is * {@link ActuateType } * */ public void setActuate(ActuateType value) { this.actuate = value; } public boolean isSetActuate() { return (this.actuate!= null); } }
[ "enrico.deguidi@gmail.com" ]
enrico.deguidi@gmail.com
2874db4ffe8964255c3815dfb16fc0d2be74435c
a83e543bcb8869b9e32947ef1c7c378d09a4a607
/VideoGenTransformer/src/main/java/fr/istic/videogen/tps/TP3.java
f91edd893858a07fdf0784b6fdca20d83522188d
[]
no_license
triggersch/videogen
cc7145fdc25cc0624a394a93e1482d4d93c8063f
8ba7fac805338bae9a1ec4353c2ed2f9afd38a82
refs/heads/master
2020-04-24T15:18:54.065587
2019-02-22T12:19:03
2019-02-22T12:19:03
171,009,790
0
0
null
null
null
null
UTF-8
Java
false
false
6,449
java
package fr.istic.videogen.tps; import static org.junit.Assert.*; import java.util.List; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.Map; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.junit.Test; import fr.istic.videoGen.AlternativesMedia; import fr.istic.videoGen.ImageDescription; import fr.istic.videoGen.MandatoryMedia; import fr.istic.videoGen.Media; import fr.istic.videoGen.MediaDescription; import fr.istic.videoGen.OptionalMedia; import fr.istic.videoGen.VideoDescription; import fr.istic.videoGen.VideoGeneratorModel; import fr.istic.videogen.fileutils.FilesUtils; public class TP3 { private FilesUtils fileservice = new FilesUtils(); public String[] addOptionnalVideo( String[] entries ) { String[] result = new String[entries.length * 2]; int index = 0; for(String s:entries) { result[index] = s + ",TRUE"; result[index+1] = s + ",FALSE"; index += 2; } return result; } public String[] addMandatoryVideo( String[] entries ) { String[] result = new String[entries.length]; int index = 0; for(String s:entries) { if (s == null) s=""; result[index] = s + ",TRUE"; index ++; } return result; } public String[] addAlternativesVideo( String[] entries , int nbChoice) { String[] result = new String[entries.length * nbChoice]; int index = 0; int i=0; for(String s:entries) { int nb = nbChoice; while(nb > 0) { String line = ""; for(i=0;i<nbChoice;i++) { if (i == nb-1) line += ",TRUE"; else line += ",FALSE"; } result[index] = s + line; index++; nb--; } } return result; } public Long getFileSize(String filename) { File f = fileservice.loadingFile2(filename); Long value = 0L; if (f.exists()) value = f.length(); return value; } @Test public void generateCSV() throws Exception { String listeId = ""; String[] listeCycle = new String[1]; Map<String,String> listLocation = new LinkedHashMap<String,String>(); File dslfile = fileservice.loadingFile2("dsl/exampletp.videogen"); VideoGeneratorModel videoGen = new VideoGenHelper().loadVideoGenerator(URI.createURI(dslfile.getPath())); assertNotNull(videoGen); for (Media media : videoGen.getMedias()) { if (media instanceof MandatoryMedia){ MandatoryMedia mandatory = (MandatoryMedia)media; MediaDescription mediadescription = mandatory.getDescription(); if(mediadescription instanceof ImageDescription) { ImageDescription imagedescription = (ImageDescription)mediadescription; System.out.println("Mandatory image : " + imagedescription.getImageid()); listeId += "," + imagedescription.getImageid(); listeCycle = addMandatoryVideo( listeCycle ); listLocation.put( imagedescription.getImageid(),imagedescription.getLocation()); }else if(mediadescription instanceof VideoDescription) { VideoDescription video = (VideoDescription)mediadescription; System.out.println("Mandatory video : " + video.getVideoid()); listeId += "," + video.getVideoid(); listeCycle = addMandatoryVideo( listeCycle ); listLocation.put( video.getVideoid(),video.getLocation()); } }else if (media instanceof OptionalMedia){ OptionalMedia option = (OptionalMedia)media; MediaDescription mediadescrip = option.getDescription(); if(mediadescrip instanceof ImageDescription) { ImageDescription imgdescrip = (ImageDescription)mediadescrip; System.out.println("Optional image : " + imgdescrip.getImageid()); listeId += "," + imgdescrip.getLocation(); listeCycle = addOptionnalVideo( listeCycle ); listLocation.put( imgdescrip.getImageid(),imgdescrip.getLocation()); }else if(mediadescrip instanceof VideoDescription) { VideoDescription videodescription = (VideoDescription)mediadescrip; System.out.println("Optional video : " +videodescription.getVideoid()); listeId += "," + videodescription.getVideoid(); listeCycle = addOptionnalVideo( listeCycle ); listLocation.put( videodescription.getVideoid(),videodescription.getLocation()); } }else if (media instanceof AlternativesMedia){ AlternativesMedia alternative = (AlternativesMedia)media; EList<MediaDescription> liste = alternative.getMedias(); for( MediaDescription md : liste ) { if(md instanceof ImageDescription) { ImageDescription img = (ImageDescription)md; System.out.println("Alternatives image : " + img.getImageid()); listeId += "," + img.getImageid(); listLocation.put( img.getImageid(),img.getLocation()); }else if(md instanceof VideoDescription) { VideoDescription video = (VideoDescription)md; System.out.println("Alternatives video : " +video.getVideoid()); listeId += "," + video.getVideoid(); listLocation.put( video.getVideoid(),video.getLocation()); } } listeCycle = addAlternativesVideo( listeCycle , liste.size()); } } File file = fileservice.loadingFile2("csv/csv-file.csv"); BufferedWriter bw = new BufferedWriter(new FileWriter(file)); bw.write(listeId + ",size,realsize \n"); int index = 1; String output = "ouputvideo/output.mp4"; for (String line : listeCycle) { Long cumulSize = 0L; Long realSize = 0L; Long gifSize = 0L; int indexColonne = -1; List<String> concatLocation = new ArrayList<String>(); // liste de media à concatener List<String> medias = new ArrayList<String>(); for (String str : line.split(",")) { if (str.equals("TRUE")) { //size Object[] keys = listLocation.keySet().toArray(); String location = listLocation.get( keys[indexColonne] ); concatLocation.add(location); cumulSize += getFileSize(location); //realsize medias.add(location); } indexColonne++; } VideoTools.concatenerMedia(concatLocation, output); realSize = getFileSize(output); bw.write(index + line + "," + cumulSize +","+ realSize +","+ gifSize +"\n"); index++; } bw.close(); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while ((line = br.readLine()) != null) { System.out.println(line); } br.close(); } }
[ "abdallah.lachaal@etudiant.univ-rennes1.fr" ]
abdallah.lachaal@etudiant.univ-rennes1.fr
44b6329ddd0f52e1839b926999ce5b888e8c4c96
a367d647b70e0c772cc63a666498f66969e68e03
/src/Programers/numberHide.java
3edb8464fedb835f010c3c1a7064db0d650e276d
[]
no_license
lwjace/yamuAlgorithm
0149e043d4cd0d28ae61dfbc2cc44dd62c34d8ff
91c17b294adedb35c394217c77c029c221ca9228
refs/heads/master
2023-01-24T06:53:50.452639
2020-12-09T11:52:36
2020-12-09T11:52:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
package Programers; public class numberHide { public static void main(String[] args) { System.out.println(solution("01090550119")); } public static String solution(String phone_number) { String answer = ""; int length= phone_number.length(); for (int i=0; i<=length-4; i++){ answer+="*"; } String end= phone_number.substring(length-4); answer+=end; return answer; } }
[ "rntjdrh308@gmail.com" ]
rntjdrh308@gmail.com
41f0589a1e50d2a1b7b9be69354fb54f66df92a6
91924d70f45fc77b5763cf213018deaa1287e772
/iski-ejb/src/main/java/tn/esprit/blizzard/services/interfaces/OrganizerRequestServiceRemote.java
bf3b701346faa9bf7cd18f56da7645f53d597c65
[]
no_license
Bairem/iSKi
1cdac5577f0c4011d47cee01609c5aba6bada13b
d49e96a9c9f59b7ecd09846ba9cf8cac7cd43f58
refs/heads/master
2021-07-25T02:02:16.991790
2017-10-29T23:47:12
2017-10-29T23:47:12
108,161,910
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package tn.esprit.blizzard.services.interfaces; import java.util.List; import javax.ejb.Remote; import tn.esprit.blizzard.iski.entities.OrganizerRequest; @Remote public interface OrganizerRequestServiceRemote { public OrganizerRequest add(OrganizerRequest u); public OrganizerRequest update(OrganizerRequest u); public void remove(Integer id); public List<OrganizerRequest> findAll(); public OrganizerRequest findById(Integer id); public List<OrganizerRequest> findPendingRequests(String status); }
[ "bairem.zalleg@esprit.tn" ]
bairem.zalleg@esprit.tn
09ae39f7298537a5742dda9f1ed48d9bc1e1721f
f0fd23d6b87c599354f665fe28d061d2c0c1c157
/ms_users/src/main/java/groupeg/msusers/modele/enumerations/Situation.java
bf5554b977a2b88cae1ec3ea5b81f432f2e1596d
[]
no_license
kagboton/groupeG
91532619e76a32768ddc3407c522e75d13445121
5818eea061c6ea234887e59c80e6ba8969dee4b0
refs/heads/master
2022-04-07T15:52:48.674253
2020-01-27T18:04:29
2020-01-27T18:04:29
236,556,824
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package groupeg.msusers.modele.enumerations; public enum Situation { CELIBATAIRE("Célibataire"), COUPLE("En couple"), INCONNU("Inconnu"); private String value; Situation(String value) { this.value = value; } public String value(){ return value; } }
[ "KAgboton@wdk.local" ]
KAgboton@wdk.local
aabf7c188ae0d3acc0fe328d8e49804353d263c5
50ff614e0a9bd6145711523cb039f879eb032c84
/src/builder/recursiveGeneric/Person.java
51083d78c0e6ce2e8c9f42a72bb5516b5ce2aa85
[]
no_license
JAlayon/java-design-patterns
9e9c5039661bdd149a38f41722020ae4cf384bc0
31a23ddf4f2418af4d98599aa011b8bed07b8260
refs/heads/master
2023-06-09T15:14:47.006052
2021-06-23T02:54:50
2021-06-23T02:54:50
361,209,918
0
0
null
2021-06-23T02:19:59
2021-04-24T16:21:20
Java
UTF-8
Java
false
false
1,263
java
package builder.recursiveGeneric; public class Person { public String name; public String position; @Override public String toString() { return "Person{" + "name='" + name + '\'' + ", position='" + position + '\'' + '}'; } } class PersonBuilder<SELF extends PersonBuilder<SELF>>{ protected Person person = new Person(); public SELF withName(String name){ this.person.name = name; return self(); } protected SELF self(){ return (SELF)this; } public Person build(){ return person; } } class EmployeeBuilder extends PersonBuilder<EmployeeBuilder>{ public EmployeeBuilder withPosition(String position){ this.person.position = position; return self(); } @Override protected EmployeeBuilder self() { return this; } } class Demmo{ public static void main(String[] args) { final EmployeeBuilder personBuilder = new EmployeeBuilder(); final Person person = personBuilder .withName("Jair") .withPosition("Software Engineer") .build(); System.out.println(person.toString()); } }
[ "jair.atl.95@gmail.com" ]
jair.atl.95@gmail.com
20c43861b0689f89b4d0ee8520fab0bfd307424b
febf1c79191bf596aa19661dc91888fa2dc6d316
/src/com/uniovi/sdi/ServletSaludo.java
6a363f25c03413e4ca8d0665a5c3759f0568732b
[]
no_license
alvarogarinf/sdi1920-1006-lab-jee
ee5c1c70e27b5ac61330727aa89809ee08fde927
12e54491706a021720bc0b969c472e77a0f0c4a2
refs/heads/master
2020-12-27T06:40:41.061318
2020-02-03T18:13:44
2020-02-03T18:13:44
237,798,707
0
0
null
null
null
null
UTF-8
Java
false
false
1,615
java
package com.uniovi.sdi; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; /** * Servlet implementation class ServletSaludo */ @WebServlet("/ServletSaludo") public class ServletSaludo extends HttpServlet { private static final long serialVersionUID = 1L; int contador = 0; public ServletSaludo() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<HTML>"); out.println("<HEAD><TITLE>Hola Mundo!</TITLE></HEAD>"); out.println("<BODY>"); String nombre = (String) request.getParameter("nombre"); if (nombre != null) { out.println("Hola " + nombre + "<br>"); } try { Thread.sleep(15000); } catch (InterruptedException e) { } out.println("ID del hilo:" + Thread.currentThread().getId() + "<br>"); contador++; out.println("Visitas:" + contador + "<br>"); out.println("</BODY></HTML>"); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
[ "UO264881@uniovi.es" ]
UO264881@uniovi.es
a5059570e876b9fd3077f1d615d870863b9f30b5
29d84d8908f5877655b0fc95703880362cde3d40
/app/src/main/java/com/example/preferences/ConfirmActivity.java
984320d186df98ed90ed8cee3e9b697d1f615737
[]
no_license
Dudi111/preference
fd0ff2a8bff22a00ec749697873d9a056a6351ac
318375144b5f8fc4f110c996bff90b85d7e480de
refs/heads/main
2023-06-14T03:00:27.339007
2021-07-06T17:26:43
2021-07-06T17:26:43
383,548,360
0
0
null
null
null
null
UTF-8
Java
false
false
1,821
java
package com.example.preferences; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class ConfirmActivity extends AppCompatActivity { private TextView view1, view2, view3, view4,view5; private Button mbtnconfirm; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_confirm); initview(); settext(); mbtnconfirm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Context context=getApplication(); new AlertDialog.Builder(context) .setTitle("Delete entry") .setMessage("Are you sure you want to delete this entry?") .show(); } }); } private void initview(){ view1=findViewById(R.id.tvfinal1); view2=findViewById(R.id.tvfinal2); view3=findViewById(R.id.tvfinal3); view4=findViewById(R.id.tvfinal4); view5=findViewById(R.id.tvfinal5); mbtnconfirm=findViewById(R.id.btnconfirm); } private void settext(){ view1.setText(SharedPreference.readString(getApplicationContext(),"name")); view2.setText(SharedPreference.readString(getApplicationContext(),"last")); view3.setText(SharedPreference.readString(getApplicationContext(),"email")); view4.setText(SharedPreference.readString(getApplicationContext(),"seat")); view5.setText(SharedPreference.readString(getApplicationContext(),"date")); } }
[ "pd.rajiv.000@gmail.com" ]
pd.rajiv.000@gmail.com
4f7562ab1b6a38fbd0aeff50f047aca23d6adaed
1a0fefb7eada7f554fc437ca20617a4599e0150b
/src/me/libraryaddict/gearwars/abilities/Hatcher.java
0aab6d34484a2ccb1c4d24b61ff5318c5fb49e0d
[]
no_license
libraryaddict-old/GearWars
ea2a888bcefd4a8f3813211aa6d1266ab86a3176
7faf405c04e9748e7a497de81eb8a7186358df77
refs/heads/master
2021-07-18T05:48:06.801041
2017-10-25T01:24:57
2017-10-25T01:24:57
107,872,467
0
2
null
null
null
null
UTF-8
Java
false
false
8,411
java
package me.libraryaddict.gearwars.abilities; import me.libraryaddict.gearwars.GearApi; import me.libraryaddict.gearwars.events.PlayerKilledEvent; import me.libraryaddict.gearwars.misc.Disableable; import me.libraryaddict.gearwars.types.AbilityListener; import me.libraryaddict.gearwars.types.Gamer; import net.minecraft.server.v1_7_R4.MobSpawnerAbstract; import net.minecraft.server.v1_7_R4.NBTTagCompound; import net.minecraft.server.v1_7_R4.TileEntityMobSpawner; import net.minecraft.server.v1_7_R4.TileEntityMobSpawnerData; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.EntityTargetEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.metadata.FixedMetadataValue; import java.util.*; public class Hatcher extends AbilityListener implements Disableable { private HashMap<Block, ArrayList<Entity>> spawnedMobs = new HashMap<Block, ArrayList<Entity>>(); private HashMap<Player, ArrayList<Block>> spawners = new HashMap<Player, ArrayList<Block>>(); public void giveSpawner(Player player) { if (player.isOnline() && player.getAllowFlight() == false) { HashMap<Integer, ItemStack> drops = player.getInventory().addItem(new ItemStack(52)); for (Map.Entry<Integer, ItemStack> entry : drops.entrySet()) { player.getWorld().dropItemNaturally(player.getLocation(), entry.getValue()); } } } private boolean isSpawner(Block block) { for (ArrayList<Block> blocks : spawners.values()) { if (blocks.contains(block)) { return true; } } return false; } @EventHandler public void onExplode(EntityExplodeEvent event) { List<Block> blockListCopy = new ArrayList<Block>(); for (Block block : blockListCopy) { if (isSpawner(block)) { removeSpawner(block, true); } } } @EventHandler public void onInteract(PlayerInteractEvent event) { ItemStack item = event.getPlayer().getItemInHand(); if (item != null && item.getType() == Material.MONSTER_EGG && hasAbility(event.getPlayer()) && event.getAction() == Action.RIGHT_CLICK_BLOCK) { if (event.getClickedBlock().getType() == Material.MOB_SPAWNER) { event.setCancelled(true); Player p = event.getPlayer(); if (spawners.containsKey(p) && spawners.get(p).contains(event.getClickedBlock())) { CreatureSpawner spawner = (CreatureSpawner) event.getClickedBlock().getState(); EntityType entity = EntityType.fromId(item.getData().getData()); spawner.setSpawnedType(entity); spawner.update(); p.sendMessage(ChatColor.RED + "You are now spawning " + entity.name()); if (item.getAmount() > 1) { item.setAmount(item.getAmount() - 1); } else { p.getInventory().setItemInHand(new ItemStack(Material.AIR)); } } else { p.sendMessage(ChatColor.RED + "This is not your mob spawner!"); } } } } @EventHandler public void onPlace(BlockPlaceEvent event) { Block b = event.getBlock(); if (b.getType() == Material.MOB_SPAWNER) { if (hasAbility(event.getPlayer())) { if (!spawners.containsKey(event.getPlayer())) { spawners.put(event.getPlayer(), new ArrayList<Block>()); } spawners.get(event.getPlayer()).add(b); MobSpawnerAbstract spawner = ((TileEntityMobSpawner) ((CraftWorld) b.getWorld()).getHandle().getTileEntity( b.getX(), b.getY(), b.getZ())).getSpawner(); NBTTagCompound nbt = new NBTTagCompound(); nbt.setString("CustomName", event.getPlayer().getName()); TileEntityMobSpawnerData data = new TileEntityMobSpawnerData(spawner, nbt, EntityType.PIG.getName()); spawner.a(data); } } } @EventHandler public void onPlayerDeath(PlayerKilledEvent event) { if (event.getKillerGamer() != null) { if (hasAbility(event.getKillerGamer())) { EntityType[] mobs = new EntityType[] { EntityType.SKELETON, EntityType.CREEPER, EntityType.ZOMBIE, EntityType.BLAZE, EntityType.CAVE_SPIDER, EntityType.PIG_ZOMBIE, EntityType.SILVERFISH }; event.getKilled() .getPlayer() .getWorld() .dropItemNaturally(event.getKilled().getPlayer().getLocation(), new ItemStack(Material.MONSTER_EGG, 1, mobs[new Random().nextInt(mobs.length)].getTypeId())); } } else if (hasAbility(event.getKilled()) && spawners.containsKey(event.getKilled().getPlayer())) { List<Block> blocks = spawners.get(event.getKilled().getPlayer()); while (!blocks.isEmpty()) { removeSpawner(blocks.get(0), false); } } } @EventHandler public void onSpawn(CreatureSpawnEvent event) { if (event.getSpawnReason() == SpawnReason.SPAWNER) { if (event.getEntity().getCustomName() != null) { event.getEntity().setMetadata("DontTarget", new FixedMetadataValue(GearApi.getMainPlugin(), event.getEntity().getCustomName())); event.getEntity().setCustomName(null); } } } @EventHandler public void onSpawnerSmash(BlockBreakEvent event) { if (event.getBlock().getType() == Material.MOB_SPAWNER) { for (Player p : spawners.keySet()) { if (spawners.get(p).contains(event.getBlock())) { removeSpawner(event.getBlock(), false); event.getPlayer().sendMessage(ChatColor.BLUE + "You destroyed " + p.getName() + "'s spawner!"); p.sendMessage(ChatColor.BLUE + event.getPlayer().getName() + " destroyed your monster spawner!"); } } } } @EventHandler public void onTarget(EntityTargetEvent event) { if (event.getEntity().hasMetadata("DontTarget") && event.getTarget() instanceof Player) { if (event.getEntity().getMetadata("DontTarget").get(0).asString().equals(((Player) event.getTarget()).getName())) { event.setCancelled(true); } } } @Override public void registerListener() { for (Gamer gamer : getGamers()) { gamer.getPlayer().getInventory().addItem(new ItemStack(Material.MOB_SPAWNER)); } } private void removeSpawner(Block block, boolean message) { Iterator<Player> itel = spawners.keySet().iterator(); while (itel.hasNext()) { Player p = itel.next(); if (spawners.get(p).contains(block)) { if (message) { p.sendMessage(ChatColor.RED + "Spawner has been broken!"); } spawners.get(p).remove(block); if (spawners.get(p).isEmpty()) { itel.remove(); } if (spawnedMobs.containsKey(block)) { for (Entity entity : spawnedMobs.get(block)) { entity.remove(); } spawnedMobs.remove(block); } block.setType(Material.AIR); break; } } } @Override public void unregisterListener() { } }
[ "github@lib.co.nz" ]
github@lib.co.nz
78225a69b9e3a0173fc4cffd049b61b2bfab269a
e9375c7cb7f672a59b927d1f6e2dcc50da7994bf
/src/com/company/thread/lock/ThreadAA.java
4ea3f0412f8a55015cab989b74fe5cc588552eae
[]
no_license
zxj16152/JavaTest
eea553f57e4d40616b641246463e67a9adf3120b
3ed20cc08d61bdbf20e9aafbdc1ec9fbf0e112e4
refs/heads/master
2020-07-19T19:22:36.426860
2019-09-05T07:22:46
2019-09-05T07:22:46
206,500,603
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
package com.company.thread.lock; import com.company.thread.condition.MyService; /** * @Description TODO * @Author zhouxinjian * @Date 2019-07-16 15:11 **/ public class ThreadAA extends Thread { private MyService myService; public ThreadAA(MyService myService) { this.myService=myService; } @Override public void run() { // myService.methodA(); } }
[ "wangh@hshbao.com" ]
wangh@hshbao.com
491a732341eaf11bcd38b9a2a166fa60a5baeedc
0ed4f87f109c878b62b6282114315e41c823ed4f
/src/View/Main.java
8a4280910c71c05e522b76cfa3c3714829a25bb8
[]
no_license
Vivien-lb/GLI-Camembert
76d50a9ce9260e48448ecf824786fd9675d8bacf
4d9f70e9f0c661dc80bb523c06bba6d1099178fd
refs/heads/master
2021-01-11T19:43:15.456795
2016-09-25T20:23:17
2016-09-25T20:23:17
69,188,928
0
0
null
null
null
null
UTF-8
Java
false
false
1,481
java
package View; import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import Controller.Controller; import Controller.IController; import Model.Adapter; import Model.IModel; import Model.Item; import Model.Model; import Model.TableCamembert; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Item item1 = new Item("Loyer", "Un toit, c'est fort utile", 400.0); Item item2 = new Item("Sorties", "Les petits plaisirs du mois", 50.0); Item item3 = new Item("Miam miam", "Pizza, pâtes, pizza.", 100.0); Item item4 = new Item("Café", "Le café du matin, celui de 10h, celui de 16h", 15.0); Model model = new Model(); model.addItem(item1); model.addItem(item2); model.addItem(item3); model.addItem(item4); IModel adapter = new Adapter(model); IController ic = new Controller(); ic.setModel(adapter); TableCamembert tablecamembert = new TableCamembert(adapter, ic); Vue vue = new Vue(adapter, ic); ic.setVue(vue); JFrame jframe = new JFrame(); JTable jtable = new JTable(tablecamembert); JScrollPane jscrollpane = new JScrollPane(jtable); JPanel paneltable = new JPanel(); paneltable.add(jscrollpane); jframe.setSize(new Dimension (900, 900)); jframe.getContentPane().add(vue); jframe.add(paneltable,BorderLayout.EAST); jframe.setVisible(true); } }
[ "vivien-lb@hotmail.fr" ]
vivien-lb@hotmail.fr
bae218fae1873f3113863a871361181e5bd22e19
b10fbc421c0501d0d2ec99060a620bc3e49fa4c9
/app/src/main/java/net/lzzy/practicesonline/activities/models/Question.java
f2b46f5b2cf9fb876c9cbfe6dc1ddcf976201241
[]
no_license
hezhengqiao/PracticesOnline
795cfccb285c67aae6f2dc84d38c5b7f56764d76
8fbb31791f429074a8ca6973fe4fef748e1742a4
refs/heads/master
2020-05-07T08:37:18.378226
2019-05-22T03:47:50
2019-05-22T03:47:50
180,338,289
0
0
null
2019-04-09T10:00:51
2019-04-09T10:00:50
null
UTF-8
Java
false
false
3,042
java
package net.lzzy.practicesonline.activities.models; import net.lzzy.practicesonline.activities.constants.ApiConstants; import net.lzzy.practicesonline.activities.models.view.QuestionType; import net.lzzy.practicesonline.activities.network.QuestionService; import net.lzzy.sqllib.Ignored; import net.lzzy.sqllib.Jsonable; import net.lzzy.sqllib.Sqlitable; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; import java.util.UUID; /** * * @author lzzy_gxy * @date 2019/4/16 * Description: */ public class Question extends BaseEntity implements Sqlitable, Jsonable { @Ignored public static final String COL_PRACTICE_ID="practiceId"; private String content; @Ignored private QuestionType type; private int dbType; private String analysis; private UUID practiceId; private int number; @Ignored private List<Option> options; public Question(){ options= new ArrayList<>(); } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public QuestionType getType() { return type; } public int getDbType() { return dbType; } public void setDbType(int dbType) { this.dbType = dbType; type=QuestionType.getInstance(dbType); } public String getAnalysis() { return analysis; } public void setAnalysis(String analysis) { this.analysis = analysis; } public UUID getPracticeId() { return practiceId; } public void setPracticeId(UUID practiceId) { this.practiceId = practiceId; } public List<Option> getOptions() { return options; } public void setOptions(List<Option> options) { this.options.clear(); this.options.addAll(options); } public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } @Override public boolean needUpdate() { return false; } @Override public JSONObject toJson() throws JSONException { return null; } @Override public void fromJson(JSONObject json) throws JSONException { analysis=json.getString(ApiConstants.JSON_QUESTION_ANALYSIS); content=json.getString(ApiConstants.JSON_QUESTION_CONTENT); setDbType(json.getInt(ApiConstants.JSON_QUESTION_TYPE)); String strOption= json.getString(ApiConstants.JSON_QUESTION_OPTIONS); String strAnswers=json.getString(ApiConstants.JSON_QUESTION_ANSWER); try { List<Option> options= QuestionService.getOptionsFromJson(strOption,strAnswers); for (Option option:options){ option.setQuestionId(id); } setOptions(options); }catch (IllegalAccessException|InstantiationException e){ e.printStackTrace(); } number=json.getInt("Number"); } }
[ "1829007308@qq.com" ]
1829007308@qq.com
7a852aad63018b7a4208014ce9af884db16b9a52
a8ed2f68a5b57bbb0efaa287186a9a0921b2cb70
/src/br/feevale/example/BigUFOEnemyShip.java
0fa0f44e421b463958d2428ee83d54d7e395d534
[]
no_license
ricardomachadosb/Factory-Pattern
67fafd3e9692ae97566ca0024721069137a89cc2
660658fe8802bbdb8abea667033148e3ac363c59
refs/heads/master
2021-01-01T08:54:58.435219
2015-10-03T14:05:58
2015-10-03T14:05:58
42,407,396
1
0
null
null
null
null
UTF-8
Java
false
false
229
java
package br.feevale.example; /** * @author Ricardo Machado * */ public class BigUFOEnemyShip extends UFOEnemyShip { /** * */ public BigUFOEnemyShip(){ setName("Big UFO Enemy Ship"); setDamage(40.0); } }
[ "ricardomachado.sb@gmail.com" ]
ricardomachado.sb@gmail.com
7b4c6759059a79f9cd1f1737e0835da4729d7c86
ec870a6d5735bbbc373864ccb1b9c2f9405db1b8
/mobile-sensors-max-sum/src/main/java/boundedMaxSum/treeformation/ghs/messages/GHSRejectMessage.java
9af50b4e6fb98fac33053918a384438030468162
[]
no_license
figo005/code_submittion
ab5f6e75144fae2f4c897bbb30beb0e4ade93b72
2c0c2a66a275ba67b79f0461402e5adb26a83c2e
refs/heads/master
2016-09-05T12:17:12.829340
2015-04-12T14:06:14
2015-04-12T14:06:14
33,808,990
0
1
null
null
null
null
UTF-8
Java
false
false
426
java
package boundedMaxSum.treeformation.ghs.messages; import boundedMaxSum.treeformation.ghs.GHSAgent; import boundedMaxSum.treeformation.ghs.GHSEdge; import boundedMaxSum.treeformation.ghs.GHSMessage; public class GHSRejectMessage extends GHSMessage { public GHSRejectMessage(GHSEdge edge, GHSAgent sender) { super(edge, sender, GHSMessageType.REJECT); } @Override public String toString() { return "Reject"; } }
[ "chensf005@163.com" ]
chensf005@163.com
1db15a70bd66a70d09aa364bf6d64a8b2104f5fb
ca11d94c9a94878001666385bf78c90af06f5b55
/tests/WorkmanTests.java
1c2b5085f7fe779a137fab75721af80b088ab842
[ "MIT" ]
permissive
Jinnoma/employees
998a8527e8cb71a8865a23a783b559e0e89ff882
891379c5af31b9c68699052af93bc019f73752cb
refs/heads/master
2023-01-14T15:03:19.858307
2020-11-28T08:25:56
2020-11-28T08:25:56
315,539,226
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; public class WorkmanTests { private Workman workman; @Before public void setup() { Address workerAddress = new Address("Augusta", 12, 13, "Gdynia"); workman = new Workman("Przemek", "Guzek", 30, 3, 100, workerAddress); } @Test public void getWorkmanCorporationValue() { /* value = experience * strength / age */ float corporationValue; corporationValue = workman.getCorporationValue(); assertEquals(10, corporationValue, 2); } @Test(expected = IllegalArgumentException.class) public void setTooHighStrength() { workman.setStrength(101); } @Test(expected = IllegalArgumentException.class) public void setTooLowStrength() { workman.setStrength(-1); } }
[ "przemyslaw.guzek@gmail.com" ]
przemyslaw.guzek@gmail.com
1bec1e563be1cf579a1dfe734013d838152c4987
0a99e10a1cb80fc263a9446c5a54ff3a17161f17
/va2/src/main/modes/menu/EstateRoomMenuMode.java
939b262696c6d3b7ddddd629d7f543d0ca498428
[]
no_license
VectorShadow/VA2
46c61d4f309a6badde71879c33a8082a58b56594
3f13c417e01a035eaf8ef0454ab00612c856e4df
refs/heads/master
2021-07-09T01:34:00.354124
2021-04-22T17:17:07
2021-04-22T17:17:07
242,174,598
1
0
null
2021-04-14T14:38:37
2020-02-21T15:48:03
Java
UTF-8
Java
false
false
2,844
java
package main.modes.menu; import io.in.InputCommandList; import io.out.GUIManager; import main.Session; import main.modes.menu.estate.*; import main.modes.menu.estate.armory.ArmoryMenuMode; import main.modes.menu.estate.library.LibraryMenuMode; import world.lore.LockLeaf; import world.lore.LoreDefinitions; import world.terrain.TerrainDefinitions; import world.terrain.TerrainTemplate; public abstract class EstateRoomMenuMode extends MenuMode { abstract protected void setEstateMenu(); @Override public InputCommandList getInput() { return null; } @Override public void to() { setEstateMenu(); GUIManager gm = Session.getGuiManager(); gm.changeChannelToFullscreenText(); out(); } @Override public void from() { //todo - nothing } public static EstateRoomMenuMode interpretTerrain(TerrainTemplate tt) { if (tt.equals(TerrainDefinitions.LIBRARY_PORTAL)) { EstateRoomMenuMode targetMode = new LibraryMenuMode(); if (((LockLeaf)LoreDefinitions.getLockTree().get( LoreDefinitions.THEME_GENERAL, LoreDefinitions.GENERAL_ESTATE_MESSAGE )).isLocked()) { Session.unlockLore(LoreDefinitions.THEME_GENERAL, LoreDefinitions.GENERAL_ESTATE_MESSAGE, targetMode); LoreDefinitions.silentUnlock(LoreDefinitions.THEME_GENERAL, LoreDefinitions.GENERAL_HISTORY); LoreDefinitions.silentUnlock(LoreDefinitions.THEME_GENERAL, LoreDefinitions.GENERAL_MYTHS); return null; } else return targetMode; } else if (tt.equals(TerrainDefinitions.HALL_OF_ARMS_PORTAL)) return new HallOfArmsMenuMode(); else if (tt.equals(TerrainDefinitions.ARCHERY_RANGE_PORTAL)) return new ArcheryRangeMenuMode(); else if (tt.equals(TerrainDefinitions.LABORATORY_PORTAL)) return new LaboratoryMenuMode(); else if (tt.equals(TerrainDefinitions.TROPHY_HALL_PORTAL)) return new TrophyHallMenuMode(); else if (tt.equals(TerrainDefinitions.MAUSOLEUM_PORTAL)) return new MausoleumMenuMode(); else if (tt.equals(TerrainDefinitions.FORGE_PORTAL)) return new ForgeMenuMode(); else if (tt.equals(TerrainDefinitions.WORKSHOP_PORTAL)) return new WorkshopMenuMode(); else if (tt.equals(TerrainDefinitions.WAREHOUSE_PORTAL)) return new WarehouseMenuMode(); else if (tt.equals(TerrainDefinitions.ARMORY_PORTAL)) return new ArmoryMenuMode(); else if (tt.equals(TerrainDefinitions.RITUAL_CHAMBER_PORTAL)) return new RitualChamberMenuMode(); else return null; //unsupported terrain need not generate a menu } }
[ "ncbrayshaw@hotmail.com" ]
ncbrayshaw@hotmail.com
e83be7b7243cbbc536b0a3f3c0a0575280422482
5786b8c28f069ae9b9b7f850edf4d4c1b5cf976c
/languages/CSharp/source_gen/CSharp/behavior/Class_member_declarations_BehaviorDescriptor.java
af404bfc54173402fc6d98a2152ece35187f7dd3
[ "Apache-2.0" ]
permissive
vaclav/MPS_CSharp
681ea277dae2e7503cd0f2d21cb3bb7084f6dffc
deea11bfe3711dd241d9ca3f007b810d574bae76
refs/heads/master
2021-01-13T14:36:41.949662
2019-12-03T15:26:21
2019-12-03T15:26:21
72,849,927
19
5
null
null
null
null
UTF-8
Java
false
false
378
java
package CSharp.behavior; /*Generated by MPS */ /** * Will be removed after 3.4 * Need to support compilation of the legacy behavior descriptors before the language is rebuilt * This class is not involved in the actual method invocation */ @Deprecated public class Class_member_declarations_BehaviorDescriptor { public String getConceptFqName() { return null; } }
[ "vaclav.pech@gmail.com" ]
vaclav.pech@gmail.com
b8a8692231b58d255076f563d17e6aa96241b7fd
e8f80594324eb42c7c135537c37237d74cd2ae1b
/src/main/java/com/marin/job/listing/persistence/model/User.java
2ff2e2ac4b1b257133b40b5d573d06457fec21fd
[]
no_license
MarinKacaj/JobListing
1f8693ded1236dc13b4530ce2606130e7774fc15
3adf00008a39e145f2471589a3c1a096bc1915af
refs/heads/master
2020-04-13T08:08:29.654829
2018-12-27T13:11:23
2018-12-27T13:11:23
163,073,419
0
0
null
null
null
null
UTF-8
Java
false
false
2,117
java
package com.marin.job.listing.persistence.model; import javax.persistence.*; import java.util.Set; @Entity @Table(name = "user") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "user_id") private int id; @Column(name = "email") // @ValidEmail(message = "*Please provide an email") // @NotEmpty(message = "*Please provide an email") private String email; @Column(name = "password") // @Length(min = 5, message = "*Your password must have at least 5 characters") // @NotEmpty(message = "*Please provide your password") // @Transient private String password; @Column(name = "name") // @NotEmpty(message = "*Please provide your name") private String name; @Column(name = "last_name") // @NotEmpty(message = "*Please provide your last name") private String lastName; // @Column(name = "active") private int active; @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "user_role", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "role_id")) private Set<Role> roles; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getActive() { return active; } public void setActive(int active) { this.active = active; } public Set<Role> getRoles() { return roles; } public void setRoles(Set<Role> roles) { this.roles = roles; } }
[ "m93_vkacaj@yahoo.com" ]
m93_vkacaj@yahoo.com
16da8daeb6e6876fcc6c758754faa784e2f0edfe
7c3507a565443800d3ba459f860e1df0820c7973
/day03-ControlFlow/src/comtrol/ifstmt/CalcBMI.java
2f54b5d5c0498b458449d76dfd96a5a4dabfb740
[]
no_license
kangyuhwan/02_java
d91b1fad22c6475694c7a3eecc6eb99d12c2a0ff
d0615728ec0b5bcd55ec4ef1cfebb33e2b25622f
refs/heads/master
2022-01-26T03:06:58.895604
2019-08-06T01:33:36
2019-08-06T01:33:36
195,142,867
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package comtrol.ifstmt; /* * */ import java.util.Scanner; public class CalcBMI { // 선언 double weight; double height; String bmi; Scanner scan; // 초기화 bmi = weight/(height*height); scan = new Scanner(System.in); // prompt System.out.printf("키 몸무게 입력 "); weight = scan.nextDouble(); height = scan.nextDouble(); sysout if (bmi > 40) { bmi = "병적인 비만"; } else if (bmi >= 27.5 && bmi < 40 ) { bmi = "비만"; } else if (bmi >= 23 && bmi < 27.5 ) { bmi = "과체중"; } else if (bmi >= 18.5 && bmi < 23 ) { bmi = "정상"; } else if (bmi >= 15 && bmi < 18.5 ) { bmi = "저체중"; } else { bmi = "병적인 저체중"; } System.out.printf("키 : %d 몸무게 : %d bmi : %s입니다.", weight, height, bmi); } }
[ "msg5345@naver.com" ]
msg5345@naver.com
8118f19e53aa5a1e92b0e5386e9e6724c3157c48
7c18608823ce7616436eadef0a83cfbd64943502
/hazelcast-code-samples/hazelcast-integration/mongodb/src/main/java/com/hazelcast/loader/ReadWriteThroughCache.java
0d59e0df4cc788f829b76107b0257578ae401e29
[]
no_license
djkevincr/JCache-Samples
a7cd6118464997b00d77f6c9de89a2ef20e9089c
1504dc9956d7660d6a191e1a1fd95eed63b4dab2
refs/heads/master
2021-01-01T05:42:55.461979
2016-05-24T15:06:12
2016-05-24T15:06:12
59,575,941
3
1
null
null
null
null
UTF-8
Java
false
false
1,881
java
/* * * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. * * 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.hazelcast.loader; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IMap; import java.io.FileNotFoundException; /** * Starter application for read-through / write-through example with Hazelcast and MongoDB. * * Connection details should be interred in `hazelcast.xml` under MapStore config for IMap * Properties includes: connection url, database and collection names * * @author Viktor Gamov on 11/2/15. * Twitter: @gamussa */ public class ReadWriteThroughCache { public static void main(String[] args) throws FileNotFoundException { HazelcastInstance instance = Hazelcast.newHazelcastInstance(); IMap<String, Supplement> supplements = instance.getMap("supplements"); System.out.println(supplements.size()); supplements.set("1", new Supplement("bcaa", 10)); supplements.set("2", new Supplement("protein", 100)); supplements.set("3", new Supplement("glucosamine", 200)); System.out.println(supplements.size()); supplements.evictAll(); System.out.println(supplements.size()); supplements.loadAll(true); System.out.println(supplements.size()); } }
[ "djkevincr@yahoo.com" ]
djkevincr@yahoo.com
f9bfa20d0265f61a0d41abaaad7931857b82c3d6
7190a72145528284ff90624def20c30611c2c712
/src/com/company/DataTypeBool.java
ee7cffa4f821fcc13e1ed41f948c856cc3c15897
[]
no_license
madluk-me/Te
27cdf6fe34c773b22139e0d389fd50a7fc515426
e4a0008216a1aa320725fcbdf6e5c3da8934e3ce
refs/heads/master
2020-12-26T07:38:41.476809
2020-05-23T08:46:02
2020-05-23T08:46:02
237,435,744
0
0
null
null
null
null
UTF-8
Java
false
false
1,282
java
package com.company; import java.sql.SQLOutput; public class DataTypeBool { public static void main(String[] args) { boolean varBoolTrue = true; boolean varBoolFalse = false; System.out.println(varBoolFalse); System.out.println(varBoolTrue); //<>== System.out.println("------------------------------------------"); System.out.println(1>4); System.out.println(1<4); System.out.println(1==4); System.out.println(4==4); System.out.println('A'=='A'); System.out.println('A'=='a'); System.out.println(true ==false); System.out.println("------------------"); int number1 = 688; int number2 = 33; boolean checkLessThan = number1 < number2; boolean checkGreaterThan = number1 > number2; boolean checkEqualsThan = number1 == number2; System.out.println("Is number "+ number1+ " less than "+number2); System.out.println("It is "+checkLessThan); System.out.println("Is number "+ number1+ " greater than "+number2); System.out.println("It is "+checkGreaterThan); System.out.println("Is number "+ number1+ " equal "+number2); System.out.println("It is "+checkEqualsThan); } }
[ "m.lukasevica@gmail.com" ]
m.lukasevica@gmail.com
3b1143f32f079e03483c8b47488e3a007ae05d41
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/776365/buggy-version/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
b3e9027175801fd8d72569eca351352fe6e2bdd1
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
398,738
java
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.cassandra.service; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; import java.util.Collections; import org.apache.log4j.Logger; import org.apache.thrift.*; import org.apache.thrift.meta_data.*; import org.apache.thrift.protocol.*; public class Cassandra { public interface Iface { public List<column_t> get_slice(String tablename, String key, String columnFamily_column, int start, int count) throws InvalidRequestException, NotFoundException, TException; public List<column_t> get_slice_by_name_range(String tablename, String key, String columnFamily, String start, String end, int count) throws InvalidRequestException, NotFoundException, TException; public List<column_t> get_slice_by_names(String tablename, String key, String columnFamily, List<String> columnNames) throws InvalidRequestException, NotFoundException, TException; public column_t get_column(String tablename, String key, String columnFamily_column) throws InvalidRequestException, NotFoundException, TException; public int get_column_count(String tablename, String key, String columnFamily_column) throws InvalidRequestException, TException; public void insert(String tablename, String key, String columnFamily_column, byte[] cellData, long timestamp, boolean block) throws InvalidRequestException, UnavailableException, TException; public void batch_insert(batch_mutation_t batchMutation, boolean block) throws InvalidRequestException, UnavailableException, TException; public void remove(String tablename, String key, String columnFamily_column, long timestamp, boolean block) throws InvalidRequestException, UnavailableException, TException; public List<column_t> get_columns_since(String tablename, String key, String columnFamily_column, long timeStamp) throws InvalidRequestException, NotFoundException, TException; public List<superColumn_t> get_slice_super(String tablename, String key, String columnFamily_superColumnName, int start, int count) throws InvalidRequestException, TException; public List<superColumn_t> get_slice_super_by_names(String tablename, String key, String columnFamily, List<String> superColumnNames) throws InvalidRequestException, TException; public superColumn_t get_superColumn(String tablename, String key, String columnFamily) throws InvalidRequestException, NotFoundException, TException; public void batch_insert_superColumn(batch_mutation_super_t batchMutationSuper, boolean block) throws InvalidRequestException, UnavailableException, TException; public void touch(String key, boolean fData) throws TException; public List<String> get_key_range(String tablename, String startWith, String stopAt, int maxResults) throws InvalidRequestException, TException; public String getStringProperty(String propertyName) throws TException; public List<String> getStringListProperty(String propertyName) throws TException; public String describeTable(String tableName) throws TException; public CqlResult_t executeQuery(String query) throws TException; } public static class Client implements Iface { public Client(TProtocol prot) { this(prot, prot); } public Client(TProtocol iprot, TProtocol oprot) { iprot_ = iprot; oprot_ = oprot; } protected TProtocol iprot_; protected TProtocol oprot_; protected int seqid_; public TProtocol getInputProtocol() { return this.iprot_; } public TProtocol getOutputProtocol() { return this.oprot_; } public List<column_t> get_slice(String tablename, String key, String columnFamily_column, int start, int count) throws InvalidRequestException, NotFoundException, TException { send_get_slice(tablename, key, columnFamily_column, start, count); return recv_get_slice(); } public void send_get_slice(String tablename, String key, String columnFamily_column, int start, int count) throws TException { oprot_.writeMessageBegin(new TMessage("get_slice", TMessageType.CALL, seqid_)); get_slice_args args = new get_slice_args(); args.tablename = tablename; args.key = key; args.columnFamily_column = columnFamily_column; args.start = start; args.count = count; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<column_t> recv_get_slice() throws InvalidRequestException, NotFoundException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_slice_result result = new get_slice_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice failed: unknown result"); } public List<column_t> get_slice_by_name_range(String tablename, String key, String columnFamily, String start, String end, int count) throws InvalidRequestException, NotFoundException, TException { send_get_slice_by_name_range(tablename, key, columnFamily, start, end, count); return recv_get_slice_by_name_range(); } public void send_get_slice_by_name_range(String tablename, String key, String columnFamily, String start, String end, int count) throws TException { oprot_.writeMessageBegin(new TMessage("get_slice_by_name_range", TMessageType.CALL, seqid_)); get_slice_by_name_range_args args = new get_slice_by_name_range_args(); args.tablename = tablename; args.key = key; args.columnFamily = columnFamily; args.start = start; args.end = end; args.count = count; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<column_t> recv_get_slice_by_name_range() throws InvalidRequestException, NotFoundException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_slice_by_name_range_result result = new get_slice_by_name_range_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice_by_name_range failed: unknown result"); } public List<column_t> get_slice_by_names(String tablename, String key, String columnFamily, List<String> columnNames) throws InvalidRequestException, NotFoundException, TException { send_get_slice_by_names(tablename, key, columnFamily, columnNames); return recv_get_slice_by_names(); } public void send_get_slice_by_names(String tablename, String key, String columnFamily, List<String> columnNames) throws TException { oprot_.writeMessageBegin(new TMessage("get_slice_by_names", TMessageType.CALL, seqid_)); get_slice_by_names_args args = new get_slice_by_names_args(); args.tablename = tablename; args.key = key; args.columnFamily = columnFamily; args.columnNames = columnNames; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<column_t> recv_get_slice_by_names() throws InvalidRequestException, NotFoundException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_slice_by_names_result result = new get_slice_by_names_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice_by_names failed: unknown result"); } public column_t get_column(String tablename, String key, String columnFamily_column) throws InvalidRequestException, NotFoundException, TException { send_get_column(tablename, key, columnFamily_column); return recv_get_column(); } public void send_get_column(String tablename, String key, String columnFamily_column) throws TException { oprot_.writeMessageBegin(new TMessage("get_column", TMessageType.CALL, seqid_)); get_column_args args = new get_column_args(); args.tablename = tablename; args.key = key; args.columnFamily_column = columnFamily_column; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public column_t recv_get_column() throws InvalidRequestException, NotFoundException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_column_result result = new get_column_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_column failed: unknown result"); } public int get_column_count(String tablename, String key, String columnFamily_column) throws InvalidRequestException, TException { send_get_column_count(tablename, key, columnFamily_column); return recv_get_column_count(); } public void send_get_column_count(String tablename, String key, String columnFamily_column) throws TException { oprot_.writeMessageBegin(new TMessage("get_column_count", TMessageType.CALL, seqid_)); get_column_count_args args = new get_column_count_args(); args.tablename = tablename; args.key = key; args.columnFamily_column = columnFamily_column; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public int recv_get_column_count() throws InvalidRequestException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_column_count_result result = new get_column_count_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_column_count failed: unknown result"); } public void insert(String tablename, String key, String columnFamily_column, byte[] cellData, long timestamp, boolean block) throws InvalidRequestException, UnavailableException, TException { send_insert(tablename, key, columnFamily_column, cellData, timestamp, block); recv_insert(); } public void send_insert(String tablename, String key, String columnFamily_column, byte[] cellData, long timestamp, boolean block) throws TException { oprot_.writeMessageBegin(new TMessage("insert", TMessageType.CALL, seqid_)); insert_args args = new insert_args(); args.tablename = tablename; args.key = key; args.columnFamily_column = columnFamily_column; args.cellData = cellData; args.timestamp = timestamp; args.block = block; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_insert() throws InvalidRequestException, UnavailableException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } insert_result result = new insert_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } return; } public void batch_insert(batch_mutation_t batchMutation, boolean block) throws InvalidRequestException, UnavailableException, TException { send_batch_insert(batchMutation, block); recv_batch_insert(); } public void send_batch_insert(batch_mutation_t batchMutation, boolean block) throws TException { oprot_.writeMessageBegin(new TMessage("batch_insert", TMessageType.CALL, seqid_)); batch_insert_args args = new batch_insert_args(); args.batchMutation = batchMutation; args.block = block; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_batch_insert() throws InvalidRequestException, UnavailableException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } batch_insert_result result = new batch_insert_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } return; } public void remove(String tablename, String key, String columnFamily_column, long timestamp, boolean block) throws InvalidRequestException, UnavailableException, TException { send_remove(tablename, key, columnFamily_column, timestamp, block); recv_remove(); } public void send_remove(String tablename, String key, String columnFamily_column, long timestamp, boolean block) throws TException { oprot_.writeMessageBegin(new TMessage("remove", TMessageType.CALL, seqid_)); remove_args args = new remove_args(); args.tablename = tablename; args.key = key; args.columnFamily_column = columnFamily_column; args.timestamp = timestamp; args.block = block; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_remove() throws InvalidRequestException, UnavailableException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } remove_result result = new remove_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } return; } public List<column_t> get_columns_since(String tablename, String key, String columnFamily_column, long timeStamp) throws InvalidRequestException, NotFoundException, TException { send_get_columns_since(tablename, key, columnFamily_column, timeStamp); return recv_get_columns_since(); } public void send_get_columns_since(String tablename, String key, String columnFamily_column, long timeStamp) throws TException { oprot_.writeMessageBegin(new TMessage("get_columns_since", TMessageType.CALL, seqid_)); get_columns_since_args args = new get_columns_since_args(); args.tablename = tablename; args.key = key; args.columnFamily_column = columnFamily_column; args.timeStamp = timeStamp; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<column_t> recv_get_columns_since() throws InvalidRequestException, NotFoundException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_columns_since_result result = new get_columns_since_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_columns_since failed: unknown result"); } public List<superColumn_t> get_slice_super(String tablename, String key, String columnFamily_superColumnName, int start, int count) throws InvalidRequestException, TException { send_get_slice_super(tablename, key, columnFamily_superColumnName, start, count); return recv_get_slice_super(); } public void send_get_slice_super(String tablename, String key, String columnFamily_superColumnName, int start, int count) throws TException { oprot_.writeMessageBegin(new TMessage("get_slice_super", TMessageType.CALL, seqid_)); get_slice_super_args args = new get_slice_super_args(); args.tablename = tablename; args.key = key; args.columnFamily_superColumnName = columnFamily_superColumnName; args.start = start; args.count = count; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<superColumn_t> recv_get_slice_super() throws InvalidRequestException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_slice_super_result result = new get_slice_super_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice_super failed: unknown result"); } public List<superColumn_t> get_slice_super_by_names(String tablename, String key, String columnFamily, List<String> superColumnNames) throws InvalidRequestException, TException { send_get_slice_super_by_names(tablename, key, columnFamily, superColumnNames); return recv_get_slice_super_by_names(); } public void send_get_slice_super_by_names(String tablename, String key, String columnFamily, List<String> superColumnNames) throws TException { oprot_.writeMessageBegin(new TMessage("get_slice_super_by_names", TMessageType.CALL, seqid_)); get_slice_super_by_names_args args = new get_slice_super_by_names_args(); args.tablename = tablename; args.key = key; args.columnFamily = columnFamily; args.superColumnNames = superColumnNames; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<superColumn_t> recv_get_slice_super_by_names() throws InvalidRequestException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_slice_super_by_names_result result = new get_slice_super_by_names_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice_super_by_names failed: unknown result"); } public superColumn_t get_superColumn(String tablename, String key, String columnFamily) throws InvalidRequestException, NotFoundException, TException { send_get_superColumn(tablename, key, columnFamily); return recv_get_superColumn(); } public void send_get_superColumn(String tablename, String key, String columnFamily) throws TException { oprot_.writeMessageBegin(new TMessage("get_superColumn", TMessageType.CALL, seqid_)); get_superColumn_args args = new get_superColumn_args(); args.tablename = tablename; args.key = key; args.columnFamily = columnFamily; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public superColumn_t recv_get_superColumn() throws InvalidRequestException, NotFoundException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_superColumn_result result = new get_superColumn_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } if (result.nfe != null) { throw result.nfe; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_superColumn failed: unknown result"); } public void batch_insert_superColumn(batch_mutation_super_t batchMutationSuper, boolean block) throws InvalidRequestException, UnavailableException, TException { send_batch_insert_superColumn(batchMutationSuper, block); recv_batch_insert_superColumn(); } public void send_batch_insert_superColumn(batch_mutation_super_t batchMutationSuper, boolean block) throws TException { oprot_.writeMessageBegin(new TMessage("batch_insert_superColumn", TMessageType.CALL, seqid_)); batch_insert_superColumn_args args = new batch_insert_superColumn_args(); args.batchMutationSuper = batchMutationSuper; args.block = block; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_batch_insert_superColumn() throws InvalidRequestException, UnavailableException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } batch_insert_superColumn_result result = new batch_insert_superColumn_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.ire != null) { throw result.ire; } if (result.ue != null) { throw result.ue; } return; } public void touch(String key, boolean fData) throws TException { send_touch(key, fData); } public void send_touch(String key, boolean fData) throws TException { oprot_.writeMessageBegin(new TMessage("touch", TMessageType.CALL, seqid_)); touch_args args = new touch_args(); args.key = key; args.fData = fData; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<String> get_key_range(String tablename, String startWith, String stopAt, int maxResults) throws InvalidRequestException, TException { send_get_key_range(tablename, startWith, stopAt, maxResults); return recv_get_key_range(); } public void send_get_key_range(String tablename, String startWith, String stopAt, int maxResults) throws TException { oprot_.writeMessageBegin(new TMessage("get_key_range", TMessageType.CALL, seqid_)); get_key_range_args args = new get_key_range_args(); args.tablename = tablename; args.startWith = startWith; args.stopAt = stopAt; args.maxResults = maxResults; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<String> recv_get_key_range() throws InvalidRequestException, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } get_key_range_result result = new get_key_range_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } if (result.ire != null) { throw result.ire; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_key_range failed: unknown result"); } public String getStringProperty(String propertyName) throws TException { send_getStringProperty(propertyName); return recv_getStringProperty(); } public void send_getStringProperty(String propertyName) throws TException { oprot_.writeMessageBegin(new TMessage("getStringProperty", TMessageType.CALL, seqid_)); getStringProperty_args args = new getStringProperty_args(); args.propertyName = propertyName; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public String recv_getStringProperty() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } getStringProperty_result result = new getStringProperty_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getStringProperty failed: unknown result"); } public List<String> getStringListProperty(String propertyName) throws TException { send_getStringListProperty(propertyName); return recv_getStringListProperty(); } public void send_getStringListProperty(String propertyName) throws TException { oprot_.writeMessageBegin(new TMessage("getStringListProperty", TMessageType.CALL, seqid_)); getStringListProperty_args args = new getStringListProperty_args(); args.propertyName = propertyName; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<String> recv_getStringListProperty() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } getStringListProperty_result result = new getStringListProperty_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getStringListProperty failed: unknown result"); } public String describeTable(String tableName) throws TException { send_describeTable(tableName); return recv_describeTable(); } public void send_describeTable(String tableName) throws TException { oprot_.writeMessageBegin(new TMessage("describeTable", TMessageType.CALL, seqid_)); describeTable_args args = new describeTable_args(); args.tableName = tableName; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public String recv_describeTable() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } describeTable_result result = new describeTable_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "describeTable failed: unknown result"); } public CqlResult_t executeQuery(String query) throws TException { send_executeQuery(query); return recv_executeQuery(); } public void send_executeQuery(String query) throws TException { oprot_.writeMessageBegin(new TMessage("executeQuery", TMessageType.CALL, seqid_)); executeQuery_args args = new executeQuery_args(); args.query = query; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public CqlResult_t recv_executeQuery() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } executeQuery_result result = new executeQuery_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "executeQuery failed: unknown result"); } } public static class Processor implements TProcessor { private static final Logger LOGGER = Logger.getLogger(Processor.class.getName()); public Processor(Iface iface) { iface_ = iface; processMap_.put("get_slice", new get_slice()); processMap_.put("get_slice_by_name_range", new get_slice_by_name_range()); processMap_.put("get_slice_by_names", new get_slice_by_names()); processMap_.put("get_column", new get_column()); processMap_.put("get_column_count", new get_column_count()); processMap_.put("insert", new insert()); processMap_.put("batch_insert", new batch_insert()); processMap_.put("remove", new remove()); processMap_.put("get_columns_since", new get_columns_since()); processMap_.put("get_slice_super", new get_slice_super()); processMap_.put("get_slice_super_by_names", new get_slice_super_by_names()); processMap_.put("get_superColumn", new get_superColumn()); processMap_.put("batch_insert_superColumn", new batch_insert_superColumn()); processMap_.put("touch", new touch()); processMap_.put("get_key_range", new get_key_range()); processMap_.put("getStringProperty", new getStringProperty()); processMap_.put("getStringListProperty", new getStringListProperty()); processMap_.put("describeTable", new describeTable()); processMap_.put("executeQuery", new executeQuery()); } protected static interface ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException; } private Iface iface_; protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>(); public boolean process(TProtocol iprot, TProtocol oprot) throws TException { TMessage msg = iprot.readMessageBegin(); ProcessFunction fn = processMap_.get(msg.name); if (fn == null) { TProtocolUtil.skip(iprot, TType.STRUCT); iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return true; } fn.process(msg.seqid, iprot, oprot); return true; } private class get_slice implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_slice_args args = new get_slice_args(); args.read(iprot); iprot.readMessageEnd(); get_slice_result result = new get_slice_result(); try { result.success = iface_.get_slice(args.tablename, args.key, args.columnFamily_column, args.start, args.count); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing get_slice", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_slice"); oprot.writeMessageBegin(new TMessage("get_slice", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_slice", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_slice_by_name_range implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_slice_by_name_range_args args = new get_slice_by_name_range_args(); args.read(iprot); iprot.readMessageEnd(); get_slice_by_name_range_result result = new get_slice_by_name_range_result(); try { result.success = iface_.get_slice_by_name_range(args.tablename, args.key, args.columnFamily, args.start, args.end, args.count); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing get_slice_by_name_range", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_slice_by_name_range"); oprot.writeMessageBegin(new TMessage("get_slice_by_name_range", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_slice_by_name_range", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_slice_by_names implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_slice_by_names_args args = new get_slice_by_names_args(); args.read(iprot); iprot.readMessageEnd(); get_slice_by_names_result result = new get_slice_by_names_result(); try { result.success = iface_.get_slice_by_names(args.tablename, args.key, args.columnFamily, args.columnNames); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing get_slice_by_names", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_slice_by_names"); oprot.writeMessageBegin(new TMessage("get_slice_by_names", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_slice_by_names", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_column implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_column_args args = new get_column_args(); args.read(iprot); iprot.readMessageEnd(); get_column_result result = new get_column_result(); try { result.success = iface_.get_column(args.tablename, args.key, args.columnFamily_column); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing get_column", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_column"); oprot.writeMessageBegin(new TMessage("get_column", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_column", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_column_count implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_column_count_args args = new get_column_count_args(); args.read(iprot); iprot.readMessageEnd(); get_column_count_result result = new get_column_count_result(); try { result.success = iface_.get_column_count(args.tablename, args.key, args.columnFamily_column); result.__isset.success = true; } catch (InvalidRequestException ire) { result.ire = ire; } catch (Throwable th) { LOGGER.error("Internal error processing get_column_count", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_column_count"); oprot.writeMessageBegin(new TMessage("get_column_count", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_column_count", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class insert implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { insert_args args = new insert_args(); args.read(iprot); iprot.readMessageEnd(); insert_result result = new insert_result(); try { iface_.insert(args.tablename, args.key, args.columnFamily_column, args.cellData, args.timestamp, args.block); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (Throwable th) { LOGGER.error("Internal error processing insert", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing insert"); oprot.writeMessageBegin(new TMessage("insert", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("insert", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class batch_insert implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { batch_insert_args args = new batch_insert_args(); args.read(iprot); iprot.readMessageEnd(); batch_insert_result result = new batch_insert_result(); try { iface_.batch_insert(args.batchMutation, args.block); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (Throwable th) { LOGGER.error("Internal error processing batch_insert", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batch_insert"); oprot.writeMessageBegin(new TMessage("batch_insert", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("batch_insert", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class remove implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { remove_args args = new remove_args(); args.read(iprot); iprot.readMessageEnd(); remove_result result = new remove_result(); try { iface_.remove(args.tablename, args.key, args.columnFamily_column, args.timestamp, args.block); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (Throwable th) { LOGGER.error("Internal error processing remove", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing remove"); oprot.writeMessageBegin(new TMessage("remove", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("remove", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_columns_since implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_columns_since_args args = new get_columns_since_args(); args.read(iprot); iprot.readMessageEnd(); get_columns_since_result result = new get_columns_since_result(); try { result.success = iface_.get_columns_since(args.tablename, args.key, args.columnFamily_column, args.timeStamp); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing get_columns_since", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_columns_since"); oprot.writeMessageBegin(new TMessage("get_columns_since", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_columns_since", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_slice_super implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_slice_super_args args = new get_slice_super_args(); args.read(iprot); iprot.readMessageEnd(); get_slice_super_result result = new get_slice_super_result(); try { result.success = iface_.get_slice_super(args.tablename, args.key, args.columnFamily_superColumnName, args.start, args.count); } catch (InvalidRequestException ire) { result.ire = ire; } catch (Throwable th) { LOGGER.error("Internal error processing get_slice_super", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_slice_super"); oprot.writeMessageBegin(new TMessage("get_slice_super", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_slice_super", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_slice_super_by_names implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_slice_super_by_names_args args = new get_slice_super_by_names_args(); args.read(iprot); iprot.readMessageEnd(); get_slice_super_by_names_result result = new get_slice_super_by_names_result(); try { result.success = iface_.get_slice_super_by_names(args.tablename, args.key, args.columnFamily, args.superColumnNames); } catch (InvalidRequestException ire) { result.ire = ire; } catch (Throwable th) { LOGGER.error("Internal error processing get_slice_super_by_names", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_slice_super_by_names"); oprot.writeMessageBegin(new TMessage("get_slice_super_by_names", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_slice_super_by_names", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_superColumn implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_superColumn_args args = new get_superColumn_args(); args.read(iprot); iprot.readMessageEnd(); get_superColumn_result result = new get_superColumn_result(); try { result.success = iface_.get_superColumn(args.tablename, args.key, args.columnFamily); } catch (InvalidRequestException ire) { result.ire = ire; } catch (NotFoundException nfe) { result.nfe = nfe; } catch (Throwable th) { LOGGER.error("Internal error processing get_superColumn", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_superColumn"); oprot.writeMessageBegin(new TMessage("get_superColumn", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_superColumn", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class batch_insert_superColumn implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { batch_insert_superColumn_args args = new batch_insert_superColumn_args(); args.read(iprot); iprot.readMessageEnd(); batch_insert_superColumn_result result = new batch_insert_superColumn_result(); try { iface_.batch_insert_superColumn(args.batchMutationSuper, args.block); } catch (InvalidRequestException ire) { result.ire = ire; } catch (UnavailableException ue) { result.ue = ue; } catch (Throwable th) { LOGGER.error("Internal error processing batch_insert_superColumn", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batch_insert_superColumn"); oprot.writeMessageBegin(new TMessage("batch_insert_superColumn", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("batch_insert_superColumn", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class touch implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { touch_args args = new touch_args(); args.read(iprot); iprot.readMessageEnd(); iface_.touch(args.key, args.fData); return; } } private class get_key_range implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_key_range_args args = new get_key_range_args(); args.read(iprot); iprot.readMessageEnd(); get_key_range_result result = new get_key_range_result(); try { result.success = iface_.get_key_range(args.tablename, args.startWith, args.stopAt, args.maxResults); } catch (InvalidRequestException ire) { result.ire = ire; } catch (Throwable th) { LOGGER.error("Internal error processing get_key_range", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_key_range"); oprot.writeMessageBegin(new TMessage("get_key_range", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } oprot.writeMessageBegin(new TMessage("get_key_range", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class getStringProperty implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getStringProperty_args args = new getStringProperty_args(); args.read(iprot); iprot.readMessageEnd(); getStringProperty_result result = new getStringProperty_result(); result.success = iface_.getStringProperty(args.propertyName); oprot.writeMessageBegin(new TMessage("getStringProperty", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class getStringListProperty implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getStringListProperty_args args = new getStringListProperty_args(); args.read(iprot); iprot.readMessageEnd(); getStringListProperty_result result = new getStringListProperty_result(); result.success = iface_.getStringListProperty(args.propertyName); oprot.writeMessageBegin(new TMessage("getStringListProperty", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class describeTable implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { describeTable_args args = new describeTable_args(); args.read(iprot); iprot.readMessageEnd(); describeTable_result result = new describeTable_result(); result.success = iface_.describeTable(args.tableName); oprot.writeMessageBegin(new TMessage("describeTable", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class executeQuery implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { executeQuery_args args = new executeQuery_args(); args.read(iprot); iprot.readMessageEnd(); executeQuery_result result = new executeQuery_result(); result.success = iface_.executeQuery(args.query); oprot.writeMessageBegin(new TMessage("executeQuery", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } } public static class get_slice_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_COLUMN_FIELD_DESC = new TField("columnFamily_column", TType.STRING, (short)3); private static final TField START_FIELD_DESC = new TField("start", TType.I32, (short)4); private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)5); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_column; public static final int COLUMNFAMILY_COLUMN = 3; public int start; public static final int START = 4; public int count; public static final int COUNT = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean start = false; public boolean count = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_COLUMN, new FieldMetaData("columnFamily_column", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(START, new FieldMetaData("start", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); put(COUNT, new FieldMetaData("count", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_args.class, metaDataMap); } public get_slice_args() { this.start = -1; this.count = -1; } public get_slice_args( String tablename, String key, String columnFamily_column, int start, int count) { this(); this.tablename = tablename; this.key = key; this.columnFamily_column = columnFamily_column; this.start = start; this.__isset.start = true; this.count = count; this.__isset.count = true; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_args(get_slice_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_column()) { this.columnFamily_column = other.columnFamily_column; } __isset.start = other.__isset.start; this.start = other.start; __isset.count = other.__isset.count; this.count = other.count; } @Override public get_slice_args clone() { return new get_slice_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_column() { return this.columnFamily_column; } public void setColumnFamily_column(String columnFamily_column) { this.columnFamily_column = columnFamily_column; } public void unsetColumnFamily_column() { this.columnFamily_column = null; } // Returns true if field columnFamily_column is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_column() { return this.columnFamily_column != null; } public void setColumnFamily_columnIsSet(boolean value) { if (!value) { this.columnFamily_column = null; } } public int getStart() { return this.start; } public void setStart(int start) { this.start = start; this.__isset.start = true; } public void unsetStart() { this.__isset.start = false; } // Returns true if field start is set (has been asigned a value) and false otherwise public boolean isSetStart() { return this.__isset.start; } public void setStartIsSet(boolean value) { this.__isset.start = value; } public int getCount() { return this.count; } public void setCount(int count) { this.count = count; this.__isset.count = true; } public void unsetCount() { this.__isset.count = false; } // Returns true if field count is set (has been asigned a value) and false otherwise public boolean isSetCount() { return this.__isset.count; } public void setCountIsSet(boolean value) { this.__isset.count = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_COLUMN: if (value == null) { unsetColumnFamily_column(); } else { setColumnFamily_column((String)value); } break; case START: if (value == null) { unsetStart(); } else { setStart((Integer)value); } break; case COUNT: if (value == null) { unsetCount(); } else { setCount((Integer)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_COLUMN: return getColumnFamily_column(); case START: return new Integer(getStart()); case COUNT: return new Integer(getCount()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_COLUMN: return isSetColumnFamily_column(); case START: return isSetStart(); case COUNT: return isSetCount(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_args) return this.equals((get_slice_args)that); return false; } public boolean equals(get_slice_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_column = true && this.isSetColumnFamily_column(); boolean that_present_columnFamily_column = true && that.isSetColumnFamily_column(); if (this_present_columnFamily_column || that_present_columnFamily_column) { if (!(this_present_columnFamily_column && that_present_columnFamily_column)) return false; if (!this.columnFamily_column.equals(that.columnFamily_column)) return false; } boolean this_present_start = true; boolean that_present_start = true; if (this_present_start || that_present_start) { if (!(this_present_start && that_present_start)) return false; if (this.start != that.start) return false; } boolean this_present_count = true; boolean that_present_count = true; if (this_present_count || that_present_count) { if (!(this_present_count && that_present_count)) return false; if (this.count != that.count) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_COLUMN: if (field.type == TType.STRING) { this.columnFamily_column = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case START: if (field.type == TType.I32) { this.start = iprot.readI32(); this.__isset.start = true; } else { TProtocolUtil.skip(iprot, field.type); } break; case COUNT: if (field.type == TType.I32) { this.count = iprot.readI32(); this.__isset.count = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_column != null) { oprot.writeFieldBegin(COLUMN_FAMILY_COLUMN_FIELD_DESC); oprot.writeString(this.columnFamily_column); oprot.writeFieldEnd(); } oprot.writeFieldBegin(START_FIELD_DESC); oprot.writeI32(this.start); oprot.writeFieldEnd(); oprot.writeFieldBegin(COUNT_FIELD_DESC); oprot.writeI32(this.count); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_column:"); if (this.columnFamily_column == null) { sb.append("null"); } else { sb.append(this.columnFamily_column); } first = false; if (!first) sb.append(", "); sb.append("start:"); sb.append(this.start); first = false; if (!first) sb.append(", "); sb.append("count:"); sb.append(this.count); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2); public List<column_t> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; public NotFoundException nfe; public static final int NFE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, column_t.class)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_result.class, metaDataMap); } public get_slice_result() { } public get_slice_result( List<column_t> success, InvalidRequestException ire, NotFoundException nfe) { this(); this.success = success; this.ire = ire; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_result(get_slice_result other) { if (other.isSetSuccess()) { List<column_t> __this__success = new ArrayList<column_t>(); for (column_t other_element : other.success) { __this__success.add(new column_t(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } @Override public get_slice_result clone() { return new get_slice_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<column_t> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(column_t elem) { if (this.success == null) { this.success = new ArrayList<column_t>(); } this.success.add(elem); } public List<column_t> getSuccess() { return this.success; } public void setSuccess(List<column_t> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public void setNfe(NotFoundException nfe) { this.nfe = nfe; } public void unsetNfe() { this.nfe = null; } // Returns true if field nfe is set (has been asigned a value) and false otherwise public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<column_t>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); case NFE: return isSetNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_result) return this.equals((get_slice_result)that); return false; } public boolean equals(get_slice_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list31 = iprot.readListBegin(); this.success = new ArrayList<column_t>(_list31.size); for (int _i32 = 0; _i32 < _list31.size; ++_i32) { column_t _elem33; _elem33 = new column_t(); _elem33.read(iprot); this.success.add(_elem33); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case NFE: if (field.type == TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); for (column_t _iter34 : this.success) { _iter34.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_by_name_range_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_by_name_range_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("columnFamily", TType.STRING, (short)3); private static final TField START_FIELD_DESC = new TField("start", TType.STRING, (short)4); private static final TField END_FIELD_DESC = new TField("end", TType.STRING, (short)5); private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)6); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily; public static final int COLUMNFAMILY = 3; public String start; public static final int START = 4; public String end; public static final int END = 5; public int count; public static final int COUNT = 6; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean count = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY, new FieldMetaData("columnFamily", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(START, new FieldMetaData("start", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(END, new FieldMetaData("end", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COUNT, new FieldMetaData("count", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_by_name_range_args.class, metaDataMap); } public get_slice_by_name_range_args() { this.count = -1; } public get_slice_by_name_range_args( String tablename, String key, String columnFamily, String start, String end, int count) { this(); this.tablename = tablename; this.key = key; this.columnFamily = columnFamily; this.start = start; this.end = end; this.count = count; this.__isset.count = true; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_by_name_range_args(get_slice_by_name_range_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily()) { this.columnFamily = other.columnFamily; } if (other.isSetStart()) { this.start = other.start; } if (other.isSetEnd()) { this.end = other.end; } __isset.count = other.__isset.count; this.count = other.count; } @Override public get_slice_by_name_range_args clone() { return new get_slice_by_name_range_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily() { return this.columnFamily; } public void setColumnFamily(String columnFamily) { this.columnFamily = columnFamily; } public void unsetColumnFamily() { this.columnFamily = null; } // Returns true if field columnFamily is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily() { return this.columnFamily != null; } public void setColumnFamilyIsSet(boolean value) { if (!value) { this.columnFamily = null; } } public String getStart() { return this.start; } public void setStart(String start) { this.start = start; } public void unsetStart() { this.start = null; } // Returns true if field start is set (has been asigned a value) and false otherwise public boolean isSetStart() { return this.start != null; } public void setStartIsSet(boolean value) { if (!value) { this.start = null; } } public String getEnd() { return this.end; } public void setEnd(String end) { this.end = end; } public void unsetEnd() { this.end = null; } // Returns true if field end is set (has been asigned a value) and false otherwise public boolean isSetEnd() { return this.end != null; } public void setEndIsSet(boolean value) { if (!value) { this.end = null; } } public int getCount() { return this.count; } public void setCount(int count) { this.count = count; this.__isset.count = true; } public void unsetCount() { this.__isset.count = false; } // Returns true if field count is set (has been asigned a value) and false otherwise public boolean isSetCount() { return this.__isset.count; } public void setCountIsSet(boolean value) { this.__isset.count = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY: if (value == null) { unsetColumnFamily(); } else { setColumnFamily((String)value); } break; case START: if (value == null) { unsetStart(); } else { setStart((String)value); } break; case END: if (value == null) { unsetEnd(); } else { setEnd((String)value); } break; case COUNT: if (value == null) { unsetCount(); } else { setCount((Integer)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY: return getColumnFamily(); case START: return getStart(); case END: return getEnd(); case COUNT: return new Integer(getCount()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY: return isSetColumnFamily(); case START: return isSetStart(); case END: return isSetEnd(); case COUNT: return isSetCount(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_by_name_range_args) return this.equals((get_slice_by_name_range_args)that); return false; } public boolean equals(get_slice_by_name_range_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily = true && this.isSetColumnFamily(); boolean that_present_columnFamily = true && that.isSetColumnFamily(); if (this_present_columnFamily || that_present_columnFamily) { if (!(this_present_columnFamily && that_present_columnFamily)) return false; if (!this.columnFamily.equals(that.columnFamily)) return false; } boolean this_present_start = true && this.isSetStart(); boolean that_present_start = true && that.isSetStart(); if (this_present_start || that_present_start) { if (!(this_present_start && that_present_start)) return false; if (!this.start.equals(that.start)) return false; } boolean this_present_end = true && this.isSetEnd(); boolean that_present_end = true && that.isSetEnd(); if (this_present_end || that_present_end) { if (!(this_present_end && that_present_end)) return false; if (!this.end.equals(that.end)) return false; } boolean this_present_count = true; boolean that_present_count = true; if (this_present_count || that_present_count) { if (!(this_present_count && that_present_count)) return false; if (this.count != that.count) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY: if (field.type == TType.STRING) { this.columnFamily = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case START: if (field.type == TType.STRING) { this.start = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case END: if (field.type == TType.STRING) { this.end = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COUNT: if (field.type == TType.I32) { this.count = iprot.readI32(); this.__isset.count = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily != null) { oprot.writeFieldBegin(COLUMN_FAMILY_FIELD_DESC); oprot.writeString(this.columnFamily); oprot.writeFieldEnd(); } if (this.start != null) { oprot.writeFieldBegin(START_FIELD_DESC); oprot.writeString(this.start); oprot.writeFieldEnd(); } if (this.end != null) { oprot.writeFieldBegin(END_FIELD_DESC); oprot.writeString(this.end); oprot.writeFieldEnd(); } oprot.writeFieldBegin(COUNT_FIELD_DESC); oprot.writeI32(this.count); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_by_name_range_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily:"); if (this.columnFamily == null) { sb.append("null"); } else { sb.append(this.columnFamily); } first = false; if (!first) sb.append(", "); sb.append("start:"); if (this.start == null) { sb.append("null"); } else { sb.append(this.start); } first = false; if (!first) sb.append(", "); sb.append("end:"); if (this.end == null) { sb.append("null"); } else { sb.append(this.end); } first = false; if (!first) sb.append(", "); sb.append("count:"); sb.append(this.count); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_by_name_range_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_by_name_range_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2); public List<column_t> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; public NotFoundException nfe; public static final int NFE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, column_t.class)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_by_name_range_result.class, metaDataMap); } public get_slice_by_name_range_result() { } public get_slice_by_name_range_result( List<column_t> success, InvalidRequestException ire, NotFoundException nfe) { this(); this.success = success; this.ire = ire; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_by_name_range_result(get_slice_by_name_range_result other) { if (other.isSetSuccess()) { List<column_t> __this__success = new ArrayList<column_t>(); for (column_t other_element : other.success) { __this__success.add(new column_t(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } @Override public get_slice_by_name_range_result clone() { return new get_slice_by_name_range_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<column_t> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(column_t elem) { if (this.success == null) { this.success = new ArrayList<column_t>(); } this.success.add(elem); } public List<column_t> getSuccess() { return this.success; } public void setSuccess(List<column_t> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public void setNfe(NotFoundException nfe) { this.nfe = nfe; } public void unsetNfe() { this.nfe = null; } // Returns true if field nfe is set (has been asigned a value) and false otherwise public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<column_t>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); case NFE: return isSetNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_by_name_range_result) return this.equals((get_slice_by_name_range_result)that); return false; } public boolean equals(get_slice_by_name_range_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list35 = iprot.readListBegin(); this.success = new ArrayList<column_t>(_list35.size); for (int _i36 = 0; _i36 < _list35.size; ++_i36) { column_t _elem37; _elem37 = new column_t(); _elem37.read(iprot); this.success.add(_elem37); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case NFE: if (field.type == TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); for (column_t _iter38 : this.success) { _iter38.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_by_name_range_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_by_names_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_by_names_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("columnFamily", TType.STRING, (short)3); private static final TField COLUMN_NAMES_FIELD_DESC = new TField("columnNames", TType.LIST, (short)4); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily; public static final int COLUMNFAMILY = 3; public List<String> columnNames; public static final int COLUMNNAMES = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY, new FieldMetaData("columnFamily", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNNAMES, new FieldMetaData("columnNames", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_by_names_args.class, metaDataMap); } public get_slice_by_names_args() { } public get_slice_by_names_args( String tablename, String key, String columnFamily, List<String> columnNames) { this(); this.tablename = tablename; this.key = key; this.columnFamily = columnFamily; this.columnNames = columnNames; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_by_names_args(get_slice_by_names_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily()) { this.columnFamily = other.columnFamily; } if (other.isSetColumnNames()) { List<String> __this__columnNames = new ArrayList<String>(); for (String other_element : other.columnNames) { __this__columnNames.add(other_element); } this.columnNames = __this__columnNames; } } @Override public get_slice_by_names_args clone() { return new get_slice_by_names_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily() { return this.columnFamily; } public void setColumnFamily(String columnFamily) { this.columnFamily = columnFamily; } public void unsetColumnFamily() { this.columnFamily = null; } // Returns true if field columnFamily is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily() { return this.columnFamily != null; } public void setColumnFamilyIsSet(boolean value) { if (!value) { this.columnFamily = null; } } public int getColumnNamesSize() { return (this.columnNames == null) ? 0 : this.columnNames.size(); } public java.util.Iterator<String> getColumnNamesIterator() { return (this.columnNames == null) ? null : this.columnNames.iterator(); } public void addToColumnNames(String elem) { if (this.columnNames == null) { this.columnNames = new ArrayList<String>(); } this.columnNames.add(elem); } public List<String> getColumnNames() { return this.columnNames; } public void setColumnNames(List<String> columnNames) { this.columnNames = columnNames; } public void unsetColumnNames() { this.columnNames = null; } // Returns true if field columnNames is set (has been asigned a value) and false otherwise public boolean isSetColumnNames() { return this.columnNames != null; } public void setColumnNamesIsSet(boolean value) { if (!value) { this.columnNames = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY: if (value == null) { unsetColumnFamily(); } else { setColumnFamily((String)value); } break; case COLUMNNAMES: if (value == null) { unsetColumnNames(); } else { setColumnNames((List<String>)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY: return getColumnFamily(); case COLUMNNAMES: return getColumnNames(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY: return isSetColumnFamily(); case COLUMNNAMES: return isSetColumnNames(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_by_names_args) return this.equals((get_slice_by_names_args)that); return false; } public boolean equals(get_slice_by_names_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily = true && this.isSetColumnFamily(); boolean that_present_columnFamily = true && that.isSetColumnFamily(); if (this_present_columnFamily || that_present_columnFamily) { if (!(this_present_columnFamily && that_present_columnFamily)) return false; if (!this.columnFamily.equals(that.columnFamily)) return false; } boolean this_present_columnNames = true && this.isSetColumnNames(); boolean that_present_columnNames = true && that.isSetColumnNames(); if (this_present_columnNames || that_present_columnNames) { if (!(this_present_columnNames && that_present_columnNames)) return false; if (!this.columnNames.equals(that.columnNames)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY: if (field.type == TType.STRING) { this.columnFamily = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNNAMES: if (field.type == TType.LIST) { { TList _list39 = iprot.readListBegin(); this.columnNames = new ArrayList<String>(_list39.size); for (int _i40 = 0; _i40 < _list39.size; ++_i40) { String _elem41; _elem41 = iprot.readString(); this.columnNames.add(_elem41); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily != null) { oprot.writeFieldBegin(COLUMN_FAMILY_FIELD_DESC); oprot.writeString(this.columnFamily); oprot.writeFieldEnd(); } if (this.columnNames != null) { oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columnNames.size())); for (String _iter42 : this.columnNames) { oprot.writeString(_iter42); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_by_names_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily:"); if (this.columnFamily == null) { sb.append("null"); } else { sb.append(this.columnFamily); } first = false; if (!first) sb.append(", "); sb.append("columnNames:"); if (this.columnNames == null) { sb.append("null"); } else { sb.append(this.columnNames); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_by_names_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_by_names_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2); public List<column_t> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; public NotFoundException nfe; public static final int NFE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, column_t.class)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_by_names_result.class, metaDataMap); } public get_slice_by_names_result() { } public get_slice_by_names_result( List<column_t> success, InvalidRequestException ire, NotFoundException nfe) { this(); this.success = success; this.ire = ire; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_by_names_result(get_slice_by_names_result other) { if (other.isSetSuccess()) { List<column_t> __this__success = new ArrayList<column_t>(); for (column_t other_element : other.success) { __this__success.add(new column_t(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } @Override public get_slice_by_names_result clone() { return new get_slice_by_names_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<column_t> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(column_t elem) { if (this.success == null) { this.success = new ArrayList<column_t>(); } this.success.add(elem); } public List<column_t> getSuccess() { return this.success; } public void setSuccess(List<column_t> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public void setNfe(NotFoundException nfe) { this.nfe = nfe; } public void unsetNfe() { this.nfe = null; } // Returns true if field nfe is set (has been asigned a value) and false otherwise public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<column_t>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); case NFE: return isSetNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_by_names_result) return this.equals((get_slice_by_names_result)that); return false; } public boolean equals(get_slice_by_names_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list43 = iprot.readListBegin(); this.success = new ArrayList<column_t>(_list43.size); for (int _i44 = 0; _i44 < _list43.size; ++_i44) { column_t _elem45; _elem45 = new column_t(); _elem45.read(iprot); this.success.add(_elem45); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case NFE: if (field.type == TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); for (column_t _iter46 : this.success) { _iter46.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_by_names_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_column_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_column_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_COLUMN_FIELD_DESC = new TField("columnFamily_column", TType.STRING, (short)3); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_column; public static final int COLUMNFAMILY_COLUMN = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_COLUMN, new FieldMetaData("columnFamily_column", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(get_column_args.class, metaDataMap); } public get_column_args() { } public get_column_args( String tablename, String key, String columnFamily_column) { this(); this.tablename = tablename; this.key = key; this.columnFamily_column = columnFamily_column; } /** * Performs a deep copy on <i>other</i>. */ public get_column_args(get_column_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_column()) { this.columnFamily_column = other.columnFamily_column; } } @Override public get_column_args clone() { return new get_column_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_column() { return this.columnFamily_column; } public void setColumnFamily_column(String columnFamily_column) { this.columnFamily_column = columnFamily_column; } public void unsetColumnFamily_column() { this.columnFamily_column = null; } // Returns true if field columnFamily_column is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_column() { return this.columnFamily_column != null; } public void setColumnFamily_columnIsSet(boolean value) { if (!value) { this.columnFamily_column = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_COLUMN: if (value == null) { unsetColumnFamily_column(); } else { setColumnFamily_column((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_COLUMN: return getColumnFamily_column(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_COLUMN: return isSetColumnFamily_column(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_column_args) return this.equals((get_column_args)that); return false; } public boolean equals(get_column_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_column = true && this.isSetColumnFamily_column(); boolean that_present_columnFamily_column = true && that.isSetColumnFamily_column(); if (this_present_columnFamily_column || that_present_columnFamily_column) { if (!(this_present_columnFamily_column && that_present_columnFamily_column)) return false; if (!this.columnFamily_column.equals(that.columnFamily_column)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_COLUMN: if (field.type == TType.STRING) { this.columnFamily_column = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_column != null) { oprot.writeFieldBegin(COLUMN_FAMILY_COLUMN_FIELD_DESC); oprot.writeString(this.columnFamily_column); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_column_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_column:"); if (this.columnFamily_column == null) { sb.append("null"); } else { sb.append(this.columnFamily_column); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_column_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_column_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2); public column_t success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; public NotFoundException nfe; public static final int NFE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, column_t.class))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_column_result.class, metaDataMap); } public get_column_result() { } public get_column_result( column_t success, InvalidRequestException ire, NotFoundException nfe) { this(); this.success = success; this.ire = ire; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public get_column_result(get_column_result other) { if (other.isSetSuccess()) { this.success = new column_t(other.success); } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } @Override public get_column_result clone() { return new get_column_result(this); } public column_t getSuccess() { return this.success; } public void setSuccess(column_t success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public void setNfe(NotFoundException nfe) { this.nfe = nfe; } public void unsetNfe() { this.nfe = null; } // Returns true if field nfe is set (has been asigned a value) and false otherwise public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((column_t)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); case NFE: return isSetNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_column_result) return this.equals((get_column_result)that); return false; } public boolean equals(get_column_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.STRUCT) { this.success = new column_t(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case NFE: if (field.type == TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_column_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_column_count_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_column_count_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_COLUMN_FIELD_DESC = new TField("columnFamily_column", TType.STRING, (short)3); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_column; public static final int COLUMNFAMILY_COLUMN = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_COLUMN, new FieldMetaData("columnFamily_column", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(get_column_count_args.class, metaDataMap); } public get_column_count_args() { } public get_column_count_args( String tablename, String key, String columnFamily_column) { this(); this.tablename = tablename; this.key = key; this.columnFamily_column = columnFamily_column; } /** * Performs a deep copy on <i>other</i>. */ public get_column_count_args(get_column_count_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_column()) { this.columnFamily_column = other.columnFamily_column; } } @Override public get_column_count_args clone() { return new get_column_count_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_column() { return this.columnFamily_column; } public void setColumnFamily_column(String columnFamily_column) { this.columnFamily_column = columnFamily_column; } public void unsetColumnFamily_column() { this.columnFamily_column = null; } // Returns true if field columnFamily_column is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_column() { return this.columnFamily_column != null; } public void setColumnFamily_columnIsSet(boolean value) { if (!value) { this.columnFamily_column = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_COLUMN: if (value == null) { unsetColumnFamily_column(); } else { setColumnFamily_column((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_COLUMN: return getColumnFamily_column(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_COLUMN: return isSetColumnFamily_column(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_column_count_args) return this.equals((get_column_count_args)that); return false; } public boolean equals(get_column_count_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_column = true && this.isSetColumnFamily_column(); boolean that_present_columnFamily_column = true && that.isSetColumnFamily_column(); if (this_present_columnFamily_column || that_present_columnFamily_column) { if (!(this_present_columnFamily_column && that_present_columnFamily_column)) return false; if (!this.columnFamily_column.equals(that.columnFamily_column)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_COLUMN: if (field.type == TType.STRING) { this.columnFamily_column = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_column != null) { oprot.writeFieldBegin(COLUMN_FAMILY_COLUMN_FIELD_DESC); oprot.writeString(this.columnFamily_column); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_column_count_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_column:"); if (this.columnFamily_column == null) { sb.append("null"); } else { sb.append(this.columnFamily_column); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_column_count_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_column_count_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); public int success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean success = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_column_count_result.class, metaDataMap); } public get_column_count_result() { } public get_column_count_result( int success, InvalidRequestException ire) { this(); this.success = success; this.__isset.success = true; this.ire = ire; } /** * Performs a deep copy on <i>other</i>. */ public get_column_count_result(get_column_count_result other) { __isset.success = other.__isset.success; this.success = other.success; if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } } @Override public get_column_count_result clone() { return new get_column_count_result(this); } public int getSuccess() { return this.success; } public void setSuccess(int success) { this.success = success; this.__isset.success = true; } public void unsetSuccess() { this.__isset.success = false; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.__isset.success; } public void setSuccessIsSet(boolean value) { this.__isset.success = value; } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return new Integer(getSuccess()); case IRE: return getIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_column_count_result) return this.equals((get_column_count_result)that); return false; } public boolean equals(get_column_count_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.I32) { this.success = iprot.readI32(); this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_column_count_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class insert_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("insert_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_COLUMN_FIELD_DESC = new TField("columnFamily_column", TType.STRING, (short)3); private static final TField CELL_DATA_FIELD_DESC = new TField("cellData", TType.STRING, (short)4); private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)5); private static final TField BLOCK_FIELD_DESC = new TField("block", TType.BOOL, (short)6); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_column; public static final int COLUMNFAMILY_COLUMN = 3; public byte[] cellData; public static final int CELLDATA = 4; public long timestamp; public static final int TIMESTAMP = 5; public boolean block; public static final int BLOCK = 6; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean timestamp = false; public boolean block = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_COLUMN, new FieldMetaData("columnFamily_column", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(CELLDATA, new FieldMetaData("cellData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); put(BLOCK, new FieldMetaData("block", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); }}); static { FieldMetaData.addStructMetaDataMap(insert_args.class, metaDataMap); } public insert_args() { this.block = false; } public insert_args( String tablename, String key, String columnFamily_column, byte[] cellData, long timestamp, boolean block) { this(); this.tablename = tablename; this.key = key; this.columnFamily_column = columnFamily_column; this.cellData = cellData; this.timestamp = timestamp; this.__isset.timestamp = true; this.block = block; this.__isset.block = true; } /** * Performs a deep copy on <i>other</i>. */ public insert_args(insert_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_column()) { this.columnFamily_column = other.columnFamily_column; } if (other.isSetCellData()) { this.cellData = new byte[other.cellData.length]; System.arraycopy(other.cellData, 0, cellData, 0, other.cellData.length); } __isset.timestamp = other.__isset.timestamp; this.timestamp = other.timestamp; __isset.block = other.__isset.block; this.block = other.block; } @Override public insert_args clone() { return new insert_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_column() { return this.columnFamily_column; } public void setColumnFamily_column(String columnFamily_column) { this.columnFamily_column = columnFamily_column; } public void unsetColumnFamily_column() { this.columnFamily_column = null; } // Returns true if field columnFamily_column is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_column() { return this.columnFamily_column != null; } public void setColumnFamily_columnIsSet(boolean value) { if (!value) { this.columnFamily_column = null; } } public byte[] getCellData() { return this.cellData; } public void setCellData(byte[] cellData) { this.cellData = cellData; } public void unsetCellData() { this.cellData = null; } // Returns true if field cellData is set (has been asigned a value) and false otherwise public boolean isSetCellData() { return this.cellData != null; } public void setCellDataIsSet(boolean value) { if (!value) { this.cellData = null; } } public long getTimestamp() { return this.timestamp; } public void setTimestamp(long timestamp) { this.timestamp = timestamp; this.__isset.timestamp = true; } public void unsetTimestamp() { this.__isset.timestamp = false; } // Returns true if field timestamp is set (has been asigned a value) and false otherwise public boolean isSetTimestamp() { return this.__isset.timestamp; } public void setTimestampIsSet(boolean value) { this.__isset.timestamp = value; } public boolean isBlock() { return this.block; } public void setBlock(boolean block) { this.block = block; this.__isset.block = true; } public void unsetBlock() { this.__isset.block = false; } // Returns true if field block is set (has been asigned a value) and false otherwise public boolean isSetBlock() { return this.__isset.block; } public void setBlockIsSet(boolean value) { this.__isset.block = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_COLUMN: if (value == null) { unsetColumnFamily_column(); } else { setColumnFamily_column((String)value); } break; case CELLDATA: if (value == null) { unsetCellData(); } else { setCellData((byte[])value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case BLOCK: if (value == null) { unsetBlock(); } else { setBlock((Boolean)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_COLUMN: return getColumnFamily_column(); case CELLDATA: return getCellData(); case TIMESTAMP: return new Long(getTimestamp()); case BLOCK: return new Boolean(isBlock()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_COLUMN: return isSetColumnFamily_column(); case CELLDATA: return isSetCellData(); case TIMESTAMP: return isSetTimestamp(); case BLOCK: return isSetBlock(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof insert_args) return this.equals((insert_args)that); return false; } public boolean equals(insert_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_column = true && this.isSetColumnFamily_column(); boolean that_present_columnFamily_column = true && that.isSetColumnFamily_column(); if (this_present_columnFamily_column || that_present_columnFamily_column) { if (!(this_present_columnFamily_column && that_present_columnFamily_column)) return false; if (!this.columnFamily_column.equals(that.columnFamily_column)) return false; } boolean this_present_cellData = true && this.isSetCellData(); boolean that_present_cellData = true && that.isSetCellData(); if (this_present_cellData || that_present_cellData) { if (!(this_present_cellData && that_present_cellData)) return false; if (!java.util.Arrays.equals(this.cellData, that.cellData)) return false; } boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_block = true; boolean that_present_block = true; if (this_present_block || that_present_block) { if (!(this_present_block && that_present_block)) return false; if (this.block != that.block) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_COLUMN: if (field.type == TType.STRING) { this.columnFamily_column = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case CELLDATA: if (field.type == TType.STRING) { this.cellData = iprot.readBinary(); } else { TProtocolUtil.skip(iprot, field.type); } break; case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; } else { TProtocolUtil.skip(iprot, field.type); } break; case BLOCK: if (field.type == TType.BOOL) { this.block = iprot.readBool(); this.__isset.block = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_column != null) { oprot.writeFieldBegin(COLUMN_FAMILY_COLUMN_FIELD_DESC); oprot.writeString(this.columnFamily_column); oprot.writeFieldEnd(); } if (this.cellData != null) { oprot.writeFieldBegin(CELL_DATA_FIELD_DESC); oprot.writeBinary(this.cellData); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldBegin(BLOCK_FIELD_DESC); oprot.writeBool(this.block); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("insert_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_column:"); if (this.columnFamily_column == null) { sb.append("null"); } else { sb.append(this.columnFamily_column); } first = false; if (!first) sb.append(", "); sb.append("cellData:"); if (this.cellData == null) { sb.append("null"); } else { int __cellData_size = Math.min(this.cellData.length, 128); for (int i = 0; i < __cellData_size; i++) { if (i != 0) sb.append(" "); sb.append(Integer.toHexString(this.cellData[i]).length() > 1 ? Integer.toHexString(this.cellData[i]).substring(Integer.toHexString(this.cellData[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.cellData[i]).toUpperCase()); } if (this.cellData.length > 128) sb.append(" ..."); } first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("block:"); sb.append(this.block); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class insert_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("insert_result"); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField UE_FIELD_DESC = new TField("ue", TType.STRUCT, (short)2); public InvalidRequestException ire; public static final int IRE = 1; public UnavailableException ue; public static final int UE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(UE, new FieldMetaData("ue", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(insert_result.class, metaDataMap); } public insert_result() { } public insert_result( InvalidRequestException ire, UnavailableException ue) { this(); this.ire = ire; this.ue = ue; } /** * Performs a deep copy on <i>other</i>. */ public insert_result(insert_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } } @Override public insert_result clone() { return new insert_result(this); } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public void setUe(UnavailableException ue) { this.ue = ue; } public void unsetUe() { this.ue = null; } // Returns true if field ue is set (has been asigned a value) and false otherwise public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case IRE: return getIre(); case UE: return getUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case IRE: return isSetIre(); case UE: return isSetUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof insert_result) return this.equals((insert_result)that); return false; } public boolean equals(insert_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case UE: if (field.type == TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("insert_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class batch_insert_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("batch_insert_args"); private static final TField BATCH_MUTATION_FIELD_DESC = new TField("batchMutation", TType.STRUCT, (short)1); private static final TField BLOCK_FIELD_DESC = new TField("block", TType.BOOL, (short)2); public batch_mutation_t batchMutation; public static final int BATCHMUTATION = 1; public boolean block; public static final int BLOCK = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean block = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(BATCHMUTATION, new FieldMetaData("batchMutation", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, batch_mutation_t.class))); put(BLOCK, new FieldMetaData("block", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); }}); static { FieldMetaData.addStructMetaDataMap(batch_insert_args.class, metaDataMap); } public batch_insert_args() { this.block = false; } public batch_insert_args( batch_mutation_t batchMutation, boolean block) { this(); this.batchMutation = batchMutation; this.block = block; this.__isset.block = true; } /** * Performs a deep copy on <i>other</i>. */ public batch_insert_args(batch_insert_args other) { if (other.isSetBatchMutation()) { this.batchMutation = new batch_mutation_t(other.batchMutation); } __isset.block = other.__isset.block; this.block = other.block; } @Override public batch_insert_args clone() { return new batch_insert_args(this); } public batch_mutation_t getBatchMutation() { return this.batchMutation; } public void setBatchMutation(batch_mutation_t batchMutation) { this.batchMutation = batchMutation; } public void unsetBatchMutation() { this.batchMutation = null; } // Returns true if field batchMutation is set (has been asigned a value) and false otherwise public boolean isSetBatchMutation() { return this.batchMutation != null; } public void setBatchMutationIsSet(boolean value) { if (!value) { this.batchMutation = null; } } public boolean isBlock() { return this.block; } public void setBlock(boolean block) { this.block = block; this.__isset.block = true; } public void unsetBlock() { this.__isset.block = false; } // Returns true if field block is set (has been asigned a value) and false otherwise public boolean isSetBlock() { return this.__isset.block; } public void setBlockIsSet(boolean value) { this.__isset.block = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case BATCHMUTATION: if (value == null) { unsetBatchMutation(); } else { setBatchMutation((batch_mutation_t)value); } break; case BLOCK: if (value == null) { unsetBlock(); } else { setBlock((Boolean)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case BATCHMUTATION: return getBatchMutation(); case BLOCK: return new Boolean(isBlock()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case BATCHMUTATION: return isSetBatchMutation(); case BLOCK: return isSetBlock(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_insert_args) return this.equals((batch_insert_args)that); return false; } public boolean equals(batch_insert_args that) { if (that == null) return false; boolean this_present_batchMutation = true && this.isSetBatchMutation(); boolean that_present_batchMutation = true && that.isSetBatchMutation(); if (this_present_batchMutation || that_present_batchMutation) { if (!(this_present_batchMutation && that_present_batchMutation)) return false; if (!this.batchMutation.equals(that.batchMutation)) return false; } boolean this_present_block = true; boolean that_present_block = true; if (this_present_block || that_present_block) { if (!(this_present_block && that_present_block)) return false; if (this.block != that.block) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case BATCHMUTATION: if (field.type == TType.STRUCT) { this.batchMutation = new batch_mutation_t(); this.batchMutation.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case BLOCK: if (field.type == TType.BOOL) { this.block = iprot.readBool(); this.__isset.block = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.batchMutation != null) { oprot.writeFieldBegin(BATCH_MUTATION_FIELD_DESC); this.batchMutation.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(BLOCK_FIELD_DESC); oprot.writeBool(this.block); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_insert_args("); boolean first = true; sb.append("batchMutation:"); if (this.batchMutation == null) { sb.append("null"); } else { sb.append(this.batchMutation); } first = false; if (!first) sb.append(", "); sb.append("block:"); sb.append(this.block); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class batch_insert_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("batch_insert_result"); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField UE_FIELD_DESC = new TField("ue", TType.STRUCT, (short)2); public InvalidRequestException ire; public static final int IRE = 1; public UnavailableException ue; public static final int UE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(UE, new FieldMetaData("ue", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(batch_insert_result.class, metaDataMap); } public batch_insert_result() { } public batch_insert_result( InvalidRequestException ire, UnavailableException ue) { this(); this.ire = ire; this.ue = ue; } /** * Performs a deep copy on <i>other</i>. */ public batch_insert_result(batch_insert_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } } @Override public batch_insert_result clone() { return new batch_insert_result(this); } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public void setUe(UnavailableException ue) { this.ue = ue; } public void unsetUe() { this.ue = null; } // Returns true if field ue is set (has been asigned a value) and false otherwise public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case IRE: return getIre(); case UE: return getUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case IRE: return isSetIre(); case UE: return isSetUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_insert_result) return this.equals((batch_insert_result)that); return false; } public boolean equals(batch_insert_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case UE: if (field.type == TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_insert_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class remove_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("remove_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_COLUMN_FIELD_DESC = new TField("columnFamily_column", TType.STRING, (short)3); private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)4); private static final TField BLOCK_FIELD_DESC = new TField("block", TType.BOOL, (short)5); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_column; public static final int COLUMNFAMILY_COLUMN = 3; public long timestamp; public static final int TIMESTAMP = 4; public boolean block; public static final int BLOCK = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean timestamp = false; public boolean block = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_COLUMN, new FieldMetaData("columnFamily_column", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); put(BLOCK, new FieldMetaData("block", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); }}); static { FieldMetaData.addStructMetaDataMap(remove_args.class, metaDataMap); } public remove_args() { this.block = false; } public remove_args( String tablename, String key, String columnFamily_column, long timestamp, boolean block) { this(); this.tablename = tablename; this.key = key; this.columnFamily_column = columnFamily_column; this.timestamp = timestamp; this.__isset.timestamp = true; this.block = block; this.__isset.block = true; } /** * Performs a deep copy on <i>other</i>. */ public remove_args(remove_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_column()) { this.columnFamily_column = other.columnFamily_column; } __isset.timestamp = other.__isset.timestamp; this.timestamp = other.timestamp; __isset.block = other.__isset.block; this.block = other.block; } @Override public remove_args clone() { return new remove_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_column() { return this.columnFamily_column; } public void setColumnFamily_column(String columnFamily_column) { this.columnFamily_column = columnFamily_column; } public void unsetColumnFamily_column() { this.columnFamily_column = null; } // Returns true if field columnFamily_column is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_column() { return this.columnFamily_column != null; } public void setColumnFamily_columnIsSet(boolean value) { if (!value) { this.columnFamily_column = null; } } public long getTimestamp() { return this.timestamp; } public void setTimestamp(long timestamp) { this.timestamp = timestamp; this.__isset.timestamp = true; } public void unsetTimestamp() { this.__isset.timestamp = false; } // Returns true if field timestamp is set (has been asigned a value) and false otherwise public boolean isSetTimestamp() { return this.__isset.timestamp; } public void setTimestampIsSet(boolean value) { this.__isset.timestamp = value; } public boolean isBlock() { return this.block; } public void setBlock(boolean block) { this.block = block; this.__isset.block = true; } public void unsetBlock() { this.__isset.block = false; } // Returns true if field block is set (has been asigned a value) and false otherwise public boolean isSetBlock() { return this.__isset.block; } public void setBlockIsSet(boolean value) { this.__isset.block = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_COLUMN: if (value == null) { unsetColumnFamily_column(); } else { setColumnFamily_column((String)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case BLOCK: if (value == null) { unsetBlock(); } else { setBlock((Boolean)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_COLUMN: return getColumnFamily_column(); case TIMESTAMP: return new Long(getTimestamp()); case BLOCK: return new Boolean(isBlock()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_COLUMN: return isSetColumnFamily_column(); case TIMESTAMP: return isSetTimestamp(); case BLOCK: return isSetBlock(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_args) return this.equals((remove_args)that); return false; } public boolean equals(remove_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_column = true && this.isSetColumnFamily_column(); boolean that_present_columnFamily_column = true && that.isSetColumnFamily_column(); if (this_present_columnFamily_column || that_present_columnFamily_column) { if (!(this_present_columnFamily_column && that_present_columnFamily_column)) return false; if (!this.columnFamily_column.equals(that.columnFamily_column)) return false; } boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_block = true; boolean that_present_block = true; if (this_present_block || that_present_block) { if (!(this_present_block && that_present_block)) return false; if (this.block != that.block) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_COLUMN: if (field.type == TType.STRING) { this.columnFamily_column = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; } else { TProtocolUtil.skip(iprot, field.type); } break; case BLOCK: if (field.type == TType.BOOL) { this.block = iprot.readBool(); this.__isset.block = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_column != null) { oprot.writeFieldBegin(COLUMN_FAMILY_COLUMN_FIELD_DESC); oprot.writeString(this.columnFamily_column); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldBegin(BLOCK_FIELD_DESC); oprot.writeBool(this.block); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_column:"); if (this.columnFamily_column == null) { sb.append("null"); } else { sb.append(this.columnFamily_column); } first = false; if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; if (!first) sb.append(", "); sb.append("block:"); sb.append(this.block); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class remove_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("remove_result"); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField UE_FIELD_DESC = new TField("ue", TType.STRUCT, (short)2); public InvalidRequestException ire; public static final int IRE = 1; public UnavailableException ue; public static final int UE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(UE, new FieldMetaData("ue", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(remove_result.class, metaDataMap); } public remove_result() { } public remove_result( InvalidRequestException ire, UnavailableException ue) { this(); this.ire = ire; this.ue = ue; } /** * Performs a deep copy on <i>other</i>. */ public remove_result(remove_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } } @Override public remove_result clone() { return new remove_result(this); } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public void setUe(UnavailableException ue) { this.ue = ue; } public void unsetUe() { this.ue = null; } // Returns true if field ue is set (has been asigned a value) and false otherwise public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case IRE: return getIre(); case UE: return getUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case IRE: return isSetIre(); case UE: return isSetUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_result) return this.equals((remove_result)that); return false; } public boolean equals(remove_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case UE: if (field.type == TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_columns_since_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_columns_since_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_COLUMN_FIELD_DESC = new TField("columnFamily_column", TType.STRING, (short)3); private static final TField TIME_STAMP_FIELD_DESC = new TField("timeStamp", TType.I64, (short)4); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_column; public static final int COLUMNFAMILY_COLUMN = 3; public long timeStamp; public static final int TIMESTAMP = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean timeStamp = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_COLUMN, new FieldMetaData("columnFamily_column", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(TIMESTAMP, new FieldMetaData("timeStamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); }}); static { FieldMetaData.addStructMetaDataMap(get_columns_since_args.class, metaDataMap); } public get_columns_since_args() { } public get_columns_since_args( String tablename, String key, String columnFamily_column, long timeStamp) { this(); this.tablename = tablename; this.key = key; this.columnFamily_column = columnFamily_column; this.timeStamp = timeStamp; this.__isset.timeStamp = true; } /** * Performs a deep copy on <i>other</i>. */ public get_columns_since_args(get_columns_since_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_column()) { this.columnFamily_column = other.columnFamily_column; } __isset.timeStamp = other.__isset.timeStamp; this.timeStamp = other.timeStamp; } @Override public get_columns_since_args clone() { return new get_columns_since_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_column() { return this.columnFamily_column; } public void setColumnFamily_column(String columnFamily_column) { this.columnFamily_column = columnFamily_column; } public void unsetColumnFamily_column() { this.columnFamily_column = null; } // Returns true if field columnFamily_column is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_column() { return this.columnFamily_column != null; } public void setColumnFamily_columnIsSet(boolean value) { if (!value) { this.columnFamily_column = null; } } public long getTimeStamp() { return this.timeStamp; } public void setTimeStamp(long timeStamp) { this.timeStamp = timeStamp; this.__isset.timeStamp = true; } public void unsetTimeStamp() { this.__isset.timeStamp = false; } // Returns true if field timeStamp is set (has been asigned a value) and false otherwise public boolean isSetTimeStamp() { return this.__isset.timeStamp; } public void setTimeStampIsSet(boolean value) { this.__isset.timeStamp = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_COLUMN: if (value == null) { unsetColumnFamily_column(); } else { setColumnFamily_column((String)value); } break; case TIMESTAMP: if (value == null) { unsetTimeStamp(); } else { setTimeStamp((Long)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_COLUMN: return getColumnFamily_column(); case TIMESTAMP: return new Long(getTimeStamp()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_COLUMN: return isSetColumnFamily_column(); case TIMESTAMP: return isSetTimeStamp(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_columns_since_args) return this.equals((get_columns_since_args)that); return false; } public boolean equals(get_columns_since_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_column = true && this.isSetColumnFamily_column(); boolean that_present_columnFamily_column = true && that.isSetColumnFamily_column(); if (this_present_columnFamily_column || that_present_columnFamily_column) { if (!(this_present_columnFamily_column && that_present_columnFamily_column)) return false; if (!this.columnFamily_column.equals(that.columnFamily_column)) return false; } boolean this_present_timeStamp = true; boolean that_present_timeStamp = true; if (this_present_timeStamp || that_present_timeStamp) { if (!(this_present_timeStamp && that_present_timeStamp)) return false; if (this.timeStamp != that.timeStamp) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_COLUMN: if (field.type == TType.STRING) { this.columnFamily_column = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case TIMESTAMP: if (field.type == TType.I64) { this.timeStamp = iprot.readI64(); this.__isset.timeStamp = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_column != null) { oprot.writeFieldBegin(COLUMN_FAMILY_COLUMN_FIELD_DESC); oprot.writeString(this.columnFamily_column); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TIME_STAMP_FIELD_DESC); oprot.writeI64(this.timeStamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_columns_since_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_column:"); if (this.columnFamily_column == null) { sb.append("null"); } else { sb.append(this.columnFamily_column); } first = false; if (!first) sb.append(", "); sb.append("timeStamp:"); sb.append(this.timeStamp); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_columns_since_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_columns_since_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2); public List<column_t> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; public NotFoundException nfe; public static final int NFE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, column_t.class)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_columns_since_result.class, metaDataMap); } public get_columns_since_result() { } public get_columns_since_result( List<column_t> success, InvalidRequestException ire, NotFoundException nfe) { this(); this.success = success; this.ire = ire; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public get_columns_since_result(get_columns_since_result other) { if (other.isSetSuccess()) { List<column_t> __this__success = new ArrayList<column_t>(); for (column_t other_element : other.success) { __this__success.add(new column_t(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } @Override public get_columns_since_result clone() { return new get_columns_since_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<column_t> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(column_t elem) { if (this.success == null) { this.success = new ArrayList<column_t>(); } this.success.add(elem); } public List<column_t> getSuccess() { return this.success; } public void setSuccess(List<column_t> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public void setNfe(NotFoundException nfe) { this.nfe = nfe; } public void unsetNfe() { this.nfe = null; } // Returns true if field nfe is set (has been asigned a value) and false otherwise public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<column_t>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); case NFE: return isSetNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_columns_since_result) return this.equals((get_columns_since_result)that); return false; } public boolean equals(get_columns_since_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list47 = iprot.readListBegin(); this.success = new ArrayList<column_t>(_list47.size); for (int _i48 = 0; _i48 < _list47.size; ++_i48) { column_t _elem49; _elem49 = new column_t(); _elem49.read(iprot); this.success.add(_elem49); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case NFE: if (field.type == TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); for (column_t _iter50 : this.success) { _iter50.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_columns_since_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_super_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_super_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_SUPER_COLUMN_NAME_FIELD_DESC = new TField("columnFamily_superColumnName", TType.STRING, (short)3); private static final TField START_FIELD_DESC = new TField("start", TType.I32, (short)4); private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)5); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily_superColumnName; public static final int COLUMNFAMILY_SUPERCOLUMNNAME = 3; public int start; public static final int START = 4; public int count; public static final int COUNT = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean start = false; public boolean count = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY_SUPERCOLUMNNAME, new FieldMetaData("columnFamily_superColumnName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(START, new FieldMetaData("start", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); put(COUNT, new FieldMetaData("count", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_super_args.class, metaDataMap); } public get_slice_super_args() { this.start = -1; this.count = -1; } public get_slice_super_args( String tablename, String key, String columnFamily_superColumnName, int start, int count) { this(); this.tablename = tablename; this.key = key; this.columnFamily_superColumnName = columnFamily_superColumnName; this.start = start; this.__isset.start = true; this.count = count; this.__isset.count = true; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_super_args(get_slice_super_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily_superColumnName()) { this.columnFamily_superColumnName = other.columnFamily_superColumnName; } __isset.start = other.__isset.start; this.start = other.start; __isset.count = other.__isset.count; this.count = other.count; } @Override public get_slice_super_args clone() { return new get_slice_super_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily_superColumnName() { return this.columnFamily_superColumnName; } public void setColumnFamily_superColumnName(String columnFamily_superColumnName) { this.columnFamily_superColumnName = columnFamily_superColumnName; } public void unsetColumnFamily_superColumnName() { this.columnFamily_superColumnName = null; } // Returns true if field columnFamily_superColumnName is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily_superColumnName() { return this.columnFamily_superColumnName != null; } public void setColumnFamily_superColumnNameIsSet(boolean value) { if (!value) { this.columnFamily_superColumnName = null; } } public int getStart() { return this.start; } public void setStart(int start) { this.start = start; this.__isset.start = true; } public void unsetStart() { this.__isset.start = false; } // Returns true if field start is set (has been asigned a value) and false otherwise public boolean isSetStart() { return this.__isset.start; } public void setStartIsSet(boolean value) { this.__isset.start = value; } public int getCount() { return this.count; } public void setCount(int count) { this.count = count; this.__isset.count = true; } public void unsetCount() { this.__isset.count = false; } // Returns true if field count is set (has been asigned a value) and false otherwise public boolean isSetCount() { return this.__isset.count; } public void setCountIsSet(boolean value) { this.__isset.count = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY_SUPERCOLUMNNAME: if (value == null) { unsetColumnFamily_superColumnName(); } else { setColumnFamily_superColumnName((String)value); } break; case START: if (value == null) { unsetStart(); } else { setStart((Integer)value); } break; case COUNT: if (value == null) { unsetCount(); } else { setCount((Integer)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY_SUPERCOLUMNNAME: return getColumnFamily_superColumnName(); case START: return new Integer(getStart()); case COUNT: return new Integer(getCount()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY_SUPERCOLUMNNAME: return isSetColumnFamily_superColumnName(); case START: return isSetStart(); case COUNT: return isSetCount(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_super_args) return this.equals((get_slice_super_args)that); return false; } public boolean equals(get_slice_super_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily_superColumnName = true && this.isSetColumnFamily_superColumnName(); boolean that_present_columnFamily_superColumnName = true && that.isSetColumnFamily_superColumnName(); if (this_present_columnFamily_superColumnName || that_present_columnFamily_superColumnName) { if (!(this_present_columnFamily_superColumnName && that_present_columnFamily_superColumnName)) return false; if (!this.columnFamily_superColumnName.equals(that.columnFamily_superColumnName)) return false; } boolean this_present_start = true; boolean that_present_start = true; if (this_present_start || that_present_start) { if (!(this_present_start && that_present_start)) return false; if (this.start != that.start) return false; } boolean this_present_count = true; boolean that_present_count = true; if (this_present_count || that_present_count) { if (!(this_present_count && that_present_count)) return false; if (this.count != that.count) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY_SUPERCOLUMNNAME: if (field.type == TType.STRING) { this.columnFamily_superColumnName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case START: if (field.type == TType.I32) { this.start = iprot.readI32(); this.__isset.start = true; } else { TProtocolUtil.skip(iprot, field.type); } break; case COUNT: if (field.type == TType.I32) { this.count = iprot.readI32(); this.__isset.count = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily_superColumnName != null) { oprot.writeFieldBegin(COLUMN_FAMILY_SUPER_COLUMN_NAME_FIELD_DESC); oprot.writeString(this.columnFamily_superColumnName); oprot.writeFieldEnd(); } oprot.writeFieldBegin(START_FIELD_DESC); oprot.writeI32(this.start); oprot.writeFieldEnd(); oprot.writeFieldBegin(COUNT_FIELD_DESC); oprot.writeI32(this.count); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_super_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily_superColumnName:"); if (this.columnFamily_superColumnName == null) { sb.append("null"); } else { sb.append(this.columnFamily_superColumnName); } first = false; if (!first) sb.append(", "); sb.append("start:"); sb.append(this.start); first = false; if (!first) sb.append(", "); sb.append("count:"); sb.append(this.count); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_super_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_super_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); public List<superColumn_t> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, superColumn_t.class)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_super_result.class, metaDataMap); } public get_slice_super_result() { } public get_slice_super_result( List<superColumn_t> success, InvalidRequestException ire) { this(); this.success = success; this.ire = ire; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_super_result(get_slice_super_result other) { if (other.isSetSuccess()) { List<superColumn_t> __this__success = new ArrayList<superColumn_t>(); for (superColumn_t other_element : other.success) { __this__success.add(new superColumn_t(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } } @Override public get_slice_super_result clone() { return new get_slice_super_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<superColumn_t> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(superColumn_t elem) { if (this.success == null) { this.success = new ArrayList<superColumn_t>(); } this.success.add(elem); } public List<superColumn_t> getSuccess() { return this.success; } public void setSuccess(List<superColumn_t> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<superColumn_t>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_super_result) return this.equals((get_slice_super_result)that); return false; } public boolean equals(get_slice_super_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list51 = iprot.readListBegin(); this.success = new ArrayList<superColumn_t>(_list51.size); for (int _i52 = 0; _i52 < _list51.size; ++_i52) { superColumn_t _elem53; _elem53 = new superColumn_t(); _elem53.read(iprot); this.success.add(_elem53); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); for (superColumn_t _iter54 : this.success) { _iter54.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_super_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_super_by_names_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_super_by_names_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("columnFamily", TType.STRING, (short)3); private static final TField SUPER_COLUMN_NAMES_FIELD_DESC = new TField("superColumnNames", TType.LIST, (short)4); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily; public static final int COLUMNFAMILY = 3; public List<String> superColumnNames; public static final int SUPERCOLUMNNAMES = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY, new FieldMetaData("columnFamily", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(SUPERCOLUMNNAMES, new FieldMetaData("superColumnNames", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_super_by_names_args.class, metaDataMap); } public get_slice_super_by_names_args() { } public get_slice_super_by_names_args( String tablename, String key, String columnFamily, List<String> superColumnNames) { this(); this.tablename = tablename; this.key = key; this.columnFamily = columnFamily; this.superColumnNames = superColumnNames; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_super_by_names_args(get_slice_super_by_names_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily()) { this.columnFamily = other.columnFamily; } if (other.isSetSuperColumnNames()) { List<String> __this__superColumnNames = new ArrayList<String>(); for (String other_element : other.superColumnNames) { __this__superColumnNames.add(other_element); } this.superColumnNames = __this__superColumnNames; } } @Override public get_slice_super_by_names_args clone() { return new get_slice_super_by_names_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily() { return this.columnFamily; } public void setColumnFamily(String columnFamily) { this.columnFamily = columnFamily; } public void unsetColumnFamily() { this.columnFamily = null; } // Returns true if field columnFamily is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily() { return this.columnFamily != null; } public void setColumnFamilyIsSet(boolean value) { if (!value) { this.columnFamily = null; } } public int getSuperColumnNamesSize() { return (this.superColumnNames == null) ? 0 : this.superColumnNames.size(); } public java.util.Iterator<String> getSuperColumnNamesIterator() { return (this.superColumnNames == null) ? null : this.superColumnNames.iterator(); } public void addToSuperColumnNames(String elem) { if (this.superColumnNames == null) { this.superColumnNames = new ArrayList<String>(); } this.superColumnNames.add(elem); } public List<String> getSuperColumnNames() { return this.superColumnNames; } public void setSuperColumnNames(List<String> superColumnNames) { this.superColumnNames = superColumnNames; } public void unsetSuperColumnNames() { this.superColumnNames = null; } // Returns true if field superColumnNames is set (has been asigned a value) and false otherwise public boolean isSetSuperColumnNames() { return this.superColumnNames != null; } public void setSuperColumnNamesIsSet(boolean value) { if (!value) { this.superColumnNames = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY: if (value == null) { unsetColumnFamily(); } else { setColumnFamily((String)value); } break; case SUPERCOLUMNNAMES: if (value == null) { unsetSuperColumnNames(); } else { setSuperColumnNames((List<String>)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY: return getColumnFamily(); case SUPERCOLUMNNAMES: return getSuperColumnNames(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY: return isSetColumnFamily(); case SUPERCOLUMNNAMES: return isSetSuperColumnNames(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_super_by_names_args) return this.equals((get_slice_super_by_names_args)that); return false; } public boolean equals(get_slice_super_by_names_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily = true && this.isSetColumnFamily(); boolean that_present_columnFamily = true && that.isSetColumnFamily(); if (this_present_columnFamily || that_present_columnFamily) { if (!(this_present_columnFamily && that_present_columnFamily)) return false; if (!this.columnFamily.equals(that.columnFamily)) return false; } boolean this_present_superColumnNames = true && this.isSetSuperColumnNames(); boolean that_present_superColumnNames = true && that.isSetSuperColumnNames(); if (this_present_superColumnNames || that_present_superColumnNames) { if (!(this_present_superColumnNames && that_present_superColumnNames)) return false; if (!this.superColumnNames.equals(that.superColumnNames)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY: if (field.type == TType.STRING) { this.columnFamily = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case SUPERCOLUMNNAMES: if (field.type == TType.LIST) { { TList _list55 = iprot.readListBegin(); this.superColumnNames = new ArrayList<String>(_list55.size); for (int _i56 = 0; _i56 < _list55.size; ++_i56) { String _elem57; _elem57 = iprot.readString(); this.superColumnNames.add(_elem57); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily != null) { oprot.writeFieldBegin(COLUMN_FAMILY_FIELD_DESC); oprot.writeString(this.columnFamily); oprot.writeFieldEnd(); } if (this.superColumnNames != null) { oprot.writeFieldBegin(SUPER_COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.superColumnNames.size())); for (String _iter58 : this.superColumnNames) { oprot.writeString(_iter58); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_super_by_names_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily:"); if (this.columnFamily == null) { sb.append("null"); } else { sb.append(this.columnFamily); } first = false; if (!first) sb.append(", "); sb.append("superColumnNames:"); if (this.superColumnNames == null) { sb.append("null"); } else { sb.append(this.superColumnNames); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_slice_super_by_names_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_slice_super_by_names_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); public List<superColumn_t> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, superColumn_t.class)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_slice_super_by_names_result.class, metaDataMap); } public get_slice_super_by_names_result() { } public get_slice_super_by_names_result( List<superColumn_t> success, InvalidRequestException ire) { this(); this.success = success; this.ire = ire; } /** * Performs a deep copy on <i>other</i>. */ public get_slice_super_by_names_result(get_slice_super_by_names_result other) { if (other.isSetSuccess()) { List<superColumn_t> __this__success = new ArrayList<superColumn_t>(); for (superColumn_t other_element : other.success) { __this__success.add(new superColumn_t(other_element)); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } } @Override public get_slice_super_by_names_result clone() { return new get_slice_super_by_names_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<superColumn_t> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(superColumn_t elem) { if (this.success == null) { this.success = new ArrayList<superColumn_t>(); } this.success.add(elem); } public List<superColumn_t> getSuccess() { return this.success; } public void setSuccess(List<superColumn_t> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<superColumn_t>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_slice_super_by_names_result) return this.equals((get_slice_super_by_names_result)that); return false; } public boolean equals(get_slice_super_by_names_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list59 = iprot.readListBegin(); this.success = new ArrayList<superColumn_t>(_list59.size); for (int _i60 = 0; _i60 < _list59.size; ++_i60) { superColumn_t _elem61; _elem61 = new superColumn_t(); _elem61.read(iprot); this.success.add(_elem61); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); for (superColumn_t _iter62 : this.success) { _iter62.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_slice_super_by_names_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_superColumn_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_superColumn_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2); private static final TField COLUMN_FAMILY_FIELD_DESC = new TField("columnFamily", TType.STRING, (short)3); public String tablename; public static final int TABLENAME = 1; public String key; public static final int KEY = 2; public String columnFamily; public static final int COLUMNFAMILY = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(COLUMNFAMILY, new FieldMetaData("columnFamily", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(get_superColumn_args.class, metaDataMap); } public get_superColumn_args() { } public get_superColumn_args( String tablename, String key, String columnFamily) { this(); this.tablename = tablename; this.key = key; this.columnFamily = columnFamily; } /** * Performs a deep copy on <i>other</i>. */ public get_superColumn_args(get_superColumn_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetKey()) { this.key = other.key; } if (other.isSetColumnFamily()) { this.columnFamily = other.columnFamily; } } @Override public get_superColumn_args clone() { return new get_superColumn_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getColumnFamily() { return this.columnFamily; } public void setColumnFamily(String columnFamily) { this.columnFamily = columnFamily; } public void unsetColumnFamily() { this.columnFamily = null; } // Returns true if field columnFamily is set (has been asigned a value) and false otherwise public boolean isSetColumnFamily() { return this.columnFamily != null; } public void setColumnFamilyIsSet(boolean value) { if (!value) { this.columnFamily = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case COLUMNFAMILY: if (value == null) { unsetColumnFamily(); } else { setColumnFamily((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case KEY: return getKey(); case COLUMNFAMILY: return getColumnFamily(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case KEY: return isSetKey(); case COLUMNFAMILY: return isSetColumnFamily(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_superColumn_args) return this.equals((get_superColumn_args)that); return false; } public boolean equals(get_superColumn_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_columnFamily = true && this.isSetColumnFamily(); boolean that_present_columnFamily = true && that.isSetColumnFamily(); if (this_present_columnFamily || that_present_columnFamily) { if (!(this_present_columnFamily && that_present_columnFamily)) return false; if (!this.columnFamily.equals(that.columnFamily)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case COLUMNFAMILY: if (field.type == TType.STRING) { this.columnFamily = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } if (this.columnFamily != null) { oprot.writeFieldBegin(COLUMN_FAMILY_FIELD_DESC); oprot.writeString(this.columnFamily); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_superColumn_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("columnFamily:"); if (this.columnFamily == null) { sb.append("null"); } else { sb.append(this.columnFamily); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_superColumn_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_superColumn_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2); public superColumn_t success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; public NotFoundException nfe; public static final int NFE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, superColumn_t.class))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_superColumn_result.class, metaDataMap); } public get_superColumn_result() { } public get_superColumn_result( superColumn_t success, InvalidRequestException ire, NotFoundException nfe) { this(); this.success = success; this.ire = ire; this.nfe = nfe; } /** * Performs a deep copy on <i>other</i>. */ public get_superColumn_result(get_superColumn_result other) { if (other.isSetSuccess()) { this.success = new superColumn_t(other.success); } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetNfe()) { this.nfe = new NotFoundException(other.nfe); } } @Override public get_superColumn_result clone() { return new get_superColumn_result(this); } public superColumn_t getSuccess() { return this.success; } public void setSuccess(superColumn_t success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public NotFoundException getNfe() { return this.nfe; } public void setNfe(NotFoundException nfe) { this.nfe = nfe; } public void unsetNfe() { this.nfe = null; } // Returns true if field nfe is set (has been asigned a value) and false otherwise public boolean isSetNfe() { return this.nfe != null; } public void setNfeIsSet(boolean value) { if (!value) { this.nfe = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((superColumn_t)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case NFE: if (value == null) { unsetNfe(); } else { setNfe((NotFoundException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); case NFE: return getNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); case NFE: return isSetNfe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_superColumn_result) return this.equals((get_superColumn_result)that); return false; } public boolean equals(get_superColumn_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_nfe = true && this.isSetNfe(); boolean that_present_nfe = true && that.isSetNfe(); if (this_present_nfe || that_present_nfe) { if (!(this_present_nfe && that_present_nfe)) return false; if (!this.nfe.equals(that.nfe)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.STRUCT) { this.success = new superColumn_t(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case NFE: if (field.type == TType.STRUCT) { this.nfe = new NotFoundException(); this.nfe.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetNfe()) { oprot.writeFieldBegin(NFE_FIELD_DESC); this.nfe.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_superColumn_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("nfe:"); if (this.nfe == null) { sb.append("null"); } else { sb.append(this.nfe); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class batch_insert_superColumn_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("batch_insert_superColumn_args"); private static final TField BATCH_MUTATION_SUPER_FIELD_DESC = new TField("batchMutationSuper", TType.STRUCT, (short)1); private static final TField BLOCK_FIELD_DESC = new TField("block", TType.BOOL, (short)2); public batch_mutation_super_t batchMutationSuper; public static final int BATCHMUTATIONSUPER = 1; public boolean block; public static final int BLOCK = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean block = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(BATCHMUTATIONSUPER, new FieldMetaData("batchMutationSuper", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, batch_mutation_super_t.class))); put(BLOCK, new FieldMetaData("block", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); }}); static { FieldMetaData.addStructMetaDataMap(batch_insert_superColumn_args.class, metaDataMap); } public batch_insert_superColumn_args() { this.block = false; } public batch_insert_superColumn_args( batch_mutation_super_t batchMutationSuper, boolean block) { this(); this.batchMutationSuper = batchMutationSuper; this.block = block; this.__isset.block = true; } /** * Performs a deep copy on <i>other</i>. */ public batch_insert_superColumn_args(batch_insert_superColumn_args other) { if (other.isSetBatchMutationSuper()) { this.batchMutationSuper = new batch_mutation_super_t(other.batchMutationSuper); } __isset.block = other.__isset.block; this.block = other.block; } @Override public batch_insert_superColumn_args clone() { return new batch_insert_superColumn_args(this); } public batch_mutation_super_t getBatchMutationSuper() { return this.batchMutationSuper; } public void setBatchMutationSuper(batch_mutation_super_t batchMutationSuper) { this.batchMutationSuper = batchMutationSuper; } public void unsetBatchMutationSuper() { this.batchMutationSuper = null; } // Returns true if field batchMutationSuper is set (has been asigned a value) and false otherwise public boolean isSetBatchMutationSuper() { return this.batchMutationSuper != null; } public void setBatchMutationSuperIsSet(boolean value) { if (!value) { this.batchMutationSuper = null; } } public boolean isBlock() { return this.block; } public void setBlock(boolean block) { this.block = block; this.__isset.block = true; } public void unsetBlock() { this.__isset.block = false; } // Returns true if field block is set (has been asigned a value) and false otherwise public boolean isSetBlock() { return this.__isset.block; } public void setBlockIsSet(boolean value) { this.__isset.block = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case BATCHMUTATIONSUPER: if (value == null) { unsetBatchMutationSuper(); } else { setBatchMutationSuper((batch_mutation_super_t)value); } break; case BLOCK: if (value == null) { unsetBlock(); } else { setBlock((Boolean)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case BATCHMUTATIONSUPER: return getBatchMutationSuper(); case BLOCK: return new Boolean(isBlock()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case BATCHMUTATIONSUPER: return isSetBatchMutationSuper(); case BLOCK: return isSetBlock(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_insert_superColumn_args) return this.equals((batch_insert_superColumn_args)that); return false; } public boolean equals(batch_insert_superColumn_args that) { if (that == null) return false; boolean this_present_batchMutationSuper = true && this.isSetBatchMutationSuper(); boolean that_present_batchMutationSuper = true && that.isSetBatchMutationSuper(); if (this_present_batchMutationSuper || that_present_batchMutationSuper) { if (!(this_present_batchMutationSuper && that_present_batchMutationSuper)) return false; if (!this.batchMutationSuper.equals(that.batchMutationSuper)) return false; } boolean this_present_block = true; boolean that_present_block = true; if (this_present_block || that_present_block) { if (!(this_present_block && that_present_block)) return false; if (this.block != that.block) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case BATCHMUTATIONSUPER: if (field.type == TType.STRUCT) { this.batchMutationSuper = new batch_mutation_super_t(); this.batchMutationSuper.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case BLOCK: if (field.type == TType.BOOL) { this.block = iprot.readBool(); this.__isset.block = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.batchMutationSuper != null) { oprot.writeFieldBegin(BATCH_MUTATION_SUPER_FIELD_DESC); this.batchMutationSuper.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(BLOCK_FIELD_DESC); oprot.writeBool(this.block); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_insert_superColumn_args("); boolean first = true; sb.append("batchMutationSuper:"); if (this.batchMutationSuper == null) { sb.append("null"); } else { sb.append(this.batchMutationSuper); } first = false; if (!first) sb.append(", "); sb.append("block:"); sb.append(this.block); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class batch_insert_superColumn_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("batch_insert_superColumn_result"); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); private static final TField UE_FIELD_DESC = new TField("ue", TType.STRUCT, (short)2); public InvalidRequestException ire; public static final int IRE = 1; public UnavailableException ue; public static final int UE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(UE, new FieldMetaData("ue", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(batch_insert_superColumn_result.class, metaDataMap); } public batch_insert_superColumn_result() { } public batch_insert_superColumn_result( InvalidRequestException ire, UnavailableException ue) { this(); this.ire = ire; this.ue = ue; } /** * Performs a deep copy on <i>other</i>. */ public batch_insert_superColumn_result(batch_insert_superColumn_result other) { if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } if (other.isSetUe()) { this.ue = new UnavailableException(other.ue); } } @Override public batch_insert_superColumn_result clone() { return new batch_insert_superColumn_result(this); } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public UnavailableException getUe() { return this.ue; } public void setUe(UnavailableException ue) { this.ue = ue; } public void unsetUe() { this.ue = null; } // Returns true if field ue is set (has been asigned a value) and false otherwise public boolean isSetUe() { return this.ue != null; } public void setUeIsSet(boolean value) { if (!value) { this.ue = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; case UE: if (value == null) { unsetUe(); } else { setUe((UnavailableException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case IRE: return getIre(); case UE: return getUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case IRE: return isSetIre(); case UE: return isSetUe(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof batch_insert_superColumn_result) return this.equals((batch_insert_superColumn_result)that); return false; } public boolean equals(batch_insert_superColumn_result that) { if (that == null) return false; boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } boolean this_present_ue = true && this.isSetUe(); boolean that_present_ue = true && that.isSetUe(); if (this_present_ue || that_present_ue) { if (!(this_present_ue && that_present_ue)) return false; if (!this.ue.equals(that.ue)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case UE: if (field.type == TType.STRUCT) { this.ue = new UnavailableException(); this.ue.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetUe()) { oprot.writeFieldBegin(UE_FIELD_DESC); this.ue.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("batch_insert_superColumn_result("); boolean first = true; sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; if (!first) sb.append(", "); sb.append("ue:"); if (this.ue == null) { sb.append("null"); } else { sb.append(this.ue); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class touch_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("touch_args"); private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)1); private static final TField F_DATA_FIELD_DESC = new TField("fData", TType.BOOL, (short)2); public String key; public static final int KEY = 1; public boolean fData; public static final int FDATA = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean fData = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(FDATA, new FieldMetaData("fData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); }}); static { FieldMetaData.addStructMetaDataMap(touch_args.class, metaDataMap); } public touch_args() { } public touch_args( String key, boolean fData) { this(); this.key = key; this.fData = fData; this.__isset.fData = true; } /** * Performs a deep copy on <i>other</i>. */ public touch_args(touch_args other) { if (other.isSetKey()) { this.key = other.key; } __isset.fData = other.__isset.fData; this.fData = other.fData; } @Override public touch_args clone() { return new touch_args(this); } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } // Returns true if field key is set (has been asigned a value) and false otherwise public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public boolean isFData() { return this.fData; } public void setFData(boolean fData) { this.fData = fData; this.__isset.fData = true; } public void unsetFData() { this.__isset.fData = false; } // Returns true if field fData is set (has been asigned a value) and false otherwise public boolean isSetFData() { return this.__isset.fData; } public void setFDataIsSet(boolean value) { this.__isset.fData = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case FDATA: if (value == null) { unsetFData(); } else { setFData((Boolean)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case KEY: return getKey(); case FDATA: return new Boolean(isFData()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case KEY: return isSetKey(); case FDATA: return isSetFData(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof touch_args) return this.equals((touch_args)that); return false; } public boolean equals(touch_args that) { if (that == null) return false; boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_fData = true; boolean that_present_fData = true; if (this_present_fData || that_present_fData) { if (!(this_present_fData && that_present_fData)) return false; if (this.fData != that.fData) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case KEY: if (field.type == TType.STRING) { this.key = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case FDATA: if (field.type == TType.BOOL) { this.fData = iprot.readBool(); this.__isset.fData = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(this.key); oprot.writeFieldEnd(); } oprot.writeFieldBegin(F_DATA_FIELD_DESC); oprot.writeBool(this.fData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("touch_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("fData:"); sb.append(this.fData); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_key_range_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_key_range_args"); private static final TField TABLENAME_FIELD_DESC = new TField("tablename", TType.STRING, (short)1); private static final TField START_WITH_FIELD_DESC = new TField("startWith", TType.STRING, (short)2); private static final TField STOP_AT_FIELD_DESC = new TField("stopAt", TType.STRING, (short)3); private static final TField MAX_RESULTS_FIELD_DESC = new TField("maxResults", TType.I32, (short)4); public String tablename; public static final int TABLENAME = 1; public String startWith; public static final int STARTWITH = 2; public String stopAt; public static final int STOPAT = 3; public int maxResults; public static final int MAXRESULTS = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { public boolean maxResults = false; } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tablename", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(STARTWITH, new FieldMetaData("startWith", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(STOPAT, new FieldMetaData("stopAt", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(MAXRESULTS, new FieldMetaData("maxResults", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); }}); static { FieldMetaData.addStructMetaDataMap(get_key_range_args.class, metaDataMap); } public get_key_range_args() { this.startWith = ""; this.stopAt = ""; this.maxResults = 1000; } public get_key_range_args( String tablename, String startWith, String stopAt, int maxResults) { this(); this.tablename = tablename; this.startWith = startWith; this.stopAt = stopAt; this.maxResults = maxResults; this.__isset.maxResults = true; } /** * Performs a deep copy on <i>other</i>. */ public get_key_range_args(get_key_range_args other) { if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetStartWith()) { this.startWith = other.startWith; } if (other.isSetStopAt()) { this.stopAt = other.stopAt; } __isset.maxResults = other.__isset.maxResults; this.maxResults = other.maxResults; } @Override public get_key_range_args clone() { return new get_key_range_args(this); } public String getTablename() { return this.tablename; } public void setTablename(String tablename) { this.tablename = tablename; } public void unsetTablename() { this.tablename = null; } // Returns true if field tablename is set (has been asigned a value) and false otherwise public boolean isSetTablename() { return this.tablename != null; } public void setTablenameIsSet(boolean value) { if (!value) { this.tablename = null; } } public String getStartWith() { return this.startWith; } public void setStartWith(String startWith) { this.startWith = startWith; } public void unsetStartWith() { this.startWith = null; } // Returns true if field startWith is set (has been asigned a value) and false otherwise public boolean isSetStartWith() { return this.startWith != null; } public void setStartWithIsSet(boolean value) { if (!value) { this.startWith = null; } } public String getStopAt() { return this.stopAt; } public void setStopAt(String stopAt) { this.stopAt = stopAt; } public void unsetStopAt() { this.stopAt = null; } // Returns true if field stopAt is set (has been asigned a value) and false otherwise public boolean isSetStopAt() { return this.stopAt != null; } public void setStopAtIsSet(boolean value) { if (!value) { this.stopAt = null; } } public int getMaxResults() { return this.maxResults; } public void setMaxResults(int maxResults) { this.maxResults = maxResults; this.__isset.maxResults = true; } public void unsetMaxResults() { this.__isset.maxResults = false; } // Returns true if field maxResults is set (has been asigned a value) and false otherwise public boolean isSetMaxResults() { return this.__isset.maxResults; } public void setMaxResultsIsSet(boolean value) { this.__isset.maxResults = value; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTablename(); } else { setTablename((String)value); } break; case STARTWITH: if (value == null) { unsetStartWith(); } else { setStartWith((String)value); } break; case STOPAT: if (value == null) { unsetStopAt(); } else { setStopAt((String)value); } break; case MAXRESULTS: if (value == null) { unsetMaxResults(); } else { setMaxResults((Integer)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTablename(); case STARTWITH: return getStartWith(); case STOPAT: return getStopAt(); case MAXRESULTS: return new Integer(getMaxResults()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTablename(); case STARTWITH: return isSetStartWith(); case STOPAT: return isSetStopAt(); case MAXRESULTS: return isSetMaxResults(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_key_range_args) return this.equals((get_key_range_args)that); return false; } public boolean equals(get_key_range_args that) { if (that == null) return false; boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_startWith = true && this.isSetStartWith(); boolean that_present_startWith = true && that.isSetStartWith(); if (this_present_startWith || that_present_startWith) { if (!(this_present_startWith && that_present_startWith)) return false; if (!this.startWith.equals(that.startWith)) return false; } boolean this_present_stopAt = true && this.isSetStopAt(); boolean that_present_stopAt = true && that.isSetStopAt(); if (this_present_stopAt || that_present_stopAt) { if (!(this_present_stopAt && that_present_stopAt)) return false; if (!this.stopAt.equals(that.stopAt)) return false; } boolean this_present_maxResults = true; boolean that_present_maxResults = true; if (this_present_maxResults || that_present_maxResults) { if (!(this_present_maxResults && that_present_maxResults)) return false; if (this.maxResults != that.maxResults) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tablename = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case STARTWITH: if (field.type == TType.STRING) { this.startWith = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case STOPAT: if (field.type == TType.STRING) { this.stopAt = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case MAXRESULTS: if (field.type == TType.I32) { this.maxResults = iprot.readI32(); this.__isset.maxResults = true; } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(this.tablename); oprot.writeFieldEnd(); } if (this.startWith != null) { oprot.writeFieldBegin(START_WITH_FIELD_DESC); oprot.writeString(this.startWith); oprot.writeFieldEnd(); } if (this.stopAt != null) { oprot.writeFieldBegin(STOP_AT_FIELD_DESC); oprot.writeString(this.stopAt); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_RESULTS_FIELD_DESC); oprot.writeI32(this.maxResults); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_key_range_args("); boolean first = true; sb.append("tablename:"); if (this.tablename == null) { sb.append("null"); } else { sb.append(this.tablename); } first = false; if (!first) sb.append(", "); sb.append("startWith:"); if (this.startWith == null) { sb.append("null"); } else { sb.append(this.startWith); } first = false; if (!first) sb.append(", "); sb.append("stopAt:"); if (this.stopAt == null) { sb.append("null"); } else { sb.append(this.stopAt); } first = false; if (!first) sb.append(", "); sb.append("maxResults:"); sb.append(this.maxResults); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class get_key_range_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_key_range_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1); public List<String> success; public static final int SUCCESS = 0; public InvalidRequestException ire; public static final int IRE = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { FieldMetaData.addStructMetaDataMap(get_key_range_result.class, metaDataMap); } public get_key_range_result() { } public get_key_range_result( List<String> success, InvalidRequestException ire) { this(); this.success = success; this.ire = ire; } /** * Performs a deep copy on <i>other</i>. */ public get_key_range_result(get_key_range_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetIre()) { this.ire = new InvalidRequestException(other.ire); } } @Override public get_key_range_result clone() { return new get_key_range_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public InvalidRequestException getIre() { return this.ire; } public void setIre(InvalidRequestException ire) { this.ire = ire; } public void unsetIre() { this.ire = null; } // Returns true if field ire is set (has been asigned a value) and false otherwise public boolean isSetIre() { return this.ire != null; } public void setIreIsSet(boolean value) { if (!value) { this.ire = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<String>)value); } break; case IRE: if (value == null) { unsetIre(); } else { setIre((InvalidRequestException)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); case IRE: return getIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); case IRE: return isSetIre(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_key_range_result) return this.equals((get_key_range_result)that); return false; } public boolean equals(get_key_range_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_ire = true && this.isSetIre(); boolean that_present_ire = true && that.isSetIre(); if (this_present_ire || that_present_ire) { if (!(this_present_ire && that_present_ire)) return false; if (!this.ire.equals(that.ire)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list63 = iprot.readListBegin(); this.success = new ArrayList<String>(_list63.size); for (int _i64 = 0; _i64 < _list63.size; ++_i64) { String _elem65; _elem65 = iprot.readString(); this.success.add(_elem65); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case IRE: if (field.type == TType.STRUCT) { this.ire = new InvalidRequestException(); this.ire.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); for (String _iter66 : this.success) { oprot.writeString(_iter66); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetIre()) { oprot.writeFieldBegin(IRE_FIELD_DESC); this.ire.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_key_range_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("ire:"); if (this.ire == null) { sb.append("null"); } else { sb.append(this.ire); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class getStringProperty_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getStringProperty_args"); private static final TField PROPERTY_NAME_FIELD_DESC = new TField("propertyName", TType.STRING, (short)1); public String propertyName; public static final int PROPERTYNAME = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(PROPERTYNAME, new FieldMetaData("propertyName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(getStringProperty_args.class, metaDataMap); } public getStringProperty_args() { } public getStringProperty_args( String propertyName) { this(); this.propertyName = propertyName; } /** * Performs a deep copy on <i>other</i>. */ public getStringProperty_args(getStringProperty_args other) { if (other.isSetPropertyName()) { this.propertyName = other.propertyName; } } @Override public getStringProperty_args clone() { return new getStringProperty_args(this); } public String getPropertyName() { return this.propertyName; } public void setPropertyName(String propertyName) { this.propertyName = propertyName; } public void unsetPropertyName() { this.propertyName = null; } // Returns true if field propertyName is set (has been asigned a value) and false otherwise public boolean isSetPropertyName() { return this.propertyName != null; } public void setPropertyNameIsSet(boolean value) { if (!value) { this.propertyName = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case PROPERTYNAME: if (value == null) { unsetPropertyName(); } else { setPropertyName((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case PROPERTYNAME: return getPropertyName(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case PROPERTYNAME: return isSetPropertyName(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getStringProperty_args) return this.equals((getStringProperty_args)that); return false; } public boolean equals(getStringProperty_args that) { if (that == null) return false; boolean this_present_propertyName = true && this.isSetPropertyName(); boolean that_present_propertyName = true && that.isSetPropertyName(); if (this_present_propertyName || that_present_propertyName) { if (!(this_present_propertyName && that_present_propertyName)) return false; if (!this.propertyName.equals(that.propertyName)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case PROPERTYNAME: if (field.type == TType.STRING) { this.propertyName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.propertyName != null) { oprot.writeFieldBegin(PROPERTY_NAME_FIELD_DESC); oprot.writeString(this.propertyName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getStringProperty_args("); boolean first = true; sb.append("propertyName:"); if (this.propertyName == null) { sb.append("null"); } else { sb.append(this.propertyName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class getStringProperty_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getStringProperty_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); public String success; public static final int SUCCESS = 0; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(getStringProperty_result.class, metaDataMap); } public getStringProperty_result() { } public getStringProperty_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getStringProperty_result(getStringProperty_result other) { if (other.isSetSuccess()) { this.success = other.success; } } @Override public getStringProperty_result clone() { return new getStringProperty_result(this); } public String getSuccess() { return this.success; } public void setSuccess(String success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getStringProperty_result) return this.equals((getStringProperty_result)that); return false; } public boolean equals(getStringProperty_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.STRING) { this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getStringProperty_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class getStringListProperty_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getStringListProperty_args"); private static final TField PROPERTY_NAME_FIELD_DESC = new TField("propertyName", TType.STRING, (short)1); public String propertyName; public static final int PROPERTYNAME = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(PROPERTYNAME, new FieldMetaData("propertyName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(getStringListProperty_args.class, metaDataMap); } public getStringListProperty_args() { } public getStringListProperty_args( String propertyName) { this(); this.propertyName = propertyName; } /** * Performs a deep copy on <i>other</i>. */ public getStringListProperty_args(getStringListProperty_args other) { if (other.isSetPropertyName()) { this.propertyName = other.propertyName; } } @Override public getStringListProperty_args clone() { return new getStringListProperty_args(this); } public String getPropertyName() { return this.propertyName; } public void setPropertyName(String propertyName) { this.propertyName = propertyName; } public void unsetPropertyName() { this.propertyName = null; } // Returns true if field propertyName is set (has been asigned a value) and false otherwise public boolean isSetPropertyName() { return this.propertyName != null; } public void setPropertyNameIsSet(boolean value) { if (!value) { this.propertyName = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case PROPERTYNAME: if (value == null) { unsetPropertyName(); } else { setPropertyName((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case PROPERTYNAME: return getPropertyName(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case PROPERTYNAME: return isSetPropertyName(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getStringListProperty_args) return this.equals((getStringListProperty_args)that); return false; } public boolean equals(getStringListProperty_args that) { if (that == null) return false; boolean this_present_propertyName = true && this.isSetPropertyName(); boolean that_present_propertyName = true && that.isSetPropertyName(); if (this_present_propertyName || that_present_propertyName) { if (!(this_present_propertyName && that_present_propertyName)) return false; if (!this.propertyName.equals(that.propertyName)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case PROPERTYNAME: if (field.type == TType.STRING) { this.propertyName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.propertyName != null) { oprot.writeFieldBegin(PROPERTY_NAME_FIELD_DESC); oprot.writeString(this.propertyName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getStringListProperty_args("); boolean first = true; sb.append("propertyName:"); if (this.propertyName == null) { sb.append("null"); } else { sb.append(this.propertyName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class getStringListProperty_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getStringListProperty_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); public List<String> success; public static final int SUCCESS = 0; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); }}); static { FieldMetaData.addStructMetaDataMap(getStringListProperty_result.class, metaDataMap); } public getStringListProperty_result() { } public getStringListProperty_result( List<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getStringListProperty_result(getStringListProperty_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } @Override public getStringListProperty_result clone() { return new getStringListProperty_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<String>)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getStringListProperty_result) return this.equals((getStringListProperty_result)that); return false; } public boolean equals(getStringListProperty_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.LIST) { { TList _list67 = iprot.readListBegin(); this.success = new ArrayList<String>(_list67.size); for (int _i68 = 0; _i68 < _list67.size; ++_i68) { String _elem69; _elem69 = iprot.readString(); this.success.add(_elem69); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); for (String _iter70 : this.success) { oprot.writeString(_iter70); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getStringListProperty_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class describeTable_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("describeTable_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); public String tableName; public static final int TABLENAME = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(describeTable_args.class, metaDataMap); } public describeTable_args() { } public describeTable_args( String tableName) { this(); this.tableName = tableName; } /** * Performs a deep copy on <i>other</i>. */ public describeTable_args(describeTable_args other) { if (other.isSetTableName()) { this.tableName = other.tableName; } } @Override public describeTable_args clone() { return new describeTable_args(this); } public String getTableName() { return this.tableName; } public void setTableName(String tableName) { this.tableName = tableName; } public void unsetTableName() { this.tableName = null; } // Returns true if field tableName is set (has been asigned a value) and false otherwise public boolean isSetTableName() { return this.tableName != null; } public void setTableNameIsSet(boolean value) { if (!value) { this.tableName = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: if (value == null) { unsetTableName(); } else { setTableName((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case TABLENAME: return getTableName(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case TABLENAME: return isSetTableName(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describeTable_args) return this.equals((describeTable_args)that); return false; } public boolean equals(describeTable_args that) { if (that == null) return false; boolean this_present_tableName = true && this.isSetTableName(); boolean that_present_tableName = true && that.isSetTableName(); if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; if (!this.tableName.equals(that.tableName)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(this.tableName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describeTable_args("); boolean first = true; sb.append("tableName:"); if (this.tableName == null) { sb.append("null"); } else { sb.append(this.tableName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class describeTable_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("describeTable_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); public String success; public static final int SUCCESS = 0; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(describeTable_result.class, metaDataMap); } public describeTable_result() { } public describeTable_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public describeTable_result(describeTable_result other) { if (other.isSetSuccess()) { this.success = other.success; } } @Override public describeTable_result clone() { return new describeTable_result(this); } public String getSuccess() { return this.success; } public void setSuccess(String success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof describeTable_result) return this.equals((describeTable_result)that); return false; } public boolean equals(describeTable_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.STRING) { this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("describeTable_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class executeQuery_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("executeQuery_args"); private static final TField QUERY_FIELD_DESC = new TField("query", TType.STRING, (short)1); public String query; public static final int QUERY = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(QUERY, new FieldMetaData("query", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { FieldMetaData.addStructMetaDataMap(executeQuery_args.class, metaDataMap); } public executeQuery_args() { } public executeQuery_args( String query) { this(); this.query = query; } /** * Performs a deep copy on <i>other</i>. */ public executeQuery_args(executeQuery_args other) { if (other.isSetQuery()) { this.query = other.query; } } @Override public executeQuery_args clone() { return new executeQuery_args(this); } public String getQuery() { return this.query; } public void setQuery(String query) { this.query = query; } public void unsetQuery() { this.query = null; } // Returns true if field query is set (has been asigned a value) and false otherwise public boolean isSetQuery() { return this.query != null; } public void setQueryIsSet(boolean value) { if (!value) { this.query = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case QUERY: if (value == null) { unsetQuery(); } else { setQuery((String)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case QUERY: return getQuery(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case QUERY: return isSetQuery(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof executeQuery_args) return this.equals((executeQuery_args)that); return false; } public boolean equals(executeQuery_args that) { if (that == null) return false; boolean this_present_query = true && this.isSetQuery(); boolean that_present_query = true && that.isSetQuery(); if (this_present_query || that_present_query) { if (!(this_present_query && that_present_query)) return false; if (!this.query.equals(that.query)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case QUERY: if (field.type == TType.STRING) { this.query = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.query != null) { oprot.writeFieldBegin(QUERY_FIELD_DESC); oprot.writeString(this.query); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("executeQuery_args("); boolean first = true; sb.append("query:"); if (this.query == null) { sb.append("null"); } else { sb.append(this.query); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } public static class executeQuery_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("executeQuery_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); public CqlResult_t success; public static final int SUCCESS = 0; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, CqlResult_t.class))); }}); static { FieldMetaData.addStructMetaDataMap(executeQuery_result.class, metaDataMap); } public executeQuery_result() { } public executeQuery_result( CqlResult_t success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public executeQuery_result(executeQuery_result other) { if (other.isSetSuccess()) { this.success = new CqlResult_t(other.success); } } @Override public executeQuery_result clone() { return new executeQuery_result(this); } public CqlResult_t getSuccess() { return this.success; } public void setSuccess(CqlResult_t success) { this.success = success; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((CqlResult_t)value); } break; default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: return getSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { case SUCCESS: return isSetSuccess(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof executeQuery_result) return this.equals((executeQuery_result)that); return false; } public boolean equals(executeQuery_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { return 0; } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case SUCCESS: if (field.type == TType.STRUCT) { this.success = new CqlResult_t(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("executeQuery_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields // check that fields of type enum have valid values } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
1645b701a5367920949f8cd4949b9e1b0ff0eda2
36d818cbeda9fe07c3097e136beeaad33ab33cd9
/src/Design_Pattern/Structural_Pattern/Adapter/Adapter.java
b5a19ad87cf47745e9829856d6d18c835aabd85e
[]
no_license
XQLong/java_workplace
61a5cca83bc3da942779ececd1b871832d058d41
f8fd8a04c9a01f57a61efbd1e026fe6d83edd9b3
refs/heads/master
2020-03-28T19:23:16.464728
2019-10-22T02:35:37
2019-10-22T02:35:37
148,970,832
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package Design_Pattern.Structural_Pattern.Adapter; /** * @Author: xql * @Date: Created in 10:48 2019/7/12 * 适配器模式中的适配器类(类适配器模式) */ public class Adapter extends Adaptee implements Target{ @Override public void sampleOperation2() { } }
[ "xql820148218@gmail.com" ]
xql820148218@gmail.com
73a5a3bce0979ca50b9544fffb0c8bc81d0ce8ef
ad5531058fb389f3fd4d42690485565398272ec2
/src/main/java/com/example/JPA_Test/Dates.java
e771862b301a3945dc21152a60e83c12d81dfef4
[]
no_license
Dilo229/TP_JPA
eb380bdf0de4aedef7d4c2b07ca13d179c821ae7
0d08762546de799f9b91a35ea02c602301eaf00b
refs/heads/master
2023-04-02T01:36:42.905368
2021-03-31T16:25:00
2021-03-31T16:25:00
353,400,934
0
0
null
null
null
null
UTF-8
Java
false
false
54
java
package com.example.JPA_Test; public class Dates { }
[ "57441931+Dilo229@users.noreply.github.com" ]
57441931+Dilo229@users.noreply.github.com
6fe9489e08bdb1df49f56ab7f54e671f9fb224cf
317dbe484ec3ea1acf6d4041224c6e284ec8ffa3
/src/test/java/com/example/SpringDataJpaAuditingFailApplicationTests.java
8368c8c2b284dd814591f033798516f87fbe5d54
[]
no_license
mihn/spring-data-jpa-auditing-fail
9e4dc582d72e153f2cf2709e1d54368cfe6ea253
9c246941eab0d87e78236e8e264e484b7c73662b
refs/heads/master
2021-01-11T04:06:22.828892
2016-10-18T13:01:00
2016-10-18T13:15:06
71,248,686
0
0
null
null
null
null
UTF-8
Java
false
false
1,058
java
package com.example; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) @SpringBootTest public class SpringDataJpaAuditingFailApplicationTests { private static final Logger LOGGER = LoggerFactory.getLogger(SpringDataJpaAuditingFailApplicationTests.class); @Autowired TestEntityRepository testEntityRepository; @Test //fails on 1.4.1, works on 1.4.0 public void checkIfAuditingWorks() { //given: TestEntity newEntity = new TestEntity("test"); //when: TestEntity savedEntity = testEntityRepository.save(newEntity); //then: assertThat(savedEntity.getCreatedDate()).isNotNull(); assertThat(savedEntity.getModifiedDate()).isNotNull(); } }
[ "M.Niczyporuk@polish-airports.com" ]
M.Niczyporuk@polish-airports.com
a7747186b1080e7fcb45d914832c1ec7d43dd4a4
b69bc3aa46bda206a9de9520d9e0811b365e7d4d
/the state of wakanda 2/Main.java
bdf848faaaebf371b952ed2a7bd25f2193f8b833
[]
no_license
tanishq-agarwal/2d-arrays
7fa96db2bf18ff190dd632aa0349c3b6efbdae45
743f8c1392920d584c8d835920111371d60d6bcf
refs/heads/main
2023-04-05T14:16:53.756080
2021-04-13T10:00:47
2021-04-13T10:00:47
356,487,449
0
0
null
null
null
null
UTF-8
Java
false
false
593
java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { // write your code here Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int arr[][]=new int[n][n]; for(int i=0;i<arr.length;i++){ for(int j=0;j<arr[0].length;j++){ arr[i][j]=sc.nextInt(); } } for(int g=0;g<arr.length;g++){ for(int i=0,j=g;j<arr.length; i++,j++){ System.out.println(arr[i][j]); } } } }
[ "agarwaltanishq35@gmail.com" ]
agarwaltanishq35@gmail.com
2ef70ff3be92d24ced89ecc3a237202a90770dc2
bdaca57107a7ef62b770e62b53f6361f740d6a5d
/XMLTest/src/xml/entity/XMLFacility.java
766373121749b36178ab276e5f0efdb8528e12cb
[]
no_license
rogvold/OrskRestaurant
8ba5c1e194337d7c1e3858a29e4669d54d98a092
04f01be5122d91aa786cfb9c68b5d295829b52f3
refs/heads/master
2020-11-26T16:32:20.216656
2012-09-03T12:21:16
2012-09-03T12:21:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,235
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package xml.entity; import java.util.ArrayList; import java.util.List; /** * * @author rogvold */ public class XMLFacility { private String name; private String phone; private String site; private String description; private String schedule; private String address; private List<XMLFeature> features; private List<String> types; private List<String> images; public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getSchedule() { return schedule; } public void setSchedule(String schedule) { this.schedule = schedule; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public List<XMLFeature> getFeatures() { return features; } public void setFeatures(List<XMLFeature> features) { this.features = features; } public List<String> getImages() { return images; } public void setImages(List<String> images) { this.images = images; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getScedule() { return schedule; } public void setScedule(String scedule) { this.schedule = scedule; } public String getSite() { return site; } public void setSite(String site) { this.site = site; } public List<String> getTypes() { return types; } public void setTypes(List<String> types) { this.types = types; } public void trimAllFields() { this.address = this.address.trim(); this.name = this.name.trim(); this.phone = this.phone.trim(); this.site = this.site.trim(); this.schedule = this.schedule.trim(); this.description = this.description.trim(); List<String> imlist = new ArrayList(); for (String s : images) { imlist.add(s.trim()); } images = imlist; List<String> tlist = new ArrayList(); for (String s : types) { tlist.add(s.trim()); } types = tlist; List<XMLFeature> list = new ArrayList(); for (XMLFeature f : features) { f.trimAllFields(); } } @Override public String toString() { String s = ""; s += "name = " + name + "\n" + "address = " + address + "\n" + "site = " + site + "\n" + "phone = " + phone + "\n" + "description = " + description + "\n" + "schedule = " + schedule + "\n" + "images = " + images + "\n" + "types = " + types + "\n" + "features = " + features + "\n"; return s; } }
[ "sha-sabir@yandex.ru" ]
sha-sabir@yandex.ru
8bc1938d0217a444a336e4475c197c4a7a4a4217
c5673697bfcfe2dd1a0bb37de8ef8168e3cd2a12
/gmall-order-service/src/main/java/com/atguigu/gmallmy0311/order/mapper/OrderInfoMapper.java
c380e85bf6a400ae759d26d24a6319f1005fc438
[]
no_license
clf322/gmallmy0311
00c281f3b10939ad11e92e90808cd24bcc219238
3b99599d8a1a823b7260b51af226ce822e8a0d6e
refs/heads/master
2022-10-04T05:38:33.337624
2022-08-05T09:38:26
2022-08-05T09:38:26
202,660,127
0
0
null
2022-09-01T23:57:33
2019-08-16T04:48:48
CSS
UTF-8
Java
false
false
199
java
package com.atguigu.gmallmy0311.order.mapper; import com.atguigu.gmallmy0311.bean.OrderInfo; import tk.mybatis.mapper.common.Mapper; public interface OrderInfoMapper extends Mapper<OrderInfo> { }
[ "934635718@qq.com" ]
934635718@qq.com
ac70f3cbf735da887d09c058426f172930a13fc9
cb627dfc8849d3c8c39cbcff4fab73be065b2372
/app/src/main/java/mx/com/cceo/emprezando/Fragment/ImageShowcaseFragment.java
034d7467bf137652b2d57561c69ec2c5b8d1b157
[]
no_license
CCEO/Emprezando
82e5667d26810e8011ce6f51143a7fca4e9905ee
f92a6c6c59a3432fcd4edd00baeb352d09a6429d
refs/heads/master
2021-01-13T01:00:58.053986
2015-12-04T15:42:51
2015-12-04T15:42:51
43,501,438
0
0
null
2015-12-04T15:42:52
2015-10-01T14:34:02
Java
UTF-8
Java
false
false
909
java
package mx.com.cceo.emprezando.Fragment; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import mx.com.cceo.emprezando.R; /** * Created by Hugo on 11/22/2015. */ public class ImageShowcaseFragment extends Fragment { private int id; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //container.removeAllViews(); ViewGroup rootView = (ViewGroup) inflater.inflate( R.layout.fragment_image_showcase, container, false); ImageView image = (ImageView) rootView.findViewById(R.id.item_image_showcase_image); image.setImageResource(id); return rootView; } public void setImageId(int id) { this.id = id; } }
[ "rhadammanthis@gmail.com" ]
rhadammanthis@gmail.com
eb3f365671b700015f3cb5a7696f1756a3a71e1b
c85cc129a635ab5ac5a469c3dcb398af4cb97db8
/src/main/java/com/magicalsolutions/fastcourier/Config/DBConfig.java
bc1ae4ee2aa256c3debe3fc6e1889d80ccec3150
[]
no_license
VictorAtPL/FastCourier-Rest
0e86a73bc0b1f9aec34a171c48573baa96b5b66c
2a63851450cfa0e483846a70f0ad783122fb4a08
refs/heads/master
2021-09-03T04:33:38.083770
2017-12-19T19:47:17
2017-12-19T19:47:17
111,995,140
0
0
null
2018-01-05T13:39:25
2017-11-25T10:28:20
Java
UTF-8
Java
false
false
3,174
java
package com.magicalsolutions.fastcourier.Config; import org.apache.commons.dbcp2.BasicDataSource; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.core.env.Environment; import org.springframework.orm.hibernate5.HibernateTemplate; import org.springframework.orm.hibernate5.HibernateTransactionManager; import org.springframework.orm.hibernate5.LocalSessionFactoryBean; import org.springframework.transaction.annotation.EnableTransactionManagement; import javax.sql.DataSource; import java.io.IOException; import java.util.Properties; @Configuration @EnableTransactionManagement @PropertySource("classpath:database.properties") public class DBConfig { @Autowired private Environment env; @Bean public HibernateTemplate hibernateTemplate() { return new HibernateTemplate(sessionFactory()); } @Bean public SessionFactory sessionFactory() { LocalSessionFactoryBean lsfb = new LocalSessionFactoryBean(); lsfb.setDataSource(getDataSource()); lsfb.setPackagesToScan("com.magicalsolutions.fastcourier.Entity"); lsfb.setHibernateProperties(hibernateProperties()); try { lsfb.afterPropertiesSet(); } catch (IOException e) { e.printStackTrace(); } return lsfb.getObject(); } @Bean public DataSource getDataSource() { BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName(env.getProperty("database.driverClassName")); dataSource.setUrl(env.getProperty("database.url")); dataSource.setUsername(env.getProperty("database.username")); dataSource.setPassword(env.getProperty("database.password")); return dataSource; } @Bean public HibernateTransactionManager transactionManager() { return new HibernateTransactionManager(sessionFactory()); } private Properties hibernateProperties() { Properties properties = new Properties(); properties.put("hibernate.dialect", env.getProperty("hibernate.dialect")); properties.put("hibernate.id.new_generator_mappings", env.getProperty("hibernate.id.new_generator_mappings")); properties.put("hibernate.show_sql", env.getProperty("hibernate.show_sql")); properties.put("hibernate.format_sql", env.getProperty("hibernate.format_sql")); properties.put("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); properties.put("hibernate.hbm2ddl.import_files", env.getProperty("hibernate.hbm2ddl.import_files")); properties.put("hibernate.connection.CharSet", env.getProperty("hibernate.connection.CharSet")); properties.put("hibernate.connection.characterEncoding", env.getProperty("hibernate.connection.characterEncoding")); properties.put("hibernate.connection.useUnicode", env.getProperty("hibernate.connection.useUnicode")); return properties; } }
[ "p.podbielski@gmail.com" ]
p.podbielski@gmail.com
eff5dbe8f24bfb04020351f9c9041c8fa350368d
76359c348d2a8200fb7b4e2c505758a02d411b54
/src/Pokemon.java
5670716b789681eb0200a283990b2d8651aa0e33
[]
no_license
sameerd4/Pokemon
19c37bd5c08f9e1ae2b42cd08f2fc8a5673c3728
29f5be22ee84c873aa098458048016761814dcf9
refs/heads/master
2020-03-09T07:49:12.000046
2018-09-20T18:57:53
2018-09-20T18:57:53
128,673,529
0
0
null
null
null
null
UTF-8
Java
false
false
1,214
java
public class Pokemon { private String name; private Type type; private Move[] moves; private Stats stats; // constructor public Pokemon(String name, Type type, Move[] moves, Stats stats) { this.name = name; this.type = type; this.moves = moves; this.stats = stats; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Type getType() { return type; } public void setType(Type type) { this.type = type; } public Move[] getMoves() { return moves; } public void setMoves(Move[] moves) { this.moves = moves; } public Stats getStats() { return stats; } public void setStats(Stats stats) { this.stats = stats; } public void attack(Pokemon other) { } public String toString() { return "Name: " + name + "\nType: " + type.getType() + "\n\n" + stats .toString() + "\n\nMoves:" + "\n" + moves[0].getMove() + "\n" + moves[1].getMove() + "\n" + moves[2].getMove() + "\n" + moves[3] .getMove(); } }
[ "sameerd@vt.edu" ]
sameerd@vt.edu