blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
394628c570b00f4fc3a96627a1d9bddb1112f688
8b4432fa749eb3b3600e1730880f89cae4a7f764
/src/main/java/com/readlearncode/dukesbookshop/restserver/RESTConfig.java
753c9e411d9334ccb5675b563f68e684992e0ace
[]
no_license
tn-teamrg/RESTful-JAX-RS
ac66531fb5edc847ab94ea1b891bb07a61a37e53
8273d700195986025c145d6aa72469c58e6250a5
refs/heads/main
2023-07-17T05:25:47.009569
2021-09-10T18:18:34
2021-09-10T18:18:34
405,159,807
0
0
null
null
null
null
UTF-8
Java
false
false
201
java
package com.readlearncode.dukesbookshop.restserver; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; @ApplicationPath("/api") public class RESTConfig extends Application{ }
[ "85945974+tn-teamrg@users.noreply.github.com" ]
85945974+tn-teamrg@users.noreply.github.com
8773303cdca18d75637ef73e485d66d02b1c0921
c94235adb1c60bbfb1381418b78439152b5cd477
/web_restful_crud/src/main/java/com/rock/filter/MyFilter.java
9c7e780f7cc30836b92704a1d5f1a6d30c3bf296
[]
no_license
south-windy/SpringBootStudy
79f95c3d89f336539eac92d028bdaa2bb1e43b90
ff7629a2101275263da5fba26ee337de2a7d95b6
refs/heads/master
2023-01-02T15:38:49.858723
2020-10-11T09:08:34
2020-10-11T09:08:34
303,081,201
0
0
null
null
null
null
UTF-8
Java
false
false
557
java
package com.rock.filter; import javax.servlet.*; import java.io.IOException; public class MyFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { System.out.println("MyFilter process...."); filterChain.doFilter(servletRequest, servletResponse); } @Override public void destroy() { } }
[ "south_windy@163.com" ]
south_windy@163.com
d2f601053be425061cc994195934e5582f591f4d
6a373916b074d1dd01093c39009fac49f76f8da1
/2020-01-27_TrainingSessionTDD/src/main/java/com/example/tdd/currency/mapper/CurrencyMapper.java
37dae303ed5230d9cf178cca079f9fc2876a3a73
[ "MIT" ]
permissive
hhvvkk/TrainingSessions
f39fa25fc3360d946e2dd1bbb1e6fb4a686913ff
43aae3fe021dc6c47ed76f517445c4a90dbb418a
refs/heads/master
2021-07-09T07:46:26.403019
2020-08-27T19:50:35
2020-08-27T19:50:35
236,575,251
0
0
MIT
2021-03-31T22:11:29
2020-01-27T19:31:07
Java
UTF-8
Java
false
false
626
java
package com.example.tdd.currency.mapper; import org.mapstruct.Mapper; import com.example.tdd.currency.dto.CurrencyDTO; import com.example.tdd.currency.entity.Currency; import java.util.List; import java.util.stream.Collectors; @Mapper(componentModel = "spring") public abstract class CurrencyMapper { public abstract Currency toEntity(CurrencyDTO dto); public abstract CurrencyDTO toDTO(Currency entity); public List<CurrencyDTO> toDTOsList(List<Currency> entities) { return entities .stream() .map(this::toDTO) .collect(Collectors.toList()); } }
[ "henko.van.koesveld@advance.io" ]
henko.van.koesveld@advance.io
a100c91cc3fc642087c9962e2c3bd911a6900b91
8533079e8f3bef1977348146c544980828fe40ef
/mission10/src/main/java/com/saeyan/controller/moviedeleteServlet.java
0002171e394a0a82c30584afbc47760838f5381c
[]
no_license
co1248/jspworkspace
7ebdf36f3f44d18a0bcce5cd46b164f200811da6
25b966c2dfcfe5dc8f3d04405e5b3a25c9551585
refs/heads/master
2023-08-26T15:45:47.108918
2021-10-28T04:55:40
2021-10-28T04:55:40
384,344,342
0
0
null
null
null
null
UTF-8
Java
false
false
1,289
java
package com.saeyan.controller; import java.io.IOException; import javax.servlet.RequestDispatcher; 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 com.saeyan.dao.MemberDAO; import com.saeyan.dto.MemberVO; @WebServlet("/moviedelete.do") public class moviedeleteServlet extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String code = request.getParameter("code"); MemberDAO mDao = MemberDAO.getInstance(); MemberVO mVo = mDao.selectMemberByCode(code); request.setAttribute("member", mVo); RequestDispatcher dispatcher = request.getRequestDispatcher("movie/moviedelete.jsp"); dispatcher.forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String code = request.getParameter("code"); MemberDAO mDao = MemberDAO.getInstance(); mDao.deleteMember(code); response.sendRedirect("movielist.do"); } }
[ "noreply@github.com" ]
noreply@github.com
255742fcafce694b4502016211dc8c70304fbc6b
541f06d54ea64ac7ea7646a48ae02601527f2bb3
/app/src/main/java/com/travelguide/helpers/DeviceDimensionsHelper.java
40117357fa210994bbbbd2cfab840af9d1e36792
[ "Apache-2.0" ]
permissive
TravelGuide/TravelGuide
633dd04d5e8fe7e1cb0cd6c99d77be2fdb30a749
99291c27e7bb7a578190a50cda429474365b8653
refs/heads/master
2021-01-10T15:16:26.144779
2015-11-05T00:37:56
2015-11-05T00:37:56
43,860,560
1
0
null
2015-11-05T00:37:56
2015-10-08T03:36:58
Java
UTF-8
Java
false
false
1,608
java
package com.travelguide.helpers; import android.content.Context; import android.content.res.Resources; import android.util.DisplayMetrics; import android.util.TypedValue; /** * Authored by @nesquena * Obtained from GitHub * * @see <a href="https://gist.github.com/nesquena/318b6930aac3a56f96a4">https://gist.github.com/nesquena/318b6930aac3a56f96a4</a> */ public class DeviceDimensionsHelper { // DeviceDimensionsHelper.getDisplayWidth(context) => (display width in pixels) public static int getDisplayWidth(Context context) { DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); return displayMetrics.widthPixels; } // DeviceDimensionsHelper.getDisplayHeight(context) => (display height in pixels) public static int getDisplayHeight(Context context) { DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); return displayMetrics.heightPixels; } // DeviceDimensionsHelper.convertDpToPixel(25f, context) => (25dp converted to pixels) public static float convertDpToPixel(float dp, Context context) { Resources r = context.getResources(); return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, r.getDisplayMetrics()); } // DeviceDimensionsHelper.convertPixelsToDp(25f, context) => (25px converted to dp) public static float convertPixelsToDp(float px, Context context) { Resources r = context.getResources(); DisplayMetrics metrics = r.getDisplayMetrics(); float dp = px / (metrics.densityDpi / 160f); return dp; } }
[ "praveen.86@gmail.com" ]
praveen.86@gmail.com
7ca63029b24b67614d715835bfb0f27ece9cf363
1c6894ecafcab0a1468b41075057c763b4dfb22f
/kulun_jetpack/app/src/main/java/com/kulun/energynet/mine/CarbindApplyActivity.java
063506b2f2d04bbfb3f6d39d83ebc3df5a0b0ed9
[]
no_license
wannaRunaway/klwork
3184f0ea2299d9ee3f97ade63f7665c3467ada80
694615cad7e002aba0c90dfc3be8aba6200b63f6
refs/heads/master
2023-07-15T03:10:58.773921
2021-08-30T12:03:07
2021-08-30T12:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,668
java
package com.kulun.energynet.mine; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.DataBindingUtil; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; import com.kulun.energynet.R; import com.kulun.energynet.databinding.ActivityCarBindApplyBinding; import com.kulun.energynet.databinding.AdapterCarBindBinding; import com.kulun.energynet.model.CarApply; import com.kulun.energynet.model.ResponseModel; import com.kulun.energynet.network.InternetWorkManager; import com.kulun.energynet.network.MyObserver; import com.kulun.energynet.network.RxHelper; import com.kulun.energynet.utils.Utils; import com.scwang.smart.refresh.layout.api.RefreshLayout; import com.scwang.smart.refresh.layout.listener.OnRefreshListener; import java.util.ArrayList; import java.util.List; import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; import io.reactivex.rxjava3.functions.Consumer; import io.reactivex.rxjava3.schedulers.Schedulers; public class CarbindApplyActivity extends AppCompatActivity { private ActivityCarBindApplyBinding activityCarBindApplyBinding; private MyAdapter adapter; private List<CarApply> list = new ArrayList<>(); @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); activityCarBindApplyBinding = DataBindingUtil.setContentView(this, R.layout.activity_car_bind_apply); activityCarBindApplyBinding.title.left.setOnClickListener(v -> finish()); activityCarBindApplyBinding.title.title.setText("绑定申请"); adapter = new MyAdapter(list); activityCarBindApplyBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this)); activityCarBindApplyBinding.recyclerView.setAdapter(adapter); activityCarBindApplyBinding.smartRefresh.setOnRefreshListener(new OnRefreshListener() { @Override public void onRefresh(@NonNull RefreshLayout refreshLayout) { load(); } }); load(); } private void load(){ InternetWorkManager.getRequest().carapplyList() .compose(RxHelper.observableIOMain(this)) .subscribe(new MyObserver<List<CarApply>>() { @Override public void onSuccess(List<CarApply> data) { Utils.finishRefresh(activityCarBindApplyBinding.smartRefresh); if (data == null) { activityCarBindApplyBinding.image.setVisibility(list.size()==0?View.VISIBLE:View.GONE); return; } if (data.size() > 0){ list.clear(); list.addAll(data); activityCarBindApplyBinding.image.setVisibility(list.size()==0?View.VISIBLE:View.GONE); adapter.notifyDataSetChanged(); } } @Override public void onFail(int code, String message) { Utils.finishRefresh(activityCarBindApplyBinding.smartRefresh); } @Override public void onError() { Utils.finishRefresh(activityCarBindApplyBinding.smartRefresh); } @Override public void onClearToken() { Utils.toLogin(CarbindApplyActivity.this); } }); // new MyRequest().myRequest(API.carapplylist, false, null, false, this, null, // activityCarBindApplyBinding.smartRefresh, new Response() { // @Override // public void response(JsonObject json, JsonArray jsonArray,boolean isNull) { // if (isNull){ // activityCarBindApplyBinding.image.setVisibility(list.size()==0?View.VISIBLE:View.GONE); // } // if (jsonArray != null) { // list.clear(); // list.addAll(Mygson.getInstance().fromJson(jsonArray, new TypeToken<List<CarApply>>() { // }.getType())); // activityCarBindApplyBinding.image.setVisibility(list.size()==0?View.VISIBLE:View.GONE); // adapter.notifyDataSetChanged(); // } // } // }); } class MyAdapter extends RecyclerView.Adapter<MyViewHolder> { private List<CarApply> list; public MyAdapter(List<CarApply> list) { this.list = list; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(CarbindApplyActivity.this).inflate(R.layout.adapter_car_bind, null); AdapterCarBindBinding binding = AdapterCarBindBinding.bind(view); MyViewHolder holder = new MyViewHolder(view); holder.setBinding(binding); return holder; } @Override public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { CarApply carApply = list.get(position); holder.getBinding().plate.setText("车牌号:"+carApply.getPlate()+" "+carApply.getCar_type()); holder.getBinding().time.setText(carApply.getApply_time()); String status = "";//status=0申请中status=1通过status=2失败 switch (carApply.getStatus()) { case 0: status = "审核中"; holder.getBinding().status.setTextColor(getResources().getColor(R.color.black)); holder.getBinding().view.setVisibility(View.GONE); holder.getBinding().reason.setVisibility(View.GONE); break; case 1: status = "通过"; holder.getBinding().status.setTextColor(getResources().getColor(R.color.black)); holder.getBinding().view.setVisibility(View.GONE); holder.getBinding().reason.setVisibility(View.GONE); break; case 2: holder.getBinding().status.setTextColor(getResources().getColor(R.color.red)); if (TextUtils.isEmpty(carApply.getReason())){//reason为空则不显示 holder.getBinding().view.setVisibility(View.GONE); holder.getBinding().reason.setVisibility(View.GONE); }else { holder.getBinding().view.setVisibility(View.VISIBLE); holder.getBinding().reason.setVisibility(View.VISIBLE); holder.getBinding().reason.setText(carApply.getReason()); } status = "未通过"; break; default: break; } holder.getBinding().status.setText(status); String typestatus = ""; switch (carApply.getApply_type()){//0新增绑定 1换车解绑 2离职解绑 case 0: typestatus = "新增绑定"; break; case 1: typestatus = "换车解绑"; break; case 2: typestatus = "解绑"; break; default: break; } holder.getBinding().statusType.setText(typestatus); } @Override public int getItemCount() { return list.size(); } } class MyViewHolder extends RecyclerView.ViewHolder { private AdapterCarBindBinding binding; public AdapterCarBindBinding getBinding() { return binding; } public void setBinding(AdapterCarBindBinding binding) { this.binding = binding; } public MyViewHolder(@NonNull View itemView) { super(itemView); } } }
[ "xuedicr7@gmail.com" ]
xuedicr7@gmail.com
327da948a392dbdb3a36656638f32a5b7ccbbe8f
b94d2d814a7e40b4aba43ed5bb65bc7a65ad44ca
/app-audio-wav/src/main/java/com/afirez/wav/api/audio/AudioDecoder.java
8cd04d3c37eaaf2a7b05cfe64bac917ef7fff2d9
[]
no_license
afirez/knight
9b4251db55673c40c3d30872a00408b5b8c6314d
0a22ffc4ceb10671ed78e98f8a1728ee2a9c96bf
refs/heads/master
2020-04-03T15:31:58.053379
2019-09-14T06:48:53
2019-09-14T06:48:53
155,365,753
0
0
null
null
null
null
UTF-8
Java
false
false
5,943
java
package com.afirez.wav.api.audio; import android.annotation.TargetApi; import android.media.MediaCodec; import android.media.MediaCodecInfo; import android.media.MediaFormat; import android.os.Build; import android.util.Log; import java.io.IOException; import java.nio.ByteBuffer; /** * Created by afirez on 18-3-20. */ @TargetApi(Build.VERSION_CODES.JELLY_BEAN) public class AudioDecoder { private static final String TAG = "AudioDecoder"; private static final String DEFAULT_MIME = "audio/mp4a-latm"; private static final int DEFAULT_PROFILE = MediaCodecInfo.CodecProfileLevel.AACObjectLC; private static final int DEFAULT_SAMPLE_RATE = 44100; private static final int DEFAULT_CHANNELS = 1; private static final int DEFAULT_MAX_BUFFER_SIZE = 16384; private String mime; private int aacProfile; public AudioDecoder() { this.mime = DEFAULT_MIME; this.aacProfile = DEFAULT_PROFILE; } public interface OnFrameDecodedListener { void onFrameDecoded(byte[] decoded, long presentationTimeUs); } private OnFrameDecodedListener onFrameDecodedListener; public void setOnFrameDecodedListener(OnFrameDecodedListener onFrameDecodedListener) { this.onFrameDecodedListener = onFrameDecodedListener; } private volatile boolean isOpened; private volatile MediaCodec decoder; private boolean isFirstFrame; public boolean isOpened() { return isOpened; } public boolean open() { if (isOpened) { return true; } return open( DEFAULT_SAMPLE_RATE, DEFAULT_CHANNELS, DEFAULT_MAX_BUFFER_SIZE ); } public boolean open( int sampleRate, int channels, int maxBufferSize) { Log.i(TAG, "open: sampleRate: " + sampleRate + ",channels: " + channels + ",maxBufferSize: " + maxBufferSize ); if (isOpened) { return true; } try { decoder = MediaCodec.createDecoderByType(mime); MediaFormat format = new MediaFormat(); format.setString(MediaFormat.KEY_MIME, mime); format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, channels); format.setInteger(MediaFormat.KEY_SAMPLE_RATE, sampleRate); format.setInteger(MediaFormat.KEY_AAC_PROFILE, aacProfile); format.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, maxBufferSize); decoder.configure(format, null, null, 0); decoder.start(); isOpened = true; } catch (IOException e) { e.printStackTrace(); return false; } Log.i(TAG, "open audio decoder success !"); return true; } public void close() { Log.i(TAG, "close audio decoder +"); if (!isOpened || decoder == null) { Log.i(TAG, "close audio decoder -"); return; } MediaCodec theDecoder = decoder; decoder = null; theDecoder.stop(); theDecoder.release(); isOpened = false; Log.i(TAG, "close audio decoder -"); } public synchronized boolean decode(byte[] buffer, long presentationTimeUs) { Log.d(TAG, "decode: " + presentationTimeUs); if (!isOpened) { return false; } try { ByteBuffer[] inputBuffers = decoder.getInputBuffers(); int i = decoder.dequeueInputBuffer(1000); if (i > 0) { ByteBuffer inputBuffer = inputBuffers[i]; inputBuffer.clear(); inputBuffer.put(buffer); /** * Some formats, notably AAC audio and MPEG4, H.264 and H.265 video formats * require the actual data to be prefixed by a number of buffers containing * setup data, or codec specific data. When processing such compressed formats, * this data must be submitted to the codec after start() and before any frame data. * Such data must be marked using the flag BUFFER_FLAG_CODEC_CONFIG in a call to queueInputBuffer. */ int flags = isFirstFrame ? MediaCodec.BUFFER_FLAG_CODEC_CONFIG : 0; isFirstFrame = false; decoder.queueInputBuffer( i, 0, buffer.length, presentationTimeUs, flags ); } } catch (Throwable throwable) { throwable.printStackTrace(); return false; } Log.d(TAG, "decode -"); return false; } public synchronized boolean retrieve() { Log.d(TAG, "retrieve decoded frame +"); if (!isOpened) { return false; } try { ByteBuffer[] outputBuffers = decoder.getOutputBuffers(); MediaCodec.BufferInfo bufferInfo = new MediaCodec.BufferInfo(); int i = decoder.dequeueOutputBuffer(bufferInfo, 1000); if (i > 0) { Log.d(TAG, "size: " + bufferInfo.size); ByteBuffer outputBuffer = outputBuffers[i]; byte[] theBuffer = new byte[bufferInfo.size]; outputBuffer.position(bufferInfo.offset); outputBuffer.limit(bufferInfo.offset + bufferInfo.size); outputBuffer.get(theBuffer, 0, bufferInfo.size); if (onFrameDecodedListener != null) { onFrameDecodedListener.onFrameDecoded(theBuffer, bufferInfo.presentationTimeUs); } } } catch (Throwable throwable) { throwable.printStackTrace(); return false; } Log.d(TAG, "retrieve decoded frame +"); return true; } }
[ "afirez.io@gmail.com" ]
afirez.io@gmail.com
6b950b978b1c5ba8d000d1bcabd16f15705f3cab
7aaf9abe3145986d2f2c68a43588128fea9ded42
/app/src/main/java/com/example/amit/androidmainproject/MainActivity.java
e37786b04df5645062d4c00cc890ea7a741bc7b8
[]
no_license
arohablue/AndroidMainProject
4781506d7e11fe159be010a4cd155528bed58a90
2c73efc9ad118e1f4c88771791e8c9915e3ef58d
refs/heads/master
2020-04-07T11:50:59.103314
2019-05-27T05:22:54
2019-05-27T05:22:54
158,343,884
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package com.example.amit.androidmainproject; import android.content.Context; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.example.navimate.LibClass; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); LibClass.libFun(getApplicationContext(), "Calling Library function"); } }
[ "amit42308@gmail.com" ]
amit42308@gmail.com
343457116db1194057f81d72e798f990174f052a
82823854edeab7f9f61da46f36a991cf0d6668da
/library-onekeyshare/src/androidTest/java/com/smalltown/library_onekeyshare/ApplicationTest.java
4791928596f4ef76c05b2b353e73058312d506dd
[]
no_license
ychy00001/ShareSdkLibs
bf7e3a9e11e22f1a3d39a48bed79010c6efef9d2
7dbdfcbdf606a5553c07ab8f94f9665ced2f9e50
refs/heads/master
2021-01-10T01:12:15.332594
2015-12-11T06:26:38
2015-12-11T06:26:38
47,809,068
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package com.smalltown.library_onekeyshare; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "yangchunyu00001@163.com" ]
yangchunyu00001@163.com
f97dc0dfb5a0a8a855e249e4b439d7947f3d1736
570a861182e097abe43b3a97e0908f2d10c4924d
/src/test/java/com/example/takeAhike/TakeAhikeApplicationTests.java
37684e75c5ae0142d5ab25f53fb6674fec3f9912
[]
no_license
therealandrewrea/Take-a-hike
eccfbe50fad1f4469b7f156c3e704436c6bc2701
25dd0072db6f402729dfea45aa3578ca2d15b1e6
refs/heads/master
2021-08-17T14:23:03.152133
2017-11-08T00:07:37
2017-11-08T00:07:37
96,624,773
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.example.takeAhike; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class TakeAhikeApplicationTests { @Test public void contextLoads() { } }
[ "therealandrewrea@gmail.com" ]
therealandrewrea@gmail.com
19ba15d4e7029da0a60f99c0db806db05a10c0d5
9cb02e44b1d08f7077a53a7e6e4918ab57f30653
/java8/src/org/example/java8/interface2/TestRunner.java
bc406833bcbd4fd267dc0d81fc40c3ec4f24f7ca
[]
no_license
jluzio/dev-tests
75c3345386757ff541a6f2e9b491d9b3ad321ec2
5d7cf5f18033d73e67b9131d0dcf3068327b0ba9
refs/heads/master
2021-01-10T09:49:19.588669
2016-03-02T12:59:51
2016-03-02T12:59:51
52,962,881
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package org.example.java8.interface2; public class TestRunner { public static void main(String[] args) { new DefaultImpl().defaultMethod(); new OverrideDefaultImpl().defaultMethod(); } }
[ "joao.luzio@gmail.com" ]
joao.luzio@gmail.com
0274a2aa0657d2b424cc178cce32b2c4df2e0bf5
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14227-21-13-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/XWiki_ESTest.java
3cd3906c250323cd1efdd7f8d3dd6d6412a46556
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
/* * This file was automatically generated by EvoSuite * Mon Jan 20 11:18:39 UTC 2020 */ package com.xpn.xwiki; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWiki_ESTest extends XWiki_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
559608b8372e307a3cc63e605ce129bfe783cab3
357be0226a4e3ba5ea16ab4c71f8a293f11f0aeb
/platform-tools/spikes/s3-url.updater/src/main/java/org/ekstep/graph/util/DriverUtil.java
4228c032d509f9ad7bc406abe68451571e3c0957
[ "MIT" ]
permissive
krgauraw/sunbird-learning-platform
105afdf4ea2dcf1544f78bba63e2e12b2356e7ad
90f93d677aba38d275635ca3af08874d303734f8
refs/heads/master
2023-07-21T23:49:28.567122
2019-07-08T06:33:50
2019-07-08T06:33:50
177,784,091
1
1
MIT
2019-04-29T05:33:35
2019-03-26T12:28:25
Java
UTF-8
Java
false
false
1,622
java
package org.ekstep.graph.util; import java.util.HashMap; import java.util.Map; import org.neo4j.driver.v1.Config; import org.neo4j.driver.v1.Config.ConfigBuilder; import org.neo4j.driver.v1.Config.EncryptionLevel; import org.neo4j.driver.v1.Config.TrustStrategy; import org.neo4j.driver.v1.Driver; import org.neo4j.driver.v1.GraphDatabase; public class DriverUtil { private static Map<String, Driver> driverMap = new HashMap<String, Driver>(); public static Driver getDriver(String path) { Driver driver = driverMap.get(path); if (null == driver) { driver = loadDriver(path); driverMap.put(path, driver); } return driver; } public static Driver loadDriver(String path) { Driver driver = null; driver = GraphDatabase.driver(getRoute(path), getConfig()); if (null != driver) registerShutdownHook(driver); return driver; } public static String getRoute(String url) { String routeUrl = "bolt://" + url; return routeUrl; } public static Config getConfig() { ConfigBuilder config = Config.build(); config.withEncryptionLevel(EncryptionLevel.NONE); config.withMaxIdleSessions(20); config.withTrustStrategy(getTrustStrategy()); return config.toConfig(); } private static TrustStrategy getTrustStrategy() { TrustStrategy trustStrategy = TrustStrategy.trustAllCertificates(); return trustStrategy; } private static void registerShutdownHook(Driver driver) { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { System.out.println("Closing Neo4j Graph Driver..."); if (null != driver) driver.close(); } }); } }
[ "rayulu@Rayulus-MacBook-Pro.local" ]
rayulu@Rayulus-MacBook-Pro.local
5b7d9fd9d7f0088d29c57ee7af7cb7958cee6ca9
106199595af36c884423c1ac118163a071819c89
/src/main/java/com/zjx/testJTA/service/UserService.java
ad352ac9173724d59b11ab44b83a9a525340c62a
[]
no_license
476554858/testJTA
a808e9e334772724b8962f4f04472fa96216fd35
61e611975e2b5cfd2cdd113bc3c3758cf738c38f
refs/heads/master
2022-11-22T00:45:38.074335
2019-09-08T11:44:26
2019-09-08T11:44:26
204,903,734
1
0
null
null
null
null
UTF-8
Java
false
false
67
java
package com.zjx.testJTA.service; public interface UserService { }
[ "476554858@qq.com" ]
476554858@qq.com
0620f2c6097f0167ea1ac45c269fc62aa5c689a6
7c45b59e178e14e9f8cdd123a7785db38b2994b4
/TestingSelenium/SeleniumTesting/src/test/java/test/Test.java
c27764a9535dd4487b444ab2a4b7a7cc93cceb8a
[]
no_license
Lbr1/Tests
774c0f17eb191732f423ebd8bd5df0399d45d51c
2093885dedf7e0f0efdeebba197c955f7d3f4b1c
refs/heads/main
2023-05-08T04:12:27.780463
2021-05-25T19:57:34
2021-05-25T19:57:34
370,812,395
0
0
null
null
null
null
UTF-8
Java
false
false
1,889
java
package test; import org.junit.Assert; import org.junit.jupiter.api.BeforeAll; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import test.newwindow.NewWindow; import test.steps.ElementActions; import java.util.List; import static java.lang.Thread.sleep; public class Test { private static WebDriver driver; private static NewWindow newWindow; private static ElementActions elementActions; @BeforeAll public static void initialTestConditions(){ newWindow = new NewWindow(); driver = newWindow.createNewInstanceBrowser(); elementActions = new ElementActions(driver); } @org.junit.jupiter.api.Test public void testSubmitWithoutAcceptingAllRules() throws InterruptedException { driver.navigate().to("https://careers.xpand-it.com/?utm_source=website_xpand-it&utm_medium=banner_destaque_botao&utm_campaign=careers_website_launch"); sleep(1000); elementActions.clickCANDIDATE(); elementActions.clickCookie(); sleep(3000); elementActions.clickListOpportunities(); sleep(3000); elementActions.sendKeys(elementActions.nameInput(), "Luisinho Filipe"); elementActions.sendKeys(elementActions.emailInput(), "xpander@xpand-it.com"); elementActions.sendKeys(elementActions.phoneInput(), "964565555"); elementActions.countryInput(); elementActions.selectOffer(); elementActions.selectUniversityByValue(elementActions.selectUniversity(), "UM - Universidade do Minho \t"); sleep(3000); elementActions.sendCV(); sleep(3000); elementActions.submit(); sleep(3000); String errorMessage = elementActions.error(); Assert.assertEquals("This field is required.", errorMessage); } }
[ "lbrbrito@gmail.com" ]
lbrbrito@gmail.com
260ab8c6a70f4271640443e8e0edf41589cd8fc3
49b436df19c50712e177651df7e477d284e3addb
/app/src/main/java/com/paidapp/laughtercafe/Callback/ILoadTimeFromFirebaseListener.java
64ede5441d5cf3753d3d42cc22a3fedc09653d4f
[]
no_license
aimenya-andrew/My-Restaurant
069339e753aa78838ae5190a85cf6384ac2b2be2
340ce393e0e7df1a278bf145a1bcb69e1682f89c
refs/heads/master
2023-01-02T10:43:44.875220
2020-10-29T19:30:02
2020-10-29T19:30:02
304,442,592
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.paidapp.laughtercafe.Callback; import com.paidapp.laughtercafe.Model.OrderModel; public interface ILoadTimeFromFirebaseListener { void onLoadTimeSuccess(OrderModel order, long estimateTimeInMs); void onLoadOnlyTimeSuccess(long estimateTimeInMs); void onLoadTimeFailed(String message); }
[ "ehikioyaandrew@gmail.com" ]
ehikioyaandrew@gmail.com
1fd202114c6c6aaaee910fd2a78a0cdc13aad95d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_f8d0a6cbde449a7dc09d6e69dabeb7c85ebec9da/ShowAnnotationOperation/2_f8d0a6cbde449a7dc09d6e69dabeb7c85ebec9da_ShowAnnotationOperation_s.java
933ece67ff313a279575579e9a30e31bd73f21b3
[]
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
17,319
java
/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.team.internal.ccvs.ui.operations; import java.io.*; import java.text.DateFormat; import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialogWithToggle; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.revisions.Revision; import org.eclipse.jface.text.revisions.RevisionInformation; import org.eclipse.jface.text.source.LineRange; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Display; import org.eclipse.team.core.TeamException; import org.eclipse.team.core.variants.IResourceVariant; import org.eclipse.team.internal.ccvs.core.*; import org.eclipse.team.internal.ccvs.core.client.*; import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption; import org.eclipse.team.internal.ccvs.core.client.listeners.AnnotateListener; import org.eclipse.team.internal.ccvs.core.connection.CVSServerException; import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot; import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo; import org.eclipse.team.internal.ccvs.core.util.KnownRepositories; import org.eclipse.team.internal.ccvs.ui.*; import org.eclipse.team.internal.ccvs.ui.Policy; import org.eclipse.team.internal.core.TeamPlugin; import org.eclipse.team.internal.ui.Utils; import org.eclipse.team.internal.ui.history.GenericHistoryView; import org.eclipse.team.ui.history.IHistoryPage; import org.eclipse.ui.*; import org.eclipse.ui.ide.IDE; import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor; /** * An operation to fetch the annotations for a file from the repository and * display them in the annotations view. */ public class ShowAnnotationOperation extends CVSOperation { final private ICVSResource fCVSResource; final private String fRevision; private final boolean binary; public ShowAnnotationOperation(IWorkbenchPart part, ICVSResource cvsResource, String revision, boolean binary) { super(part); fCVSResource= cvsResource; fRevision= revision; this.binary = binary; } /* (non-Javadoc) * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#execute(org.eclipse.core.runtime.IProgressMonitor) */ protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException { monitor.beginTask(null, 120); // Get the annotations from the repository. final AnnotateListener listener= new AnnotateListener(); fetchAnnotation(listener, fCVSResource, fRevision, Policy.subMonitorFor(monitor, 80)); // this is not needed if there is a live editor - but we don't know, and the user might have closed the live editor since... fetchContents(listener, Policy.subMonitorFor(monitor, 20)); // this is not needed if there is no live annotate final RevisionInformation information= createRevisionInformation(listener, Policy.subMonitorFor(monitor, 20)); // Open the view and display it from the UI thread. final Display display= getPart().getSite().getShell().getDisplay(); display.asyncExec(new Runnable() { public void run() { boolean useQuickDiffAnnotate = false; //If the file being annotated is not binary, check to see if we can use the quick //annotate. Until we are able to show quick diff annotate on read only text editors //we can't make use of it for binary files/remote files. if (!binary) useQuickDiffAnnotate = promptForQuickDiffAnnotate(); if (useQuickDiffAnnotate){ //is there an open editor for the given input? If yes, use live annotate AbstractDecoratedTextEditor editor= getEditor(); if (editor != null){ editor.showRevisionInformation(information, "org.eclipse.quickdiff.providers.CVSReferenceProvider"); //$NON-NLS-1$ try { GenericHistoryView historyView = (GenericHistoryView) getPart().getSite().getPage().showView(GenericHistoryView.VIEW_ID); historyView.showHistoryFor(fCVSResource.getIResource()); IHistoryPage historyPage = historyView.getHistoryPage(); if (historyPage instanceof CVSHistoryPage){ CVSHistoryPage cvsHistoryPage = (CVSHistoryPage) historyPage; cvsHistoryPage.setMode(CVSHistoryPage.REMOTE_MODE); } } catch (PartInitException e) { CVSException.wrapException(e); } } } else showView(listener); } }); monitor.done(); } /* (non-Javadoc) * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName() */ protected String getTaskName() { return CVSUIMessages.ShowAnnotationOperation_taskName; } protected boolean hasCharset(ICVSResource cvsResource, InputStream contents) { try { return TeamPlugin.getCharset(cvsResource.getName(), contents) != null; } catch (IOException e) { // Assume that the contents do have a charset return true; } } /** * Shows the view once the background operation is finished. This must be called * from the UI thread. * * @param listener The listener with the results. */ protected void showView(final AnnotateListener listener) { final IWorkbench workbench= PlatformUI.getWorkbench(); final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); final String defaultPerspectiveID= promptForPerspectiveSwitch(); if (defaultPerspectiveID != null) { try { workbench.showPerspective(defaultPerspectiveID, window); } catch (WorkbenchException e) { Utils.handleError(window.getShell(), e, CVSUIMessages.ShowAnnotationOperation_0, e.getMessage()); } } try { final AnnotateView view = AnnotateView.openInActivePerspective(); view.showAnnotations(fCVSResource, listener.getCvsAnnotateBlocks(), listener.getContents()); } catch (PartInitException e) { CVSUIPlugin.log(e); } catch (CVSException e) { CVSUIPlugin.log(e); } } private AbstractDecoratedTextEditor getEditor() { final IWorkbench workbench= PlatformUI.getWorkbench(); final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IEditorReference[] references= window.getActivePage().getEditorReferences(); IResource resource= fCVSResource.getIResource(); if (resource == null) return null; for (int i= 0; i < references.length; i++) { IEditorReference reference= references[i]; try { if (resource != null && resource.equals(reference.getEditorInput().getAdapter(IFile.class))) { IEditorPart editor= reference.getEditor(false); if (editor instanceof AbstractDecoratedTextEditor) return (AbstractDecoratedTextEditor) editor; else { //editor opened is not a text editor - reopen file using the defualt text editor IEditorPart part = getPart().getSite().getPage().openEditor(new FileEditorInput((IFile) resource), IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID, true, IWorkbenchPage.MATCH_NONE); if (part != null && part instanceof AbstractDecoratedTextEditor) return (AbstractDecoratedTextEditor)part; } } } catch (PartInitException e) { // ignore } } //no existing editor references found, try to open a new editor for the file if (resource instanceof IFile){ try { IEditorDescriptor descrptr = IDE.getEditorDescriptor((IFile) resource); //try to open the associated editor only if its an internal editor if (descrptr.isInternal()){ IEditorPart part = IDE.openEditor(getPart().getSite().getPage(), (IFile) resource); if (part instanceof AbstractDecoratedTextEditor) return (AbstractDecoratedTextEditor)part; //editor opened is not a text editor - close it getPart().getSite().getPage().closeEditor(part, false); } //open file in default text editor IEditorPart part = IDE.openEditor(getPart().getSite().getPage(), (IFile) resource, IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID); if (part != null && part instanceof AbstractDecoratedTextEditor) return (AbstractDecoratedTextEditor)part; } catch (PartInitException e) { } } return null; } private void fetchAnnotation(AnnotateListener listener, ICVSResource cvsResource, String revision, IProgressMonitor monitor) throws CVSException { monitor = Policy.monitorFor(monitor); monitor.beginTask(null, 100); final ICVSFolder folder = cvsResource.getParent(); final FolderSyncInfo info = folder.getFolderSyncInfo(); final ICVSRepositoryLocation location = KnownRepositories.getInstance().getRepository(info.getRoot()); final Session session = new Session(location, folder, true /*output to console*/); session.open(Policy.subMonitorFor(monitor, 10), false /* read-only */); try { final Command.QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness(); try { CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE); List localOptions = new ArrayList(); if (revision != null) { localOptions.add(Annotate.makeRevisionOption(revision)); } if (binary) { localOptions.add(Annotate.FORCE_BINARY_ANNOTATE); } final IStatus status = Command.ANNOTATE.execute(session, Command.NO_GLOBAL_OPTIONS, (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]), new ICVSResource[]{cvsResource}, listener, Policy.subMonitorFor(monitor, 90)); if (status.getCode() == CVSStatus.SERVER_ERROR) { throw new CVSServerException(status); } } finally { CVSProviderPlugin.getPlugin().setQuietness(quietness); monitor.done(); } } finally { session.close(); } } private RevisionInformation createRevisionInformation(final AnnotateListener listener, IProgressMonitor monitor) { Map logEntriesByRevision= new HashMap(); if (fCVSResource instanceof ICVSFile) { try { ILogEntry[] logEntries= ((ICVSFile) fCVSResource).getLogEntries(Policy.subMonitorFor(monitor, 20)); for (int i= 0; i < logEntries.length; i++) { ILogEntry entry= logEntries[i]; logEntriesByRevision.put(entry.getRevision(), entry); } } catch (TeamException e) { CVSUIPlugin.log(e); } } final CommitterColors colors= CommitterColors.getDefault(); RevisionInformation info= new RevisionInformation(); HashMap sets= new HashMap(); List annotateBlocks= listener.getCvsAnnotateBlocks(); for (Iterator blocks= annotateBlocks.iterator(); blocks.hasNext();) { final CVSAnnotateBlock block= (CVSAnnotateBlock) blocks.next(); final String revisionString= block.getRevision(); Revision revision= (Revision) sets.get(revisionString); if (revision == null) { final ILogEntry entry= (ILogEntry) logEntriesByRevision.get(revisionString); revision= new Revision() { public Object getHoverInfo() { if (entry != null) return "<b>" + entry.getAuthor() + " " + entry.getRevision() + " " + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(entry.getDate()) + "</b><p>" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ entry.getComment() + "</p>"; //$NON-NLS-1$ return block.toString().substring(0, block.toString().indexOf(" (")); //$NON-NLS-1$ } private String getCommitterId() { return block.toString().substring(0, block.toString().indexOf(' ')); } public String getId() { return revisionString; } public Date getDate() { return entry.getDate(); } public RGB getColor() { return colors.getCommitterRGB(getCommitterId()); } }; sets.put(revisionString, revision); info.addRevision(revision); } revision.addRange(new LineRange(block.getStartLine(), block.getEndLine() - block.getStartLine() + 1)); } return info; } private void fetchContents(final AnnotateListener listener, IProgressMonitor monitor) { try { if (hasCharset(fCVSResource, listener.getContents())) { listener.setContents(getRemoteContents(fCVSResource, monitor)); } } catch (CoreException e) { // Log and continue, using the original fetched contents CVSUIPlugin.log(e); } } private InputStream getRemoteContents(ICVSResource resource, IProgressMonitor monitor) throws CoreException { final ICVSRemoteResource remote = CVSWorkspaceRoot.getRemoteResourceFor(resource); if (remote == null) { return new ByteArrayInputStream(new byte[0]); } final IStorage storage = ((IResourceVariant)remote).getStorage(monitor); if (storage == null) { return new ByteArrayInputStream(new byte[0]); } return storage.getContents(); } /** * @return The ID of the perspective if the perspective needs to be changed, * null otherwise. */ private String promptForPerspectiveSwitch() { // check whether we should ask the user. final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore(); final String option = store.getString(ICVSUIConstants.PREF_CHANGE_PERSPECTIVE_ON_SHOW_ANNOTATIONS); final String desiredID = store.getString(ICVSUIConstants.PREF_DEFAULT_PERSPECTIVE_FOR_SHOW_ANNOTATIONS); if (option.equals(MessageDialogWithToggle.ALWAYS)) return desiredID; // no, always switch if (option.equals(MessageDialogWithToggle.NEVER)) return null; // no, never switch // Check whether the desired perspective is already active. final IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry(); final IPerspectiveDescriptor desired = registry.findPerspectiveWithId(desiredID); final IWorkbenchPage page = CVSUIPlugin.getActivePage(); if (page != null) { final IPerspectiveDescriptor current = page.getPerspective(); if (current != null && current.getId().equals(desiredID)) { return null; // it is active, so no prompt and no switch } } if (desired != null) { String message;; String desc = desired.getDescription(); if (desc == null) { message = NLS.bind(CVSUIMessages.ShowAnnotationOperation_2, new String[] { desired.getLabel() }); } else { message = NLS.bind(CVSUIMessages.ShowAnnotationOperation_3, new String[] { desired.getLabel(), desc }); } // Ask the user whether to switch final MessageDialogWithToggle m = MessageDialogWithToggle.openYesNoQuestion( Utils.getShell(null), CVSUIMessages.ShowAnnotationOperation_1, message, CVSUIMessages.ShowAnnotationOperation_4, false /* toggle state */, store, ICVSUIConstants.PREF_CHANGE_PERSPECTIVE_ON_SHOW_ANNOTATIONS); final int result = m.getReturnCode(); switch (result) { // yes case IDialogConstants.YES_ID: case IDialogConstants.OK_ID : return desiredID; // no case IDialogConstants.NO_ID : return null; } } return null; } /** * Returns true if the user wishes to always use the live annotate view, false otherwise. * @return */ private boolean promptForQuickDiffAnnotate(){ //check whether we should ask the user. final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore(); final String option = store.getString(ICVSUIConstants.PREF_USE_QUICKDIFFANNOTATE); if (option.equals(MessageDialogWithToggle.ALWAYS)) return true; //use live annotate final MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(Utils.getShell(null), CVSUIMessages.ShowAnnotationOperation_QDAnnotateTitle, CVSUIMessages.ShowAnnotationOperation_QDAnnotateMessage,CVSUIMessages.ShowAnnotationOperation_4, false, store, ICVSUIConstants.PREF_USE_QUICKDIFFANNOTATE); final int result = dialog.getReturnCode(); switch (result) { //yes case IDialogConstants.YES_ID: case IDialogConstants.OK_ID : return true; } return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
94bdabf7918f19a2885959e5dee95ee895e193d8
c9582dfc40c324edeaedcf487e863c65b8178f9a
/src/main/java/com/myspace/currencyrules/CurrentCheckResult.java
6ad2c2bc98fc7efa3dfac9d400b9965dad9c70f3
[ "Apache-2.0" ]
permissive
AndyYuen/currencyValidation
4281df32fb30417a7b82471847d27c4544a5e5f6
2d1af070f9bfcf73cce7dc76516b005d28c1a4ab
refs/heads/master
2022-07-16T05:26:13.503620
2022-07-03T23:41:45
2022-07-03T23:41:45
190,969,557
0
0
Apache-2.0
2023-09-12T13:56:31
2019-06-09T05:52:48
Java
UTF-8
Java
false
false
325
java
package com.myspace.currencyrules; public class CurrentCheckResult { static final long serialVersionUID = 1L; private boolean valid; public CurrentCheckResult(boolean valid) { this.valid = valid; } public boolean isValid() { return valid; } public void setValid(boolean valid) { this.valid = valid; } }
[ "ayuen@redhat.com" ]
ayuen@redhat.com
a31fa977efe2052759d444398a986096e2c85af5
172931299ae1008d07c68c8d32abcdcbd2cf29fc
/Generics/Wein.java
33de9742e067a9537a7b242bbf8d98ceb99f4635
[]
no_license
carbo/Java_Basics_1
e7578c59e64b4b2cdfa306adbad4f776daea3bff
cc2e15c4ad8f6299b6e3c56ab1a604296de266d4
refs/heads/master
2021-01-10T13:30:46.627635
2016-01-31T13:51:29
2016-01-31T13:51:29
50,728,396
0
0
null
null
null
null
UTF-8
Java
false
false
275
java
package Generics; public class Wein extends Getraenk { private String herkunft; public String getHerkunft() { return herkunft; } public String toString(){ return ("Wein aus " + herkunft);} public Wein (String origin) { herkunft = origin; } }
[ "cbokeloh@gmail.com" ]
cbokeloh@gmail.com
9382c6dcad7fd370bb483414119258da9f66ece9
83d56024094d15f64e07650dd2b606a38d7ec5f1
/Construccion/PROYECTO.SICC/MAE/ENTIDADES/src/es/indra/sicc/entidades/mae/PreguntaEncuestaLocal.java
34bf8ea3bff5d6e0b9ffabbbc6b8b3c87b25680e
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,464
java
package es.indra.sicc.entidades.mae; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Column; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import java.io.Serializable; @Entity @Table(name="MAE_PREGU_ENCUE") @NamedQueries({ @NamedQuery(name="PreguntaEncuestaLocal.FindAll",query="select object(o) from PreguntaEncuestaLocal o") }) public class PreguntaEncuestaLocal implements Serializable { public PreguntaEncuestaLocal() {} public PreguntaEncuestaLocal(Long oid, String codPreg, Long valPesoPreg, Long enseOidEncu) { this.oid = oid; this.codigoPregunta = codPreg; this.peso = valPesoPreg; this.oidEncu = enseOidEncu; } @Id @Column(name="OID_PREG") private Long oid; @Column(name="COD_PREG") private String codigoPregunta; @Column(name="VAL_PESO_PREG") private Long peso; @Column(name="ENSE_OID_ENCU") private Long oidEncu; public Long getOid() {return oid;} public Long getPrimaryKey() {return oid;} public String getCodigoPregunta() {return codigoPregunta;} public void setCodigoPregunta(String codigoPregunta){this.codigoPregunta=codigoPregunta;} public Long getPeso() {return peso;} public void setPeso(Long peso){this.peso=peso;} public Long getOidEncu() {return oidEncu;} public void setOidEncu(Long oidEncu){this.oidEncu=oidEncu;} }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
cdbc6fba6e7c69d04938840884a96cc76cc19ff0
66a57b0c142fdd77c4048a19e4c0ae3f16ba97f8
/components/dbutil/src/main/java/com/wso2telco/core/dbutils/JdbcException.java
57fd922ce89d91ffe444536ebf431756e46211bf
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
udithad/core-util
6af9e225d8b8a546724232fa1118f689a1948bdc
0849edb209460ea5c12bcc96a587e10548c55eb7
refs/heads/master
2021-01-22T18:14:44.485701
2017-03-07T17:06:07
2017-03-07T17:06:07
85,068,804
0
0
null
2017-03-15T12:18:28
2017-03-15T12:18:28
null
UTF-8
Java
false
false
2,295
java
/******************************************************************************* * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. * * WSO2.Telco Inc. licences 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.wso2telco.core.dbutils; import java.sql.Connection; // TODO: Auto-generated Javadoc /** * The Class JdbcException. */ class JdbcException extends Exception { /** The conn. */ Connection conn; /** * Instantiates a new jdbc exception. * * @param e the e */ public JdbcException(Exception e) { super(e.getMessage()); conn = null; } /** * Instantiates a new jdbc exception. * * @param e the e * @param con the con */ public JdbcException(Exception e, Connection con) { super(e.getMessage()); conn = con; } /** * Handle. */ public void handle() { System.out.println(getMessage()); System.out.println(); if (conn != null) { try { System.out.println("--Rollback the transaction-----"); conn.rollback(); System.out.println(" Rollback done!"); } catch (Exception e) { }; } } // handle /** * Handle expected err. */ public void handleExpectedErr() { System.out.println(); System.out.println( "**************** Expected Error ******************\n"); System.out.println(getMessage()); System.out.println( "**************************************************"); } // handleExpectedError } // JdbcException
[ "shashika@wso2telco.com" ]
shashika@wso2telco.com
25764c919a4cf54d11f8138ab469606898252a08
cc5c673830fdb7442c8bee92f8ac9e721d8b3f16
/app/src/main/java/com/example/starwarsinfo/Fragments/PeopleFragment.java
90fd9a76c95c3460ed232ce396141a4021a2fcf0
[]
no_license
Abigail-Rguez/SW-InfoA
a071db86329f0ab8c035a93c699c2e555501beaf
68ec4ceda08663e85e143eddf7298757154a994e
refs/heads/master
2023-01-09T10:48:06.987997
2020-11-17T04:40:32
2020-11-17T04:40:32
313,426,995
0
0
null
null
null
null
UTF-8
Java
false
false
4,453
java
package com.example.starwarsinfo.Fragments; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.example.starwarsinfo.ApiContants; import com.example.starwarsinfo.Models.BasePeopleObject; import com.example.starwarsinfo.R; import com.example.starwarsinfo.swService; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; public class PeopleFragment extends Fragment { RecyclerView rvPeople; Retrofit retrofit; swService service; Callback<BasePeopleObject> cbHandler = new Callback<BasePeopleObject>() { @Override public void onResponse(Call<BasePeopleObject> call, Response<BasePeopleObject> response) { Log.e("TYAM","Web Response"); if (!response.isSuccessful()) { Log.e("TYAM","Error "+ response.isSuccessful()); return; } BasePeopleObject bpo = response.body(); if (bpo == null || bpo.results == null) return; Log.e("TYAM","Dibujando datos"); rvPeople.setLayoutManager(new LinearLayoutManager(getContext())); rvPeople.setAdapter(new PeopleAdapter(getContext(),bpo)); } @Override public void onFailure(Call<BasePeopleObject> call, Throwable t) { Log.e("TYAM", t.getMessage()); } }; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_people, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); retrofit = new Retrofit.Builder() .baseUrl(ApiContants.API_BASE_URL) .addConverterFactory(GsonConverterFactory.create()) .build(); service = retrofit.create(swService.class); rvPeople = view.findViewById(R.id.rvFPeople); Log.e("TYAM","onViewCreated Exit"); } @Override public void onResume() { super.onResume(); Call<BasePeopleObject> foo = service.getPeople(); foo.enqueue(cbHandler); Log.e("TYAM","onResume Finished"); } } class PeopleAdapter extends RecyclerView.Adapter<PeopleViewHolder>{ private final BasePeopleObject baseObject; private final Context context; PeopleAdapter(Context context, BasePeopleObject baseObject){ this.baseObject = baseObject; this.context = context; } @NonNull @Override public PeopleViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(context).inflate (R.layout.item_people, parent, false); return new PeopleViewHolder(view); } @Override public void onBindViewHolder(@NonNull PeopleViewHolder holder, int position) { String name =baseObject.results.get(position).name; String height =baseObject.results.get(position).height; String year_birth =baseObject.results.get(position).birth_year; holder.bind(name,height,year_birth); } @Override public int getItemCount() { return baseObject.results.size(); } } class PeopleViewHolder extends RecyclerView.ViewHolder { private final TextView people_name; private final TextView people_height; private final TextView people_birth_year; public PeopleViewHolder(@NonNull View itemView) { super(itemView); people_name = itemView.findViewById(R.id.tv_people_name); people_height = itemView.findViewById(R.id.tv_people_height); people_birth_year = itemView.findViewById(R.id.tv_people_yearbirth); } void bind (String name, String height, String birth){ people_name.setText(name); people_height.setText("Altura: " + height); people_birth_year.setText("Nacimiento: " + birth); } }
[ "abii091015@gmail.com" ]
abii091015@gmail.com
764e72da5310e4b0d8e80362ee1426c1c186683d
d4681b4af42380d0db7113a8254713e07de03d98
/teachertlk.web/src/main/java/com/venus/finance/thread/SaveLatestQuote.java
319e1c00ecc585832a17efd0d62cc49677e2b539
[]
no_license
xiaowulf/html5quote
bf404af772ef1d9c4e5c8d8a65e80e63e7a17d87
5c1fa2341a06d8c6c8d30f6dd1055f6b75afee3a
refs/heads/master
2022-12-23T19:07:30.136342
2021-06-28T07:21:58
2021-06-28T07:21:58
224,561,917
1
0
null
2022-12-16T10:01:22
2019-11-28T03:23:09
CSS
UTF-8
Java
false
false
3,368
java
package com.venus.finance.thread; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; import com.venus.finance.socket.IndexQuoteServer; import com.venus.finance.util.CodeUtil; import com.venus.finance.util.FileUtil; import com.venus.finance.util.InitUtil; import com.venus.finance.util.Variable; import com.venus.finance.vo.FuturesQuoteVO; public class SaveLatestQuote implements Runnable { private boolean isReady = false; // private ConcurrentHashMap<String,FuturesQuoteVO> quoteMap; public boolean isReady() { return isReady; } public void setReady(boolean isReady) { this.isReady = isReady; } public SaveLatestQuote() { } @Override public void run() { List<String> codeList = CodeUtil.getCodeList(); List<String> list = new ArrayList<String>(); StringBuffer codeStrBuf = new StringBuffer(); File file = null; try { file = InitUtil.getFutures_latest_file(); } catch (IOException e1) { e1.printStackTrace(); } while (true) { try { if (isReady) { list.clear(); for (int i = 0; i < codeList.size(); i++) { String[] codeArray = codeList.get(i).split(","); // Set<String> keySet = Variable.getFuturesQuoteMap().keySet(); // Iterator it = keySet.iterator(); // while(it.hasNext()){ // System.out.println(it.next()); // } // System.out.println(codeArray.length); if (codeArray.length > 0 && Variable.getFuturesQuoteMap().containsKey(codeArray[0])) { codeStrBuf.setLength(0); FuturesQuoteVO futuresQuoteVO = Variable.getFuturesQuoteMap().get(codeArray[0]); codeStrBuf.append(futuresQuoteVO.getInstrumentID()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getOpenPrice()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getHighestPrice()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getLowestPrice()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getClosePrice()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getSettlementPrice()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getVolume()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getCcvolume()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getBidPrice1()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getBidVolume1()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getAskPrice1()); codeStrBuf.append(","); codeStrBuf.append(futuresQuoteVO.getAskVolume1()); codeStrBuf.append(","); codeStrBuf.append(codeArray[1]); codeStrBuf.append("\n"); list.add(codeStrBuf.toString()); } } //System.out.println("--list--"+list.size()); FileUtil.saveQuoteFile(file, list); codeStrBuf.setLength(0); list.clear(); //System.out.println(list.toString()); Thread.sleep(5000); } else { Thread.sleep(1); } } catch (InterruptedException e) { System.out.println("Thread interrupted..."); } } } }
[ "xiaowulf@163.com" ]
xiaowulf@163.com
f8fec2013ec58d3dea000857568f238213a824c3
0b384665943ffdd3b68d0adcc5b51b0d6e94bd58
/src/main/java/com/ozay/backend/config/apidoc/SwaggerConfiguration.java
296180f2b3fcab527969db7528fc7f3bd0a779f7
[]
no_license
OzayOrg/OzayBackend
88be0106b0479c5a0e8b8a58be7b1dcafd209227
58679258deb98eef605450cbe35e580d6687554c
refs/heads/master
2021-01-21T16:39:15.252313
2016-08-09T01:39:47
2016-08-09T01:39:47
45,718,522
1
2
null
2016-04-02T12:51:06
2015-11-07T02:00:53
Java
UTF-8
Java
false
false
2,981
java
package com.ozay.backend.config.apidoc; import com.ozay.backend.config.Constants; import com.ozay.backend.config.JHipsterProperties; import java.util.Date; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.http.ResponseEntity; import org.springframework.util.StopWatch; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; import static springfox.documentation.builders.PathSelectors.regex; /** * Springfox Swagger configuration. * * Warning! When having a lot of REST endpoints, Springfox can become a performance issue. In that * case, you can use a specific Spring profile for this class, so that only front-end developers * have access to the Swagger view. */ @Configuration @EnableSwagger2 @Profile("!"+Constants.SPRING_PROFILE_PRODUCTION) public class SwaggerConfiguration { private final Logger log = LoggerFactory.getLogger(SwaggerConfiguration.class); public static final String DEFAULT_INCLUDE_PATTERN = "/api/.*"; /** * Swagger Springfox configuration. */ @Bean public Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger"); StopWatch watch = new StopWatch(); watch.start(); ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl()); Docket docket = new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo) .genericModelSubstitutes(ResponseEntity.class) .forCodeGeneration(true) .genericModelSubstitutes(ResponseEntity.class) .directModelSubstitute(org.joda.time.LocalDate.class, String.class) .directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class) .directModelSubstitute(org.joda.time.DateTime.class, Date.class) .directModelSubstitute(java.time.LocalDate.class, String.class) .directModelSubstitute(java.time.ZonedDateTime.class, Date.class) .directModelSubstitute(java.time.LocalDateTime.class, Date.class) .select() .paths(regex(DEFAULT_INCLUDE_PATTERN)) .build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis()); return docket; } }
[ "nezaki@northpointdigital.com" ]
nezaki@northpointdigital.com
55329afc1cef87ca128621aa88f34c467bff2eff
198b020a82e4c75365c6aec9aa4a4cac53e5aaa8
/ttj/src/com/cy/dctms/dao/DaycountDriverActiveDao.java
65b48b12592f24e54cb7332d7b1e68bca0202fa1
[]
no_license
kenjs/Java
8cc2a6c4a13bddc12f15d62350f3181acccc48ec
8cb9c7c93bc0cfa57d77cf3805044e5fe18778f2
refs/heads/master
2020-12-14T09:46:07.493930
2015-08-19T08:11:59
2015-08-19T08:11:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,899
java
package com.cy.dctms.dao; import com.cy.dctms.common.bo.DaycountDriverActive; import org.springframework.stereotype.Repository; import java.sql.SQLException; import java.util.List; /** * Created by haoy on 2014/9/23. */ @Repository("daycountDriverActiveDao") public interface DaycountDriverActiveDao { /** * 新增 * @param list * @throws SQLException */ public void insertDaycountDriverActive(List<DaycountDriverActive> list) throws SQLException; /** * 修改 * @param list * @throws SQLException */ public void updateDaycountDriverActive(List<DaycountDriverActive> list) throws SQLException; /** * 查询 * @param driverId * @return * @throws SQLException */ public int selectDaycountDriverActive(int driverId) throws SQLException; /** * 查询司机是否上传位置信息 * @param driverId * @return * @throws SQLException */ public int selectDriverLastLocation(int driverId) throws SQLException; /** * 司机打开次数 * @param driverId * @return * @throws SQLException */ // public int selectDriverDayOpens(int driverId) throws SQLException; /** * 司机主动通讯次数 * @param driverId * @return * @throws SQLException */ public int selectDriverDayInitiativeLinks(int driverId) throws SQLException; /** * 司机被动收到的货源推送次数 * @param driverId * @return * @throws SQLException */ public int selectDriverDayHuoyuanPushs(int driverId) throws SQLException; /** * 司机被动上传位置信息次数 * @param driverId * @return * @throws SQLException */ public int selectDriverDayLocationUps(int driverId) throws SQLException; }
[ "haoyongvv@163.com" ]
haoyongvv@163.com
60f27983a3156c4b90a4694ab2b78a7553ed62c1
03a3fdb077ebbe254043cdbb3d95a9c2ef535681
/src/main/java/com/unicon/entity/MUEU.java
16f7ba2b24e4c08ccd1ac25e894bd227a1a47734
[]
no_license
2451752454/uniconn
04af6a49272fbc603e9b2d54a6f35bcf97d9e801
55f7d2d98a585d01c87f220dbed1865420d1d89b
refs/heads/master
2022-12-29T14:41:17.581339
2019-08-29T10:40:41
2019-08-29T10:40:41
204,450,315
0
0
null
2022-12-16T11:17:52
2019-08-26T10:15:32
Java
UTF-8
Java
false
false
1,900
java
package com.unicon.entity; import java.math.BigDecimal; public class MUEU { private BigDecimal ROLEID; private String ROLENAME; private BigDecimal JURISDICTIONID; private String JURISDICTIONNAME; private BigDecimal MENUID; private String MENUNAME; private String URL; private String ROLEMENU; public BigDecimal getROLEID() { return ROLEID; } public void setROLEID(BigDecimal rOLEID) { ROLEID = rOLEID; } public String getROLENAME() { return ROLENAME; } public void setROLENAME(String rOLENAME) { ROLENAME = rOLENAME; } public BigDecimal getJURISDICTIONID() { return JURISDICTIONID; } public void setJURISDICTIONID(BigDecimal jURISDICTIONID) { JURISDICTIONID = jURISDICTIONID; } public String getJURISDICTIONNAME() { return JURISDICTIONNAME; } public void setJURISDICTIONNAME(String jURISDICTIONNAME) { JURISDICTIONNAME = jURISDICTIONNAME; } public BigDecimal getMENUID() { return MENUID; } public void setMENUID(BigDecimal mENUID) { MENUID = mENUID; } public String getMENUNAME() { return MENUNAME; } public void setMENUNAME(String mENUNAME) { MENUNAME = mENUNAME; } public String getURL() { return URL; } public void setURL(String uRL) { URL = uRL; } public String getROLEMENU() { return ROLEMENU; } public void setROLEMENU(String rOLEMENU) { ROLEMENU = rOLEMENU; } public MUEU(BigDecimal ROLEID, String JURISDICTIONNAME) { this.ROLEID = ROLEID; this.JURISDICTIONNAME = JURISDICTIONNAME; } public MUEU(BigDecimal rOLEID, String rOLENAME, BigDecimal jURISDICTIONID, String jURISDICTIONNAME, BigDecimal mENUID, String mENUNAME, String uRL, String rOLEMENU) { super(); ROLEID = rOLEID; ROLENAME = rOLENAME; JURISDICTIONID = jURISDICTIONID; JURISDICTIONNAME = jURISDICTIONNAME; MENUID = mENUID; MENUNAME = mENUNAME; URL = uRL; ROLEMENU = rOLEMENU; } public MUEU() { super(); } }
[ "1248127912@qq.com" ]
1248127912@qq.com
3341c2cd9137448545eeb4cbebdcd65ce41604b7
0af71556e661d76c825c4fdd479860c327219a6a
/module-domain/src/main/java/com/example/multimodulesexample/domain/ModuleDomainConfig.java
c91cac4e7db45f2701e7d19c7bd3febd499225f8
[]
no_license
hanjo8813/multi-modules-example
add9b2c88c34f20b4fefd725645aecb9e6427aea
9a71a84beee31045734a0110d5e8a5913f4cfc29
refs/heads/main
2023-09-03T01:50:11.948550
2021-10-25T06:42:28
2021-10-25T06:42:28
420,513,813
1
0
null
null
null
null
UTF-8
Java
false
false
805
java
package com.example.multimodulesexample.domain; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; // 현재 클래스가 포함된 패키지의 하위 컴포넌트를 Bean으로 스캔 @EntityScan(basePackageClasses = ModuleDomainConfig.class) @EnableJpaRepositories(basePackageClasses = ModuleDomainConfig.class) @ComponentScan(basePackageClasses = ModuleDomainConfig.class) @Configuration public class ModuleDomainConfig { // + yaml의 datasource가 bean으로 등록되도록 @Configuration 설정 }
[ "hanjo8813@gmail.com" ]
hanjo8813@gmail.com
77bc068b6ca755dddd421df5f651bfa9cc035f18
14d083e172837377a0bc3e9b2b031c058e75a4aa
/src/GameInterfaces/ItemsByProfession/Bard/IStandingHarp.java
78a7ff6dafb7059c01df02005a2bcb8e9f58627a
[]
no_license
wgres101/NECROTEK3Dv2
478b708936b4dcfd9aa7f9b949e23bfa3e61bd43
4f57b5f56fc2fa6406d2ce6ed5fdce21964fd483
refs/heads/master
2020-12-18T18:58:42.660286
2017-08-10T23:23:29
2017-08-10T23:23:29
235,483,578
0
0
null
null
null
null
UTF-8
Java
false
false
165
java
package GameInterfaces.ItemsByProfession.Bard; import GameInterfaces.Construction.IBaseConstruction; public interface IStandingHarp extends IBaseConstruction { }
[ "ted_gress@yahoo.com" ]
ted_gress@yahoo.com
741272dc48698f5c88687e52a83039759842c603
d2a34719551e8d9ea9e363b25030c138016d000f
/src/main/java/com/feeyo/net/udp/packet/V5PacketEncoder.java
fff585d2eb0a19ceb7a3bbb03020dbde6800bc59
[ "Apache-2.0" ]
permissive
jing5877/feeyo-hlsserver
608b3a70d02c07735f3552f21b86e35aabe8e568
283a392ab4a1cf89449dfd41704effc2467f06b8
refs/heads/master
2021-04-15T18:33:11.370068
2018-06-20T07:56:18
2018-06-20T07:56:18
126,448,944
0
0
Apache-2.0
2018-06-20T07:56:19
2018-03-23T07:31:03
Java
UTF-8
Java
false
false
3,608
java
package com.feeyo.net.udp.packet; import java.util.ArrayList; import java.util.List; import java.util.zip.CRC32; /** * * @author zhuam * */ public class V5PacketEncoder { public List<V5Packet> encode(int mtu, int packetSender, byte packetType, byte[] packetReserved, int packetId, byte[] data) { // if ( mtu <= V5Packet.HEAD_LENGTH + V5Packet.TAIL_LENGTH ) { throw new java.lang.IllegalArgumentException(" mtu must be greater than packet header size , " + " headSize=" + V5Packet.HEAD_LENGTH + ", tailSize=" + V5Packet.TAIL_LENGTH ); } //1、根据原始的包长和MTU值 来分成几个碎片包 int maxLen = mtu - V5Packet.HEAD_LENGTH - V5Packet.TAIL_LENGTH; int n = data.length / maxLen; if ( (data.length % maxLen) != 0 ) n++; //2、构造碎片包 List<V5Packet> packs = new ArrayList<V5Packet>(n); for (int i = 0; i < n; i++) { int dataOffset = i * maxLen; int dataLength = (i < (n - 1)) ? maxLen : data.length - i * maxLen; // byte[] packetData = new byte[ dataLength ]; // int idx = 0; int start = dataOffset; int end = dataOffset + dataLength; for (int j = start; j < end; j++) { packetData[idx++] = data[j]; } // 包尾,crc CRC32 crc32 = new CRC32(); crc32.update( packetData, 0, packetData.length); long crc = crc32.getValue(); int packetLength = data.length; int packetOffset = i * maxLen; packs.add( new V5Packet(packetSender, packetType, packetReserved, packetId, packetLength, packetOffset, packetData, crc) ); } return packs; } public byte[] encode(V5Packet packet) { int packetSender = packet.getPacketSender(); byte packetType = packet.getPacketType(); byte[] packetReserved = packet.getPacketReserved(); int packetId = packet.getPacketId(); int packetLength = packet.getPacketLength(); int packetOffset = packet.getPacketOffset(); byte[] packetData = packet.getPacketData(); long crc = packet.getCrc(); byte[] pdu = new byte[V5Packet.HEAD_LENGTH + packetData.length + V5Packet.TAIL_LENGTH]; int idx = 0; pdu[idx++] = 89; pdu[idx++] = 89; // 发送方 pdu[idx++] = ByteUtil.getByte3(packetSender); pdu[idx++] = ByteUtil.getByte2(packetSender); pdu[idx++] = ByteUtil.getByte1(packetSender); pdu[idx++] = ByteUtil.getByte0(packetSender); // 包类型 pdu[idx++] = packetType; // 预留 System.arraycopy(packetReserved, 0, pdu, idx, packetReserved.length); idx += 8; // 包唯一编号 pdu[idx++] = ByteUtil.getByte3(packetId); pdu[idx++] = ByteUtil.getByte2(packetId); pdu[idx++] = ByteUtil.getByte1(packetId); pdu[idx++] = ByteUtil.getByte0(packetId); // 包长 pdu[idx++] = ByteUtil.getByte3(packetLength); pdu[idx++] = ByteUtil.getByte2(packetLength); pdu[idx++] = ByteUtil.getByte1(packetLength); pdu[idx++] = ByteUtil.getByte0(packetLength); // 包偏移值 pdu[idx++] = ByteUtil.getByte3(packetOffset); pdu[idx++] = ByteUtil.getByte2(packetOffset); pdu[idx++] = ByteUtil.getByte1(packetOffset); pdu[idx++] = ByteUtil.getByte0(packetOffset); idx = V5Packet.HEAD_LENGTH; for (int j = 0; j < packetData.length; j++) { pdu[idx++] = packetData[j]; } // 包尾,crc pdu[idx++] = ByteUtil.getByte7( crc ); pdu[idx++] = ByteUtil.getByte6( crc ); pdu[idx++] = ByteUtil.getByte5( crc ); pdu[idx++] = ByteUtil.getByte4( crc ); pdu[idx++] = ByteUtil.getByte3( crc ); pdu[idx++] = ByteUtil.getByte2( crc ); pdu[idx++] = ByteUtil.getByte1( crc ); pdu[idx++] = ByteUtil.getByte0( crc ); return pdu; } }
[ "zhuam@foxmail.com" ]
zhuam@foxmail.com
31ef3bbbfad57404591e3ec77782d1087370e402
2cc576711695ae7eacc555ccd85868b1e49a315c
/src/main/java/com/example/samplebookmarks/web/ItemWebHandlers.java
2732be84aba65fc212c1e4e92c6fe53cd2ca3e45
[]
no_license
BriteSnow/sampleBookmarks
f228ae09086200d3cbc8df4b34828c2e05cc2ce8
9ff9ad2db18547acc67acd6fe5a7e1f163de8888
refs/heads/master
2016-09-05T11:09:47.658511
2015-11-11T21:58:07
2015-11-11T21:58:07
7,594,071
2
4
null
null
null
null
UTF-8
Java
false
false
2,197
java
package com.example.samplebookmarks.web; import java.util.List; import javax.inject.Inject; import com.britesnow.snow.web.param.annotation.PathVar; import com.britesnow.snow.web.param.annotation.WebParam; import com.britesnow.snow.web.param.annotation.WebUser; import com.britesnow.snow.web.rest.annotation.WebDelete; import com.britesnow.snow.web.rest.annotation.WebGet; import com.britesnow.snow.web.rest.annotation.WebPost; import com.example.samplebookmarks.dao.ItemDao; import com.example.samplebookmarks.entity.Item; import com.example.samplebookmarks.entity.User; import com.google.inject.Singleton; @Singleton public class ItemWebHandlers { @Inject public ItemDao itemDao; @WebPost("/api/user-create-item") public WebResponse apiUserCreateItem(@WebUser User user, @WebParam("title") String title, @WebParam("url") String url, @WebParam("note") String note) { if (user != null) { try { Item item = new Item(title, url, note); item.setUser_id(user.getId()); item = itemDao.save(item); return WebResponse.success(item); } catch (Throwable t) { return WebResponse.fail(t); } } return WebResponse.fail("Not logged in, no create."); } @WebDelete("/api/user-item-{id}") public WebResponse apiUserDeleteItem(@WebUser User user, @PathVar("id") Long id) { if (user != null) { try { itemDao.delete(id); return WebResponse.success(id); } catch (Throwable t) { return WebResponse.fail(t); } } return WebResponse.fail("Not logged in, no delete."); } @WebGet("/api/user-items") public WebResponse apiUserItems(@WebUser User user) { if (user != null) { try { List<Item> items = itemDao.getItemsForUser(user.getId()); return WebResponse.success(items); } catch (Throwable t) { return WebResponse.fail(t); } } return WebResponse.fail("Not logged in, no item list."); } }
[ "jeremy.chone@gmail.com" ]
jeremy.chone@gmail.com
4f8c62365eccca947b9b2c568c54cb131573bfee
8f8dfbc9f3543a12934bb652d141100d315f1f78
/client/src/test/java/org/ehrbase/client/classgenerator/exampleoptimizersettingsections/coronaanamnesecomposition/definition/FragebogenZumMedikationsScreeningObservation.java
70a36184acb07e32e3f785f8f194d3d1b47572b8
[ "Apache-2.0" ]
permissive
yasir2000/openEHR_SDK
f36081d2d507809fc2b5dcd2c8d239497c133148
31605a69a982be2f1f10e24be92f39171059b93d
refs/heads/master
2023-08-06T00:32:41.467027
2021-07-13T12:45:52
2021-07-13T12:45:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,383
java
package org.ehrbase.client.classgenerator.exampleoptimizersettingsections.coronaanamnesecomposition.definition; import com.nedap.archie.rm.archetyped.FeederAudit; import com.nedap.archie.rm.datastructures.Cluster; import com.nedap.archie.rm.datavalues.DvCodedText; import com.nedap.archie.rm.generic.PartyProxy; import java.lang.String; import java.time.temporal.TemporalAccessor; import java.util.List; import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Path; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; @Entity @Archetype("openEHR-EHR-OBSERVATION.medication_use.v0") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", date = "2020-12-10T13:06:13.464033100+01:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: null" ) public class FragebogenZumMedikationsScreeningObservation implements EntryEntity { /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/Beliebiges Ereignis/Medikamente in Verwendung? * Description: Wendet die Person das Medikament bei oder während des Zeitpunkts des Ergebnisses an? */ @Path("/data[at0022]/events[at0023]/data[at0001]/items[at0027]/value") private DvCodedText medikamenteInVerwendung; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/Beliebiges Ereignis/Spezifische Medikamentenklasse/Name der Medikamentenklasse * Description: Name der Klasse oder des Medikamententyps. */ @Path("/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0002]/value|value") private String nameDerMedikamentenklasseValue; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/Beliebiges Ereignis/Spezifische Medikamentenklasse/Medikamentenklasse in Verwendung? * Description: Wendet die Person das Medikament, die Klasse oder Art des Medikaments bei oder während des Zeitpunkts des Ergebnisses an? */ @Path("/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0003]/value|defining_code") private MedikamentenklasseInVerwendungDefiningCode medikamentenklasseInVerwendungDefiningCode; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/Beliebiges Ereignis/Spezifische Medikamentenklasse/Spezifische Medikamente * Description: Details über ein spezifisches Medikament oder eine Medikamentenunterklasse der Medikamentenklasse. */ @Path("/data[at0022]/events[at0023]/data[at0001]/items[at0026]/items[at0008]") private List<FragebogenZumMedikationsScreeningSpezifischeMedikamenteCluster> spezifischeMedikamente; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/Beliebiges Ereignis/time */ @Path("/data[at0022]/events[at0023]/time|value") private TemporalAccessor timeValue; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/origin */ @Path("/data[at0022]/origin|value") private TemporalAccessor originValue; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/Erweiterung * Description: Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen. * Comment: Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Ressourcen oder CIMI-Modelle. */ @Path("/protocol[at0005]/items[at0019]") private List<Cluster> erweiterung; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/subject */ @Path("/subject") private PartyProxy subject; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/language */ @Path("/language") private Language language; /** * Path: Bericht/Allgemeine Angaben/Fragebogen zum Medikations-Screening/feeder_audit */ @Path("/feeder_audit") private FeederAudit feederAudit; public void setMedikamenteInVerwendung(DvCodedText medikamenteInVerwendung) { this.medikamenteInVerwendung = medikamenteInVerwendung; } public DvCodedText getMedikamenteInVerwendung() { return this.medikamenteInVerwendung ; } public void setNameDerMedikamentenklasseValue(String nameDerMedikamentenklasseValue) { this.nameDerMedikamentenklasseValue = nameDerMedikamentenklasseValue; } public String getNameDerMedikamentenklasseValue() { return this.nameDerMedikamentenklasseValue ; } public void setMedikamentenklasseInVerwendungDefiningCode( MedikamentenklasseInVerwendungDefiningCode medikamentenklasseInVerwendungDefiningCode) { this.medikamentenklasseInVerwendungDefiningCode = medikamentenklasseInVerwendungDefiningCode; } public MedikamentenklasseInVerwendungDefiningCode getMedikamentenklasseInVerwendungDefiningCode( ) { return this.medikamentenklasseInVerwendungDefiningCode ; } public void setSpezifischeMedikamente( List<FragebogenZumMedikationsScreeningSpezifischeMedikamenteCluster> spezifischeMedikamente) { this.spezifischeMedikamente = spezifischeMedikamente; } public List<FragebogenZumMedikationsScreeningSpezifischeMedikamenteCluster> getSpezifischeMedikamente( ) { return this.spezifischeMedikamente ; } public void setTimeValue(TemporalAccessor timeValue) { this.timeValue = timeValue; } public TemporalAccessor getTimeValue() { return this.timeValue ; } public void setOriginValue(TemporalAccessor originValue) { this.originValue = originValue; } public TemporalAccessor getOriginValue() { return this.originValue ; } public void setErweiterung(List<Cluster> erweiterung) { this.erweiterung = erweiterung; } public List<Cluster> getErweiterung() { return this.erweiterung ; } public void setSubject(PartyProxy subject) { this.subject = subject; } public PartyProxy getSubject() { return this.subject ; } public void setLanguage(Language language) { this.language = language; } public Language getLanguage() { return this.language ; } public void setFeederAudit(FeederAudit feederAudit) { this.feederAudit = feederAudit; } public FeederAudit getFeederAudit() { return this.feederAudit ; } }
[ "s.spiska@symeda.de" ]
s.spiska@symeda.de
b93b7dc0d9a4ec730d9fc9543ebd7b627d39f5ab
5960c981c83373091c0823a105800bb362d36d8c
/src/main/java/com/converterDAO/entity/enums/Currency.java
1c047aec465c4e140b7efbf654cc98b90fc36fe7
[]
no_license
olyaborodikhina/ConvertLogin
60197472a8221deeecbdcc819790959c0a9bc124
85b0b7d134eb1d8bea03d0a08a21d7510eaf4da8
refs/heads/master
2021-01-12T05:26:18.157442
2017-01-09T07:57:03
2017-01-09T07:57:03
77,928,020
0
0
null
null
null
null
UTF-8
Java
false
false
132
java
package com.converterDAO.entity.enums; /** * Created by hp on 07.01.2017. */ public enum Currency { RUB, USD, EUR; }
[ "020189kirill" ]
020189kirill
fe395d379bd96c2489f76231bb4c8d2498825afb
eb10687e3b707dfe3797159a8834d4cc37e2d86b
/reverse string.java
66df8fad979c27b308ed743f86be7f1d7126101d
[]
no_license
zhibolau/lintCodeOfZhiboLiu
7d7bae649b9d8e0e96c82232fe60cc220c5e8636
7fc0a70dcfd6ee7025cd5dab48d2aca4ad4d17b2
refs/heads/master
2021-01-21T04:55:15.148585
2016-06-28T20:07:52
2016-06-28T20:07:52
51,408,069
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
public static String reverse(String input){ char[] in = input.toCharArray(); int begin=0; int end=in.length-1; char temp; while(end>begin){ temp = in[begin]; in[begin]=in[end]; in[end] = temp; end--; begin++; } return new String(in); } new StringBuilder(hi).reverse().toString() public static String reverseIt(String source) { int i, len = source.length(); StringBuilder dest = new StringBuilder(len); for (i = (len - 1); i >= 0; i--){ dest.append(source.charAt(i)); } return dest.toString(); }
[ "zhibolau@gmail.com" ]
zhibolau@gmail.com
d77bc6a12ad68c7aa08df25487a925d093c4d8e8
d68281dda0c326ebea335260d8640f31282ca19b
/src/main/java/org/black_ixx/bossshop/listeners/InventoryListener.java
779757358951eb156341c2c448e3aafdd361d788
[]
no_license
abu002/BossShop
f0b11afc7936f4bb8c7644faf8c7ef5b77ec7ef9
bb86db32ca968762e97a9728bce1ece270e45834
refs/heads/master
2021-01-16T21:52:43.084956
2016-02-15T18:53:12
2016-02-15T18:53:12
51,932,505
2
0
null
2016-02-17T15:27:12
2016-02-17T15:27:11
null
UTF-8
Java
false
false
3,887
java
package org.black_ixx.bossshop.listeners; import org.black_ixx.bossshop.BossShop; import org.black_ixx.bossshop.core.BSBuy; import org.black_ixx.bossshop.core.BSEnums.BSBuyType; import org.black_ixx.bossshop.core.BSInventoryHolder; import org.black_ixx.bossshop.core.BSShop; import org.black_ixx.bossshop.core.BSShopHolder; import org.black_ixx.bossshop.events.BSPlayerPurchaseEvent; import org.black_ixx.bossshop.events.BSPlayerPurchasedEvent; import org.black_ixx.bossshop.misc.Enchant; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.Event.Result; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.inventory.InventoryType.SlotType; public class InventoryListener implements Listener{ public InventoryListener(BossShop plugin){ this.plugin=plugin; } private BossShop plugin; @EventHandler public void closeShop(InventoryCloseEvent e){ if (!(e.getInventory().getHolder() instanceof BSInventoryHolder)){ return; } if (e.getPlayer() instanceof Player){ plugin.getClassManager().getMessageHandler().sendMessage("Main.CloseShop", (Player)e.getPlayer()); } } @EventHandler public void purchase(InventoryClickEvent event){ if (!(event.getInventory().getHolder() instanceof BSShopHolder)){ return; } BSShopHolder holder = (BSShopHolder)event.getInventory().getHolder(); event.setCancelled(true); event.setResult(Result.DENY); //event.setCurrentItem(null); if (event.getWhoClicked() instanceof Player){ if (event.getCurrentItem()==null){ event.setCancelled(true); return; } if (event.getCursor()==null){ event.setCancelled(true); return; } if (event.getSlotType() == SlotType.QUICKBAR){ return; } BSBuy buy = holder.getShopItem(event.getRawSlot()); if(buy==null){ return; } if (buy.getInventoryLocation()==event.getRawSlot()){ event.setCancelled(true); Player p = (Player) event.getWhoClicked(); if (!buy.hasPermission(p,true)){ return; } BSShop shop = ((BSShopHolder)event.getInventory().getHolder()).getShop(); BSPlayerPurchaseEvent e1 = new BSPlayerPurchaseEvent(p, shop, buy);//Custom Event Bukkit.getPluginManager().callEvent(e1); if(e1.isCancelled()){ return; }//Custom Event end if (!buy.hasPrice(p)){ return; } if(buy.alreadyBought(p)){ plugin.getClassManager().getMessageHandler().sendMessage("Main.AlreadyBought", p); return; } if(buy.getBuyType()==BSBuyType.Enchantment){ Enchant e = (Enchant) buy.getReward(); if(p.getItemInHand()==null |! plugin.getClassManager().getItemStackChecker().isValidEnchantment(p.getItemInHand(), e.getType(), e.getLevel()) &! plugin.getClassManager().getSettings().isUnsafeEnchantmentsEnabled()){ plugin.getClassManager().getMessageHandler().sendMessage("Enchantment.Invalid", p); return; } } String o = buy.takePrice(p); String s = buy.getMessage(); if (s!=null){ s = plugin.getClassManager().getStringManager().transform(buy.getMessage(), p); if (o!=null&&o!=""&&s.contains("%left%")){ s=s.replace("%left%", o); } } buy.giveReward(p); if(plugin.getClassManager().getSettings().getTransactionLogEnabled()){ plugin.getClassManager().getTransactionLog().addTransaction(p, buy); } BSPlayerPurchasedEvent e2 = new BSPlayerPurchasedEvent(p, shop, buy);//Custom Event Bukkit.getPluginManager().callEvent(e2);//Custom Event end if (s!=null && s!=""&&s.length()!=0){ p.sendMessage(s); } if(shop.isCustomizable()){ shop.updateInventory(event.getInventory(), p, plugin.getClassManager());//NEW } } } } }
[ "jamesmortemore@gmail.com" ]
jamesmortemore@gmail.com
4515fd0275cde64fd9cff0208c01ae186ef40e58
302a7a7df834cd01779778aaa3f5592267349717
/src/main/java/es/franl2p/App.java
126f0a018399599ff521094bdf5d4891f1899316
[]
no_license
flparedes/RestfulApi
e946a571a396ef2a08d5f9d64dff7330c0fb7ef1
5e941b6900b466df3aa3224c896d783d28a044da
refs/heads/master
2021-01-10T11:39:54.758122
2015-12-19T18:05:06
2015-12-19T18:05:06
44,347,157
1
0
null
null
null
null
UTF-8
Java
false
false
255
java
package es.franl2p; import es.franl2p.controllers.UserController; import es.franl2p.services.UserService; /** * Hello world! * */ public class App { public static void main( String[] args ){ new UserController(new UserService()); } }
[ "franciscoluis.paredes@gmail.com" ]
franciscoluis.paredes@gmail.com
7cc719aa5bcbce7eac5534827fb3aad1e0a06ad4
c2c9d07c25383780a46248ca609ea96615b8eb40
/employeeinfo/AccountType.java
61ce9abe7ca9ef863edba3ca49cd01652d39ac20
[]
no_license
samuelbwambale/console-based-banking-app
249258be5a4821077d051e2678495d6885cdea72
caffd36facd3db68a575af323ac56a7c06347e93
refs/heads/develop
2020-11-28T13:24:56.330203
2019-12-23T23:15:13
2019-12-23T23:15:13
229,829,485
0
0
null
2019-12-23T23:15:14
2019-12-23T22:08:29
null
UTF-8
Java
false
false
94
java
package employeeinfo; public enum AccountType { CHECKING, SAVINGS, RETIREMENT; }
[ "simplesam63@gmail.com" ]
simplesam63@gmail.com
536594ca61e168edad6056fb62470ff3d434441c
aca457909ef8c4eb989ba23919de508c490b074a
/DialerJADXDecompile/defpackage/azw.java
a603a3a9c92d2be7da9b9925c67cbd42717f7535
[]
no_license
KHikami/ProjectFiCallingDeciphered
bfccc1e1ba5680d32a4337746de4b525f1911969
cc92bf6d4cad16559a2ecbc592503d37a182dee3
refs/heads/master
2021-01-12T17:50:59.643861
2016-12-08T01:20:34
2016-12-08T01:23:04
71,650,754
1
0
null
null
null
null
UTF-8
Java
false
false
262
java
package defpackage; /* compiled from: PG */ /* renamed from: azw */ final class azw implements axg { private /* synthetic */ ayo a; azw(azs azs, ayo ayo) { this.a = ayo; } public final void a(boolean z) { this.a.r = z; } }
[ "chu.rachelh@gmail.com" ]
chu.rachelh@gmail.com
91912571e8a6193bacf3a3f868f632561004ce1c
f745e1064de5e701b2f81c5348708007db6b50a1
/app/src/main/java/com/lovocal/retromodels/response/BannerResponseModel.java
57d4b192f36896c045348dd71ae76251a6e804e7
[]
no_license
lovocal/lovocal_android
5b9df858d8459485b5f4f951567b9fad39c6dc69
5ea2c3b09cfb1122f68e7a727a8c1abfaf01485b
refs/heads/master
2016-09-06T05:43:14.864329
2014-08-27T18:33:54
2014-08-27T18:33:54
22,511,629
0
1
null
2014-08-27T18:33:55
2014-08-01T13:47:54
Java
UTF-8
Java
false
false
252
java
package com.lovocal.retromodels.response; import java.util.List; /** * Created by anshul1235 on 05/08/14. */ public class BannerResponseModel { public List<ImageUrl> banners; public class ImageUrl{ public String image_url; } }
[ "anshul1235@gmail.com" ]
anshul1235@gmail.com
516c2f7b104357e64a3e8db90c9e0095930b0560
ed29778a20ac25b4eda542fcfce449a764a9229c
/ProductRecommendation/src/main/java/com/prime/jax/FilterOperator.java
dfced1325eabf4b3c4e6da89d5ab789ba9f8daaa
[]
no_license
AgilePrimeFighting/2016Semester2Agile
e9b7d7feb84260088d21d85ea2987be3ddafe42b
f12df0183b368838c381a7aa5a83a76a9674f021
refs/heads/master
2020-04-10T21:25:15.717018
2016-10-06T07:29:09
2016-10-06T07:29:09
65,066,545
1
2
null
2016-10-05T05:22:47
2016-08-06T05:24:40
Java
UTF-8
Java
false
false
1,115
java
package com.prime.jax; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for FilterOperator. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="FilterOperator"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="And"/> * &lt;enumeration value="Or"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "FilterOperator") @XmlEnum public enum FilterOperator { @XmlEnumValue("And") AND("And"), @XmlEnumValue("Or") OR("Or"); private final String value; FilterOperator(String v) { value = v; } public String value() { return value; } public static FilterOperator fromValue(String v) { for (FilterOperator c: FilterOperator.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "liu_taichen@hotmail.com" ]
liu_taichen@hotmail.com
09ddb5997c8adaca2285a009d202b39b5563b0ae
207fa658b2547d980882369a3cc316d14cbaaacb
/src/main/java/org/micromanager/acqj/internal/acqengj/AffineTransformUtils.java
7b46d6ff0ba5dbd499aa5c18050f24ad189e77ec
[]
no_license
ieivanov/AcqEngJ
e6af268206c2d730d061d77ab98096089538d8d2
4e9eb2ebeffc6ef3ebfd7a1bf5da02f6fc67c7c6
refs/heads/master
2022-12-07T10:03:46.105597
2020-09-03T00:47:33
2020-09-03T00:47:33
292,420,335
0
0
null
2020-09-02T23:55:45
2020-09-02T23:55:45
null
UTF-8
Java
false
false
4,897
java
/////////////////////////////////////////////////////////////////////////////// // AUTHOR: Henry Pinkard, henry.pinkard@gmail.com // // COPYRIGHT: University of California, San Francisco, 2015 // // LICENSE: This file is distributed under the BSD license. // License text is included with the source distribution. // // This file 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. // // IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES. // package org.micromanager.acqj.internal.acqengj; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.util.ArrayList; import mmcorej.DoubleVector; import org.micromanager.acqj.api.xystage.XYStagePosition; public class AffineTransformUtils { public static ArrayList<XYStagePosition> createPositionGrid(int imageWidth, int imageHeight, double xCenter, double yCenter, int overlapX, int overlapY, int numRows, int numCols) { ArrayList<XYStagePosition> positions = new ArrayList<XYStagePosition>(); int tileWidthMinusOverlap = imageWidth - overlapX; int tileHeightMinusOverlap = imageHeight - overlapY; AffineTransform transform = getAffineTransform(xCenter, yCenter); for (int col = 0; col < numCols; col++) { double xPixelOffset = (col - (numCols - 1) / 2.0) * tileWidthMinusOverlap; //add in snaky behavior if (col % 2 == 0) { for (int row = 0; row < numRows; row++) { double yPixelOffset = (row - (numRows - 1) / 2.0) * tileHeightMinusOverlap; Point2D.Double pixelPos = new Point2D.Double(xPixelOffset, yPixelOffset); Point2D.Double stagePos = new Point2D.Double(); transform.transform(pixelPos, stagePos); AffineTransform posTransform = getAffineTransform(stagePos.x, stagePos.y); positions.add(new XYStagePosition(stagePos, row, col)); } } else { for (int row = numRows - 1; row >= 0; row--) { double yPixelOffset = (row - (numRows - 1) / 2.0) * tileHeightMinusOverlap; Point2D.Double pixelPos = new Point2D.Double(xPixelOffset, yPixelOffset); Point2D.Double stagePos = new Point2D.Double(); transform.transform(pixelPos, stagePos); positions.add(new XYStagePosition(stagePos, row, col)); } } } return positions; } public static String transformToString(AffineTransform transform) { double[] matrix = new double[4]; transform.getMatrix(matrix); return matrix[0] + "_" + matrix[1] + "_" + matrix[2] + "_" + matrix[3]; } public static AffineTransform stringToTransform(String s) { if (s.equals("Undefined")) { return null; } double[] mat = new double[4]; String[] vals = s.split("_"); for (int i = 0; i < 4; i++) { mat[i] = NumUtils.parseDouble(vals[i]); } return new AffineTransform(mat); } public static boolean isAffineTransformDefined() { try { DoubleVector v = Engine.getCore().getPixelSizeAffine(true); for (int i = 0; i < v.size(); i++) { if (v.get(i) != 0.0) { return true; } } return false; } catch (Exception ex) { throw new RuntimeException(ex); } } public static AffineTransform getAffineTransform(double xTranslation, double yTranslation) { try { AffineTransform transform = doubleToAffine(Engine.getCore().getPixelSizeAffineByID( Engine.getCore().getCurrentPixelSizeConfig())); //set map origin to current stage position double[] matrix = new double[6]; transform.getMatrix(matrix); matrix[4] = xTranslation; matrix[5] = yTranslation; return new AffineTransform(matrix); } catch (Exception ex) { throw new RuntimeException(ex); } } public static final AffineTransform doubleToAffine(DoubleVector atf) { if (atf.size() != 6) { double[] flatMatrix = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; return new AffineTransform(flatMatrix); } double[] flatMatrix = {atf.get(0), atf.get(3), atf.get(1), atf.get(4), atf.get(2), atf.get(5)}; return new AffineTransform(flatMatrix); } }
[ "henry.pinkard@gmail.com" ]
henry.pinkard@gmail.com
af06080b62fb58655f20a7e7edf6f342df36eebe
c98ca81bf7d3d0bd1330eb549cb68ae2537f31b2
/src/object/clone/DeepCloneDemo.java
532e1b3cd5ff36077bf97586572f47ff90320f4c
[ "MIT" ]
permissive
IvanLu1024/JavaBasicDemo
d76933bc19e5310c79c100602313d00d4667d008
d6ca189a52b4e54306d1b65b55a4c140b6143d85
refs/heads/master
2020-03-28T16:45:55.943253
2018-09-14T07:22:48
2018-09-14T07:22:48
148,726,279
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package object.clone; /** * 深拷贝: * 拷贝对象和原始对象的引用类型引用不同的对象 */ public class DeepCloneDemo implements Cloneable{ private int[] arr; public DeepCloneDemo() { arr=new int[10]; for (int i=0;i<arr.length;i++){ arr[i]=i; } } public int get(int index){ return arr[index]; } public void set(int index, int value){ arr[index]=value; } @Override protected DeepCloneDemo clone() throws CloneNotSupportedException { DeepCloneDemo result= (DeepCloneDemo) super.clone(); result.arr=new int[arr.length]; for (int i=0;i<arr.length;i++){ result.arr[i]=arr[i]; } return result; } public static void main(String[] args) { DeepCloneDemo e1 = new DeepCloneDemo(); DeepCloneDemo e2=null; try { e2=e1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } e1.set(1,11); System.out.println(e2.get(1)); } }
[ "32642894+IvanLu1024@users.noreply.github.com" ]
32642894+IvanLu1024@users.noreply.github.com
40107f1337e7070933c6b57eb12cabd657222a73
4c5e190a9eb4925d5ef4be5f9e7f69f2bae8a9c0
/Utils/cleansdk/src/main/java/com/clean/spaceplus/cleansdk/junk/engine/CleanerDataCenter.java
aff28501422eca5b9820f34c245223abb2743456
[]
no_license
SteamedBunZL/AndroidUtils
5bb4346a373b0ef3deace4d7ad69e9deeca90ab2
31f9b630f5b67d8608a6b5bfc6caee4cd3c045ee
refs/heads/master
2020-09-18T05:34:36.300027
2018-06-05T06:24:57
2018-06-05T06:24:57
66,835,083
0
1
null
null
null
null
UTF-8
Java
false
false
717
java
//package com.clean.spaceplus.cleansdk.junk.engine; // //import com.clean.spaceplus.cleansdk.junk.engine.bean.APKPackagesCache; // ///** // * @author zengtao.kuang // * @Description: // * @date 2016/5/14 14:14 // * @copyright TCL-MIG // */ //public class CleanerDataCenter { // // public static CleanerDataCenter getInstance(){ // if(null == mCleanerDataCenterApp) // mCleanerDataCenterApp = new CleanerDataCenter(); // // return mCleanerDataCenterApp; // } // // public void setAPKPackagesData(APKPackagesCache cache){ // mAPKPackagesInfo = cache; // } // // private static CleanerDataCenter mCleanerDataCenterApp; // private APKPackagesCache mAPKPackagesInfo; //}
[ "stevezhang@tcl.com" ]
stevezhang@tcl.com
5256cd7857bb0672b333178ef5c0da09b9960499
7bf24ff09d02367e65c9b0fcfb7f1a2d3b201a88
/CheckIndomaret/app/src/main/java/com/example/user/checkindomaret/UserInActivity.java
d24814eefd69421a3655894bce7755262657d536
[]
no_license
qalbinurils/Check-Indomaret
b71a8e932ef81a38da0676afbe31e319536e1cfa
e087e629ebdd144ebc122989bfa46a3075400f40
refs/heads/master
2021-01-18T17:45:29.150334
2017-03-31T11:50:23
2017-03-31T11:50:23
86,812,935
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.example.user.checkindomaret; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class UserInActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_user_in); } }
[ "qalbins@gmail.com" ]
qalbins@gmail.com
c408d96a9318d39f00b987d80887d2e8d728aeff
0f909f99aa229aa9d0e49665af7bc51cc2403f65
/src/generated/java/cdm/event/workflow/functions/Create_WorkflowStep.java
0ffb21fbe839542f1259ef684d6d9d331f951e51
[]
no_license
Xuanling-Chen/cdm-source-ext
8c93bc824e8c01255dfc06456bd6ec1fb3115649
e4cf7d5e549e514760cbd1e2d6789af171e5ea41
refs/heads/master
2023-07-11T20:35:26.485723
2021-08-29T04:12:00
2021-08-29T04:12:00
400,947,430
0
0
null
null
null
null
UTF-8
Java
false
false
7,855
java
package cdm.event.workflow.functions; import cdm.base.staticdata.identifier.Identifier; import cdm.base.staticdata.party.Account; import cdm.base.staticdata.party.Party; import cdm.event.common.ActionEnum; import cdm.event.common.BusinessEvent; import cdm.event.workflow.EventTimestamp; import cdm.event.workflow.MessageInformation; import cdm.event.workflow.WorkflowStep; import cdm.event.workflow.WorkflowStep.WorkflowStepBuilder; import cdm.event.workflow.metafields.ReferenceWithMetaWorkflowStep; import com.google.inject.ImplementedBy; import com.google.inject.Inject; import com.rosetta.model.lib.expression.CardinalityOperator; import com.rosetta.model.lib.functions.RosettaFunction; import com.rosetta.model.lib.mapper.MapperC; import com.rosetta.model.lib.mapper.MapperS; import com.rosetta.model.lib.validation.ModelObjectValidator; import java.util.Arrays; import java.util.List; import java.util.Optional; import static com.rosetta.model.lib.expression.ExpressionOperators.*; import static com.rosetta.model.lib.expression.ExpressionOperators.notExists; @ImplementedBy(Create_WorkflowStep.Create_WorkflowStepDefault.class) public abstract class Create_WorkflowStep implements RosettaFunction { @Inject protected ModelObjectValidator objectValidator; /** * @param messageInformation Contains all information pertaining the messaging header. * @param timestamp The dateTime and qualifier associated with this event. * @param eventIdentifier The identifier that uniquely identify this lifecycle event. * @param party The specification of the parties involved in the WorkflowStep. * @param account Optional account information that could be associated to the event. * @param previousWorkflowStep Optional previous WorkflowStep that provides lineage to WorkflowStep that precedes it. If specified, the previous action is used to constrain the actions allows to the resulting workflow step. * @param action Specifies whether the event is a new, a correction or a cancellation. When a previous workflow step is specified, the allowed actions are as follows; New -&gt; New, New -&gt; Correct, New -&gt; Cancel, Correct -&gt; Correct and Correct -&gt; Cancel. When a previous workflow is not specified, the action must be New. Two consecutive workflow steps with action New, is valid when you have multiple steps e.g. new execution -&gt; new contract formation * @param businessEvent Life cycle event for the step. The business event must be specified if the action is new or corrected, and must be absent in the case of a cancel where the previous step would provide the lineage to the business event. * @return workflowStep Workflow step with a business event (in the event of action being new or correct) and associated details about the message, identifiers, event timestamps, parties and accounts involved in the step. */ public WorkflowStep evaluate(MessageInformation messageInformation, EventTimestamp timestamp, Identifier eventIdentifier, List<? extends Party> party, List<? extends Account> account, WorkflowStep previousWorkflowStep, ActionEnum action, BusinessEvent businessEvent) { // pre-conditions assert com.rosetta.model.lib.mapper.MapperUtils.toComparisonResult(com.rosetta.model.lib.mapper.MapperUtils.from(() -> { if (exists(MapperS.of(previousWorkflowStep)).get()) { return exists(MapperS.of(previousWorkflowStep).<BusinessEvent>map("getBusinessEvent", _workflowStep -> _workflowStep.getBusinessEvent())); } else { return MapperS.ofNull(); } })).get() : "The previous workflow step must contain a business event. Use Create_AcceptedWorkflowStep when the previous workflow step is a proposal."; assert com.rosetta.model.lib.mapper.MapperUtils.toComparisonResult(com.rosetta.model.lib.mapper.MapperUtils.from(() -> { if (areEqual(MapperS.of(previousWorkflowStep).<ActionEnum>map("getAction", _workflowStep -> _workflowStep.getAction()), MapperS.of(ActionEnum.NEW), CardinalityOperator.All).or(areEqual(MapperS.of(previousWorkflowStep).<ActionEnum>map("getAction", _workflowStep -> _workflowStep.getAction()), MapperS.of(ActionEnum.CORRECT), CardinalityOperator.All)).get()) { return areEqual(MapperS.of(action), MapperS.of(ActionEnum.NEW), CardinalityOperator.All).or(areEqual(MapperS.of(action), MapperS.of(ActionEnum.CORRECT), CardinalityOperator.All)).or(areEqual(MapperS.of(action), MapperS.of(ActionEnum.CANCEL), CardinalityOperator.All)); } else { return MapperS.ofNull(); } })).get() : "Valid action transitions are: New -> New, New -> Correct, New -> Cancel, Correct -> New, Correct -> Correct and Correct -> Cancel"; assert notEqual(MapperS.of(previousWorkflowStep).<ActionEnum>map("getAction", _workflowStep -> _workflowStep.getAction()), MapperS.of(ActionEnum.CANCEL), CardinalityOperator.Any).get() : "You cannot create a business event on a cancelled previous step"; assert com.rosetta.model.lib.mapper.MapperUtils.toComparisonResult(com.rosetta.model.lib.mapper.MapperUtils.from(() -> { if (notExists(MapperS.of(previousWorkflowStep)).or(notExists(MapperS.of(previousWorkflowStep).<ActionEnum>map("getAction", _workflowStep -> _workflowStep.getAction()))).get()) { return areEqual(MapperS.of(action), MapperS.of(ActionEnum.NEW), CardinalityOperator.All); } else { return MapperS.ofNull(); } })).get() : "Action must be New if there is no previous step"; WorkflowStep.WorkflowStepBuilder workflowStepHolder = doEvaluate(messageInformation, timestamp, eventIdentifier, party, account, previousWorkflowStep, action, businessEvent); WorkflowStep.WorkflowStepBuilder workflowStep = assignOutput(workflowStepHolder, messageInformation, timestamp, eventIdentifier, party, account, previousWorkflowStep, action, businessEvent); if (workflowStep!=null) objectValidator.validateAndFailOnErorr(WorkflowStep.class, workflowStep); return workflowStep; } private WorkflowStep.WorkflowStepBuilder assignOutput(WorkflowStep.WorkflowStepBuilder workflowStep, MessageInformation messageInformation, EventTimestamp timestamp, Identifier eventIdentifier, List<? extends Party> party, List<? extends Account> account, WorkflowStep previousWorkflowStep, ActionEnum action, BusinessEvent businessEvent) { workflowStep .setAction(MapperS.of(action).get()) ; workflowStep .setMessageInformation(MapperS.of(messageInformation).get()) ; workflowStep .addTimestamp(MapperS.of(timestamp).get()) ; workflowStep .addEventIdentifier(MapperS.of(eventIdentifier).get()) ; workflowStep .addParty(MapperC.of(party).getMulti()) ; workflowStep .addAccount(MapperC.of(account).getMulti()) ; workflowStep .setPreviousWorkflowStep(ReferenceWithMetaWorkflowStep.builder().setGlobalReference( Optional.ofNullable(MapperS.of(previousWorkflowStep).get()) .map(r -> r.getMeta()) .map(m -> m.getGlobalKey()) .orElse(null) ).build() ) ; workflowStep .setBusinessEvent(MapperS.of(businessEvent).get()) ; return workflowStep; } protected abstract WorkflowStep.WorkflowStepBuilder doEvaluate(MessageInformation messageInformation, EventTimestamp timestamp, Identifier eventIdentifier, List<? extends Party> party, List<? extends Account> account, WorkflowStep previousWorkflowStep, ActionEnum action, BusinessEvent businessEvent); public static final class Create_WorkflowStepDefault extends Create_WorkflowStep { @Override protected WorkflowStep.WorkflowStepBuilder doEvaluate(MessageInformation messageInformation, EventTimestamp timestamp, Identifier eventIdentifier, List<? extends Party> party, List<? extends Account> account, WorkflowStep previousWorkflowStep, ActionEnum action, BusinessEvent businessEvent) { return WorkflowStep.builder(); } } }
[ "xuanling_chen@epam.com" ]
xuanling_chen@epam.com
e5ad1c2c5d9726f78990e314f2f6d3b541678774
e0acebba4aca25d9f97ff278926bd0d937f014d6
/ms-customer/ms-customer-gateway/src/main/java/com/customer/gateway/impl/ProductGatewayImpl.java
3f8f3d883f7f6ede0aaf896ed9633bb8a7ad27c0
[]
no_license
manikandakumars/Eureka-Feign-LayeredArch-Projects
d7bcafef0b4ab7f3e381742ebe8c4a03bfa93a4b
48ebb02a31c98c9343f0871788be599e696bdcca
refs/heads/master
2023-03-15T05:43:43.771292
2021-03-16T06:17:21
2021-03-16T06:17:21
285,463,005
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package com.customer.gateway.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.customer.gateway.ProductGateway; import com.product.api.ProductClient; import com.product.domain.Product; @Component public class ProductGatewayImpl implements ProductGateway{ @Autowired ProductClient productClient; public Product getProductDetail(Long prodId) { return productClient.getProductDetail(prodId); } }
[ "manikandakumar.s@corp.trizetto.com" ]
manikandakumar.s@corp.trizetto.com
abdd778249cb386c28278999b9c6744efe234688
8916107d0f6b66cdf42bd72ae9751ed87937c7f9
/app/src/main/java/com/tempus/portal/model/AppInfo.java
a9ca194782fa26422287e75761b97d04d65f7d81
[]
no_license
wldwanglidan/portal
60635d6484dbb77a1e9dda1f6438a1a22e2ca993
80fff0592960e033be7dc4e1464d3217348c5363
refs/heads/master
2020-03-28T01:18:15.352783
2018-09-05T09:38:50
2018-09-05T09:38:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
403
java
package com.tempus.portal.model; import com.google.gson.annotations.SerializedName; import java.io.Serializable; /** * <获取App实体类> * * @author fuxj * @data: 15/11/10 下午7:34 * @version: V1.0 */ public class AppInfo extends BaseResponse implements Serializable { @SerializedName("appId") public String appId; @SerializedName("appSecret") public String appSecret; }
[ "lidan.wang@tempus.cn" ]
lidan.wang@tempus.cn
cbe5a705c13090c4c0e2822a6122733c2b2c9fbf
ed34f025448a7bab956a643516376f2ca3b10f67
/src/符号.java
908d88cfe5fd295a2811f6a9ae001ccc51f3c81e
[]
no_license
majpyi/coder
b0853c496af843918d35722730e6d9fbf63c10b0
af6a00807b42d8850bea781fcdb402da1a9ca0ba
refs/heads/master
2020-04-24T03:17:20.478620
2019-06-15T03:42:35
2019-06-15T03:42:35
171,665,822
0
0
null
null
null
null
UTF-8
Java
false
false
456
java
/** * @Author: Mr.M * @Date: 2019-03-06 21:57 * @Description: **/ public class 符号 { // final int a; // static final int b; // { // a =1; // b =1; // } public static void main(String[] args) { System.out.println(true || true && false); System.out.println(Integer.toBinaryString(2)); System.out.println(Integer.toBinaryString(~2)); System.out.println(Integer.toBinaryString(-2)); System.out.println(Integer.toBinaryString(2 & -2)); } }
[ "majpyi@gmail.com" ]
majpyi@gmail.com
f9f657b631898ca572ce8fbb589a52abdfecb706
95240a5d173d0b6f517a3c9323d04a875d88cd8c
/src/main/java/com/packt/springboot/blogmania/BlogmaniaApplication.java
2bca26c27cf5ed8d5eca5a876b2243d7d9da3b61
[]
no_license
martin-wa/blogmania
f00d88880f9d17a97685d6557cb730a8ce200f29
e3caf8f0ebced271fca7b6757b4d36f2390141a1
refs/heads/master
2020-08-13T00:28:34.863440
2019-10-13T18:44:09
2019-10-13T18:44:09
214,874,364
0
0
null
null
null
null
UTF-8
Java
false
false
688
java
package com.packt.springboot.blogmania; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; @SpringBootApplication public class BlogmaniaApplication { public static void main(String[] args) { ConfigurableApplicationContext context = SpringApplication.run(BlogmaniaApplication.class, args); for (String s : context.getBeanDefinitionNames()) { System.out.println(s); } //Alternatively for sorted output //Arrays.stream(context.getBeanDefinitionNames()) // .sorted() // .forEach(System.out::println); } }
[ "wayne@system2.localdomain" ]
wayne@system2.localdomain
90fb2cc71c6c2163a99f0b8a1facafea31515f4b
7dee8775a19fb4138b88a371bb318c1b7cc654d4
/src/main/java/game/chat/Field.java
2372c5bb80c4765f87cf5d479740885d98c7fce5
[]
no_license
lMysticl/MessageGame
3745f7895bbfab8ceb5126e615de1f1654ea8a77
f17e41664915cccee753a655672483276925b767
refs/heads/master
2021-03-12T17:03:43.725960
2017-05-16T10:40:00
2017-05-16T10:40:00
91,446,682
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package game.chat; /** * @author Pavlo Putrenkov */ public interface Field { String ID = "id", COUNT = "count", MSG = "msg"; }
[ "puntrenkov99@gmail.com" ]
puntrenkov99@gmail.com
81cbc2fa73aee97f3de1bd160da5f0bb33903a2b
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-422-13-27-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/impl/TagStack_ESTest.java
fa04414274c4e8aaebc32ea98a97f370f39981d5
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
/* * This file was automatically generated by EvoSuite * Tue Apr 07 01:21:35 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.impl; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class TagStack_ESTest extends TagStack_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d04d8b617601ab1f1a985f5af2baef7e37d69147
3390f9e15656d8e7ba921674dc12334309b52f99
/app/src/main/java/fr/univ/orleans/projetopengl/utils/Vector3.java
267301ba88a850da4196360ecf5d6c20d968b28e
[]
no_license
Falcommander/OpenGLES-project
d09a683b9afd7b246f009312d323d782f331d588
efe971b356069cb14e68618548be2740ba46d8a5
refs/heads/master
2023-04-26T07:18:37.888139
2021-05-16T11:06:17
2021-05-16T11:06:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
package fr.univ.orleans.projetopengl.utils; /** * Simple, Trivial, Obvious */ public class Vector3 { public float x; public float y; public float z; public Vector3(float x, float y, float z) { this.x = x; this.y = y; this.z = z; } @Override public String toString() { return "Vector3{" + "x=" + x + ", y=" + y + ", z=" + z + '}'; } }
[ "58592342+Gunteam9@users.noreply.github.com" ]
58592342+Gunteam9@users.noreply.github.com
a21fc4b49567c494b4a038015e05d545616c5db0
156fbf5f8a79a867934899cb0e05506349e41b5d
/modules/SmartPlaylists/src/main/java/com/adashrod/smartplaylists/FileListSortType.java
01fc904d9c5f2e57508fdbb6f5c160f75a612d03
[ "MIT" ]
permissive
adashrod/SmartPlaylists
9aaed318e2358ed6a5da9d4c516849fcc5c0e2ce
2f5fc08ecc88ab6111be69949901748b676e4b62
refs/heads/main
2022-05-18T06:58:28.226633
2017-05-14T02:15:21
2017-05-14T02:15:21
20,837,624
0
0
null
null
null
null
UTF-8
Java
false
false
2,203
java
package com.adashrod.smartplaylists; import java.io.File; import java.util.Comparator; import java.util.HashMap; import java.util.Map; /** * An enum that specifies how a list of files is currently sorted. */ public enum FileListSortType { ASCENDING_NAME, // alphabetically by complete file name (a-z) DESCENDING_NAME, // reverse-alphabetically by complete file name (z-a) ASCENDING_TYPE, // alphabetically by file extension (a-z) DESCENDING_TYPE; // reverse-alphabetically by file extension (a-z) private static final Map<FileListSortType, FileListSortType> complements = new HashMap<>(); private static final Map<FileListSortType, Comparator<File>> complementComparators = new HashMap<>(); static { complements.put(ASCENDING_NAME, DESCENDING_NAME); complements.put(DESCENDING_NAME, ASCENDING_NAME); complements.put(ASCENDING_TYPE, DESCENDING_TYPE); complements.put(DESCENDING_TYPE, ASCENDING_TYPE); complementComparators.put(ASCENDING_NAME, FileComparator.name().descending().caseInsensitive()); complementComparators.put(DESCENDING_NAME, FileComparator.name().ascending().caseInsensitive()); complementComparators.put(ASCENDING_TYPE, FileComparator.type().descending().caseInsensitive()); complementComparators.put(DESCENDING_TYPE, FileComparator.type().ascending().caseInsensitive()); } /** * @return true if the sort is a "sort-by-name" type of sort */ public boolean isNameType() { return this == ASCENDING_NAME || this == DESCENDING_NAME; } /** * @return true if the sort is a "sort-by-type" type of sort */ public boolean isTypeType() { return this == ASCENDING_TYPE || this == DESCENDING_TYPE; } /** * @return the ascending sort type for descending and vice-versa, based on the same sort field (name, type, etc) */ public FileListSortType getComplement() { return complements.get(this); } /** * @return the file comparator that corresponds to the complement sort type */ public Comparator<File> getComplementComparator() { return complementComparators.get(this); } }
[ "adashrod@gmail.com" ]
adashrod@gmail.com
d440af0e6c518bf431e5ce584b9830acfe08679d
14b563a71f9b0db5707c7b318ff1bb8b3917c7c9
/src/test/java/seleniumintro/Udemy/Frames_practice.java
ab5dd8b5e2482aedec7b99a0fcdb721c18e7ab3c
[]
no_license
AntonSemenov87/Cyb_Selenium
ea97f0f787626af379e562f5852309977f8be620
451253e62a953b2fed900090acf71a42c90cfd09
refs/heads/master
2023-01-19T06:10:28.783935
2020-11-21T22:33:36
2020-11-21T22:33:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package seleniumintro.Udemy; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import utilities.Driver; public class Frames_practice { public static void main(String[] args) { Driver.getDriver().get("http://jqueryui.com/droppable/"); // seeing the number of iframes on HTML int size = Driver.getDriver().findElements(By.tagName("iframe")).size(); System.out.println(size); Driver.getDriver().switchTo().frame(0); String text = Driver.getDriver().findElement(By.cssSelector(".ui-widget-content.ui-draggable.ui-draggable-handle")).getText(); System.out.println(text); Driver.getDriver().switchTo().defaultContent(); System.out.println(Driver.getDriver().findElement(By.cssSelector(".desc")).getText()); // dragging and dropping TASK Driver.getDriver().switchTo().frame(0); Actions actions = new Actions(Driver.getDriver()); WebElement sourceSquare = Driver.getDriver().findElement(By.cssSelector(".ui-widget-content.ui-draggable.ui-draggable-handle")); WebElement targetSquare = Driver.getDriver().findElement(By.cssSelector(".ui-widget-header.ui-droppable")); actions.dragAndDrop(sourceSquare, targetSquare).build().perform(); Driver.quitDriver(); } }
[ "Anthony04061987@gmail.com" ]
Anthony04061987@gmail.com
6fff2cef0dedb8549467037fe8bc0117704804ce
f967328922baff5c2b0b2437949aad0118a90435
/gulimall_/gulimall-member/src/main/java/com/xmh/gulimall/member/entity/MemberLoginLogEntity.java
76760d61bcc3bad5bfb1f0e06da469bfe2ef0fe4
[ "Apache-2.0" ]
permissive
Blizzard0409/gulimall
8fb3170789152728df22e83f6ded33ff946edb13
5d46306a2d382f7461da6f7faa11304278e2a978
refs/heads/master
2023-08-20T22:05:00.610822
2021-10-18T07:18:13
2021-10-18T07:18:13
418,384,724
1
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.xmh.gulimall.member.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * 会员登录记录 * * @author xmh * @email 1264551979@qq.com * @date 2021-07-27 12:26:51 */ @Data @TableName("ums_member_login_log") public class MemberLoginLogEntity implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId private Long id; /** * member_id */ private Long memberId; /** * 创建时间 */ private Date createTime; /** * ip */ private String ip; /** * city */ private String city; /** * 登录类型[1-web,2-app] */ private Integer loginType; }
[ "1264551979@qq.com" ]
1264551979@qq.com
d976739713c1c52b55e073c50da30a74918c2bbb
ba3bdafcb64137609de10b9a5414ef107c9f58d9
/neirdialogs/src/main/java/com/neirx/neirdialogs/interfaces/MessageDialog.java
f262e7db79206123c2f4da6d8d0c754ed5b01242
[]
no_license
WaideShery/StopwatchTimer
de08c53bad0d363a0a3d4cf068412fd9258cef8a
ccf79763a6a9b9c670747148c6e1b4c56f451e9b
refs/heads/master
2021-05-16T04:21:12.638399
2016-10-02T21:25:57
2016-10-02T21:25:57
39,430,708
0
0
null
null
null
null
UTF-8
Java
false
false
181
java
package com.neirx.neirdialogs.interfaces; /** * Created by Waide Shery on 06.10.15. * */ public interface MessageDialog extends BaseDialog { void setMessage(String text); }
[ "neritr@gmail.com" ]
neritr@gmail.com
74e842e934beb12bc1c8936d23eeae4f90ff28a6
fbb80c13d0dd8ea55d9055213487b6d0dc64d70a
/app/src/main/java/com/example/tallesrodrigues/medicament11/ServiceHandler.java
3cd0859aae28a691825ef163d31171727058f0a8
[]
no_license
TallesRodrigues/Medicament1.1
889209c7698ca67427168e2a0141eea0c6f87f33
2d85f3c92249af2447704309562fed93342b640e
refs/heads/master
2021-01-20T20:09:06.779230
2016-08-24T18:23:39
2016-08-24T18:23:39
64,896,713
0
0
null
null
null
null
UTF-8
Java
false
false
5,766
java
package com.example.tallesrodrigues.medicament11; /** * Created by TallesRodrigues on 8/20/2016. */ import android.content.ContentValues; import android.util.Log; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; public class ServiceHandler { static String response = null; public final static int GET = 1; public final static int POST = 2; public ServiceHandler() { } /** * Making service call * * @url - url to make request * @method - http request method */ public String makeServiceCall(String url, int method) { return this.makeServiceCall(url, method, null); } /** * Making service call * * @url - url to make request * @method - http request method * @params - http request params */ public String makeServiceCall(String url, int method, ContentValues values) { List<NameValuePair> params = new ArrayList<>(); try { Log.i("Login received ", values.getAsString("email")); if (values.size() != 0) { params.add(new BasicNameValuePair("email", values.getAsString("email"))); params.add(new BasicNameValuePair("password", values.getAsString("password"))); params.add(new BasicNameValuePair("qtd", values.getAsString("qtd"))); } else { params = null; } } catch (NullPointerException e) { Log.e("No login information received ", e.toString()); } try { // http client DefaultHttpClient httpClient = new DefaultHttpClient(); HttpEntity httpEntity = null; HttpResponse httpResponse = null; // Checking http request method type if (method == POST) { HttpPost httpPost = new HttpPost(url); // adding post params if (params != null) { httpPost.setEntity(new UrlEncodedFormEntity(params)); } httpResponse = httpClient.execute(httpPost); } else if (method == GET) { // appending params to url if (params != null) { String paramString = URLEncodedUtils .format(params, "utf-8"); url += "?" + paramString; } HttpGet httpGet = new HttpGet(url); httpResponse = httpClient.execute(httpGet); } httpEntity = httpResponse.getEntity(); response = EntityUtils.toString(httpEntity); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return response; } public String makeServiceCallFeedback(String url, int method, ContentValues values) { List<NameValuePair> params = new ArrayList<>(); try { Log.i("Login received ", values.getAsString("email")); if (values.size() != 0) { params.add(new BasicNameValuePair("email", values.getAsString("email"))); params.add(new BasicNameValuePair("password", values.getAsString("password"))); params.add(new BasicNameValuePair("id_consulta", values.getAsString("id_consulta"))); params.add(new BasicNameValuePair("msg", values.getAsString("msg"))); } else { params = null; } } catch (NullPointerException e) { Log.e("No login information received ", e.toString()); } try { // http client DefaultHttpClient httpClient = new DefaultHttpClient(); HttpEntity httpEntity = null; HttpResponse httpResponse = null; // Checking http request method type if (method == POST) { HttpPost httpPost = new HttpPost(url); // adding post params if (params != null) { httpPost.setEntity(new UrlEncodedFormEntity(params)); } httpResponse = httpClient.execute(httpPost); } else if (method == GET) { // appending params to url if (params != null) { String paramString = URLEncodedUtils .format(params, "utf-8"); url += "?" + paramString; } HttpGet httpGet = new HttpGet(url); httpResponse = httpClient.execute(httpGet); } httpEntity = httpResponse.getEntity(); response = EntityUtils.toString(httpEntity); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return response; } }
[ "tallesnr@gmail.com" ]
tallesnr@gmail.com
40fa8e8072403478624ccbcd783f23d199c9c046
c3c8bcab7fed27d377173981fc0f2f878731a3b4
/src/main/java/centrale/fr/rules/service/BlacklistService.java
daf33a97e2b70e1e3271eafe332dd09653839517
[]
no_license
boussoufiane/CentralRulesChecker
bf6360c44744e9a3a6b0aa5d8481918e589987d2
e2d0fe61cf72643cfec28475722c2ebbed4ed24e
refs/heads/master
2022-04-24T15:01:56.724763
2020-04-29T11:39:28
2020-04-29T11:39:28
259,908,174
0
0
null
null
null
null
UTF-8
Java
false
false
137
java
package centrale.fr.rules.service; public interface BlacklistService { boolean isRegisterNumberBlacklisted(String registerNumber); }
[ "y.boussoufiane@gmail.com" ]
y.boussoufiane@gmail.com
ef15211c36b5f299d8a2a769e042e3f1d7b0ce49
2ff68eb0220a75db8882874e567d2084a85bf275
/module/rdd-jpa/src/main/java/com/raf/rdd/jpa/domain/skill/package-info.java
94e2dda7b5aed4951fbc2abb23fe85a52ef2ec15
[]
no_license
rtourneur/rdd
7cf25d73c46bc4cb4cc770890f65e4d2b93fef90
5285eb799f3d328ee0ac2179834e600926f2aebb
refs/heads/master
2021-01-10T04:34:34.064818
2018-04-23T12:02:07
2018-04-23T12:02:07
51,079,302
0
0
null
null
null
null
UTF-8
Java
false
false
115
java
/** * Package for domain objects of type skill. * * @author RAF */ package com.raf.rdd.jpa.domain.skill;
[ "rtourneur.rt@gmail.com" ]
rtourneur.rt@gmail.com
7df0f2ac02827d08ae808609d0c2a0addfd2ff07
715a536c044ee2ecad05b2a33e7d7ee2a7a2e397
/hakerrank.java
3fd55e524ad6f85d19d29ed4ac5b11a1863fecc4
[]
no_license
Nitish-1998/Java_Core
7ff53085d1ad3c5b2c135343279c8c4b599d9b2a
9d9796b6c20b1755977c9ecf08fee8b19b28b8e8
refs/heads/master
2020-12-09T10:31:13.454015
2020-02-29T11:55:25
2020-02-29T11:55:25
233,277,862
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
import java.util.*; class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int i=0,a; System.out.println("Enter integer: "); while(i<3) { a=scan.nextInt(); i++; } // Complete this line // Complete this line } }
[ "nitishojha33@gmail.com" ]
nitishojha33@gmail.com
0c1d43833405ad24e51735f7be5e9703c1195bdf
17cf0e343730863384ea9dfbcbc99fc5541fa1bf
/bidirectioneel/src/main/java/auction/domain/Item.java
9cb1c9b378d66a8c3c3a17d2ff8b1696c7d52187
[]
no_license
Realantran/SE42
f3ad5117c2ae821aca188be4988efd626de5ee7d
86e74f5805c7434077be14cbfce57d66fd0da60b
refs/heads/master
2021-09-03T09:04:18.157698
2018-01-07T22:26:07
2018-01-07T22:26:07
113,041,379
0
1
null
null
null
null
UTF-8
Java
false
false
4,053
java
package auction.domain; import java.util.Objects; import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToOne; import nl.fontys.util.Money; @Entity @Inheritance (strategy = InheritanceType.JOINED) @NamedQueries({ @NamedQuery(name = "Item.getAll", query = "select I from Item as I") , @NamedQuery(name = "Item.count", query = "select count(I) from Item as I") , @NamedQuery(name = "Item.findByDescription", query = "select I from Item as I where I.description = :description") , @NamedQuery(name = "Item.findByID", query = "select I from Item as I where I.id = :id") }) public abstract class Item implements Comparable { @Id @GeneratedValue private Long id; @ManyToOne private User seller; @Embedded @AttributeOverrides({ @AttributeOverride(name = "description", column = @Column(name = "category_description")) }) private Category category; private String description; @OneToOne(cascade = CascadeType.PERSIST, mappedBy = "bidItem") private Bid highest; public Item(User seller, Category category, String description) { this.seller = seller; this.category = category; this.description = description; seller.addItem(this); } public Item(Long id, User seller, Category category, String description, Bid highest) { this.id = id; this.seller = seller; this.category = category; this.description = description; this.highest = highest; seller.addItem(this); } public Item() { } public Long getId() { return id; } public User getSeller() { return seller; } public Category getCategory() { return category; } public String getDescription() { return description; } public Bid getHighestBid() { return highest; } public Bid newBid(User buyer, Money amount) { if (highest != null && highest.getAmount().compareTo(amount) >= 0) { return null; } highest = new Bid(buyer, amount, this); return highest; } @Override public int hashCode() { int hash = 3; hash = 37 * hash + Objects.hashCode(this.seller); hash = 37 * hash + Objects.hashCode(this.category); hash = 37 * hash + Objects.hashCode(this.description); hash = 37 * hash + Objects.hashCode(this.highest); return hash; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Item other = (Item) obj; if (!Objects.equals(this.description, other.description)) { return false; } if (!Objects.equals(this.id, other.id)) { return false; } if (!Objects.equals(this.seller, other.seller)) { return false; } if (!Objects.equals(this.category, other.category)) { return false; } if (!Objects.equals(this.highest, other.highest)) { return false; } return true; } @Override public int compareTo(Object o) { Item compareItem = (Item) o; return this.id.compareTo(compareItem.getId()); } }
[ "mitchkuijpers@hotmail.com" ]
mitchkuijpers@hotmail.com
0a6df2b8d8c15361e49767597d221693b9455eaf
eb5121a29ede482b1948416589578dca75d5d09d
/dream-framework/src/main/java/com/dream/framework/util/ShiroUtils.java
b9e4d79969b49caaebd73543ce4b18e970287e0d
[ "MIT" ]
permissive
FEZ-HJ/Dream
d2ba0a5d356c69c9e8a24506b03f9af961e52012
c9f5440f80631de7e10b5c872b6efda9e6d99ddd
refs/heads/master
2022-07-31T13:30:36.673168
2019-12-03T14:05:57
2019-12-03T14:05:57
224,674,861
0
0
MIT
2022-07-06T20:44:47
2019-11-28T14:50:38
HTML
UTF-8
Java
false
false
2,675
java
package com.dream.framework.util; import org.apache.shiro.SecurityUtils; import org.apache.shiro.crypto.SecureRandomNumberGenerator; import org.apache.shiro.mgt.RealmSecurityManager; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.SimplePrincipalCollection; import com.dream.common.utils.StringUtils; import com.dream.common.utils.bean.BeanUtils; import com.dream.framework.shiro.realm.UserRealm; import com.dream.system.domain.SysUser; /** * shiro 工具类 * * @author dream */ public class ShiroUtils { public static Subject getSubject() { return SecurityUtils.getSubject(); } public static Session getSession() { return SecurityUtils.getSubject().getSession(); } public static void logout() { getSubject().logout(); } public static SysUser getSysUser() { SysUser user = null; Object obj = getSubject().getPrincipal(); if (StringUtils.isNotNull(obj)) { user = new SysUser(); BeanUtils.copyBeanProp(user, obj); } return user; } public static void setSysUser(SysUser user) { Subject subject = getSubject(); PrincipalCollection principalCollection = subject.getPrincipals(); String realmName = principalCollection.getRealmNames().iterator().next(); PrincipalCollection newPrincipalCollection = new SimplePrincipalCollection(user, realmName); // 重新加载Principal subject.runAs(newPrincipalCollection); } public static void clearCachedAuthorizationInfo() { RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils.getSecurityManager(); UserRealm realm = (UserRealm) rsm.getRealms().iterator().next(); realm.clearCachedAuthorizationInfo(); } public static Long getUserId() { return getSysUser().getUserId().longValue(); } public static String getLoginName() { return getSysUser().getLoginName(); } public static String getIp() { return getSubject().getSession().getHost(); } public static String getSessionId() { return String.valueOf(getSubject().getSession().getId()); } /** * 生成随机盐 */ public static String randomSalt() { // 一个Byte占两个字节,此处生成的3字节,字符串长度为6 SecureRandomNumberGenerator secureRandom = new SecureRandomNumberGenerator(); String hex = secureRandom.nextBytes(3).toHex(); return hex; } }
[ "fez-hj@163.com" ]
fez-hj@163.com
e6df2670a61dae4af7561e4ffd289d6202634f8c
04492676e066ce4ca0eafef3c0fba6f1eb47b713
/src/main/java/com/space/controller/ShipController.java
d7064ea62b7db67b206bea938bd02413668f66f5
[]
no_license
syrtin/cosmoport
afe2d5e293bb71f8c2a67de869e27d4986a9fbf9
1f79e5a3591989ea069316427335903aae24fe50
refs/heads/master
2023-02-16T16:19:02.330847
2021-01-01T08:57:25
2021-01-01T08:57:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,081
java
package com.space.controller; import com.space.model.Ship; import com.space.model.ShipType; import com.space.service.ShipService; import com.space.service.ShipServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/rest/ships") public class ShipController { private final ShipService service; @Autowired public ShipController(ShipServiceImpl shipServiceImpl) { this.service = shipServiceImpl; } @GetMapping public List<Ship> getAllShips( @RequestParam(required = false) String name, @RequestParam(required = false) String planet, @RequestParam(required = false) ShipType shipType, @RequestParam(required = false) Long after, @RequestParam(required = false) Long before, @RequestParam(required = false) Boolean isUsed, @RequestParam(required = false) Double minSpeed, @RequestParam(required = false) Double maxSpeed, @RequestParam(required = false) Integer minCrewSize, @RequestParam(required = false) Integer maxCrewSize, @RequestParam(required = false) Double minRating, @RequestParam(required = false) Double maxRating, @RequestParam(required = false) ShipOrder order, @RequestParam(required = false, defaultValue = "0") Integer pageNumber, @RequestParam(required = false, defaultValue = "3") Integer pageSize ) { List<Ship> list = service.getAllShips(name, planet, shipType, after, before, isUsed, minSpeed, maxSpeed, minCrewSize, maxCrewSize, minRating, maxRating, order); return service.getAllShipsByPage(pageNumber, pageSize, list); } @GetMapping("/count") public Integer getShipsCount( @RequestParam(required = false) String name, @RequestParam(required = false) String planet, @RequestParam(required = false) ShipType shipType, @RequestParam(required = false) Long after, @RequestParam(required = false) Long before, @RequestParam(required = false) Boolean isUsed, @RequestParam(required = false) Double minSpeed, @RequestParam(required = false) Double maxSpeed, @RequestParam(required = false) Integer minCrewSize, @RequestParam(required = false) Integer maxCrewSize, @RequestParam(required = false) Double minRating, @RequestParam(required = false) Double maxRating ) { return service.getAllShips(name, planet, shipType, after, before, isUsed, minSpeed, maxSpeed, minCrewSize, maxCrewSize, minRating, maxRating, null).size(); } @GetMapping("/{id}") public Ship getShipById(@PathVariable Long id) { return service.getShipById(id); } @PostMapping public Ship createNewShip(@RequestBody Ship newShip) { return service.createNewShip(newShip); } @PostMapping("/{id}") public Ship updateShipById(@RequestBody Ship newShip, @PathVariable Long id) { return service.updateShipById(newShip, id); } @DeleteMapping("/{id}") public void deleteShipById(@PathVariable Long id) { service.deleteShipById(id); } }
[ "75948964+NikeMirum@users.noreply.github.com" ]
75948964+NikeMirum@users.noreply.github.com
155de6ad43ddcdce81b3894ac9678e1705a9891d
b9817829d83df2376c2091863809e1a3361bd49f
/MavenFebruary8AMBatch/src/test/java/com/project/MavenFebruary8AMBatch/JavaClass.java
9416b0d55ac752c3e5895396dacd3ad7067b3b58
[]
no_license
pandudamera/Dec2020_Selenium_Batch
7ac8aa7ac8926b2f080a88585a11a48cedd141d9
4ab3297105ff6d35febbaedebbae8e4836b3d999
refs/heads/master
2023-03-31T18:32:23.875661
2021-04-09T05:19:22
2021-04-09T05:19:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
156
java
package com.project.MavenFebruary8AMBatch; public class JavaClass { public static void main(String[] args) { // TODO Auto-generated method stub } }
[ "maha@gmail.com" ]
maha@gmail.com
93d744e16ade6e054fc93f881ef7d2f1ad650c6c
2798846fdf7e5c1b097022727fb2a76d674d779c
/src/test/java/com/feldmanm/app/ws/MobileAppWsApplicationTests.java
8dfd34aa84cd33bdc6b13b4f5926a9ac9cda1c16
[]
no_license
fmagoge/mobile-app-ws
71b70ff693f509530b9ecefa894c0ef68b65711c
7dd11bb326bc7c3fbdfe5c0c6f19a5887c1d2c36
refs/heads/master
2022-03-10T07:10:06.229842
2019-11-17T13:42:30
2019-11-17T13:42:30
222,254,129
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
package com.feldmanm.app.ws; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class MobileAppWsApplicationTests { @Test void contextLoads() { } }
[ "fmagoge@gmail.com" ]
fmagoge@gmail.com
b4f1e255980fa55bd895666a6bc11c0ebb84791b
c3a8a8d551ddbb3c228de17ae8458b533a4cf075
/app/src/main/java/ru/rpw_mos/zp/JSONParser.java
6f5e0ede09a2f0ee77c647a2eee202f9a891679d
[]
no_license
petrovichtim/Zp
a1596ad49c019f3e91f9b66f7883ac669be168f1
3dc57b4556c23feb11fc16698c4c9089c873aaf5
refs/heads/master
2021-01-17T17:05:21.136351
2015-05-15T13:18:55
2015-05-15T13:19:01
25,340,490
0
0
null
null
null
null
UTF-8
Java
false
false
3,388
java
package ru.rpw_mos.zp; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.util.Map; public class JSONParser { static JSONObject jObj = null; static String json = ""; private static final char PARAMETER_DELIMITER = '&'; private static final char PARAMETER_EQUALS_CHAR = '='; // constructor public JSONParser() { } // function get json from url // by making HTTP POST or GET mehtod public JSONObject makeHttpRequest(String url, String method, Map<String, String> params) { // Making HTTP request try { URL url1 = new URL(url); HttpURLConnection urlConnection = (HttpURLConnection) url1.openConnection(); urlConnection.setRequestMethod(method); if (params != null) { urlConnection.setDoOutput(true); OutputStream os = urlConnection.getOutputStream(); BufferedWriter writer = new BufferedWriter( new OutputStreamWriter(os, "UTF-8")); writer.write(createQueryStringForParameters(params)); writer.flush(); writer.close(); os.close(); } try { InputStream is = new BufferedInputStream(urlConnection.getInputStream()); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); // is, "UTF-8"), 8); //is,"iso-8859-1"), 8); StringBuilder sb = new StringBuilder(); String line;// = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } is.close(); json = sb.toString(); } finally { urlConnection.disconnect(); } } catch (Exception e) { //Log.e("Buffer Error", "Error converting result " + e.toString()); } // try parse the string to a JSON object try { jObj = new JSONObject(json); } catch (JSONException e) { //Log.e("JSON Parser", "Error parsing data " + e.toString()); } // return JSON String return jObj; } public static String createQueryStringForParameters(Map<String, String> parameters) { StringBuilder parametersAsQueryString = new StringBuilder(); if (parameters != null) { boolean firstParameter = true; for (String parameterName : parameters.keySet()) { if (!firstParameter) { parametersAsQueryString.append(PARAMETER_DELIMITER); } parametersAsQueryString.append(parameterName) .append(PARAMETER_EQUALS_CHAR) .append(URLEncoder.encode( parameters.get(parameterName))); firstParameter = false; } } return parametersAsQueryString.toString(); } }
[ "alfa-servis@inbox.ru" ]
alfa-servis@inbox.ru
5013e28e454b7c2f3ebc3ed44ccb5745df831a7e
fb2203c1188c95d0d77d9c0f1aee36827a668175
/app/src/main/java/com/itheima/rbclient/bean/HotproductAppInfo.java
1f40ebc899ec0bfbe325e4b44ee8d8238949e813
[]
no_license
TenFace/RBClient
0d7399fcdc1602ad314c4c9ea9bd63207431302a
55a3f95b1f7e02c84d886e69ca9812516e362451
refs/heads/master
2020-12-24T06:31:16.369438
2016-11-12T09:33:20
2016-11-12T09:33:20
73,474,117
1
0
null
null
null
null
UTF-8
Java
false
false
3,041
java
package com.itheima.rbclient.bean; import org.senydevpkg.net.resp.IResponse; import java.util.List; /** * Created by yt on 2016/8/7. */ public class HotproductAppInfo implements IResponse { /** * listCount : 15 * productList : [{"id":18,"marketPrice":200,"name":"短裙","pic":"/images/product/detail/q16.jpg","price":160},{"id":22,"marketPrice":200,"name":"新款毛衣","pic":"/images/product/detail/q20.jpg","price":160},{"id":25,"marketPrice":150,"name":"新款秋装","pic":"/images/product/detail/q23.jpg","price":160},{"id":26,"marketPrice":200,"name":"粉色系暖心套装","pic":"/images/product/detail/q24.jpg","price":200},{"id":27,"marketPrice":150,"name":"韩版粉嫩外套","pic":"/images/product/detail/q25.jpg","price":160},{"id":28,"marketPrice":300,"name":"春装新款","pic":"/images/product/detail/q26.jpg","price":200},{"id":29,"marketPrice":180,"name":"日本奶粉","pic":"/images/product/detail/q26.jpg","price":160},{"id":30,"marketPrice":200,"name":"超凡奶粉","pic":"/images/product/detail/q26.jpg","price":160},{"id":31,"marketPrice":260,"name":"天籁牧羊奶粉","pic":"/images/product/detail/q26.jpg","price":200},{"id":32,"marketPrice":300,"name":"fullcare奶粉","pic":"/images/product/detail/q26.jpg","price":300}] * response : hotProduct */ private int listCount; private String response; /** * id : 18 * marketPrice : 200 * name : 短裙 * pic : /images/product/detail/q16.jpg * price : 160 */ private List<ProductListBean> productList; public int getListCount() { return listCount; } public void setListCount(int listCount) { this.listCount = listCount; } public String getResponse() { return response; } public void setResponse(String response) { this.response = response; } public List<ProductListBean> getProductList() { return productList; } public void setProductList(List<ProductListBean> productList) { this.productList = productList; } public static class ProductListBean { private int id; private int marketPrice; private String name; private String pic; private int price; public int getId() { return id; } public void setId(int id) { this.id = id; } public int getMarketPrice() { return marketPrice; } public void setMarketPrice(int marketPrice) { this.marketPrice = marketPrice; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPic() { return pic; } public void setPic(String pic) { this.pic = pic; } public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } } }
[ "zhangtf@linkstec.com" ]
zhangtf@linkstec.com
3b2a6da9de2eafa16e2350c34f1a2ad837f8f11b
a24789efd2cb74131111acf2baf3ffff2d6e8280
/JavaCode/random_records/N1301_1400/N1366_rank_teams_by_votes.java
43e998027095044533b0f7e61ffb311ccb03e9aa
[ "Apache-2.0" ]
permissive
MikuSugar/LeetCode
15e6c7a73b296a74f4c86435c832f99021a3b6d7
e9cf36e52ae38d92b97e3c5c026c97e300c07971
refs/heads/master
2023-06-26T10:39:50.001158
2023-06-21T08:31:37
2023-06-21T08:31:37
164,054,066
6
0
null
null
null
null
UTF-8
Java
false
false
3,806
java
package JavaCode.random_records.N1301_1400; import java.util.Arrays; /** * author:fangjie * time:2020/3/6 */ public class N1366_rank_teams_by_votes { public String rankTeams(String[] votes) { int[][] book=new int[26][votes[0].length()+1]; for (String vote:votes) { char[] strs=vote.toCharArray(); for (int i=0;i<strs.length;i++) { book[strs[i]-'A'][i]++; } } for (int i=0;i<26;i++) { book[i][votes[0].length()]=i; } Arrays.sort(book, (o1, o2)->{ for (int i=0;i<o1.length-1;i++) { if(o1[i]>o2[i])return -1; else if(o1[i]<o2[i])return 1; } return Integer.compare(o1[votes[0].length()],o2[votes[0].length()]); }); StringBuilder res=new StringBuilder(); for (int i=0;i<votes[0].length();i++) { int[] b=book[i]; res.append((char)('A'+b[votes[0].length()])); } return res.toString(); } } /* 现在有一个特殊的排名系统,依据参赛团队在投票人心中的次序进行排名,每个投票者都需要按从高到低的顺序对参与排名的所有团队进行排位。 排名规则如下: 参赛团队的排名次序依照其所获「排位第一」的票的多少决定。如果存在多个团队并列的情况,将继续考虑其「排位第二」的票的数量。以此类推,直到不再存在并列的情况。 如果在考虑完所有投票情况后仍然出现并列现象,则根据团队字母的字母顺序进行排名。 给你一个字符串数组 votes 代表全体投票者给出的排位情况,请你根据上述排名规则对所有参赛团队进行排名。 请你返回能表示按排名系统 排序后 的所有团队排名的字符串。   示例 1: 输入:votes = ["ABC","ACB","ABC","ACB","ACB"] 输出:"ACB" 解释:A 队获得五票「排位第一」,没有其他队获得「排位第一」,所以 A 队排名第一。 B 队获得两票「排位第二」,三票「排位第三」。 C 队获得三票「排位第二」,两票「排位第三」。 由于 C 队「排位第二」的票数较多,所以 C 队排第二,B 队排第三。 示例 2: 输入:votes = ["WXYZ","XYZW"] 输出:"XWYZ" 解释:X 队在并列僵局打破后成为排名第一的团队。X 队和 W 队的「排位第一」票数一样,但是 X 队有一票「排位第二」,而 W 没有获得「排位第二」。 示例 3: 输入:votes = ["ZMNAGUEDSJYLBOPHRQICWFXTVK"] 输出:"ZMNAGUEDSJYLBOPHRQICWFXTVK" 解释:只有一个投票者,所以排名完全按照他的意愿。 示例 4: 输入:votes = ["BCA","CAB","CBA","ABC","ACB","BAC"] 输出:"ABC" 解释: A 队获得两票「排位第一」,两票「排位第二」,两票「排位第三」。 B 队获得两票「排位第一」,两票「排位第二」,两票「排位第三」。 C 队获得两票「排位第一」,两票「排位第二」,两票「排位第三」。 完全并列,所以我们需要按照字母升序排名。 示例 5: 输入:votes = ["M","M","M","M"] 输出:"M" 解释:只有 M 队参赛,所以它排名第一。 提示: 1 <= votes.length <= 1000 1 <= votes[i].length <= 26 votes[i].length == votes[j].length for 0 <= i, j < votes.length votes[i][j] 是英文 大写 字母 votes[i] 中的所有字母都是唯一的 votes[0] 中出现的所有字母 同样也 出现在 votes[j] 中,其中 1 <= j < votes.length 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/rank-teams-by-votes 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */
[ "syfangjie@live.cn" ]
syfangjie@live.cn
4c6d1183926587499d5aa582134e7e79f63c1f3d
270b68f1fdc08145542e6c127db275d53bdbd8ec
/AbstractFactory/src/ColorFactory.java
ee5c8b310e52876942adf58f256f09ed2afe4a57
[]
no_license
mutahirgharay/designpattern
0746484e5c71fd0af7352b48adc9a510317c5ef0
040055c554e6182684a66490564d32b7b7321620
refs/heads/master
2021-01-18T23:22:24.810698
2017-04-03T21:15:08
2017-04-03T21:15:08
87,108,641
0
1
null
null
null
null
UTF-8
Java
false
false
633
java
public class ColorFactory extends AbstractFactory { @Override Color getcolor(String color) { if(color.equals("Red")) { return new Red(); } else if(color.equals("Green")) { return new Green(); } else if(color.equals("Blue")) { return new Blue(); } return null;//To change body of generated methods, choose Tools | Templates. } @Override Shpae getshape(String shape) { return null;//To change body of generated methods, choose Tools | Templates. } }
[ "noreply@github.com" ]
noreply@github.com
88cc59ffbfa70875797b8d1763f6c495eedc162b
f581d2edba47f81594b6e4fc546d824065e3bf19
/Shahir/Adidas_Project/Adidas_Project/src/test/java/pages/Adidas_InstaPage.java
8ae4936eeebd8df99c224d32e47487ede4b22c3e
[]
no_license
Cognizant-Training-Coimbatore/Lab-Excercise
8c372d57cf170820be9c1ec3fd3ae4cb097cc933
3f9707569c04c8a831ab8a1b8953af8c3114a534
refs/heads/master
2021-07-06T10:49:49.862257
2020-03-17T12:43:03
2020-03-17T12:43:03
236,133,635
1
47
null
2021-04-26T20:03:55
2020-01-25T06:17:39
Java
UTF-8
Java
false
false
1,605
java
package pages; import java.util.ArrayList; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.interactions.Actions; public class Adidas_InstaPage { WebDriver driver; By instagramicon=By.xpath("//img[@alt='Instagram']"); By button = By.xpath("//*[@id=\"react-root\"]/section/nav/div[2]/div/div/div[3]/div/div/div/button"); By igtv = By.xpath("//a[@href=\"/adidasoriginals/channel/\"]"); By item = By.xpath("//a[@href=\"/tv/B54tZaroSt7/\"]"); By play = By.xpath("//video[@class]"); public Adidas_InstaPage(WebDriver driver) { this.driver = driver; } public void click_On_insta() throws InterruptedException { driver.findElement(instagramicon).click(); TimeUnit.SECONDS.sleep(2); } public void click_igtv() throws InterruptedException { TimeUnit.SECONDS.sleep(2); ArrayList<String> newtab = new ArrayList<String>(driver.getWindowHandles()); driver.switchTo().window(newtab.get(0)); driver.close(); driver.switchTo().window((String) newtab.get(1)); driver.findElement(button).click(); driver.findElement(igtv).click(); TimeUnit.SECONDS.sleep(2); } public void video_play() throws InterruptedException { TimeUnit.SECONDS.sleep(2); Actions action = new Actions(driver); action.moveToElement(driver.findElement(item)).click().build().perform(); driver.findElement(item).click(); TimeUnit.SECONDS.sleep(2); } public void click_play() throws InterruptedException { TimeUnit.SECONDS.sleep(3); driver.findElement(play).click(); TimeUnit.SECONDS.sleep(10); } }
[ "noreply@github.com" ]
noreply@github.com
ca6f9df1942ac9f601bf5270e251ea45babd0f83
b9b5ab020c06751ce5645412d04befaba4e46293
/src/main/java/com/bank/credyunion/configuration/JdbcConfiguration.java
1d91098ff37cd1034a239a77608190ded31d750f
[]
no_license
inforoy/demoGrado
cfa27419656b44b982b181c7d3384e3369851a94
8c5283ef3a7823f5b80c16f3d10b9f53d621003b
refs/heads/master
2021-01-23T14:05:40.491481
2016-10-29T21:43:10
2016-10-29T21:43:10
58,875,476
0
0
null
null
null
null
UTF-8
Java
false
false
1,180
java
package com.bank.credyunion.configuration; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * Services configuration. * * @author Vector ITC Group */ @Configuration @EnableTransactionManagement public class JdbcConfiguration { @Autowired private DataSource dataSource; /** * JDBC template bean configuration * * @return {@link JdbcTemplate} */ @Bean public JdbcTemplate jdbcTemplate() { return new JdbcTemplate(dataSource); } /** * PlatformTransactionManager bean configuration * * @return {@link PlatformTransactionManager} */ @Bean public PlatformTransactionManager txManager() { return new DataSourceTransactionManager(dataSource); } }
[ "rwcalles@gmail.com" ]
rwcalles@gmail.com
6efa5cee1461421970347db41aab831d6f7c1105
2df4793e4f113ad42629268b28d8f3287f906758
/启发式搜索与演化算法/HESA_assignment1/src/tracks/levelGeneration/constraints/SolutionLengthConstraint.java
e82ffbc154e9386adf6a7d966f545118385777b6
[ "GPL-3.0-or-later", "MIT" ]
permissive
jocelyn2002/NJUAI_CodingHW
7c692a08fb301f5cac146fef6da3f94d5043f2e9
002c5ecbad671b75059290065db73a7152c98db9
refs/heads/main
2023-04-29T06:25:46.607063
2021-05-25T02:45:58
2021-05-25T02:45:58
448,436,119
5
1
MIT
2022-01-16T02:06:27
2022-01-16T02:06:26
null
UTF-8
Java
false
false
726
java
package tracks.levelGeneration.constraints; public class SolutionLengthConstraint extends AbstractConstraint{ /** * the number of steps that the agent did when plays the game */ public double solutionLength; /** * the minimum number of steps the agent should do */ public double minSolutionLength; /** * check if the solution length is at least equal to minSolutionLength * @return 1 if the solution length is larger than or equal to min solution length * and percentage of how near the solution length to min solution length otherwise */ @Override public double checkConstraint() { if(solutionLength >= minSolutionLength){ return 1; } return solutionLength / minSolutionLength; } }
[ "dinghao12601@126.com" ]
dinghao12601@126.com
8660e29653dc47f75db1eb30265383c8e44931dd
21fc31a08d82d28e943e2e5994853ce89c493f57
/orientacaoObjeto/Funcionario.java
d488799bbb3baf55ffb9b6a8b97d15c2ba78db7c
[]
no_license
joaozinsh/java-exercicios-generation
1551b4e0f38573d132621c9b43941df8e435c919
fece91e36f37d9556851234cd48899e103b5bef1
refs/heads/main
2023-04-30T13:25:18.515723
2021-05-14T02:18:54
2021-05-14T02:18:54
364,705,245
0
0
null
null
null
null
UTF-8
Java
false
false
1,161
java
package orientacaoObjeto; import java.text.NumberFormat; import java.util.Scanner; public class Funcionario { Scanner sc = new Scanner(System.in); private String nome; private int codigo; private double salario; public Funcionario(String nome, int codigo, double salario) { this.nome = nome; this.codigo = codigo; this.salario = salario; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public int getCodigo() { return codigo; } public void setCodigo(int codigo) { this.codigo = codigo; } public double getSalario() { return salario; } public void setSalario(double salario) { this.salario = salario; } public String formatarSalario() { NumberFormat nf = NumberFormat.getCurrencyInstance(); nf.setMinimumFractionDigits(2); String formatoSalario = nf.format(salario); return formatoSalario; } public void aumentarSalario(double porcentagem) { salario *= 1 + porcentagem / 100; } public void mostrarFuncionario() { System.out.println("\nNome do funcionário: "+nome+"\nCódigo: "+codigo+"\nSalário: "+this.formatarSalario()); } }
[ "joaogabriel241201@gmail.com" ]
joaogabriel241201@gmail.com
fa88cd8e06de5f637d5857aa1164fe0e31d8a60c
c47d443793d0575b72d559c0c9ad900330467674
/web/project/src/main/java/com/webank/wedatasphere/qualitis/rule/request/multi/DeleteMultiSourceRequest.java
9ecbc68237cfc8c5c2f36b9eaa1d3b07dafc3085
[ "Apache-2.0" ]
permissive
yunluwen/Qualitis
03d5d9ac48372e62d02d1140aea72735cf9c782c
04fdc4a1da48daa3dbd948778f04d38abecd34b1
refs/heads/master
2020-11-29T18:34:57.415723
2019-12-23T09:22:18
2019-12-23T09:22:18
230,190,447
1
0
Apache-2.0
2019-12-26T03:45:48
2019-12-26T03:45:47
null
UTF-8
Java
false
false
1,598
java
/* * Copyright 2019 WeBank * * 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.webank.wedatasphere.qualitis.rule.request.multi; import com.fasterxml.jackson.annotation.JsonProperty; import com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException; import com.webank.wedatasphere.qualitis.project.request.CommonChecker; import com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException; import com.webank.wedatasphere.qualitis.project.request.CommonChecker; /** * @author howeye */ public class DeleteMultiSourceRequest { @JsonProperty("multi_rule_id") private Long multiRuleId; public DeleteMultiSourceRequest() { } public Long getMultiRuleId() { return multiRuleId; } public void setMultiRuleId(Long multiRuleId) { this.multiRuleId = multiRuleId; } public static void checkRequest(DeleteMultiSourceRequest request) throws UnExpectedRequestException { CommonChecker.checkObject(request, "Request"); CommonChecker.checkObject(request.getMultiRuleId(), "Multi rule id"); } }
[ "360782885@qq.com" ]
360782885@qq.com
984fa9fa8eb1edd1451dc8123196684e4ec1482f
e60b63393a7cef698038c891da4a0bea5f9e78b8
/fmkj-order/order-server/src/main/java/com/fmkj/order/server/service/OrderLogService.java
88edbc7bafeee330d7267805a87972d5f7e97ecf
[]
no_license
DaulYello/hammer-cloud
0b0877a8a59343ad08d27555e2255388ce548b4b
150ebe6817b8e5c6b575280a34b221fbc8c62097
refs/heads/master
2020-04-11T14:52:04.946749
2018-12-03T02:31:51
2018-12-03T02:31:51
161,871,494
0
1
null
null
null
null
UTF-8
Java
false
false
266
java
package com.fmkj.order.server.service; import com.fmkj.common.base.BaseService; import com.fmkj.order.dao.domain.OperateLog; /** * @Auther: youxun * @Date: 2018/8/29 13:16 * @Description: */ public interface OrderLogService extends BaseService<OperateLog> { }
[ "632017924@qq.com" ]
632017924@qq.com
76c5de1dbb3a905bfaf73f1b2f8108ae6108f434
46f0a084763f81cd7fd3a6dd5d2c7d8eacf8d028
/Session5/app/src/main/java/com/example/hieuit/android7_pomodoro/activitys/ColorActivity.java
32f4e75400cd0075213ec0ab24d5f867eb95d7da
[]
no_license
TranHanHieu/android7-pomodoro
2f08ae518fa2c9b28cf7745484406a5c3af011cd
2b2afdfce9afdca699147a538ed6752ad2ea343b
refs/heads/master
2021-01-11T20:22:22.680758
2017-03-07T05:02:30
2017-03-07T05:02:30
78,640,720
0
0
null
null
null
null
UTF-8
Java
false
false
1,105
java
package com.example.hieuit.android7_pomodoro.activitys; import android.os.Bundle; import android.os.PersistableBundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.example.hieuit.android7_pomodoro.R; import com.example.hieuit.android7_pomodoro.adapters.ColorAdapter; import butterknife.BindView; import butterknife.ButterKnife; /** * Created by Hieu It on 2/11/2017. */ public class ColorActivity extends AppCompatActivity { @BindView(R.id.rv_color) RecyclerView rvColor; private ColorAdapter colorAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_color); setupUI(); } private void setupUI() { ButterKnife.bind(this); colorAdapter = new ColorAdapter(); rvColor.setAdapter(colorAdapter); rvColor.setLayoutManager(new GridLayoutManager(this,4)); } }
[ "hanhieu.a3.namly.2012@gmail.com" ]
hanhieu.a3.namly.2012@gmail.com
d3a1e7ef594d7b6617e1afe4509b5606f7950973
2ad2f360f5ba287b36ad4dfbf4246c36a31b6892
/CineplexSystem/src/edu/nju/cineplex/service/AdminManageService.java
c5fcd35cd73c4ba28d7b766c74b892a38eb72626
[]
no_license
marc45/CineplexSystem
17d418aec84c2d7849bad3b98c93bdfb7bc98523
867712fe69c321f0c1c5b91d916e18a490a7682c
refs/heads/master
2021-01-22T18:01:41.177473
2015-09-16T14:11:26
2015-09-16T14:11:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
565
java
package edu.nju.cineplex.service; import edu.nju.cineplex.action.business.DailyUsageBean; import edu.nju.cineplex.action.business.MemberStatisticsDataBean; import edu.nju.cineplex.action.business.MonthPurchaseNumBean; public interface AdminManageService { /** * @param name * @param passwd * @return */ public boolean validate(String name,String passwd); public MemberStatisticsDataBean getMemberStatisticsDataBean(); public MonthPurchaseNumBean getMonthPurchaseNumBean(); public DailyUsageBean getDailyUsageBean(String year,String month); }
[ "15950570277@163.com" ]
15950570277@163.com
f5fff8b11d4fbc7a1543b08ecc7b64f7b89ff52c
76bdf61147554fb14fbbf6a6f0ca6e6cc05b8f89
/Introduction/src/java_loops.java
da6cf124419fb361dbca2c7e1dba73522b690c92
[ "Apache-2.0" ]
permissive
skovaleff/hr_java
693f9cd43a0c1da64f8b98835dbb09384b548d35
4aa6a59c2846a183789d495ef92bb9dfab79cf42
refs/heads/master
2021-01-20T01:19:53.297134
2017-03-20T13:55:33
2017-03-20T13:55:33
85,579,180
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
import java.util.Scanner; public class java_loops { public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); for(int i=0;i<t;i++){//queries int a = in.nextInt(); int b = in.nextInt(); int n = in.nextInt(); int num = a; for(int j=0;j<n;j++){//number in series num += Math.pow(2, j) * b; System.out.print(num + " "); } System.out.println(); } in.close(); } }
[ "serge.kovaleff@gmail.com" ]
serge.kovaleff@gmail.com
96d16aa92695a96309be47acd0a6c1d3539da642
3649663561b70f49aa975b829957334adf6d1c65
/LES-2-core/src/les/core/impl/business/stock/EntryMovstockValidation.java
56e89af3eb830f54a0dd17196dc005a5103841b1
[]
no_license
veronicaohashi/les-phonestore
22daf2857c19f69eb755fd1f3bf28902a6a02339
2ab00dee300500d1bdc6f4273f866fd295cccce1
refs/heads/master
2020-07-12T13:35:50.575683
2019-11-03T22:21:49
2019-11-03T22:21:49
204,830,564
0
0
null
null
null
null
UTF-8
Java
false
false
1,198
java
package les.core.impl.business.stock; import java.sql.SQLException; import java.util.List; import les.core.IDAO; import les.core.IStrategy; import les.core.impl.dao.stock.MovstockDAO; import les.domain.DomainEntity; import les.domain.stock.Entry; import les.domain.stock.Entryi; import les.domain.stock.Movstock; import les.domain.stock.MovstockType; public class EntryMovstockValidation implements IStrategy { public String process(DomainEntity entity) { if(entity instanceof Entry){ Entry entry = (Entry)entity; IDAO dao = new MovstockDAO(); MovstockType movstockType = new MovstockType(1); List<Entryi> items = entry.getItems(); if (! items.isEmpty()) { for(Entryi i : items) { Movstock mov = new Movstock(); mov.setPrice(i.getPrice()); mov.setQuantity(i.getQuantity()); mov.setDate(entry.getDate()); mov.setSupplier(entry.getSupplier()); mov.setReference(i.getReference()); mov.setMovstockType(movstockType); mov.setOrigin(entry.getId()); try { dao.save(mov); } catch (SQLException e) { e.printStackTrace(); } } } } return null; } }
[ "veronica.ohashi@outlook.com" ]
veronica.ohashi@outlook.com
61fcc7052864635a9da6c3daff62a155134763bc
a08cd258de2a565bce76c0ea3f86c473c7ca0e4a
/hsp-security-core/src/main/java/com/hand/security/core/validate/code/ValidateCode.java
92ed013942468fe9d1d689605600b711a494feab
[]
no_license
LorinMitchellSL/hsp-security
92cf14b4dbaa68084e6308f96f0210bd4999261d
881db70280ef3e0404bd6a70326fc9976befeae7
refs/heads/master
2021-07-21T05:52:12.845611
2017-10-26T08:41:35
2017-10-26T08:41:35
107,347,832
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package com.hand.security.core.validate.code; import java.awt.image.BufferedImage; import java.io.Serializable; import java.time.LocalDateTime; /*******************Copyright Information************************ * AUTHOR: Lorin.Mitchell * * DATE: 2017/10/19 * * TIME: 10:44 * ****************************************************************/ public class ValidateCode implements Serializable{ private String code; private LocalDateTime expireTime; public ValidateCode(String code, int expireIn) { this.code = code; this.expireTime = LocalDateTime.now().plusSeconds(expireIn); } public ValidateCode(String code, LocalDateTime expireTime) { this.code = code; this.expireTime = expireTime; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public LocalDateTime getExpireTime() { return expireTime; } public void setExpireTime(LocalDateTime expireTime) { this.expireTime = expireTime; } public boolean isExpried(){ return LocalDateTime.now().isAfter(expireTime); } }
[ "lorin-mitchell@outlook.com" ]
lorin-mitchell@outlook.com
d9f026c008ea52b990785e92f13e788409c3ec1f
58e1754414d9841c9127b159aa98a64c2db50b8f
/src/main/java/com/lhjz/portal/entity/ChannelGroup.java
f32660283e6e01030a119d8a691d06703d56735d
[ "MIT" ]
permissive
cnjswwxbtcc/tms
8a5bb4d63205da2999cae4aeb499c474fc0f7f7d
71c4ed239c4b958cc3c9fe9aabd1e8ead9603d82
refs/heads/master
2020-04-26T16:38:42.617935
2019-02-26T14:04:30
2019-02-26T14:04:30
173,686,679
1
0
MIT
2019-03-04T06:28:06
2019-03-04T06:28:06
null
UTF-8
Java
false
false
2,585
java
/** * 版权所有 (TMS) */ package com.lhjz.portal.entity; import java.io.Serializable; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Version; import javax.validation.constraints.Pattern; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import com.fasterxml.jackson.annotation.JsonIgnore; import com.lhjz.portal.entity.security.User; import com.lhjz.portal.pojo.Enum.Status; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; /** * * @author xi * * @date 2015年3月28日 下午2:03:20 * */ @Entity @EntityListeners(AuditingEntityListener.class) @Data @ToString(exclude = "members") @EqualsAndHashCode(of = { "id" }) @Builder @NoArgsConstructor @AllArgsConstructor public class ChannelGroup implements Serializable { private static final long serialVersionUID = -8833903408119901655L; @Id @GeneratedValue private Long id; @Pattern(regexp = "^[a-z][a-z0-9_\\-]{2,49}$", message = "频道名称必须是3到50位小写字母数字_-组合,并且以字母开头!") @Column(nullable = false) private String name; @Column private String title; @ManyToOne @JoinColumn(name = "creator") @CreatedBy private User creator; @ManyToOne @JoinColumn(name = "updater") @LastModifiedBy private User updater; @Temporal(TemporalType.TIMESTAMP) @CreatedDate private Date createDate; @Temporal(TemporalType.TIMESTAMP) @LastModifiedDate private Date updateDate; @Builder.Default @Enumerated(EnumType.STRING) @Column(nullable = false) private Status status = Status.New; @Version private long version; @ManyToOne @JoinColumn(name = "channel") @JsonIgnore private Channel channel; @Builder.Default @ManyToMany(mappedBy = "joinChannelGroups") Set<User> members = new HashSet<User>(); }
[ "xiweicheng@yeah.net" ]
xiweicheng@yeah.net
8afa617c8d6131645ae8679e4294e932e09cbd76
7bb36cd0e7e794f083b0e0264933aeaf3c46665e
/src/main/java/com/avos/avoscloud/AVUser.java
5069d5990621d184fbedce868b36b335ad4cec41
[ "Apache-2.0" ]
permissive
lbt05/java-common-1
2c7d5d33149b1b4e291d43bb7711fda6ee815fb4
8baec6b6b93da55aed402b3e192d736af297166d
refs/heads/master
2020-12-31T02:50:46.991946
2017-01-18T07:01:03
2017-01-18T07:01:03
65,279,034
0
0
null
2016-08-09T08:51:23
2016-08-09T08:51:23
null
UTF-8
Java
false
false
77,600
java
package com.avos.avoscloud; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import android.os.Parcel; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONType; import com.avos.avoscloud.internal.InternalConfigurationController; @JSONType(ignores = {"query", "password"}, asm = false) public class AVUser extends AVObject { transient private static boolean enableAutomatic = false; private String sessionToken; transient private boolean isNew; private String username; transient private String password; private String mobilePhoneNumber; private String email; private transient String facebookToken; private transient String twitterToken; private transient String sinaWeiboToken; private transient String qqWeiboToken; private transient boolean needTransferFromAnonymousUser; private boolean anonymous; public static final String LOG_TAG = AVUser.class.getSimpleName(); public static final String FOLLOWER_TAG = "follower"; public static final String FOLLOWEE_TAG = "followee"; public static final String SESSION_TOKEN_KEY = "sessionToken"; private static Class<? extends AVUser> subClazz; // getter/setter for fastjson public String getFacebookToken() { return facebookToken; } void setFacebookToken(String facebookToken) { this.facebookToken = facebookToken; } public String getTwitterToken() { return twitterToken; } void setTwitterToken(String twitterToken) { this.twitterToken = twitterToken; } public String getQqWeiboToken() { return qqWeiboToken; } void setQqWeiboToken(String qqWeiboToken) { this.qqWeiboToken = qqWeiboToken; } String getPassword() { return password; } // end of getter/setter static void setEnableAutomatic(boolean enableAutomatic) { AVUser.enableAutomatic = enableAutomatic; } void setNew(boolean isNew) { this.isNew = isNew; } /** * Constructs a new AVUser with no data in it. A AVUser constructed in this way will not have an * objectId and will not persist to the database until AVUser.signUp() is called. */ public AVUser() { super(userClassName()); } public AVUser(Parcel in) { super(in); } @Override protected void rebuildInstanceData() { super.rebuildInstanceData(); this.sessionToken = (String) get(SESSION_TOKEN_KEY); this.username = (String) get("username"); this.processAuthData(null); this.email = (String) get("email"); this.mobilePhoneNumber = (String) get("mobilePhoneNumber"); } /** * Enables automatic creation of anonymous users. After calling this method, * AVUser.getCurrentUser() will always have a value. The user will only be created on the server * once the user has been saved, or once an object with a relation to that user or an ACL that * refers to the user has been saved. Note: saveEventually will not work if an item being saved * has a relation to an automatic user that has never been saved. */ public static void enableAutomaticUser() { enableAutomatic = true; } public static boolean isEnableAutomatic() { return enableAutomatic; } public static void disableAutomaticUser() { enableAutomatic = false; } public static synchronized void changeCurrentUser(AVUser newUser, boolean save) { // clean password for security reason if (newUser != null) { newUser.password = null; } InternalConfigurationController.globalInstance().getInternalPersistence() .setCurrentUser(newUser, save); } /** * This retrieves the currently logged in AVUser with a valid session, either from memory or disk * if necessary. * * @return The currently logged in AVUser */ public static AVUser getCurrentUser() { return getCurrentUser(AVUser.class); } /** * This retrieves the currently logged in AVUser with a valid session, either from memory or disk * if necessary. * * @param userClass subclass. * @param <T> subclass of AVUser or AVUser * @return The currently logged in AVUser subclass instance. */ @SuppressWarnings("unchecked") public static <T extends AVUser> T getCurrentUser(Class<T> userClass) { T user = InternalConfigurationController.globalInstance().getInternalPersistence() .getCurrentUser(userClass); if (enableAutomatic && user == null) { user = newAVUser(userClass, null); AVUser.changeCurrentUser(user, false);; } return user; } static String userClassName() { return AVPowerfulUtils.getAVClassName(AVUser.class.getSimpleName()); } void setNewFlag(boolean isNew) { this.isNew = isNew; } /** * Retrieves the email address. * * @return user email */ public String getEmail() { return this.email; } /** * Constructs a query for AVUsers subclasses. * * @param clazz class type of AVUser subclass for query * @param <T> subclass of AVUser * @return query of AVUser */ public static <T extends AVUser> AVQuery<T> getUserQuery(Class<T> clazz) { AVQuery<T> query = new AVQuery<T>(userClassName(), clazz); return query; } /** * Constructs a query for AVUsers. * * @return AVQuery for AVUser */ public static AVQuery<AVUser> getQuery() { return getQuery(AVUser.class); } public String getSessionToken() { return sessionToken; } void setSessionToken(String sessionToken) { this.sessionToken = sessionToken; } /** * Retrieves the username. * * @return get username */ public String getUsername() { return username; } /** * Whether the AVUser has been authenticated on this device. This will be true if the AVUser was * obtained via a logIn or signUp method. Only an authenticated AVUser can be saved (with altered * attributes) and deleted. * * @return Whether the AVUser has been authenticated */ public boolean isAuthenticated() { return (!AVUtils.isBlankString(sessionToken) || !AVUtils.isBlankString(sinaWeiboToken) || !AVUtils .isBlankString(qqWeiboToken)); } public boolean isAnonymous() { return this.anonymous; } protected void setAnonymous(boolean anonymous) { this.anonymous = anonymous; } /** * <p> * Indicates whether this AVUser was created during this session through a call to AVUser.signUp() * or by logging in with a linked service such as Facebook. * </p> * * @return Whether this AVUser is new created */ public boolean isNew() { return isNew; } /** * @see #logIn(String, String, Class) * @param username user username * @param password user password * @return logined user * @throws AVException login exception */ public static AVUser logIn(String username, String password) throws AVException { return logIn(username, password, AVUser.class); } /** * <p> * Logs in a user with a username and password. On success, this saves the session to disk, so you * can retrieve the currently logged in user using AVUser.getCurrentUser() * </p> * <p> * Typically, you should use AVUser.logInInBackground(java.lang.String, java.lang.String, * com.parse.LogInCallback,Class clazz) instead of this, unless you are managing your own * threading. * </p> * * @param username The username to log in with. * @param password The password to log in with. * @param clazz The AVUser itself or subclass. * @param <T> The AVUser itself or subclass. * @return The user if the login was successful. * @throws AVException login exception */ public static <T extends AVUser> T logIn(String username, String password, Class<T> clazz) throws AVException { final AVUser[] list = {null}; logInInBackground(username, password, true, new LogInCallback<T>() { @Override public void done(T user, AVException e) { if (e != null) { AVExceptionHolder.add(e); } else { list[0] = user; } } @Override public boolean mustRunOnUIThread() { return false; } }, clazz); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } return (T) list[0]; } static private String logInPath() { return "login"; } /** * @see #logInInBackground(String, String, LogInCallback, Class) * @param username username * @param password password * @param callback callback.done(user, e) is called when the login completes. */ public static void logInInBackground(String username, String password, LogInCallback<AVUser> callback) { logInInBackground(username, password, callback, AVUser.class); } /** * <p> * Logs in a user with a username and password. On success, this saves the session to disk, so you * can retrieve the currently logged in user using AVUser.getCurrentUser() * </p> * <p> * This is preferable to using AVUser.logIn(java.lang.String, java.lang.String), unless your code * is already running from a background thread. * </p> * * @param username The username to log in with. * @param password The password to log in with. * @param <T> The AVUser itself or subclass * @param clazz The AVUser itself or subclass. * @param callback callback.done(user, e) is called when the login completes. */ public static <T extends AVUser> void logInInBackground(String username, String password, LogInCallback<T> callback, Class<T> clazz) { logInInBackground(username, password, false, callback, clazz); } static private Map<String, String> createUserMap(String username, String password, String email) { Map<String, String> map = new HashMap<String, String>(); map.put("username", username); if (AVUtils.isBlankString(username)) { throw new IllegalArgumentException("Blank username."); } if (!AVUtils.isBlankString(password)) { map.put("password", password); } if (!AVUtils.isBlankString(email)) { map.put("email", email); } return map; } static private Map<String, String> createUserMap(String username, String password, String email, String phoneNumber, String smsCode) { Map<String, String> map = new HashMap<String, String>(); if (AVUtils.isBlankString(username) && AVUtils.isBlankString(phoneNumber)) { throw new IllegalArgumentException("Blank username and blank mobile phone number"); } if (!AVUtils.isBlankString(username)) { map.put("username", username); } if (!AVUtils.isBlankString(password)) { map.put("password", password); } if (!AVUtils.isBlankString(email)) { map.put("email", email); } if (!AVUtils.isBlankString(phoneNumber)) { map.put("mobilePhoneNumber", phoneNumber); } if (!AVUtils.isBlankString(smsCode)) { map.put("smsCode", smsCode); } return map; } private static <T extends AVUser> void logInInBackground(String username, String password, boolean sync, LogInCallback<T> callback, Class<T> clazz) { Map<String, String> map = createUserMap(username, password, ""); final LogInCallback<T> internalCallback = callback; final T user = newAVUser(clazz, callback); if (user == null) { return; } user.put("username", username, false); PaasClient.storageInstance().postObject(logInPath(), JSON.toJSONString(map), sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { AVException error = e; T resultUser = user; if (!AVUtils.isBlankContent(content)) { AVUtils.copyPropertiesFromJsonStringToAVObject(content, user); user.processAuthData(null); AVUser.changeCurrentUser(user, true); } else { resultUser = null; error = new AVException(AVException.OBJECT_NOT_FOUND, "User is not found."); } if (internalCallback != null) { internalCallback.internalDone(resultUser, error); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } public static AVUser loginByMobilePhoneNumber(String phone, String password) throws AVException { return loginByMobilePhoneNumber(phone, password, AVUser.class); } public static <T extends AVUser> T loginByMobilePhoneNumber(String phone, String password, Class<T> clazz) throws AVException { final AVUser[] list = {null}; loginByMobilePhoneNumberInBackground(phone, password, true, new LogInCallback<T>() { @Override public void done(T user, AVException e) { if (e != null) { AVExceptionHolder.add(e); } else { list[0] = user; } } @Override public boolean mustRunOnUIThread() { return false; } }, clazz); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } return (T) list[0]; } public static void loginByMobilePhoneNumberInBackground(String phone, String password, LogInCallback<AVUser> callback) { loginByMobilePhoneNumberInBackground(phone, password, false, callback, AVUser.class); } public static <T extends AVUser> void loginByMobilePhoneNumberInBackground(String phone, String password, LogInCallback<T> callback, Class<T> clazz) { loginByMobilePhoneNumberInBackground(phone, password, false, callback, clazz); } private static <T extends AVUser> void loginByMobilePhoneNumberInBackground(String phone, String password, boolean sync, LogInCallback<T> callback, Class<T> clazz) { Map<String, String> map = createUserMap(null, password, null, phone, null); final LogInCallback<T> internalCallback = callback; final T user = newAVUser(clazz, callback); if (user == null) { return; } user.setMobilePhoneNumber(phone); PaasClient.storageInstance().postObject(logInPath(), JSON.toJSONString(map), sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { AVException error = e; T resultUser = user; if (!AVUtils.isBlankContent(content)) { AVUtils.copyPropertiesFromJsonStringToAVObject(content, user); AVUser.changeCurrentUser(user, true); } else { resultUser = null; error = new AVException(AVException.OBJECT_NOT_FOUND, "User is not found."); } if (internalCallback != null) { internalCallback.internalDone(resultUser, error); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 通过短信验证码和手机号码来登录用户 * * 请不要在UI线程内调用本方法 * * @param phone 收到验证码的手机号码 * @param smsCode 收到的验证码 * @return 登录用户 * @throws AVException 登录异常 */ public static AVUser loginBySMSCode(String phone, String smsCode) throws AVException { return loginBySMSCode(phone, smsCode, AVUser.class); } /** * 通过短信验证码和手机号码来登录用户 * * 请不要在UI线程内调用本方法 * * @param phone 收到验证码的手机号码 * @param smsCode 收到的验证码 * @param clazz AVUser的子类对象 * @param <T> AVUser的子类对象 * @return 登录用户 * @throws AVException 登录异常 */ public static <T extends AVUser> T loginBySMSCode(String phone, String smsCode, Class<T> clazz) throws AVException { final AVUser[] list = {null}; loginBySMSCodeInBackground(phone, smsCode, true, new LogInCallback<T>() { @Override public void done(T user, AVException e) { if (e != null) { AVExceptionHolder.add(e); } else { list[0] = user; } } @Override public boolean mustRunOnUIThread() { return false; } }, clazz); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } return (T) list[0]; } /** * 通过短信验证码和手机号码来登录用户 * * 本方法为异步方法,可以在UI线程中调用 * * @param phone 收到验证码的手机号码 * @param smsCode 收到的验证码 * @param callback 在登录完成后,callback.done(user,e)会被调用 */ public static void loginBySMSCodeInBackground(String phone, String smsCode, LogInCallback<AVUser> callback) { loginBySMSCodeInBackground(phone, smsCode, false, callback, AVUser.class); } /** * 通过短信验证码和手机号码来登录用户 * * 本方法为异步方法,可以在UI线程中调用 * * @param phone 收到验证码的手机号码 * @param smsCode 收到的验证码 * @param <T> AVUser的子类 * @param callback 在登录完成后,callback.done(user,e)会被调用 * @param clazz AVUser的子类 */ public static <T extends AVUser> void loginBySMSCodeInBackground(String phone, String smsCode, LogInCallback<T> callback, Class<T> clazz) { loginBySMSCodeInBackground(phone, smsCode, false, callback, clazz); } private static <T extends AVUser> void loginBySMSCodeInBackground(String phone, String smsCode, boolean sync, LogInCallback<T> callback, Class<T> clazz) { Map<String, String> map = createUserMap(null, null, "", phone, smsCode); final LogInCallback<T> internalCallback = callback; final T user = newAVUser(clazz, callback); if (user == null) { return; } user.setMobilePhoneNumber(phone); PaasClient.storageInstance().postObject(logInPath(), JSON.toJSONString(map), sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { AVException error = e; T resultUser = user; if (!AVUtils.isBlankContent(content)) { AVUtils.copyPropertiesFromJsonStringToAVObject(content, user); AVUser.changeCurrentUser(user, true); } else { resultUser = null; error = new AVException(AVException.OBJECT_NOT_FOUND, "User is not found."); } if (internalCallback != null) { internalCallback.internalDone(resultUser, error); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * Logs in a user with a session token. this saves the session to disk, so you can retrieve the * currently logged in user using AVUser.getCurrentUser(). Don't call this method on the UI thread * * @param sessionToken The sessionToken to log in with * @return logined user * @throws AVException login exception */ public static AVUser becomeWithSessionToken(String sessionToken) throws AVException { return becomeWithSessionToken(sessionToken, AVUser.class); } /** * Logs in a user with a session token. this saves the session to disk, so you can retrieve the * currently logged in user using AVUser.getCurrentUser(). Don't call this method on the UI thread * * @param sessionToken The sessionToken to log in with * @param clazz The AVUser itself or subclass. * @param <T> The AVUser itself or subclass. * @return logined user * * @throws AVException login exception */ public static <T extends AVUser> AVUser becomeWithSessionToken(String sessionToken, Class<T> clazz) throws AVException { final AVUser[] list = {null}; becomeWithSessionTokenInBackground(sessionToken, true, new LogInCallback<T>() { @Override public void done(T user, AVException e) { if (e != null) { AVExceptionHolder.add(e); } else { list[0] = user; } } @Override public boolean mustRunOnUIThread() { return false; } }, clazz); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } return (T) list[0]; } /** * Logs in a user with a session token. this saves the session to disk, so you can retrieve the * currently logged in user using AVUser.getCurrentUser(). * * @param sessionToken The sessionToken to log in with * @param callback callback.done(user,e) will be called when login completes */ public static void becomeWithSessionTokenInBackground(String sessionToken, LogInCallback<AVUser> callback) { becomeWithSessionTokenInBackground(sessionToken, callback, AVUser.class); } /** * Logs in a user with a session token. this saves the session to disk, so you can retrieve the * currently logged in user using AVUser.getCurrentUser(). * * @param sessionToken The sessionToken to log in with * @param callback callback.done(user,e) will be called when login completes * @param clazz subclass of AVUser * @param <T> subclass of AVUser */ public static <T extends AVUser> void becomeWithSessionTokenInBackground(String sessionToken, LogInCallback<T> callback, Class<T> clazz) { becomeWithSessionTokenInBackground(sessionToken, false, callback, clazz); } private static <T extends AVUser> void becomeWithSessionTokenInBackground(String sessionToken, boolean sync, LogInCallback<T> callback, Class<T> clazz) { final LogInCallback<T> internalCallback = callback; final T user = newAVUser(clazz, callback); if (user == null) { return; } AVRequestParams params = new AVRequestParams(); params.put("session_token", sessionToken); PaasClient.storageInstance().getObject("users/me", params, sync, null, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { AVException error = e; T resultUser = user; if (!AVUtils.isBlankContent(content)) { AVUtils.copyPropertiesFromJsonStringToAVObject(content, user); user.processAuthData(null); AVUser.changeCurrentUser(user, true); } else { resultUser = null; error = new AVException(AVException.OBJECT_NOT_FOUND, "User is not found."); } if (internalCallback != null) { internalCallback.internalDone(resultUser, error); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }); } /** * 直接通过手机号码和验证码来创建或者登录用户。 如果手机号码已经存在则为登录,否则创建新用户 * * 请不要在UI线程中间调用此方法 * * @param mobilePhoneNumber 用户注册的手机号码 * @param smsCode 收到的登录验证码 * @return 登录用户 * @throws AVException 登录异常 * @since 2.6.10 */ public static AVUser signUpOrLoginByMobilePhone(String mobilePhoneNumber, String smsCode) throws AVException { return signUpOrLoginByMobilePhone(mobilePhoneNumber, smsCode, AVUser.class); } /** * 直接通过手机号码和验证码来创建或者登录用户。 如果手机号码已经存在则为登录,否则创建新用户 * * 请不要在UI线程中间调用此方法 * * @param mobilePhoneNumber 用户注册的手机号码 * @param smsCode 收到的登录验证码 * @param clazz AVUser的子类 * @param <T> AVUser的子类 * @return 登录用户 * @throws AVException 登录异常 * @since 2.6.10 */ public static <T extends AVUser> T signUpOrLoginByMobilePhone(String mobilePhoneNumber, String smsCode, Class<T> clazz) throws AVException { final AVUser[] list = {null}; signUpOrLoginByMobilePhoneInBackground(mobilePhoneNumber, smsCode, true, clazz, new LogInCallback<T>() { @Override public void done(T user, AVException e) { if (e != null) { AVExceptionHolder.add(e); } else { list[0] = user; } } @Override public boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } return (T) list[0]; } /** * 直接通过手机号码和验证码来创建或者登录用户。 如果手机号码已经存在则为登录,否则创建新用户 * * * @param mobilePhoneNumber 用户注册的手机号码 * @param smsCode 收到的登录验证码 * @param callback 登录或者注册成功以后,callback.done(user,e)会被调用 * @since 2.6.10 */ public static void signUpOrLoginByMobilePhoneInBackground(String mobilePhoneNumber, String smsCode, LogInCallback<AVUser> callback) { signUpOrLoginByMobilePhoneInBackground(mobilePhoneNumber, smsCode, AVUser.class, callback); } /** * 直接通过手机号码和验证码来创建或者登录用户。 如果手机号码已经存在则为登录,否则创建新用户 * * @param mobilePhoneNumber 用户注册的手机号码 * @param smsCode 收到的登录验证码 * @param clazz AVUser的子类对象 * @param <T> subclass of AVUser * @param callback 登录或者注册成功以后,callback.done(user,e)会被调用 * @since 2.6.10 */ public static <T extends AVUser> void signUpOrLoginByMobilePhoneInBackground( String mobilePhoneNumber, String smsCode, Class<T> clazz, LogInCallback<T> callback) { signUpOrLoginByMobilePhoneInBackground(mobilePhoneNumber, smsCode, false, clazz, callback); } private static <T extends AVUser> void signUpOrLoginByMobilePhoneInBackground( String mobilePhoneNumber, String smsCode, boolean sync, Class<T> clazz, LogInCallback<T> callback) { if (AVUtils.isBlankString(smsCode)) { if (callback != null) { callback.internalDone(null, new AVException(AVException.OTHER_CAUSE, "SMS Code can't be empty")); } else { LogUtil.avlog.e("SMS Code can't be empty"); } return; } Map<String, String> map = createUserMap(null, null, "", mobilePhoneNumber, smsCode); final LogInCallback<T> internalCallback = callback; final T user = newAVUser(clazz, callback); if (user == null) { return; } user.setMobilePhoneNumber(mobilePhoneNumber); PaasClient.storageInstance().postObject("usersByMobilePhone", JSON.toJSONString(map), sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { AVException error = e; T resultUser = user; if (!AVUtils.isBlankContent(content)) { AVUtils.copyPropertiesFromJsonStringToAVObject(content, user); AVUser.changeCurrentUser(user, true); } else { resultUser = null; error = new AVException(AVException.OBJECT_NOT_FOUND, "User is not found."); } if (internalCallback != null) { internalCallback.internalDone(resultUser, error); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } public static <T extends AVUser> T newAVUser(Class<T> clazz, LogInCallback<T> cb) { try { final T user = clazz.newInstance(); return user; } catch (Exception e) { if (cb != null) { cb.internalDone(null, AVErrorUtils.createException(e, null)); } else { throw new AVRuntimeException("Create user instance failed.", e); } } return null; } protected static <T extends AVUser> T newAVUser() { return (T) newAVUser(subClazz == null ? AVUser.class : subClazz, null); } /** * Logs out the currently logged in user session. This will remove the session from disk, log out * of linked services, and future calls to AVUser.getCurrentUser() will return null. */ public static void logOut() { AVUser.changeCurrentUser(null, true); PaasClient.storageInstance().setDefaultACL(null); } /** * Add a key-value pair to this object. It is recommended to name keys in * partialCamelCaseLikeThis. * * @param key Keys must be alphanumerical plus underscore, and start with a letter. * @param value Values may be numerical, String, JSONObject, JSONArray, JSONObject.NULL, or other * AVObjects. */ @Override public void put(String key, Object value) { super.put(key, value); } /** * Removes a key from this object's data if it exists. * * @param key The key to remove. */ @Override public void remove(String key) { super.remove(key); } /** * <p> * Requests a password reset email to be sent to the specified email address associated with the * user account. This email allows the user to securely reset their password on the AVOSCloud * site. * </p> * <p> * Typically, you should use AVUser.requestPasswordResetInBackground(java.lang.String, * com.parse.RequestPasswordResetCallback) instead of this, unless you are managing your own * threading. * </p> * * @param email The email address associated with the user that forgot their password. */ public static void requestPasswordReset(String email) { requestPasswordResetInBackground(email, true, null); } /** * <p> * Requests a password reset email to be sent in a background thread to the specified email * address associated with the user account. This email allows the user to securely reset their * password on the AVOSCloud site. * </p> * <p> * This is preferable to using requestPasswordReset(), unless your code is already running from a * background thread. * </p> * * @param email The email address associated with the user that forgot their password. * @param callback callback.done(e) is called when the request completes. */ public static void requestPasswordResetInBackground(String email, RequestPasswordResetCallback callback) { requestPasswordResetInBackground(email, false, callback); } private static void requestPasswordResetInBackground(String email, boolean sync, RequestPasswordResetCallback callback) { final RequestPasswordResetCallback internalCallback = callback; Map<String, Object> map = new HashMap<String, Object>(); map.put("email", email); String object = AVUtils.jsonStringFromMapWithNull(map); PaasClient.storageInstance().postObject("requestPasswordReset", object, sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (internalCallback != null) { internalCallback.internalDone(null, null); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 同步方法调用修改用户当前的密码 * * 您需要保证用户有效的登录状态 * * @param oldPassword 原来的密码 * @param newPassword 新密码 * @throws AVException updatePassword exception */ public void updatePassword(String oldPassword, String newPassword) throws AVException { updatePasswordInBackground(oldPassword, newPassword, new UpdatePasswordCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override public boolean mustRunOnUIThread() { return false; } }, true); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } /** * 异步方法调用修改用户当前的密码 * * 您需要保证用户有效的登录状态 * * @param oldPassword 原来的密码 * @param newPassword 新密码 * @param callback 密码更新以后 callback.done(e)会被调用 */ public void updatePasswordInBackground(String oldPassword, String newPassword, UpdatePasswordCallback callback) { updatePasswordInBackground(oldPassword, newPassword, callback, false); } private void updatePasswordInBackground(String oldPassword, String newPassword, final UpdatePasswordCallback callback, boolean sync) { if (!this.isAuthenticated() || AVUtils.isBlankString(getObjectId())) { callback.internalDone(AVErrorUtils.sessionMissingException()); } else { String relativePath = String.format("users/%s/updatePassword", this.getObjectId()); Map<String, Object> params = new HashMap<String, Object>(); params.put("old_password", oldPassword); params.put("new_password", newPassword); String paramsString = AVUtils.restfulServerData(params); PaasClient.storageInstance().putObject(relativePath, paramsString, sync, headerMap(), new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (null == e && !AVUtils.isBlankString(content)) { sessionToken = AVUtils.getJSONValue(content, SESSION_TOKEN_KEY); } callback.internalDone(e); } @Override public void onFailure(Throwable error, String content) { callback.internalDone(AVErrorUtils.createException(error, content)); } }, getObjectId(), getObjectId()); } } /** * 申请通过短信重置用户密码 * * 请确保是在异步程序中调用此方法,否则请调用 requestPasswordResetBySmsCodeInBackground(String * mobilePhoneNumber,RequestMobileCodeCallback callback)方法 * * @param mobilePhoneNumber 用户注册时的手机号码 * @throws AVException 如果找不到手机号码对应的用户时抛出的异常 */ public static void requestPasswordResetBySmsCode(String mobilePhoneNumber) throws AVException { requestPasswordResetBySmsCodeInBackground(mobilePhoneNumber, true, new RequestMobileCodeCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override public boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } /** * 申请通过短信重置用户密码 * * @param mobilePhoneNumber 用户注册时的手机号码 * @param callback 密码重置成功以后会调用 callback.done(e) * */ public static void requestPasswordResetBySmsCodeInBackground(String mobilePhoneNumber, RequestMobileCodeCallback callback) { requestPasswordResetBySmsCodeInBackground(mobilePhoneNumber, false, callback); } protected static void requestPasswordResetBySmsCodeInBackground(String mobilePhoneNumber, boolean sync, RequestMobileCodeCallback callback) { final RequestMobileCodeCallback internalCallback = callback; if (AVUtils.isBlankString(mobilePhoneNumber) || !AVUtils.checkMobilePhoneNumber(mobilePhoneNumber)) { callback.internalDone(new AVException(AVException.INVALID_PHONE_NUMBER, "Invalid Phone Number")); return; } Map<String, Object> map = new HashMap<String, Object>(); map.put("mobilePhoneNumber", mobilePhoneNumber); String object = AVUtils.jsonStringFromMapWithNull(map); PaasClient.storageInstance().postObject("requestPasswordResetBySmsCode", object, sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (internalCallback != null) { internalCallback.internalDone(null, null); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 通过短信验证码更新用户密码 * * 请确保是在异步方法中调用本方法否则请调用resetPasswordBySmsCodeInBackground(String smsCode, String newPassword, * UpdatePasswordCallback callback) 方法 * * @param smsCode 验证码 * @param newPassword 新密码 * @throws AVException 验证码错误异常 */ public static void resetPasswordBySmsCode(String smsCode, String newPassword) throws AVException { resetPasswordBySmsCodeInBackground(smsCode, newPassword, true, new UpdatePasswordCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override public boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } /** * 通过短信验证码更新用户密码 * * @param smsCode 验证码 * @param newPassword 新密码 * @param callback 密码重置成功以后会调用 callback.done(e) */ public static void resetPasswordBySmsCodeInBackground(String smsCode, String newPassword, UpdatePasswordCallback callback) { resetPasswordBySmsCodeInBackground(smsCode, newPassword, false, callback); } protected static void resetPasswordBySmsCodeInBackground(String smsCode, String newPassword, boolean sync, UpdatePasswordCallback callback) { final UpdatePasswordCallback internalCallback = callback; if (AVUtils.isBlankString(smsCode) || !AVUtils.checkMobileVerifyCode(smsCode)) { callback .internalDone(new AVException(AVException.INVALID_PHONE_NUMBER, "Invalid Verify Code")); return; } String endpointer = String.format("resetPasswordBySmsCode/%s", smsCode); Map<String, Object> params = new HashMap<String, Object>(); params.put("password", newPassword); PaasClient.storageInstance().putObject(endpointer, AVUtils.restfulServerData(params), sync, null, new GenericObjectCallback() { @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(new AVException(content, error)); } } @Override public void onSuccess(String content, AVException e) { internalCallback.internalDone(e); } }, null, null); } /** * <p> * 调用这个方法会给用户的邮箱发送一封验证邮件,让用户能够确认在AVOS Cloud网站上注册的账号邮箱 * </p> * <p> * 除非是在一个后台线程中调用这个方法, 否则,一般情况下,请使用AVUser.requestEmailVerfiyInBackground(email,callback)方法进行调用 * * </p> * * @param email The email address associated with the user that forgot their password. */ public static void requestEmailVerify(String email) { requestEmailVerfiyInBackground(email, true, null); } /** * <p> * 调用这个方法会给用户的邮箱发送一封验证邮件,让用户能够确认在AVOS Cloud网站上注册的账号邮箱 * </p> * <p> * 除非这个方法在一个后台线程中被调用,请勿使用 requestEmailVerify() * </p> * * @param email The email address associated with the user that forgot their password. * @param callback callback.done(e) is called when the request completes. */ public static void requestEmailVerfiyInBackground(String email, RequestEmailVerifyCallback callback) { requestEmailVerfiyInBackground(email, false, callback); } private static void requestEmailVerfiyInBackground(String email, boolean sync, RequestEmailVerifyCallback callback) { final RequestEmailVerifyCallback internalCallback = callback; if (AVUtils.isBlankString(email) || !AVUtils.checkEmailAddress(email)) { callback.internalDone(new AVException(AVException.INVALID_EMAIL_ADDRESS, "Invalid Email")); return; } Map<String, Object> map = new HashMap<String, Object>(); map.put("email", email); String object = AVUtils.jsonStringFromMapWithNull(map); PaasClient.storageInstance().postObject("requestEmailVerify", object, sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (internalCallback != null) { internalCallback.internalDone(null, null); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 调用这个方法来请求用户的手机号码验证 * * 在发送这条请求前,请保证您已经成功保存用户的手机号码,并且在控制中心打开了“验证注册用户手机号码”选项 * * 本方法请在异步方法中调用 * * @param mobilePhoneNumber 手机号码 * @throws AVException 请求异常 */ public static void requestMobilePhoneVerify(String mobilePhoneNumber) throws AVException { requestMobilePhoneVerifyInBackground(mobilePhoneNumber, true, new RequestMobileCodeCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override public boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } /** * 调用这个方法来请求用户的手机号码验证 * * 在发送这条请求前,请保证您已经成功保存用户的手机号码,并且在控制中心打开了“验证注册用户手机号码”选项 * * * @param mobilePhoneNumber 手机号码 * @param callback 请求成功以后会调用callback.done(e) */ @Deprecated public static void requestMobilePhoneVerifyInBackgroud(String mobilePhoneNumber, RequestMobileCodeCallback callback) { requestMobilePhoneVerifyInBackground(mobilePhoneNumber, false, callback); } /** * 调用这个方法来请求用户的手机号码验证 * * 在发送这条请求前,请保证您已经成功保存用户的手机号码,并且在控制中心打开了“验证注册用户手机号码”选项 * * * @param mobilePhoneNumber 手机号码 * @param callback 请求成功以后会调用callback.done(e) */ public static void requestMobilePhoneVerifyInBackground(String mobilePhoneNumber, RequestMobileCodeCallback callback) { requestMobilePhoneVerifyInBackground(mobilePhoneNumber, false, callback); } private static void requestMobilePhoneVerifyInBackground(String mobilePhoneNumber, boolean sync, RequestMobileCodeCallback callback) { final RequestMobileCodeCallback internalCallback = callback; if (AVUtils.isBlankString(mobilePhoneNumber) || !AVUtils.checkMobilePhoneNumber(mobilePhoneNumber)) { callback.internalDone(new AVException(AVException.INVALID_PHONE_NUMBER, "Invalid Phone Number")); return; } Map<String, Object> map = new HashMap<String, Object>(); map.put("mobilePhoneNumber", mobilePhoneNumber); String object = AVUtils.jsonStringFromMapWithNull(map); PaasClient.storageInstance().postObject("requestMobilePhoneVerify", object, sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (internalCallback != null) { internalCallback.internalDone(null, null); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 请求登录验证码 * * 请在异步任务中调用本方法,或者请使用requestLoginSmsCodeInBackground * * @param mobilePhoneNumber 手机号码 * @throws AVException 请求异常 */ public static void requestLoginSmsCode(String mobilePhoneNumber) throws AVException { requestLoginSmsCodeInBackground(mobilePhoneNumber, true, new RequestMobileCodeCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override public boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } public static void requestLoginSmsCodeInBackground(String mobilePhoneNumber, RequestMobileCodeCallback callback) { requestLoginSmsCodeInBackground(mobilePhoneNumber, false, callback); } private static void requestLoginSmsCodeInBackground(String mobilePhoneNumber, boolean sync, RequestMobileCodeCallback callback) { final RequestMobileCodeCallback internalCallback = callback; if (AVUtils.isBlankString(mobilePhoneNumber) || !AVUtils.checkMobilePhoneNumber(mobilePhoneNumber)) { callback.internalDone(new AVException(AVException.INVALID_PHONE_NUMBER, "Invalid Phone Number")); return; } Map<String, Object> map = new HashMap<String, Object>(); map.put("mobilePhoneNumber", mobilePhoneNumber); String object = AVUtils.jsonStringFromMapWithNull(map); PaasClient.storageInstance().postObject("requestLoginSmsCode", object, sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (internalCallback != null) { internalCallback.internalDone(null, null); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 验证手机收到的验证码 * * 请在异步方法中调用此方法,或者您可以调用verifyMobilePhoneInBackground方法 * * @param verifyCode 验证码 * @throws AVException 请求异常 */ public static void verifyMobilePhone(String verifyCode) throws AVException { verifyMobilePhoneInBackground(true, verifyCode, new AVMobilePhoneVerifyCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override public boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } /** * 验证手机收到的验证码 * * * @param verifyCode 验证码 * @param callback 请求成功以后会调用 callback.done(e) */ @Deprecated public static void verifyMobilePhoneInBackgroud(String verifyCode, AVMobilePhoneVerifyCallback callback) { verifyMobilePhoneInBackground(false, verifyCode, callback); } /** * 验证手机收到的验证码 * * * @param verifyCode 验证码 * @param callback 请求成功以后会调用 callback.done(e) */ public static void verifyMobilePhoneInBackground(String verifyCode, AVMobilePhoneVerifyCallback callback) { verifyMobilePhoneInBackground(false, verifyCode, callback); } private static void verifyMobilePhoneInBackground(boolean sync, String verifyCode, AVMobilePhoneVerifyCallback callback) { final AVMobilePhoneVerifyCallback internalCallback = callback; if (AVUtils.isBlankString(verifyCode) || !AVUtils.checkMobileVerifyCode(verifyCode)) { callback .internalDone(new AVException(AVException.INVALID_PHONE_NUMBER, "Invalid Verify Code")); return; } String endpointer = String.format("verifyMobilePhone/%s", verifyCode); PaasClient.storageInstance().postObject(endpointer, AVUtils.restfulServerData(null), sync, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (internalCallback != null) { internalCallback.internalDone(null, null); } } @Override public void onFailure(Throwable error, String content) { if (internalCallback != null) { internalCallback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * Sets the email address. * * @param email The email address to set. */ public void setEmail(String email) { this.email = email; this.put("email", email); } /** * Sets the password. * * @param password The password to set. */ public void setPassword(String password) { this.password = password; this.put("password", password); markAnonymousUserTransfer(); } /** * Sets the username. Usernames cannot be null or blank. * * @param username The username to set. */ public void setUsername(String username) { this.username = username; this.put("username", username); markAnonymousUserTransfer(); } public String getMobilePhoneNumber() { return mobilePhoneNumber; } public void setMobilePhoneNumber(String mobilePhoneNumber) { this.mobilePhoneNumber = mobilePhoneNumber; this.put("mobilePhoneNumber", mobilePhoneNumber); } public boolean isMobilePhoneVerified() { return this.getBoolean("mobilePhoneVerified"); } void setMobilePhoneVerified(boolean mobilePhoneVerified) { this.put("mobileVerified", mobilePhoneVerified); } private String signUpPath() { return "users"; } private void signUp(boolean sync, final SignUpCallback callback) { if (sync) { try { this.save(); if (callback != null) callback.internalDone(null); } catch (AVException e) { if (callback != null) callback.internalDone(e); } } else { this.saveInBackground(new SaveCallback() { @Override public void done(AVException e) { if (callback != null) callback.internalDone(e); } }); } } /** * <p> * Signs up a new user. You should call this instead of AVObject.save() for new AVUsers. This will * create a new AVUser on the server, and also persist the session on disk so that you can access * the user using AVUser.getCurrentUser(). * </p> * <p> * A username and password must be set before calling signUp. * </p> * <p> * Typically, you should use AVUser.signUpInBackground(com.parse.SignUpCallback) instead of this, * unless you are managing your own threading. * </p> * * @throws AVException 注册请求异常 */ public void signUp() throws AVException { signUp(true, new SignUpCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override protected boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } /** * <p> * Signs up a new user. You should call this instead of AVObject.save() for new AVUsers. This will * create a new AVUser on the server, and also persist the session on disk so that you can access * the user using AVUser.getCurrentUser(). * </p> * <p> * A username and password must be set before calling signUp. * </p> * <p> * This is preferable to using AVUser.signUp(), unless your code is already running from a * background thread. * </p> * * @param callback callback.done(user, e) is called when the signUp completes. */ public void signUpInBackground(SignUpCallback callback) { signUp(false, callback); } void setSinaWeiboToken(String token) { this.sinaWeiboToken = token; } public String getSinaWeiboToken() { return sinaWeiboToken; } void setQQWeiboToken(String token) { qqWeiboToken = token; } public String getQQWeiboToken() { return qqWeiboToken; } @Override protected void onSaveSuccess() { super.onSaveSuccess(); this.processAuthData(null); if (!AVUtils.isBlankString(sessionToken)) { changeCurrentUser(this, true); } } @Override protected void onDataSynchronized() { processAuthData(null); if (!AVUtils.isBlankString(sessionToken)) { changeCurrentUser(this, true); } } @Override protected Map<String, String> headerMap() { Map<String, String> map = new HashMap<String, String>(); if (!AVUtils.isBlankString(sessionToken)) { map.put(PaasClient.sessionTokenField, sessionToken); } return map; } static AVUser userFromSinaWeibo(String weiboToken, String userName) { AVUser user = newAVUser(); user.sinaWeiboToken = weiboToken; user.username = userName; return user; } static AVUser userFromQQWeibo(String weiboToken, String userName) { AVUser user = newAVUser(); user.qqWeiboToken = weiboToken; user.username = userName; return user; } private boolean checkUserAuthentication(final AVCallback callback) { if (!this.isAuthenticated() || AVUtils.isBlankString(getObjectId())) { if (callback != null) { callback.internalDone(AVErrorUtils.createException(AVException.SESSION_MISSING, "No valid session token, make sure signUp or login has been called.")); } return false; } return true; } /** * <p> * Follow the user specified by userObjectId. This will create a follow relation between this user * and the user specified by the userObjectId. * </p> * * @param userObjectId The user objectId. * @param callback callback.done(user, e) is called when the follow completes. * @since 2.1.3 */ public void followInBackground(String userObjectId, final FollowCallback callback) { this.followInBackground(userObjectId, null, callback); } public AVUser follow(String userObjectId) throws AVException { return this.follow(userObjectId, null); } public AVUser follow(String userObjectId, Map<String, Object> attributes) throws AVException { followInBackground(true, userObjectId, attributes, new FollowCallback<AVObject>() { @Override public void done(AVObject object, AVException e) { if (e != null) { AVExceptionHolder.add(e); } } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } else { return AVUser.this; } } public void followInBackground(String userObjectId, Map<String, Object> attributes, final FollowCallback callback) { followInBackground(false, userObjectId, attributes, callback); } private void followInBackground(boolean sync, String userObjectId, Map<String, Object> attributes, final FollowCallback callback) { if (!checkUserAuthentication(callback)) { return; } String endPoint = AVPowerfulUtils.getFollowEndPoint(getObjectId(), userObjectId); String paramsString = ""; if (attributes != null) { paramsString = AVUtils.restfulServerData(attributes); } PaasClient.storageInstance().postObject(endPoint, paramsString, sync, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { super.onSuccess(content, e); // To change body of overridden methods use File | Settings // | // File Templates. if (callback != null) { callback.internalDone(AVUser.this, null); } } @Override public void onFailure(Throwable error, String content) { super.onFailure(error, content); // To change body of overridden methods use File | // Settings // | File Templates. if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(error, content)); } } }); } public void unfollowInBackground(String userObjectId, final FollowCallback callback) { unfollow(false, userObjectId, callback); } public void unfollow(String userObjectId) throws AVException { unfollow(true, userObjectId, new FollowCallback() { @Override public void done(AVObject object, AVException e) { if (e != null) { AVExceptionHolder.add(AVErrorUtils.createException(e, null)); } } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } } private void unfollow(boolean sync, String userObjectId, final FollowCallback callback) { if (!checkUserAuthentication(callback)) { return; } String endPoint = AVPowerfulUtils.getFollowEndPoint(getObjectId(), userObjectId); PaasClient.storageInstance().deleteObject(endPoint, sync, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { super.onSuccess(content, e); // To change body of overridden methods use File | Settings | // File Templates. if (callback != null) { callback.internalDone(AVUser.this, null); } } @Override public void onFailure(Throwable error, String content) { super.onFailure(error, content); // To change body of overridden methods use File | Settings // | File Templates. if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /* * {"results": [{"objectId":"52bbd4f9e4b0be6d851ef395", * "follower":{"className":"_User","objectId":"52bbd4f8e4b0be6d851ef394","__type":"Pointer"}, * "user":{"className":"_User","objectId":"52bbd4f3e4b0be6d851ef393","__type":"Pointer"}, * "createdAt":"2013-12-26T15:04:25.856Z", "updatedAt":"2013-12-26T15:04:25.856Z"}, * {"objectId":"52bbd4ffe4b0be6d851ef398", * "follower":{"className":"_User","objectId":"52bbd4fee4b0be6d851ef397","__type":"Pointer"}, * "user":{"className":"_User","objectId":"52bbd4f3e4b0be6d851ef393","__type":"Pointer"}, * "createdAt":"2013-12-26T15:04:31.066Z", "updatedAt":"2013-12-26T15:04:31.066Z"} ] } */ private List<AVUser> processResultByTag(String content, String tag) { List<AVUser> list = new LinkedList<AVUser>(); if (AVUtils.isBlankString(content)) { return list; } AVFollowResponse resp = new AVFollowResponse(); resp = JSON.parseObject(content, resp.getClass()); processResultList(resp.results, list, tag); return list; } private Map<String, List<AVUser>> processFollowerAndFollowee(String content) { Map<String, List<AVUser>> map = new HashMap<String, List<AVUser>>(); if (AVUtils.isBlankString(content)) { return map; } AVFollowResponse resp = new AVFollowResponse(); resp = JSON.parseObject(content, resp.getClass()); List<AVUser> followers = new LinkedList<AVUser>(); List<AVUser> followees = new LinkedList<AVUser>(); processResultList(resp.followers, followers, FOLLOWER_TAG); processResultList(resp.followees, followees, FOLLOWEE_TAG); map.put(FOLLOWER_TAG, followers); map.put(FOLLOWEE_TAG, followees); return map; } // TODO, consider subclass. private void processResultList(Map[] results, List<AVUser> list, String tag) { for (Map item : results) { if (item != null && !item.isEmpty()) { AVUser user = (AVUser) AVUtils.getObjectFrom(item.get(tag)); list.add(user); } } } /** * <p> * 创建follower查询。请确保传入的userObjectId不为空,否则会抛出IllegalArgumentException。 * 创建follower查询后,您可以使用whereEqualTo("follower", userFollower)查询特定的follower。 您也可以使用skip和limit支持分页操作。 * * </p> * * @param userObjectId 待查询的用户objectId。 * @param clazz AVUser类或者其子类。 * @param <T> subclass of AVUser * @return follower查询对象 * @since 2.3.0 */ static public <T extends AVUser> AVQuery<T> followerQuery(final String userObjectId, Class<T> clazz) { if (AVUtils.isBlankString(userObjectId)) { throw new IllegalArgumentException("Blank user objectId."); } AVFellowshipQuery query = new AVFellowshipQuery<T>("_Follower", clazz); query.whereEqualTo("user", AVObject.createWithoutData("_User", userObjectId)); query.setFriendshipTag(AVUser.FOLLOWER_TAG); return query; } /** * <p> * 创建follower查询。创建follower查询后,您可以使用whereEqualTo("follower", userFollower)查询特定的follower。 * 您也可以使用skip和limit支持分页操作。 * * </p> * * @param clazz AVUser类或者其子类。 * @param <T> subclass of AVUser * @return follower查询对象 * @since 2.3.0 * @throws AVException 如果当前对象未保存过则会报错 */ public <T extends AVUser> AVQuery<T> followerQuery(Class<T> clazz) throws AVException { if (AVUtils.isBlankString(this.getObjectId())) { throw AVErrorUtils.sessionMissingException(); } return followerQuery(getObjectId(), clazz); } /** * <p> * 创建followee查询。请确保传入的userObjectId不为空,否则会抛出IllegalArgumentException。 * 创建followee查询后,您可以使用whereEqualTo("followee", userFollowee)查询特定的followee。 您也可以使用skip和limit支持分页操作。 * * </p> * * @param userObjectId 待查询的用户objectId。 * @param clazz AVUser类或者其子类。 * @param <T> subclass of AVUser * @return followee查询 * @since 2.3.0 */ static public <T extends AVUser> AVQuery<T> followeeQuery(final String userObjectId, Class<T> clazz) { if (AVUtils.isBlankString(userObjectId)) { throw new IllegalArgumentException("Blank user objectId."); } AVFellowshipQuery query = new AVFellowshipQuery<T>("_Followee", clazz); query.whereEqualTo("user", AVObject.createWithoutData("_User", userObjectId)); query.setFriendshipTag(AVUser.FOLLOWEE_TAG); return query; } /** * <p> * 创建followee查询。 创建followee查询后,您可以使用whereEqualTo("followee", userFollowee)查询特定的followee。 * 您也可以使用skip和limit支持分页操作。 * * </p> * * @param clazz AVUser类或者其子类。 * @return followee 查询 * @param <T> AVUser的子类 * @throws AVException 如果本对象从来没有保存过会遇到错误 * * @since 2.3.0 */ public <T extends AVUser> AVQuery<T> followeeQuery(Class<T> clazz) throws AVException { if (AVUtils.isBlankString(this.getObjectId())) { throw AVErrorUtils.sessionMissingException(); } return followeeQuery(getObjectId(), clazz); } /** * 获取用户好友关系的查询条件,同时包括用户的关注和用户粉丝 * * @return 好友查询 */ public AVFriendshipQuery friendshipQuery() { return this.friendshipQuery(subClazz == null ? AVUser.class : subClazz); } /** * 获取用户好友关系的查询条件,同时包括用户的关注和用户粉丝 * * @param clazz 最终返回的AVUser的子类 * @param <T> AVUser的子类 * @return 好友查询 */ public <T extends AVUser> AVFriendshipQuery friendshipQuery(Class<T> clazz) { return new AVFriendshipQuery(this.objectId, clazz); } /** * 获取用户好友关系的查询条件,同时包括用户的关注和用户粉丝 * * @param userId AVUser的objectId * @param <T> AVUser的子类 * @return 好友查询 */ public static <T extends AVUser> AVFriendshipQuery friendshipQuery(String userId) { return new AVFriendshipQuery(userId, subClazz == null ? AVUser.class : subClazz); } /** * 获取用户好友关系的查询条件,同时包括用户的关注和用户粉丝 * * @param userId AVUser的objectId * @param clazz 指定的AVUser或者其子类 * @param <T> AVUser的子类 * @return 好友查询 */ public static <T extends AVUser> AVFriendshipQuery friendshipQuery(String userId, Class<T> clazz) { return new AVFriendshipQuery(userId, clazz); } @Deprecated public void getFollowersInBackground(final FindCallback callback) { if (!checkUserAuthentication(callback)) { return; } String endPoint = AVPowerfulUtils.getFollowersEndPoint(getObjectId()); PaasClient.storageInstance().getObject(endPoint, null, false, null, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { super.onSuccess(content, e); List<AVUser> list = processResultByTag(content, FOLLOWER_TAG); if (callback != null) { callback.internalDone(list, null); } } @Override public void onFailure(Throwable error, String content) { super.onFailure(error, content); if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(error, content)); } } }); } @Deprecated public void getMyFolloweesInBackground(final FindCallback callback) { if (!checkUserAuthentication(callback)) { return; } String endPoint = AVPowerfulUtils.getFolloweesEndPoint(getObjectId()); PaasClient.storageInstance().getObject(endPoint, null, false, null, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { super.onSuccess(content, e); List<AVUser> list = processResultByTag(content, FOLLOWEE_TAG); if (callback != null) { callback.internalDone(list, null); } } @Override public void onFailure(Throwable error, String content) { super.onFailure(error, content); if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(error, content)); } } }); } public void getFollowersAndFolloweesInBackground(final FollowersAndFolloweesCallback callback) { if (!checkUserAuthentication(callback)) { return; } String endPoint = AVPowerfulUtils.getFollowersAndFollowees(getObjectId()); PaasClient.storageInstance().getObject(endPoint, null, false, null, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { super.onSuccess(content, e); Map<String, List<AVUser>> map = processFollowerAndFollowee(content); if (callback != null) { callback.internalDone(map, null); } } @Override public void onFailure(Throwable error, String content) { super.onFailure(error, content); if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(error, content)); } } }); } /* * 通过这个方法可以将AVUser对象强转为其子类对象 */ public static <T extends AVUser> T cast(AVUser user, Class<T> clazz) { try { T newUser = AVObject.cast(user, clazz); return newUser; } catch (Exception e) { LogUtil.log.e("ClassCast Exception", e); } return null; } /** * * 通过设置此方法,所有关联对象中的AVUser对象都会被强转成注册的AVUser子类对象 * * @param clazz AVUser的子类 */ public static void alwaysUseSubUserClass(Class<? extends AVUser> clazz) { subClazz = clazz; } private static Map<String, Object> authData(AVThirdPartyUserAuth userInfo) { Map<String, Object> result = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>(); map.put(accessTokenTag, userInfo.accessToken); map.put(expiresAtTag, userInfo.expiredAt); if (!AVUtils.isBlankString(userInfo.snsType)) { map.put(AVThirdPartyUserAuth.platformUserIdTag(userInfo.snsType), userInfo.userId); } result.put(userInfo.snsType, map); return result; } /** * 生成一个新的AarseUser,并且将AVUser与SNS平台获取的userInfo关联。 * * @param userInfo 包含第三方授权必要信息的内部类 * @param callback 关联完成后,调用的回调函数。 */ static public void loginWithAuthData(AVThirdPartyUserAuth userInfo, final LogInCallback<AVUser> callback) { loginWithAuthData(AVUser.class, userInfo, callback); } /** * 生成一个新的AVUser子类化对象,并且将该对象与SNS平台获取的userInfo关联。 * * @param clazz 子类化的AVUer的class对象 * @param userInfo 在SNS登录成功后,返回的userInfo信息。 * @param callback 关联完成后,调用的回调函数。 * @param <T> AVUser子类 * @since 1.4.4 */ static public <T extends AVUser> void loginWithAuthData(final Class<T> clazz, final AVThirdPartyUserAuth userInfo, final LogInCallback<T> callback) { if (userInfo == null) { if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(AVException.OTHER_CAUSE, "NULL userInfo.")); } return; } Map<String, Object> data = new HashMap<String, Object>(); data.put(authDataTag, authData(userInfo)); String jsonString = JSON.toJSONString(data); PaasClient.storageInstance().postObject("users", jsonString, false, false, new GenericObjectCallback() { @Override public void onSuccess(String content, AVException e) { if (e == null) { T userObject = AVUser.newAVUser(clazz, callback); if (userObject == null) { return; } AVUtils.copyPropertiesFromJsonStringToAVObject(content, userObject); userObject.processAuthData(userInfo); AVUser.changeCurrentUser(userObject, true); if (callback != null) { callback.internalDone(userObject, null); } } } @Override public void onFailure(Throwable error, String content) { if (callback != null) { callback.internalDone(null, AVErrorUtils.createException(error, content)); } } }, null, null); } /** * 将现存的AVUser与从SNS平台获取的userInfo关联起来。 * * @param user AVUser 对象。 * @param userInfo 在SNS登录成功后,返回的userInfo信息。 * @param callback 关联完成后,调用的回调函数。 * @since 1.4.4 */ static public void associateWithAuthData(AVUser user, AVThirdPartyUserAuth userInfo, final SaveCallback callback) { if (userInfo == null) { if (callback != null) { callback.internalDone(AVErrorUtils.createException(AVException.OTHER_CAUSE, "NULL userInfo.")); } return; } Map<String, Object> authData = authData(userInfo); if (user.get(authDataTag) != null && user.get(authDataTag) instanceof Map) { authData.putAll((Map<String, Object>) user.get(authDataTag)); } user.put(authDataTag, authData); user.markAnonymousUserTransfer(); user.saveInBackground(callback); } static public void dissociateAuthData(final AVUser user, final String type, final SaveCallback callback) { Map<String, Object> authData = (Map<String, Object>) user.get(authDataTag); if (authData != null) { authData.remove(type); } user.put(authDataTag, authData); if (user.isAuthenticated() && !AVUtils.isBlankString(user.getObjectId())) { user.saveInBackground(new SaveCallback() { @Override public void done(AVException e) { user.processAuthData(new AVThirdPartyUserAuth(null, null, type, null)); if (callback != null) { callback.internalDone(e); } } }); } else { if (callback != null) { callback.internalDone(new AVException(AVException.SESSION_MISSING, "the user object missing a valid session")); } } } private static final String accessTokenTag = "access_token"; private static final String expiresAtTag = "expires_at"; private static final String authDataTag = "authData"; private static final String anonymousTag = "anonymous"; protected void processAuthData(AVThirdPartyUserAuth auth) { Map<String, Object> authData = (Map<String, Object>) this.get(authDataTag); // 匿名用户转化为正式用户 if (needTransferFromAnonymousUser) { if (authData != null && authData.containsKey(anonymousTag)) { authData.remove(anonymousTag); } else { anonymous = false; } needTransferFromAnonymousUser = false; } if (authData != null) { if (authData.containsKey(AVThirdPartyUserAuth.SNS_SINA_WEIBO)) { Map<String, Object> sinaAuthData = (Map<String, Object>) authData.get(AVThirdPartyUserAuth.SNS_SINA_WEIBO); this.sinaWeiboToken = (String) sinaAuthData.get(accessTokenTag); } else { this.sinaWeiboToken = null; } if (authData.containsKey(AVThirdPartyUserAuth.SNS_TENCENT_WEIBO)) { Map<String, Object> qqAuthData = (Map<String, Object>) authData.get(AVThirdPartyUserAuth.SNS_TENCENT_WEIBO); this.qqWeiboToken = (String) qqAuthData.get(accessTokenTag); } else { this.qqWeiboToken = null; } if (authData.containsKey(anonymousTag)) { this.anonymous = true; } else { this.anonymous = false; } } if (auth != null) { if (auth.snsType.equals(AVThirdPartyUserAuth.SNS_SINA_WEIBO)) { sinaWeiboToken = auth.accessToken; return; } if (auth.snsType.equals(AVThirdPartyUserAuth.SNS_TENCENT_WEIBO)) { qqWeiboToken = auth.accessToken; return; } } } public static class AVThirdPartyUserAuth { String accessToken; String expiredAt; String snsType; String userId; public static final String SNS_TENCENT_WEIBO = "qq"; public static final String SNS_SINA_WEIBO = "weibo"; public static final String SNS_TENCENT_WEIXIN = "weixin"; public AVThirdPartyUserAuth(String accessToken, String expiredAt, String snstype, String userId) { this.accessToken = accessToken; this.snsType = snstype; this.expiredAt = expiredAt; this.userId = userId; } protected static String platformUserIdTag(String type) { if (SNS_TENCENT_WEIBO.equalsIgnoreCase(type) || SNS_TENCENT_WEIXIN.equalsIgnoreCase(type)) { return "openid"; } else { return "uid"; } } public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getExpireAt() { return expiredAt; } public void setExpireAt(String expireAt) { this.expiredAt = expireAt; } public String getSnsType() { return snsType; } public void setSnsType(String snsType) { this.snsType = snsType; } } private void markAnonymousUserTransfer() { if (isAnonymous()) { needTransferFromAnonymousUser = true; } } }
[ "lbt0506@gmail.com" ]
lbt0506@gmail.com
c9366bb350858d5c2e04754d37d60dd16cbedef6
cd5272fa1c6194e7c39e41d69e1722422715f2ad
/v1/server/api/src/main/java/net/wecash/server/mysql/model/User.java
b858d6ad898da1222f219a4d6046c2fc8c99fad4
[]
no_license
androidzhaoxiaogang/wuyan
331d526bd05e185f44afc09e75fba4e7cec8526d
553d036acf5cfafbe25bd2dd08155a892fd9a195
refs/heads/master
2021-01-18T06:13:23.998883
2015-10-20T09:23:12
2015-10-20T09:23:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,383
java
package net.wecash.server.mysql.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import net.wecash.common.service.Collections; import org.hibernate.annotations.GenericGenerator; /** * * @author xkk * */ @Entity @Table(name = Collections.T_USER) public class User implements Serializable { private static final long serialVersionUID = -921629866889932238L; @Id @GeneratedValue(generator = "increment") @GenericGenerator(name = "increment", strategy = "increment") private Long id; @Column(length = 40) private String name; @Column(length = 250) private String description; @Temporal(TemporalType.DATE) private Date birthday; private String gender; /** * 用户类型 0管理员 1普通用户 */ private Integer type; /** * 0无需求 1 找室友 2 找房 */ private Integer state; @Column(length = 20) private String phone; @Temporal(TemporalType.TIMESTAMP) @Column(name = "create_time", updatable = false) private Date createTime; /** * 性格 */ private Float personality; /** * 习惯 */ private Integer habit; /** * 学历 */ private Integer degree; /** * 职业 */ private Integer occupation; 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 String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Integer getState() { return state; } public void setState(Integer state) { this.state = state; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Float getPersonality() { return personality; } public void setPersonality(Float personality) { this.personality = personality; } public Integer getHabit() { return habit; } public void setHabit(Integer habit) { this.habit = habit; } public Integer getDegree() { return degree; } public void setDegree(Integer degree) { this.degree = degree; } public Integer getOccupation() { return occupation; } public void setOccupation(Integer occupation) { this.occupation = occupation; } @Override public String toString() { return "User [id=" + id + ", name=" + name + ", description=" + description + ", birthday=" + birthday + ", gender=" + gender + ", type=" + type + ", state=" + state + ", phone=" + phone + ", createTime=" + createTime + ", personality=" + personality + ", habit=" + habit + ", degree=" + degree + ", occupation=" + occupation + "]"; } }
[ "franklin.xkk@gmail.com" ]
franklin.xkk@gmail.com
a6d8ef0c8902c4e6a2e637df2939c610937c9bbc
14f43f6064d9522edf67e70b49d938fd676f21bb
/src/org/opendatakit/briefcase/pull/aggregate/PullFromAggregate.java
d0e53fcb768adb93be572b0074a4f770a4e33303
[ "Apache-2.0" ]
permissive
sw-testing-lab-briefcase/briefcase
5da51b636625c5c0efd7e45a24f9ee01d4e344f9
7733176f54495642f7d113bfb18785be29c533c1
refs/heads/master
2021-03-09T19:57:50.602961
2020-05-29T14:46:36
2020-05-29T14:46:36
246,374,811
0
1
NOASSERTION
2020-03-23T12:08:02
2020-03-10T18:14:52
Java
UTF-8
Java
false
false
15,916
java
/* * Copyright (C) 2019 Nafundi * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.opendatakit.briefcase.pull.aggregate; import static java.nio.file.StandardOpenOption.CREATE; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; import static java.util.Collections.emptyList; import static java.util.function.BinaryOperator.maxBy; import static java.util.stream.Collectors.toList; import static org.opendatakit.briefcase.model.form.FormMetadataCommands.updateAsPulled; import static org.opendatakit.briefcase.reused.UncheckedFiles.createDirectories; import static org.opendatakit.briefcase.reused.UncheckedFiles.write; import static org.opendatakit.briefcase.reused.http.RequestBuilder.get; import static org.opendatakit.briefcase.reused.job.Job.run; import static org.opendatakit.briefcase.util.DatabaseUtils.withDb; import java.net.URL; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; import org.bushe.swing.event.EventBus; import org.opendatakit.briefcase.export.XmlElement; import org.opendatakit.briefcase.model.FormStatus; import org.opendatakit.briefcase.model.FormStatusEvent; import org.opendatakit.briefcase.model.RemoteFormDefinition; import org.opendatakit.briefcase.model.form.FormKey; import org.opendatakit.briefcase.model.form.FormMetadataPort; import org.opendatakit.briefcase.pull.PullEvent; import org.opendatakit.briefcase.reused.OptionalProduct; import org.opendatakit.briefcase.reused.Pair; import org.opendatakit.briefcase.reused.Triple; import org.opendatakit.briefcase.reused.http.Http; import org.opendatakit.briefcase.reused.http.Request; import org.opendatakit.briefcase.reused.http.RequestBuilder; import org.opendatakit.briefcase.reused.http.response.Response; import org.opendatakit.briefcase.reused.job.Job; import org.opendatakit.briefcase.reused.job.RunnerStatus; import org.opendatakit.briefcase.reused.transfer.AggregateServer; public class PullFromAggregate { private final Http http; private final AggregateServer server; private final Path briefcaseDir; private final boolean includeIncomplete; private final Consumer<FormStatusEvent> onEventCallback; private final FormMetadataPort formMetadataPort; public PullFromAggregate(Http http, AggregateServer server, Path briefcaseDir, boolean includeIncomplete, Consumer<FormStatusEvent> onEventCallback, FormMetadataPort formMetadataPort) { this.http = http; this.server = server; this.briefcaseDir = briefcaseDir; this.includeIncomplete = includeIncomplete; this.onEventCallback = onEventCallback; this.formMetadataPort = formMetadataPort; } static Optional<Cursor> getLastCursor(List<InstanceIdBatch> batches) { return batches.stream() .map(InstanceIdBatch::getCursor) .reduce(maxBy(Cursor::compareTo)); } /** * Pulls a form completely, writing the form file, form attachments, * submission files and their attachments to the local filesystem * under the Briefcase Storage directory. * <p> * A {@link Cursor} can be provided to define the starting point to * download the form's submissions. * <p> * Returns a Job that will produce a pull operation result. */ public Job<Void> pull(FormStatus form, Optional<Cursor> lastCursor) { FormKey key = FormKey.from(form); PullFromAggregateTracker tracker = new PullFromAggregateTracker(form, onEventCallback); // Download the form and attachments, and get the submissions list return run(rs -> tracker.trackStart()) .thenSupply(rs -> downloadForm(form, rs, tracker)) .thenAccept((rs, formXml) -> { if (formXml == null) return; List<AggregateAttachment> attachments = getFormAttachments(form, rs, tracker); int totalAttachments = attachments.size(); AtomicInteger attachmentNumber = new AtomicInteger(1); attachments.parallelStream().forEach(attachment -> downloadFormAttachment(form, attachment, rs, tracker, attachmentNumber.getAndIncrement(), totalAttachments) ); List<InstanceIdBatch> instanceIdBatches = getSubmissionIds(form, lastCursor.orElse(Cursor.empty()), rs, tracker); // Build the submission key generator with the form's XML contents SubmissionKeyGenerator subKeyGen = SubmissionKeyGenerator.from(formXml); // Extract all the instance IDs from all the batches and download each instance List<String> ids = instanceIdBatches.stream() .flatMap(batch -> batch.getInstanceIds().stream()) .collect(toList()); int totalSubmissions = ids.size(); AtomicInteger submissionNumber = new AtomicInteger(1); if (ids.isEmpty()) tracker.trackNoSubmissions(); withDb(form.getFormDir(briefcaseDir), db -> { // We need to collect to be able to create a parallel stream again ids.parallelStream() .map(instanceId -> Triple.of(submissionNumber.getAndIncrement(), instanceId, db.hasRecordedInstance(instanceId) == null)) .peek(triple -> { if (!triple.get3()) tracker.trackSubmissionAlreadyDownloaded(triple.get1(), totalSubmissions); }) .filter(Triple::get3) .map(triple -> Pair.of( triple.get1(), downloadSubmission(form, triple.get2(), subKeyGen, rs, tracker, triple.get1(), totalSubmissions) )) .filter(p -> p.getRight() != null) .forEach(pair -> { int currentSubmissionNumber = pair.getLeft(); DownloadedSubmission submission = pair.getRight(); List<AggregateAttachment> submissionAttachments = submission.getAttachments(); AtomicInteger submissionAttachmentNumber = new AtomicInteger(1); int totalSubmissionAttachments = submissionAttachments.size(); submissionAttachments.parallelStream().forEach(attachment -> downloadSubmissionAttachment(form, submission, attachment, rs, tracker, currentSubmissionNumber, totalSubmissions, submissionAttachmentNumber.getAndIncrement(), totalSubmissionAttachments) ); db.putRecordedInstanceDirectory(submission.getInstanceId(), form.getSubmissionDir(briefcaseDir, submission.getInstanceId()).toFile()); }); }); tracker.trackEnd(); Cursor newCursor = getLastCursor(instanceIdBatches).orElse(Cursor.empty()); formMetadataPort.execute(updateAsPulled(key, newCursor, briefcaseDir, form.getFormDir(briefcaseDir))); EventBus.publish(PullEvent.Success.of(form, server)); }); } String downloadForm(FormStatus form, RunnerStatus runnerStatus, PullFromAggregateTracker tracker) { if (runnerStatus.isCancelled()) { tracker.trackCancellation("Download form"); return null; } tracker.trackStartDownloadingForm(); Response<String> response = http.execute(getDownloadFormRequest(form, tracker)); if (!response.isSuccess()) { tracker.trackErrorDownloadingForm(response); return null; } Path formFile = form.getFormFile(briefcaseDir); createDirectories(formFile.getParent()); String formXml = response.get(); write(formFile, formXml, CREATE, TRUNCATE_EXISTING); tracker.trackEndDownloadingForm(); return formXml; } private Request<String> getDownloadFormRequest(FormStatus form, PullFromAggregateTracker tracker) { Optional<RemoteFormDefinition> maybeRemoteForm; if (form.getFormDefinition() instanceof RemoteFormDefinition) { maybeRemoteForm = Optional.of((RemoteFormDefinition) form.getFormDefinition()); } else { // This is a pull before export operation. We need to get the manifest // to get the download URL of this blank form. Response<List<RemoteFormDefinition>> remoteFormsResponse = http.execute(server.getFormListRequest()); if (remoteFormsResponse.isSuccess()) maybeRemoteForm = remoteFormsResponse.get().stream() .filter(remoteForm -> remoteForm.getFormId().equals(form.getFormId())) .findFirst(); else { tracker.trackErrorGettingFormManifest(remoteFormsResponse); maybeRemoteForm = Optional.empty(); } } // In case the downloadUrl is empty, we return an Aggregate // compatible url and wish for the best. return maybeRemoteForm .flatMap(RemoteFormDefinition::getDownloadUrl) .map(server::getDownloadFormRequest) .orElse(server.getDownloadFormRequest(form.getFormId())); } List<AggregateAttachment> getFormAttachments(FormStatus form, RunnerStatus runnerStatus, PullFromAggregateTracker tracker) { if (runnerStatus.isCancelled()) { tracker.trackCancellation("Get form attachments"); return emptyList(); } if (!form.getManifestUrl().filter(RequestBuilder::isUri).isPresent()) return emptyList(); tracker.trackStartGettingFormManifest(); URL manifestUrl = form.getManifestUrl().map(RequestBuilder::url).get(); Request<List<AggregateAttachment>> request = get(manifestUrl) .asXmlElement() .withResponseMapper(PullFromAggregate::parseMediaFiles) .build(); Response<List<AggregateAttachment>> response = http.execute(request); if (!response.isSuccess()) { tracker.trackErrorGettingFormManifest(response); return Collections.emptyList(); } List<AggregateAttachment> attachments = response.get(); List<AggregateAttachment> attachmentsToDownload = attachments.stream() .filter(mediaFile -> mediaFile.needsUpdate(form.getFormMediaDir(briefcaseDir))) .collect(toList()); tracker.trackEndGettingFormManifest(); tracker.trackIgnoredFormAttachments(attachmentsToDownload.size(), attachments.size()); return attachmentsToDownload; } List<InstanceIdBatch> getSubmissionIds(FormStatus form, Cursor lastCursor, RunnerStatus runnerStatus, PullFromAggregateTracker tracker) { if (runnerStatus.isCancelled()) { tracker.trackCancellation("Get submissions IDs"); return emptyList(); } return getInstanceIdBatches(form, runnerStatus, tracker, lastCursor); } void downloadFormAttachment(FormStatus form, AggregateAttachment attachment, RunnerStatus runnerStatus, PullFromAggregateTracker tracker, int attachmentNumber, int totalAttachments) { if (runnerStatus.isCancelled()) { tracker.trackCancellation("Download form attachment " + attachment.getFilename()); return; } Path target = form.getFormMediaFile(briefcaseDir, attachment.getFilename()); createDirectories(target.getParent()); tracker.trackStartDownloadingFormAttachment(attachmentNumber, totalAttachments); Response response = http.execute(get(attachment.getDownloadUrl()).downloadTo(target).build()); if (response.isSuccess()) tracker.trackEndDownloadingFormAttachment(attachmentNumber, totalAttachments); else tracker.trackErrorDownloadingFormAttachment(attachmentNumber, totalAttachments, response); } DownloadedSubmission downloadSubmission(FormStatus form, String instanceId, SubmissionKeyGenerator subKeyGen, RunnerStatus runnerStatus, PullFromAggregateTracker tracker, int submissionNumber, int totalSubmissions) { if (runnerStatus.isCancelled()) { tracker.trackCancellation("Download submission " + submissionNumber + " of " + totalSubmissions); return null; } tracker.trackStartDownloadingSubmission(submissionNumber, totalSubmissions); String submissionKey = subKeyGen.buildKey(instanceId); Response<DownloadedSubmission> response = http.execute(server.getDownloadSubmissionRequest(submissionKey)); if (!response.isSuccess()) { tracker.trackErrorDownloadingSubmission(submissionNumber, totalSubmissions, response); return null; } DownloadedSubmission submission = response.get(); Path submissionFile = form.getSubmissionFile(briefcaseDir, submission.getInstanceId()); createDirectories(submissionFile.getParent()); write(submissionFile, submission.getXml(), CREATE, TRUNCATE_EXISTING); tracker.trackEndDownloadingSubmission(submissionNumber, totalSubmissions); return submission; } void downloadSubmissionAttachment(FormStatus form, DownloadedSubmission submission, AggregateAttachment attachment, RunnerStatus runnerStatus, PullFromAggregateTracker tracker, int submissionNumber, int totalSubmissions, int attachmentNumber, int totalAttachments) { if (runnerStatus.isCancelled()) { tracker.trackCancellation("Download attachment " + attachmentNumber + " of " + totalAttachments + " of submission " + submissionNumber + " of " + totalSubmissions); return; } Path target = form.getSubmissionMediaFile(briefcaseDir, submission.getInstanceId(), attachment.getFilename()); createDirectories(target.getParent()); tracker.trackStartDownloadingSubmissionAttachment(submissionNumber, totalSubmissions, attachmentNumber, totalAttachments); Response response = http.execute(get(attachment.getDownloadUrl()).downloadTo(target).build()); if (response.isSuccess()) tracker.trackEndDownloadingSubmissionAttachment(submissionNumber, totalSubmissions, attachmentNumber, totalAttachments); else tracker.trackErrorDownloadingSubmissionAttachment(submissionNumber, totalSubmissions, attachmentNumber, totalAttachments, response); } private static List<AggregateAttachment> parseMediaFiles(XmlElement root) { return asMediaFileList(root.findElements("mediaFile")); } static List<AggregateAttachment> asMediaFileList(List<XmlElement> xmlElements) { return xmlElements.stream() .map(mediaFile -> OptionalProduct.all( mediaFile.findElement("filename").flatMap(XmlElement::maybeValue), mediaFile.findElement("hash").flatMap(XmlElement::maybeValue), mediaFile.findElement("downloadUrl").flatMap(XmlElement::maybeValue) ).map(AggregateAttachment::of)) .filter(Optional::isPresent) .map(Optional::get) .collect(toList()); } private List<InstanceIdBatch> getInstanceIdBatches(FormStatus form, RunnerStatus runnerStatus, PullFromAggregateTracker tracker, Cursor lastCursor) { tracker.trackStartGettingSubmissionIds(); InstanceIdBatchGetter batchPager; try { batchPager = new InstanceIdBatchGetter(server, http, form.getFormId(), includeIncomplete, lastCursor); } catch (InstanceIdBatchGetterException e) { tracker.trackErrorGettingInstanceIdBatches(e.aggregateResponse); return emptyList(); } List<InstanceIdBatch> batches = new ArrayList<>(); // The first batch is always an empty batch with the last cursor // to avoid losing it if there are no new submissions available batches.add(InstanceIdBatch.from(emptyList(), lastCursor)); while (runnerStatus.isStillRunning() && batchPager.hasNext()) batches.add(batchPager.next()); tracker.trackEndGettingSubmissionIds(); return batches; } }
[ "ggalmazor@gmail.com" ]
ggalmazor@gmail.com
35bb8bf867315366ff19ba7065693e8e3ce787e3
ff27c6a950cd358839dd5ca5b9d84323c594a3f0
/src/main/java/com/example/cinema/services/SeanceService.java
5046629e809715e6ed8d31981e12eddc7f93d114
[]
no_license
ValereGB/CinemaSpring
be92e1ebf759dc1187525c0402e83b2e51e6cdde
a81d9227aa500f628fa6b67fc35df2e5ed2ee9d2
refs/heads/main
2023-07-31T20:06:04.503424
2021-09-22T11:54:26
2021-09-22T11:54:26
409,181,915
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.example.cinema.services; import java.util.List; import com.example.cinema.models.Film; import com.example.cinema.models.Seance; public interface SeanceService { public List<Seance> findAll(); public Seance save(Seance seance); public void delete(String id); Seance putSeance(Seance seance); Seance findBySalle(String salle); List<Film> findFilmBySeanceSalle(String salle); }
[ "valeregbv1@gmail.com" ]
valeregbv1@gmail.com
ead778ed16b9843f987fcbf6c9343878c550bc7a
50cfe726aaa36c70ac1e8f3267799175deb4ec9d
/weishi/src/main/java/com/atguigu/weishi/ContactListActivity.java
a9e7bb859cfd5593fa654766d3b1b5c76568d23a
[]
no_license
zzlllqqqq/shuojiweishi
7a345ce7e2f0be493de80698eb3ebe23a936d404
8938b4e455667abc850f9c73cfc89747737e1108
refs/heads/master
2021-01-18T15:06:56.779273
2016-01-14T14:24:03
2016-01-14T14:24:03
49,651,968
0
0
null
null
null
null
UTF-8
Java
false
false
3,098
java
package com.atguigu.weishi; import android.app.ListActivity; import android.content.ContentResolver; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.TextView; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class ContactListActivity extends ListActivity implements AdapterView.OnItemClickListener { private List<Map<String, String>> data = new ArrayList<Map<String, String>>(); private contactAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_contact_list); ContentResolver resolver = getContentResolver(); Cursor cursor = resolver.query(Phone.CONTENT_URI, new String[]{Phone.DISPLAY_NAME, Phone.NUMBER}, null, null, null); while (cursor.moveToNext()){ Map<String, String> map = new HashMap<String, String>(); map.put("name", cursor.getString(0)); map.put("number", cursor.getString(1)); data.add(map); } cursor.close(); adapter = new contactAdapter(); setListAdapter(adapter); getListView().setOnItemClickListener(this); } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { String number = data.get(position).get("number"); Intent data = getIntent(); data.putExtra("NUMBER", number); setResult(RESULT_OK, data); finish(); } class contactAdapter extends BaseAdapter{ @Override public int getCount() { return data.size(); } @Override public Object getItem(int position) { return data.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; if(convertView == null) { convertView = View.inflate(ContactListActivity.this, R.layout.item_contact, null); holder = new ViewHolder(); holder.nameTV = (TextView) convertView.findViewById(R.id.tv_item_name); holder.numberTV = (TextView) convertView.findViewById(R.id.tv_item_number); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } Map<String, String> map = data.get(position); holder.nameTV.setText(map.get("name")); holder.numberTV.setText(map.get("number")); return convertView; } class ViewHolder{ public TextView nameTV; public TextView numberTV; } } }
[ "zlq62199300" ]
zlq62199300
f289cd8a9a11c01f0fc5a332cfb89ee5d7f7dd96
00a3be4a76640c1b4d2fd3a85c9f2ae0dc40f9d0
/Method/src/com/jonathan/method/WhiteCoffe.java
148054afc1006457a4480b5284ffdd2b2a014d04
[]
no_license
jonathansedrez/DesignPatterns
0e84c4a90519103ffa80d551e17f41a682985430
2be4e345406edf72d298cb3c3da4c3f460e551b0
refs/heads/master
2020-03-25T00:56:46.101754
2018-08-01T22:19:47
2018-08-01T22:19:47
143,213,709
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package com.jonathan.method; public class WhiteCoffe extends CoffeMachine{ @Override void addIngredients(){ System.out.println("adding water..."); System.out.println("adding coffe..."); } @Override void mixCoffe(){ System.out.println("Mixing..."); } @Override void heatCoffe(){ System.out.println("Heating coffe..."); System.out.println("Thank you!"); } }
[ "jonathansedrez@gmail.com" ]
jonathansedrez@gmail.com
645b51f31eb2072394cb5ab91a4553731afcf9ac
330d89c26c4a18f30080ae57fe38719d03f5d902
/src/Visitor/AbstractVisitor.java
c0e1bbea53f97f59c2d742a4d94ff0d10b006591
[]
no_license
martini21/Java-finals-practice
89fc99234ab9111c3f2d59cb529716058650a3f8
62af6e40c2f317a3a82e3d275de63fc8e7d1f865
refs/heads/master
2020-05-07T09:09:47.396910
2019-04-09T12:46:42
2019-04-09T12:46:42
180,365,162
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package Visitor; /** * Name: * StudentNr: */ public abstract class AbstractVisitor implements Visitor { public Ticket getTicket() { throw new UnsupportedOperationException("Not yet implemented"); } }
[ "martini.pallares@gmail.com" ]
martini.pallares@gmail.com
09604912964599ed302251b3caa2a66627e7931a
6a0a2c3543d01ce8c5ba649fc61a2c4b07ee0eae
/Interpreter/src/interpreter/Interpreter.java
c6a78287f243eb97daf79c7d6154f93bde173858
[]
no_license
ekngen11/DECAF
55dba891ada1681becf69f751cabf174c28a15bc
a857289ca061e54013e08503a799696da01a9435
refs/heads/master
2021-01-22T14:33:05.894917
2014-07-10T14:41:12
2014-07-10T14:41:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,099
java
package interpreter; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; import parser.Program; import tokenizer.SyntaxError; import tokenizer.Tokenizer; //Run Decaf Programs public class Interpreter { public static void main(String[] args) { try { String fileName= args[0]; File file= new File(fileName); Scanner scanner= new Scanner(file); Tokenizer tokenizer = new Tokenizer(scanner); Program program= new Program(tokenizer); program.run(); } catch(ArrayIndexOutOfBoundsException e){ System.out.println("Missing argument: fileName"); System.exit(0); } catch (FileNotFoundException e) { System.out.println("Error: file "+args[0]+" not found."); System.exit(0); } catch(SyntaxError e){ System.out.println(e.getMessage()); }catch(NameError e){ System.out.println(e.getMessage()); } catch(TypeError e){ System.out.println(e.getMessage()); } catch(DivisionError e){ System.out.println(e.getMessage()); } } }
[ "ekngen11@gmail.com" ]
ekngen11@gmail.com
7b8a2ce3716f9f2210cf17192d6c0534e2b75eea
7c97978e6225f963a3a0ecf37c5390947db233ef
/src/main/java/pl/mzuchnik/springpracadomowa7b/controller/ArticleController.java
3d67379375ebf49c03909729f1c48509f72e5d6e
[]
no_license
mzuchnik/spring-praca-domowa-7b
da2c15f4951d15e9ceb537b96c5587a835eef129
e5821e9ea50d0169427d8dc5dd913eb474785035
refs/heads/master
2021-05-25T15:18:01.501994
2020-04-07T13:43:30
2020-04-07T13:43:30
253,805,216
0
0
null
null
null
null
UTF-8
Java
false
false
1,756
java
package pl.mzuchnik.springpracadomowa7b.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import pl.mzuchnik.springpracadomowa7b.client.ArticleClient; import pl.mzuchnik.springpracadomowa7b.dao.ArticleDao; import pl.mzuchnik.springpracadomowa7b.model.Article; @Controller @RequestMapping("/articles") public class ArticleController { private ArticleClient articleClient; private ArticleDao articleDao; @Autowired public ArticleController(ArticleClient articleClient, ArticleDao articleDao) { this.articleClient = articleClient; this.articleDao = articleDao; } @GetMapping public String getAllArticles(Model model, @RequestParam(defaultValue = "pl") String country) { model.addAttribute("articles",articleClient.getTopLineArticles(country)); return "articles"; } @PostMapping public String saveArticle(@ModelAttribute Article article) { articleDao.addArticle(article); return "redirect:/articles"; } @GetMapping("/saved") public String getSavedArticles(Model model) { model.addAttribute("articles",articleDao.findAll()); return "savedArticles"; } @GetMapping("/update") public String updateArticle(@ModelAttribute Article article) { System.out.println(article); articleDao.updateArticle(article); return "redirect:/articles/saved"; } @GetMapping("/remove") public String removeArticle(@RequestParam long id) { articleDao.removeArticle(id); return "redirect:/articles/saved"; } }
[ "conju89@gmail.com" ]
conju89@gmail.com
0e8064ec4a1f7d21c75063dbc782d980c9daf6c2
c3adeeb4cd056b5702423c0865b126cbfa8aecee
/src/com/class24/Test.java
185a8ce804d9bad6fd46224818732d998cfd49d2
[]
no_license
sj0626/javaClasses
a332dad3a3b82cce8a763f9f094ebad7b60cb211
0a5e0e44c58af5a63ea7bdc10d64d5fd61642592
refs/heads/master
2022-03-17T19:33:29.839028
2019-12-08T15:18:24
2019-12-08T15:18:24
219,891,305
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package com.class24; public class Test { public static void main(String[] args) { Child1 child1=new Child1(); System.out.println(Child1.race); System.out.println(child1.hairColor); System.out.println(child1.eyeColor); child1.sing(); child1.code(); Parent parent=new Parent(); System.out.println(parent.eyeColor); System.out.println(parent.hairColor); System.out.println(Parent.race); parent.sing(); //parent.code();// compiler gives an error Child2 child2=new Child2(); System.out.println(Child1.race); System.out.println(child2.eyeColor); System.out.println(child2.hairColor); System.out.println(Child2.race); System.out.println(Parent.race); child2.dance(); child2.sing(); System.out.println(child2.name); } }
[ "shubhajain@me.com" ]
shubhajain@me.com
cfd356abe3bc1245a06d81be558ec27634d3dcce
605b6e800c0449736d7dfe86793b1c07bb0617b6
/src/minecraft/net/minecraft/command/CommandShowSeed.java
ecf8fa52d858dba73de2993f24db29c3fa5ed96b
[]
no_license
HaxDevsClub/WordStorm
20f07737942cbda2cd8e7002c4c971ade0725461
79323e0848830016429307e76042844204cbed5f
refs/heads/master
2020-12-24T10:14:57.662136
2016-11-07T17:36:41
2016-11-07T17:36:41
73,095,787
0
0
null
null
null
null
UTF-8
Java
false
false
1,797
java
package net.minecraft.command; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.world.World; public class CommandShowSeed extends CommandBase { private static final String __OBFID = "CL_00001053"; /** * Returns true if the given command sender is allowed to use this command. * * @param sender The CommandSender */ public boolean canCommandSenderUseCommand(ICommandSender sender) { return MinecraftServer.getServer().isSinglePlayer() || super.canCommandSenderUseCommand(sender); } /** * Gets the name of the command */ public String getCommandName() { return "seed"; } /** * Return the required permission level for this command. */ public int getRequiredPermissionLevel() { return 2; } /** * Gets the usage string for the command. * * @param sender The {@link ICommandSender} who is requesting usage details. */ public String getCommandUsage(ICommandSender sender) { return "commands.seed.usage"; } /** * Callback when the command is invoked * * @param sender The {@link ICommandSender sender} who executed the command * @param args The arguments that were passed with the command */ public void processCommand(ICommandSender sender, String[] args) throws CommandException { Object var3 = sender instanceof EntityPlayer ? ((EntityPlayer)sender).worldObj : MinecraftServer.getServer().worldServerForDimension(0); sender.addChatMessage(new ChatComponentTranslation("commands.seed.success", new Object[] {Long.valueOf(((World)var3).getSeed())})); } }
[ "jaspersmit2801@gmail.com" ]
jaspersmit2801@gmail.com
9cfd879485923b9f115975f04a4e93387ad9f04e
f03faf560b7589133125c9ef39db52b2c4010239
/src/main/java/com/lampiris/library/service/BookService.java
1846ad014e0c2db2ab8471e9c789abcdcec2b9b8
[]
no_license
Bruno10log/library
b956b368ed05b42ddcc25d1b517c9564259acd70
a2f8737bb46b604f6362fe08062005027826ec23
refs/heads/master
2023-05-14T00:33:48.418855
2021-06-01T20:26:24
2021-06-01T20:26:24
372,947,224
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package com.lampiris.library.service; import com.lampiris.library.dto.BookDTO; import com.lampiris.library.entity.Book; import java.util.List; public interface BookService { List<Book> getAll(); Book save(Book bookFamily); Book fromDTO(BookDTO dto); Book update(Book bookFamily); String generateExcel(); }
[ "bmeira.bms@gmail.com" ]
bmeira.bms@gmail.com
ab958487f3fa974a96c394c2d7d2e9ba1281d4ce
00b46dd1d207aa8320f6a3c381f713dc05c771f6
/src/main/java/tree_visualization/DeserializeActionListener.java
93d7a6cc856d5673e65d0c390c5b1e90ae04b429
[]
no_license
ffbit/okolodev-algorithms-java
4b1451049c24af080311b327813da09425a06908
33e2045c8a75d7b203129f0cc8b3b38cecb8b343
refs/heads/master
2020-05-09T14:36:22.405761
2016-06-07T21:45:01
2016-06-07T21:58:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,606
java
package tree_visualization; import meetup_08_tree_traversal.adt.TreeNode; import meetup_09_tree_traversal_serialization_depth.TreeSerializationCodec; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class DeserializeActionListener implements ActionListener { private final TreePanel treePanel; private final JTextField contentsTextField; private final JFrame frame; private final TreeSerializationCodec codec = new TreeSerializationCodec(); private final Color contentsTextFieldBackground; public DeserializeActionListener(TreePanel treePanel, JTextField contentsTextField, JFrame frame) { this.treePanel = treePanel; this.contentsTextField = contentsTextField; contentsTextFieldBackground = contentsTextField.getBackground(); this.frame = frame; } @Override public void actionPerformed(ActionEvent event) { String serializedTree = contentsTextField.getText(); try { TreeNode<Integer> root = codec.deserialize(serializedTree); treePanel.setTree(root); contentsTextField.setToolTipText(""); contentsTextField.setBackground(contentsTextFieldBackground); frame.revalidate(); frame.repaint(); } catch (RuntimeException e) { e.printStackTrace(); contentsTextField.setToolTipText(e.toString()); contentsTextField.setBackground(Color.RED); } } }
[ "dmytro.chyzhykov@yandex.ru" ]
dmytro.chyzhykov@yandex.ru
154b7d598fc09236a75134ec7a760e8502b399c8
e8094fe67e38eb9911d6887a097f9d01d4bc7b08
/src/main/java/cursoDAgil/service/cliente/ClienteService.java
0d6932b406d8de596f0f875ddc863ff9e3bdc8a8
[]
no_license
gomi99i/ProyectoFrameworksSeviciosEq1
b4ef31865646acf8e7ecf6e3ac32c415bdbb9138
179d0111f16445f27b9d01bb9a578adaaa52e8aa
refs/heads/master
2023-04-22T03:35:50.780473
2021-05-13T20:24:27
2021-05-13T20:24:27
367,162,756
0
0
null
null
null
null
UTF-8
Java
false
false
438
java
package cursoDAgil.service.cliente; import java.util.List; import java.util.Map; import cursoDAgil.bd.domain.Cliente; public interface ClienteService { List<Cliente> listarTodosClientes(); Cliente obtenerClientePorId(Map<String, Integer> mapCliente); Integer nuevoCliente(Cliente cliente); Integer cambiarClientePorId(Cliente cliente, Integer id); Integer eliminarClientePorId(Map<String, Integer> mapCliente); }
[ "Invitado@DESKTOP-GV7TU13" ]
Invitado@DESKTOP-GV7TU13
724a1460c2abc0f4887e319c16c6a8084959f3fa
7436457ddc410fca4c356453f6fa09a200f35566
/src/mobile/workout/db/HelperFactoryI.java
cf1b923d927425a116616c351fa9f741f62088d5
[]
no_license
heatlill/workout-mobile
3fff9b209fbddbfe9d5e695a1e7358e46af60bc0
1efe728cbe0fa25256bc8a86febcc9c96f0ae492
refs/heads/master
2020-12-24T14:18:11.112564
2011-10-13T03:08:46
2011-10-13T03:08:46
2,496,692
0
0
null
null
null
null
UTF-8
Java
false
false
184
java
package mobile.workout.db; import android.content.Context; public interface HelperFactoryI<T extends WorkoutTrackerDatabaseHelper> { public T createHelper( Context context ); }
[ "heath.lilley@gmail.com" ]
heath.lilley@gmail.com
122f2b898c4c6ba4f07234c7db83ec23b33eef41
43963449b66186a22df07fd4534243c41bc4d07a
/Isolette/src/ETemperatureStatus.java
6fecaeea60edef42078edc8442b928baf0e55ee1
[]
no_license
deghislain/ArmelProjects
26e89d6138a6c0c2b6fb2d87b69cdede2f130af3
c6e194ce585b28c6257646fcf6ec3af2e733443f
refs/heads/master
2022-12-28T00:33:36.472638
2020-07-17T17:33:04
2020-07-17T17:33:04
62,256,930
0
0
null
2022-12-16T13:56:47
2016-06-29T20:48:56
Java
UTF-8
Java
false
false
63
java
public enum ETemperatureStatus { INVALID, VALID; }
[ "deghislain@gmail.com" ]
deghislain@gmail.com
cef0d4abf84f5adf6a36f2cbf63f5439a007d0e3
4aa7a3f72b6631d4c7759c25e1e8e6fd72315fb9
/src/main/java/jp/sf/fess/db/cbean/cq/bs/AbstractBsSuggestElevateWordCQ.java
544cbe27631bbf6440240f2d5ca561500af05d20
[ "Apache-2.0" ]
permissive
shatake/fess
3ff98491e797b16d43f9b43e96e0885849cdd1ce
abf020ecb03e3b27f8933b8ba8c1a5ea63d9e3db
refs/heads/master
2020-12-26T10:18:16.033857
2014-10-30T12:56:01
2014-10-30T12:56:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
85,467
java
/* * Copyright 2009-2014 the CodeLibs Project and the Others. * * 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 jp.sf.fess.db.cbean.cq.bs; import java.util.Collection; import java.util.Date; import java.util.List; import jp.sf.fess.db.allcommon.DBMetaInstanceHandler; import jp.sf.fess.db.cbean.SuggestElevateWordCB; import jp.sf.fess.db.cbean.cq.SuggestElevateWordCQ; import org.seasar.dbflute.cbean.AbstractConditionQuery; import org.seasar.dbflute.cbean.ConditionBean; import org.seasar.dbflute.cbean.ConditionQuery; import org.seasar.dbflute.cbean.ManualOrderBean; import org.seasar.dbflute.cbean.SubQuery; import org.seasar.dbflute.cbean.chelper.HpQDRFunction; import org.seasar.dbflute.cbean.chelper.HpSSQFunction; import org.seasar.dbflute.cbean.chelper.HpSSQOption; import org.seasar.dbflute.cbean.chelper.HpSSQSetupper; import org.seasar.dbflute.cbean.ckey.ConditionKey; import org.seasar.dbflute.cbean.coption.DerivedReferrerOption; import org.seasar.dbflute.cbean.coption.FromToOption; import org.seasar.dbflute.cbean.coption.LikeSearchOption; import org.seasar.dbflute.cbean.coption.RangeOfOption; import org.seasar.dbflute.cbean.cvalue.ConditionValue; import org.seasar.dbflute.cbean.sqlclause.SqlClause; import org.seasar.dbflute.dbmeta.DBMetaProvider; /** * The abstract condition-query of SUGGEST_ELEVATE_WORD. * @author DBFlute(AutoGenerator) */ public abstract class AbstractBsSuggestElevateWordCQ extends AbstractConditionQuery { // =================================================================================== // Constructor // =========== public AbstractBsSuggestElevateWordCQ(final ConditionQuery referrerQuery, final SqlClause sqlClause, final String aliasName, final int nestLevel) { super(referrerQuery, sqlClause, aliasName, nestLevel); } // =================================================================================== // DBMeta Provider // =============== @Override protected DBMetaProvider xgetDBMetaProvider() { return DBMetaInstanceHandler.getProvider(); } // =================================================================================== // Table Name // ========== @Override public String getTableDbName() { return "SUGGEST_ELEVATE_WORD"; } // =================================================================================== // Query // ===== /** * Equal(=). And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param id The value of id as equal. (NullAllowed: if null, no condition) */ public void setId_Equal(final Long id) { doSetId_Equal(id); } protected void doSetId_Equal(final Long id) { regId(CK_EQ, id); } /** * NotEqual(&lt;&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param id The value of id as notEqual. (NullAllowed: if null, no condition) */ public void setId_NotEqual(final Long id) { doSetId_NotEqual(id); } protected void doSetId_NotEqual(final Long id) { regId(CK_NES, id); } /** * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param id The value of id as greaterThan. (NullAllowed: if null, no condition) */ public void setId_GreaterThan(final Long id) { regId(CK_GT, id); } /** * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param id The value of id as lessThan. (NullAllowed: if null, no condition) */ public void setId_LessThan(final Long id) { regId(CK_LT, id); } /** * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param id The value of id as greaterEqual. (NullAllowed: if null, no condition) */ public void setId_GreaterEqual(final Long id) { regId(CK_GE, id); } /** * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param id The value of id as lessEqual. (NullAllowed: if null, no condition) */ public void setId_LessEqual(final Long id) { regId(CK_LE, id); } /** * RangeOf with various options. (versatile) <br /> * {(default) minNumber &lt;= column &lt;= maxNumber} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param minNumber The min number of id. (NullAllowed: if null, no from-condition) * @param maxNumber The max number of id. (NullAllowed: if null, no to-condition) * @param rangeOfOption The option of range-of. (NotNull) */ public void setId_RangeOf(final Long minNumber, final Long maxNumber, final RangeOfOption rangeOfOption) { regROO(minNumber, maxNumber, getCValueId(), "ID", rangeOfOption); } /** * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param idList The collection of id as inScope. (NullAllowed: if null (or empty), no condition) */ public void setId_InScope(final Collection<Long> idList) { doSetId_InScope(idList); } protected void doSetId_InScope(final Collection<Long> idList) { regINS(CK_INS, cTL(idList), getCValueId(), "ID"); } /** * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} * @param idList The collection of id as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setId_NotInScope(final Collection<Long> idList) { doSetId_NotInScope(idList); } protected void doSetId_NotInScope(final Collection<Long> idList) { regINS(CK_NINS, cTL(idList), getCValueId(), "ID"); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} */ public void setId_IsNull() { regId(CK_ISN, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * ID: {PK, ID, NotNull, BIGINT(19)} */ public void setId_IsNotNull() { regId(CK_ISNN, DOBJ); } protected void regId(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueId(), "ID"); } protected abstract ConditionValue getCValueId(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as equal. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_Equal(final String suggestWord) { doSetSuggestWord_Equal(fRES(suggestWord)); } protected void doSetSuggestWord_Equal(final String suggestWord) { regSuggestWord(CK_EQ, suggestWord); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_NotEqual(final String suggestWord) { doSetSuggestWord_NotEqual(fRES(suggestWord)); } protected void doSetSuggestWord_NotEqual(final String suggestWord) { regSuggestWord(CK_NES, suggestWord); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_GreaterThan(final String suggestWord) { regSuggestWord(CK_GT, fRES(suggestWord)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_LessThan(final String suggestWord) { regSuggestWord(CK_LT, fRES(suggestWord)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_GreaterEqual(final String suggestWord) { regSuggestWord(CK_GE, fRES(suggestWord)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_LessEqual(final String suggestWord) { regSuggestWord(CK_LE, fRES(suggestWord)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWordList The collection of suggestWord as inScope. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_InScope(final Collection<String> suggestWordList) { doSetSuggestWord_InScope(suggestWordList); } public void doSetSuggestWord_InScope( final Collection<String> suggestWordList) { regINS(CK_INS, cTL(suggestWordList), getCValueSuggestWord(), "SUGGEST_WORD"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWordList The collection of suggestWord as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_NotInScope( final Collection<String> suggestWordList) { doSetSuggestWord_NotInScope(suggestWordList); } public void doSetSuggestWord_NotInScope( final Collection<String> suggestWordList) { regINS(CK_NINS, cTL(suggestWordList), getCValueSuggestWord(), "SUGGEST_WORD"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setSuggestWord_PrefixSearch(final String suggestWord) { setSuggestWord_LikeSearch(suggestWord, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} <br /> * <pre>e.g. setSuggestWord_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param suggestWord The value of suggestWord as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setSuggestWord_LikeSearch(final String suggestWord, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(suggestWord), getCValueSuggestWord(), "SUGGEST_WORD", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * SUGGEST_WORD: {NotNull, VARCHAR(255)} * @param suggestWord The value of suggestWord as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setSuggestWord_NotLikeSearch(final String suggestWord, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(suggestWord), getCValueSuggestWord(), "SUGGEST_WORD", likeSearchOption); } protected void regSuggestWord(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueSuggestWord(), "SUGGEST_WORD"); } protected abstract ConditionValue getCValueSuggestWord(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as equal. (NullAllowed: if null (or empty), no condition) */ public void setReading_Equal(final String reading) { doSetReading_Equal(fRES(reading)); } protected void doSetReading_Equal(final String reading) { regReading(CK_EQ, reading); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setReading_NotEqual(final String reading) { doSetReading_NotEqual(fRES(reading)); } protected void doSetReading_NotEqual(final String reading) { regReading(CK_NES, reading); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setReading_GreaterThan(final String reading) { regReading(CK_GT, fRES(reading)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setReading_LessThan(final String reading) { regReading(CK_LT, fRES(reading)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setReading_GreaterEqual(final String reading) { regReading(CK_GE, fRES(reading)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setReading_LessEqual(final String reading) { regReading(CK_LE, fRES(reading)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * READING: {VARCHAR(255)} * @param readingList The collection of reading as inScope. (NullAllowed: if null (or empty), no condition) */ public void setReading_InScope(final Collection<String> readingList) { doSetReading_InScope(readingList); } public void doSetReading_InScope(final Collection<String> readingList) { regINS(CK_INS, cTL(readingList), getCValueReading(), "READING"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * READING: {VARCHAR(255)} * @param readingList The collection of reading as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setReading_NotInScope(final Collection<String> readingList) { doSetReading_NotInScope(readingList); } public void doSetReading_NotInScope(final Collection<String> readingList) { regINS(CK_NINS, cTL(readingList), getCValueReading(), "READING"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setReading_PrefixSearch(final String reading) { setReading_LikeSearch(reading, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * READING: {VARCHAR(255)} <br /> * <pre>e.g. setReading_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param reading The value of reading as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setReading_LikeSearch(final String reading, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(reading), getCValueReading(), "READING", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * READING: {VARCHAR(255)} * @param reading The value of reading as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setReading_NotLikeSearch(final String reading, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(reading), getCValueReading(), "READING", likeSearchOption); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} */ public void setReading_IsNull() { regReading(CK_ISN, DOBJ); } /** * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} */ public void setReading_IsNullOrEmpty() { regReading(CK_ISNOE, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * READING: {VARCHAR(255)} */ public void setReading_IsNotNull() { regReading(CK_ISNN, DOBJ); } protected void regReading(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueReading(), "READING"); } protected abstract ConditionValue getCValueReading(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as equal. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_Equal(final String targetRole) { doSetTargetRole_Equal(fRES(targetRole)); } protected void doSetTargetRole_Equal(final String targetRole) { regTargetRole(CK_EQ, targetRole); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_NotEqual(final String targetRole) { doSetTargetRole_NotEqual(fRES(targetRole)); } protected void doSetTargetRole_NotEqual(final String targetRole) { regTargetRole(CK_NES, targetRole); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_GreaterThan(final String targetRole) { regTargetRole(CK_GT, fRES(targetRole)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_LessThan(final String targetRole) { regTargetRole(CK_LT, fRES(targetRole)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_GreaterEqual(final String targetRole) { regTargetRole(CK_GE, fRES(targetRole)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_LessEqual(final String targetRole) { regTargetRole(CK_LE, fRES(targetRole)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRoleList The collection of targetRole as inScope. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_InScope(final Collection<String> targetRoleList) { doSetTargetRole_InScope(targetRoleList); } public void doSetTargetRole_InScope(final Collection<String> targetRoleList) { regINS(CK_INS, cTL(targetRoleList), getCValueTargetRole(), "TARGET_ROLE"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRoleList The collection of targetRole as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_NotInScope(final Collection<String> targetRoleList) { doSetTargetRole_NotInScope(targetRoleList); } public void doSetTargetRole_NotInScope( final Collection<String> targetRoleList) { regINS(CK_NINS, cTL(targetRoleList), getCValueTargetRole(), "TARGET_ROLE"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setTargetRole_PrefixSearch(final String targetRole) { setTargetRole_LikeSearch(targetRole, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} <br /> * <pre>e.g. setTargetRole_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param targetRole The value of targetRole as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setTargetRole_LikeSearch(final String targetRole, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(targetRole), getCValueTargetRole(), "TARGET_ROLE", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} * @param targetRole The value of targetRole as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setTargetRole_NotLikeSearch(final String targetRole, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(targetRole), getCValueTargetRole(), "TARGET_ROLE", likeSearchOption); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} */ public void setTargetRole_IsNull() { regTargetRole(CK_ISN, DOBJ); } /** * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} */ public void setTargetRole_IsNullOrEmpty() { regTargetRole(CK_ISNOE, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * TARGET_ROLE: {VARCHAR(255)} */ public void setTargetRole_IsNotNull() { regTargetRole(CK_ISNN, DOBJ); } protected void regTargetRole(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueTargetRole(), "TARGET_ROLE"); } protected abstract ConditionValue getCValueTargetRole(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as equal. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_Equal(final String targetLabel) { doSetTargetLabel_Equal(fRES(targetLabel)); } protected void doSetTargetLabel_Equal(final String targetLabel) { regTargetLabel(CK_EQ, targetLabel); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_NotEqual(final String targetLabel) { doSetTargetLabel_NotEqual(fRES(targetLabel)); } protected void doSetTargetLabel_NotEqual(final String targetLabel) { regTargetLabel(CK_NES, targetLabel); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_GreaterThan(final String targetLabel) { regTargetLabel(CK_GT, fRES(targetLabel)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_LessThan(final String targetLabel) { regTargetLabel(CK_LT, fRES(targetLabel)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_GreaterEqual(final String targetLabel) { regTargetLabel(CK_GE, fRES(targetLabel)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_LessEqual(final String targetLabel) { regTargetLabel(CK_LE, fRES(targetLabel)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabelList The collection of targetLabel as inScope. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_InScope(final Collection<String> targetLabelList) { doSetTargetLabel_InScope(targetLabelList); } public void doSetTargetLabel_InScope( final Collection<String> targetLabelList) { regINS(CK_INS, cTL(targetLabelList), getCValueTargetLabel(), "TARGET_LABEL"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabelList The collection of targetLabel as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_NotInScope( final Collection<String> targetLabelList) { doSetTargetLabel_NotInScope(targetLabelList); } public void doSetTargetLabel_NotInScope( final Collection<String> targetLabelList) { regINS(CK_NINS, cTL(targetLabelList), getCValueTargetLabel(), "TARGET_LABEL"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setTargetLabel_PrefixSearch(final String targetLabel) { setTargetLabel_LikeSearch(targetLabel, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} <br /> * <pre>e.g. setTargetLabel_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param targetLabel The value of targetLabel as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setTargetLabel_LikeSearch(final String targetLabel, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(targetLabel), getCValueTargetLabel(), "TARGET_LABEL", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} * @param targetLabel The value of targetLabel as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setTargetLabel_NotLikeSearch(final String targetLabel, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(targetLabel), getCValueTargetLabel(), "TARGET_LABEL", likeSearchOption); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} */ public void setTargetLabel_IsNull() { regTargetLabel(CK_ISN, DOBJ); } /** * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} */ public void setTargetLabel_IsNullOrEmpty() { regTargetLabel(CK_ISNOE, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * TARGET_LABEL: {VARCHAR(255)} */ public void setTargetLabel_IsNotNull() { regTargetLabel(CK_ISNN, DOBJ); } protected void regTargetLabel(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueTargetLabel(), "TARGET_LABEL"); } protected abstract ConditionValue getCValueTargetLabel(); /** * Equal(=). And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boost The value of boost as equal. (NullAllowed: if null, no condition) */ public void setBoost_Equal(final java.math.BigDecimal boost) { doSetBoost_Equal(boost); } protected void doSetBoost_Equal(final java.math.BigDecimal boost) { regBoost(CK_EQ, boost); } /** * NotEqual(&lt;&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boost The value of boost as notEqual. (NullAllowed: if null, no condition) */ public void setBoost_NotEqual(final java.math.BigDecimal boost) { doSetBoost_NotEqual(boost); } protected void doSetBoost_NotEqual(final java.math.BigDecimal boost) { regBoost(CK_NES, boost); } /** * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boost The value of boost as greaterThan. (NullAllowed: if null, no condition) */ public void setBoost_GreaterThan(final java.math.BigDecimal boost) { regBoost(CK_GT, boost); } /** * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boost The value of boost as lessThan. (NullAllowed: if null, no condition) */ public void setBoost_LessThan(final java.math.BigDecimal boost) { regBoost(CK_LT, boost); } /** * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boost The value of boost as greaterEqual. (NullAllowed: if null, no condition) */ public void setBoost_GreaterEqual(final java.math.BigDecimal boost) { regBoost(CK_GE, boost); } /** * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boost The value of boost as lessEqual. (NullAllowed: if null, no condition) */ public void setBoost_LessEqual(final java.math.BigDecimal boost) { regBoost(CK_LE, boost); } /** * RangeOf with various options. (versatile) <br /> * {(default) minNumber &lt;= column &lt;= maxNumber} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param minNumber The min number of boost. (NullAllowed: if null, no from-condition) * @param maxNumber The max number of boost. (NullAllowed: if null, no to-condition) * @param rangeOfOption The option of range-of. (NotNull) */ public void setBoost_RangeOf(final java.math.BigDecimal minNumber, final java.math.BigDecimal maxNumber, final RangeOfOption rangeOfOption) { regROO(minNumber, maxNumber, getCValueBoost(), "BOOST", rangeOfOption); } /** * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boostList The collection of boost as inScope. (NullAllowed: if null (or empty), no condition) */ public void setBoost_InScope( final Collection<java.math.BigDecimal> boostList) { doSetBoost_InScope(boostList); } protected void doSetBoost_InScope( final Collection<java.math.BigDecimal> boostList) { regINS(CK_INS, cTL(boostList), getCValueBoost(), "BOOST"); } /** * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br /> * BOOST: {NotNull, DOUBLE(17)} * @param boostList The collection of boost as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setBoost_NotInScope( final Collection<java.math.BigDecimal> boostList) { doSetBoost_NotInScope(boostList); } protected void doSetBoost_NotInScope( final Collection<java.math.BigDecimal> boostList) { regINS(CK_NINS, cTL(boostList), getCValueBoost(), "BOOST"); } protected void regBoost(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueBoost(), "BOOST"); } protected abstract ConditionValue getCValueBoost(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as equal. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_Equal(final String createdBy) { doSetCreatedBy_Equal(fRES(createdBy)); } protected void doSetCreatedBy_Equal(final String createdBy) { regCreatedBy(CK_EQ, createdBy); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_NotEqual(final String createdBy) { doSetCreatedBy_NotEqual(fRES(createdBy)); } protected void doSetCreatedBy_NotEqual(final String createdBy) { regCreatedBy(CK_NES, createdBy); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_GreaterThan(final String createdBy) { regCreatedBy(CK_GT, fRES(createdBy)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_LessThan(final String createdBy) { regCreatedBy(CK_LT, fRES(createdBy)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_GreaterEqual(final String createdBy) { regCreatedBy(CK_GE, fRES(createdBy)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_LessEqual(final String createdBy) { regCreatedBy(CK_LE, fRES(createdBy)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdByList The collection of createdBy as inScope. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_InScope(final Collection<String> createdByList) { doSetCreatedBy_InScope(createdByList); } public void doSetCreatedBy_InScope(final Collection<String> createdByList) { regINS(CK_INS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdByList The collection of createdBy as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_NotInScope(final Collection<String> createdByList) { doSetCreatedBy_NotInScope(createdByList); } public void doSetCreatedBy_NotInScope(final Collection<String> createdByList) { regINS(CK_NINS, cTL(createdByList), getCValueCreatedBy(), "CREATED_BY"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setCreatedBy_PrefixSearch(final String createdBy) { setCreatedBy_LikeSearch(createdBy, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} <br /> * <pre>e.g. setCreatedBy_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param createdBy The value of createdBy as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setCreatedBy_LikeSearch(final String createdBy, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * CREATED_BY: {NotNull, VARCHAR(255)} * @param createdBy The value of createdBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setCreatedBy_NotLikeSearch(final String createdBy, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(createdBy), getCValueCreatedBy(), "CREATED_BY", likeSearchOption); } protected void regCreatedBy(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueCreatedBy(), "CREATED_BY"); } protected abstract ConditionValue getCValueCreatedBy(); /** * Equal(=). And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * @param createdTime The value of createdTime as equal. (NullAllowed: if null, no condition) */ public void setCreatedTime_Equal(final java.sql.Timestamp createdTime) { regCreatedTime(CK_EQ, createdTime); } /** * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * @param createdTime The value of createdTime as greaterThan. (NullAllowed: if null, no condition) */ public void setCreatedTime_GreaterThan(final java.sql.Timestamp createdTime) { regCreatedTime(CK_GT, createdTime); } /** * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * @param createdTime The value of createdTime as lessThan. (NullAllowed: if null, no condition) */ public void setCreatedTime_LessThan(final java.sql.Timestamp createdTime) { regCreatedTime(CK_LT, createdTime); } /** * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * @param createdTime The value of createdTime as greaterEqual. (NullAllowed: if null, no condition) */ public void setCreatedTime_GreaterEqual(final java.sql.Timestamp createdTime) { regCreatedTime(CK_GE, createdTime); } /** * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * @param createdTime The value of createdTime as lessEqual. (NullAllowed: if null, no condition) */ public void setCreatedTime_LessEqual(final java.sql.Timestamp createdTime) { regCreatedTime(CK_LE, createdTime); } /** * FromTo with various options. (versatile) {(default) fromDatetime &lt;= column &lt;= toDatetime} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * <pre>e.g. setCreatedTime_FromTo(fromDate, toDate, new <span style="color: #DD4747">FromToOption</span>().compareAsDate());</pre> * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no from-condition) * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of createdTime. (NullAllowed: if null, no to-condition) * @param fromToOption The option of from-to. (NotNull) */ public void setCreatedTime_FromTo(final Date fromDatetime, final Date toDatetime, final FromToOption fromToOption) { regFTQ(fromDatetime != null ? new java.sql.Timestamp( fromDatetime.getTime()) : null, toDatetime != null ? new java.sql.Timestamp(toDatetime .getTime()) : null, getCValueCreatedTime(), "CREATED_TIME", fromToOption); } /** * DateFromTo. (Date means yyyy/MM/dd) {fromDate &lt;= column &lt; toDate + 1 day} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * CREATED_TIME: {NotNull, TIMESTAMP(23, 10)} * <pre> * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29} * column &gt;= '2007/04/10 00:00:00' and column <span style="color: #DD4747">&lt; '2007/04/17 00:00:00'</span> * </pre> * @param fromDate The from-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no from-condition) * @param toDate The to-date(yyyy/MM/dd) of createdTime. (NullAllowed: if null, no to-condition) */ public void setCreatedTime_DateFromTo(final Date fromDate, final Date toDate) { setCreatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate()); } protected void regCreatedTime(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueCreatedTime(), "CREATED_TIME"); } protected abstract ConditionValue getCValueCreatedTime(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as equal. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_Equal(final String updatedBy) { doSetUpdatedBy_Equal(fRES(updatedBy)); } protected void doSetUpdatedBy_Equal(final String updatedBy) { regUpdatedBy(CK_EQ, updatedBy); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_NotEqual(final String updatedBy) { doSetUpdatedBy_NotEqual(fRES(updatedBy)); } protected void doSetUpdatedBy_NotEqual(final String updatedBy) { regUpdatedBy(CK_NES, updatedBy); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_GreaterThan(final String updatedBy) { regUpdatedBy(CK_GT, fRES(updatedBy)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_LessThan(final String updatedBy) { regUpdatedBy(CK_LT, fRES(updatedBy)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_GreaterEqual(final String updatedBy) { regUpdatedBy(CK_GE, fRES(updatedBy)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_LessEqual(final String updatedBy) { regUpdatedBy(CK_LE, fRES(updatedBy)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedByList The collection of updatedBy as inScope. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_InScope(final Collection<String> updatedByList) { doSetUpdatedBy_InScope(updatedByList); } public void doSetUpdatedBy_InScope(final Collection<String> updatedByList) { regINS(CK_INS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedByList The collection of updatedBy as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_NotInScope(final Collection<String> updatedByList) { doSetUpdatedBy_NotInScope(updatedByList); } public void doSetUpdatedBy_NotInScope(final Collection<String> updatedByList) { regINS(CK_NINS, cTL(updatedByList), getCValueUpdatedBy(), "UPDATED_BY"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setUpdatedBy_PrefixSearch(final String updatedBy) { setUpdatedBy_LikeSearch(updatedBy, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} <br /> * <pre>e.g. setUpdatedBy_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param updatedBy The value of updatedBy as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setUpdatedBy_LikeSearch(final String updatedBy, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} * @param updatedBy The value of updatedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setUpdatedBy_NotLikeSearch(final String updatedBy, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(updatedBy), getCValueUpdatedBy(), "UPDATED_BY", likeSearchOption); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} */ public void setUpdatedBy_IsNull() { regUpdatedBy(CK_ISN, DOBJ); } /** * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} */ public void setUpdatedBy_IsNullOrEmpty() { regUpdatedBy(CK_ISNOE, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * UPDATED_BY: {VARCHAR(255)} */ public void setUpdatedBy_IsNotNull() { regUpdatedBy(CK_ISNN, DOBJ); } protected void regUpdatedBy(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueUpdatedBy(), "UPDATED_BY"); } protected abstract ConditionValue getCValueUpdatedBy(); /** * Equal(=). And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * @param updatedTime The value of updatedTime as equal. (NullAllowed: if null, no condition) */ public void setUpdatedTime_Equal(final java.sql.Timestamp updatedTime) { regUpdatedTime(CK_EQ, updatedTime); } /** * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * @param updatedTime The value of updatedTime as greaterThan. (NullAllowed: if null, no condition) */ public void setUpdatedTime_GreaterThan(final java.sql.Timestamp updatedTime) { regUpdatedTime(CK_GT, updatedTime); } /** * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * @param updatedTime The value of updatedTime as lessThan. (NullAllowed: if null, no condition) */ public void setUpdatedTime_LessThan(final java.sql.Timestamp updatedTime) { regUpdatedTime(CK_LT, updatedTime); } /** * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * @param updatedTime The value of updatedTime as greaterEqual. (NullAllowed: if null, no condition) */ public void setUpdatedTime_GreaterEqual(final java.sql.Timestamp updatedTime) { regUpdatedTime(CK_GE, updatedTime); } /** * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * @param updatedTime The value of updatedTime as lessEqual. (NullAllowed: if null, no condition) */ public void setUpdatedTime_LessEqual(final java.sql.Timestamp updatedTime) { regUpdatedTime(CK_LE, updatedTime); } /** * FromTo with various options. (versatile) {(default) fromDatetime &lt;= column &lt;= toDatetime} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * <pre>e.g. setUpdatedTime_FromTo(fromDate, toDate, new <span style="color: #DD4747">FromToOption</span>().compareAsDate());</pre> * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no from-condition) * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of updatedTime. (NullAllowed: if null, no to-condition) * @param fromToOption The option of from-to. (NotNull) */ public void setUpdatedTime_FromTo(final Date fromDatetime, final Date toDatetime, final FromToOption fromToOption) { regFTQ(fromDatetime != null ? new java.sql.Timestamp( fromDatetime.getTime()) : null, toDatetime != null ? new java.sql.Timestamp(toDatetime .getTime()) : null, getCValueUpdatedTime(), "UPDATED_TIME", fromToOption); } /** * DateFromTo. (Date means yyyy/MM/dd) {fromDate &lt;= column &lt; toDate + 1 day} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} * <pre> * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29} * column &gt;= '2007/04/10 00:00:00' and column <span style="color: #DD4747">&lt; '2007/04/17 00:00:00'</span> * </pre> * @param fromDate The from-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no from-condition) * @param toDate The to-date(yyyy/MM/dd) of updatedTime. (NullAllowed: if null, no to-condition) */ public void setUpdatedTime_DateFromTo(final Date fromDate, final Date toDate) { setUpdatedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate()); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} */ public void setUpdatedTime_IsNull() { regUpdatedTime(CK_ISN, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * UPDATED_TIME: {TIMESTAMP(23, 10)} */ public void setUpdatedTime_IsNotNull() { regUpdatedTime(CK_ISNN, DOBJ); } protected void regUpdatedTime(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueUpdatedTime(), "UPDATED_TIME"); } protected abstract ConditionValue getCValueUpdatedTime(); /** * Equal(=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as equal. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_Equal(final String deletedBy) { doSetDeletedBy_Equal(fRES(deletedBy)); } protected void doSetDeletedBy_Equal(final String deletedBy) { regDeletedBy(CK_EQ, deletedBy); } /** * NotEqual(&lt;&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as notEqual. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_NotEqual(final String deletedBy) { doSetDeletedBy_NotEqual(fRES(deletedBy)); } protected void doSetDeletedBy_NotEqual(final String deletedBy) { regDeletedBy(CK_NES, deletedBy); } /** * GreaterThan(&gt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as greaterThan. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_GreaterThan(final String deletedBy) { regDeletedBy(CK_GT, fRES(deletedBy)); } /** * LessThan(&lt;). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as lessThan. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_LessThan(final String deletedBy) { regDeletedBy(CK_LT, fRES(deletedBy)); } /** * GreaterEqual(&gt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as greaterEqual. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_GreaterEqual(final String deletedBy) { regDeletedBy(CK_GE, fRES(deletedBy)); } /** * LessEqual(&lt;=). And NullOrEmptyIgnored, OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as lessEqual. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_LessEqual(final String deletedBy) { regDeletedBy(CK_LE, fRES(deletedBy)); } /** * InScope {in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedByList The collection of deletedBy as inScope. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_InScope(final Collection<String> deletedByList) { doSetDeletedBy_InScope(deletedByList); } public void doSetDeletedBy_InScope(final Collection<String> deletedByList) { regINS(CK_INS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); } /** * NotInScope {not in ('a', 'b')}. And NullOrEmptyIgnored, NullOrEmptyElementIgnored, SeveralRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedByList The collection of deletedBy as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_NotInScope(final Collection<String> deletedByList) { doSetDeletedBy_NotInScope(deletedByList); } public void doSetDeletedBy_NotInScope(final Collection<String> deletedByList) { regINS(CK_NINS, cTL(deletedByList), getCValueDeletedBy(), "DELETED_BY"); } /** * PrefixSearch {like 'xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as prefixSearch. (NullAllowed: if null (or empty), no condition) */ public void setDeletedBy_PrefixSearch(final String deletedBy) { setDeletedBy_LikeSearch(deletedBy, cLSOP()); } /** * LikeSearch with various options. (versatile) {like '%xxx%' escape ...}. And NullOrEmptyIgnored, SeveralRegistered. <br /> * DELETED_BY: {VARCHAR(255)} <br /> * <pre>e.g. setDeletedBy_LikeSearch("xxx", new <span style="color: #DD4747">LikeSearchOption</span>().likeContain());</pre> * @param deletedBy The value of deletedBy as likeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of like-search. (NotNull) */ public void setDeletedBy_LikeSearch(final String deletedBy, final LikeSearchOption likeSearchOption) { regLSQ(CK_LS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", likeSearchOption); } /** * NotLikeSearch with various options. (versatile) {not like 'xxx%' escape ...} <br /> * And NullOrEmptyIgnored, SeveralRegistered. <br /> * DELETED_BY: {VARCHAR(255)} * @param deletedBy The value of deletedBy as notLikeSearch. (NullAllowed: if null (or empty), no condition) * @param likeSearchOption The option of not-like-search. (NotNull) */ public void setDeletedBy_NotLikeSearch(final String deletedBy, final LikeSearchOption likeSearchOption) { regLSQ(CK_NLS, fRES(deletedBy), getCValueDeletedBy(), "DELETED_BY", likeSearchOption); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} */ public void setDeletedBy_IsNull() { regDeletedBy(CK_ISN, DOBJ); } /** * IsNullOrEmpty {is null or empty}. And OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} */ public void setDeletedBy_IsNullOrEmpty() { regDeletedBy(CK_ISNOE, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * DELETED_BY: {VARCHAR(255)} */ public void setDeletedBy_IsNotNull() { regDeletedBy(CK_ISNN, DOBJ); } protected void regDeletedBy(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueDeletedBy(), "DELETED_BY"); } protected abstract ConditionValue getCValueDeletedBy(); /** * Equal(=). And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * @param deletedTime The value of deletedTime as equal. (NullAllowed: if null, no condition) */ public void setDeletedTime_Equal(final java.sql.Timestamp deletedTime) { regDeletedTime(CK_EQ, deletedTime); } /** * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * @param deletedTime The value of deletedTime as greaterThan. (NullAllowed: if null, no condition) */ public void setDeletedTime_GreaterThan(final java.sql.Timestamp deletedTime) { regDeletedTime(CK_GT, deletedTime); } /** * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * @param deletedTime The value of deletedTime as lessThan. (NullAllowed: if null, no condition) */ public void setDeletedTime_LessThan(final java.sql.Timestamp deletedTime) { regDeletedTime(CK_LT, deletedTime); } /** * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * @param deletedTime The value of deletedTime as greaterEqual. (NullAllowed: if null, no condition) */ public void setDeletedTime_GreaterEqual(final java.sql.Timestamp deletedTime) { regDeletedTime(CK_GE, deletedTime); } /** * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * @param deletedTime The value of deletedTime as lessEqual. (NullAllowed: if null, no condition) */ public void setDeletedTime_LessEqual(final java.sql.Timestamp deletedTime) { regDeletedTime(CK_LE, deletedTime); } /** * FromTo with various options. (versatile) {(default) fromDatetime &lt;= column &lt;= toDatetime} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * <pre>e.g. setDeletedTime_FromTo(fromDate, toDate, new <span style="color: #DD4747">FromToOption</span>().compareAsDate());</pre> * @param fromDatetime The from-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no from-condition) * @param toDatetime The to-datetime(yyyy/MM/dd HH:mm:ss.SSS) of deletedTime. (NullAllowed: if null, no to-condition) * @param fromToOption The option of from-to. (NotNull) */ public void setDeletedTime_FromTo(final Date fromDatetime, final Date toDatetime, final FromToOption fromToOption) { regFTQ(fromDatetime != null ? new java.sql.Timestamp( fromDatetime.getTime()) : null, toDatetime != null ? new java.sql.Timestamp(toDatetime .getTime()) : null, getCValueDeletedTime(), "DELETED_TIME", fromToOption); } /** * DateFromTo. (Date means yyyy/MM/dd) {fromDate &lt;= column &lt; toDate + 1 day} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} * <pre> * e.g. from:{2007/04/10 08:24:53} to:{2007/04/16 14:36:29} * column &gt;= '2007/04/10 00:00:00' and column <span style="color: #DD4747">&lt; '2007/04/17 00:00:00'</span> * </pre> * @param fromDate The from-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no from-condition) * @param toDate The to-date(yyyy/MM/dd) of deletedTime. (NullAllowed: if null, no to-condition) */ public void setDeletedTime_DateFromTo(final Date fromDate, final Date toDate) { setDeletedTime_FromTo(fromDate, toDate, new FromToOption().compareAsDate()); } /** * IsNull {is null}. And OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} */ public void setDeletedTime_IsNull() { regDeletedTime(CK_ISN, DOBJ); } /** * IsNotNull {is not null}. And OnlyOnceRegistered. <br /> * DELETED_TIME: {TIMESTAMP(23, 10)} */ public void setDeletedTime_IsNotNull() { regDeletedTime(CK_ISNN, DOBJ); } protected void regDeletedTime(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueDeletedTime(), "DELETED_TIME"); } protected abstract ConditionValue getCValueDeletedTime(); /** * Equal(=). And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNo The value of versionNo as equal. (NullAllowed: if null, no condition) */ public void setVersionNo_Equal(final Integer versionNo) { doSetVersionNo_Equal(versionNo); } protected void doSetVersionNo_Equal(final Integer versionNo) { regVersionNo(CK_EQ, versionNo); } /** * NotEqual(&lt;&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNo The value of versionNo as notEqual. (NullAllowed: if null, no condition) */ public void setVersionNo_NotEqual(final Integer versionNo) { doSetVersionNo_NotEqual(versionNo); } protected void doSetVersionNo_NotEqual(final Integer versionNo) { regVersionNo(CK_NES, versionNo); } /** * GreaterThan(&gt;). And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNo The value of versionNo as greaterThan. (NullAllowed: if null, no condition) */ public void setVersionNo_GreaterThan(final Integer versionNo) { regVersionNo(CK_GT, versionNo); } /** * LessThan(&lt;). And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNo The value of versionNo as lessThan. (NullAllowed: if null, no condition) */ public void setVersionNo_LessThan(final Integer versionNo) { regVersionNo(CK_LT, versionNo); } /** * GreaterEqual(&gt;=). And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNo The value of versionNo as greaterEqual. (NullAllowed: if null, no condition) */ public void setVersionNo_GreaterEqual(final Integer versionNo) { regVersionNo(CK_GE, versionNo); } /** * LessEqual(&lt;=). And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNo The value of versionNo as lessEqual. (NullAllowed: if null, no condition) */ public void setVersionNo_LessEqual(final Integer versionNo) { regVersionNo(CK_LE, versionNo); } /** * RangeOf with various options. (versatile) <br /> * {(default) minNumber &lt;= column &lt;= maxNumber} <br /> * And NullIgnored, OnlyOnceRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param minNumber The min number of versionNo. (NullAllowed: if null, no from-condition) * @param maxNumber The max number of versionNo. (NullAllowed: if null, no to-condition) * @param rangeOfOption The option of range-of. (NotNull) */ public void setVersionNo_RangeOf(final Integer minNumber, final Integer maxNumber, final RangeOfOption rangeOfOption) { regROO(minNumber, maxNumber, getCValueVersionNo(), "VERSION_NO", rangeOfOption); } /** * InScope {in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNoList The collection of versionNo as inScope. (NullAllowed: if null (or empty), no condition) */ public void setVersionNo_InScope(final Collection<Integer> versionNoList) { doSetVersionNo_InScope(versionNoList); } protected void doSetVersionNo_InScope( final Collection<Integer> versionNoList) { regINS(CK_INS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); } /** * NotInScope {not in (1, 2)}. And NullIgnored, NullElementIgnored, SeveralRegistered. <br /> * VERSION_NO: {NotNull, INTEGER(10)} * @param versionNoList The collection of versionNo as notInScope. (NullAllowed: if null (or empty), no condition) */ public void setVersionNo_NotInScope(final Collection<Integer> versionNoList) { doSetVersionNo_NotInScope(versionNoList); } protected void doSetVersionNo_NotInScope( final Collection<Integer> versionNoList) { regINS(CK_NINS, cTL(versionNoList), getCValueVersionNo(), "VERSION_NO"); } protected void regVersionNo(final ConditionKey ky, final Object vl) { regQ(ky, vl, getCValueVersionNo(), "VERSION_NO"); } protected abstract ConditionValue getCValueVersionNo(); // =================================================================================== // ScalarCondition // =============== /** * Prepare ScalarCondition as equal. <br /> * {where FOO = (select max(BAR) from ...) * <pre> * cb.query().<span style="color: #DD4747">scalar_Equal()</span>.max(new SubQuery&lt;SuggestElevateWordCB&gt;() { * public void query(SuggestElevateWordCB subCB) { * subCB.specify().setXxx... <span style="color: #3F7E5E">// derived column for function</span> * subCB.query().setYyy... * } * }); * </pre> * @return The object to set up a function. (NotNull) */ public HpSSQFunction<SuggestElevateWordCB> scalar_Equal() { return xcreateSSQFunction(CK_EQ, SuggestElevateWordCB.class); } /** * Prepare ScalarCondition as equal. <br /> * {where FOO &lt;&gt; (select max(BAR) from ...) * <pre> * cb.query().<span style="color: #DD4747">scalar_NotEqual()</span>.max(new SubQuery&lt;SuggestElevateWordCB&gt;() { * public void query(SuggestElevateWordCB subCB) { * subCB.specify().setXxx... <span style="color: #3F7E5E">// derived column for function</span> * subCB.query().setYyy... * } * }); * </pre> * @return The object to set up a function. (NotNull) */ public HpSSQFunction<SuggestElevateWordCB> scalar_NotEqual() { return xcreateSSQFunction(CK_NES, SuggestElevateWordCB.class); } /** * Prepare ScalarCondition as greaterThan. <br /> * {where FOO &gt; (select max(BAR) from ...) * <pre> * cb.query().<span style="color: #DD4747">scalar_GreaterThan()</span>.max(new SubQuery&lt;SuggestElevateWordCB&gt;() { * public void query(SuggestElevateWordCB subCB) { * subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span> * subCB.query().setBar... * } * }); * </pre> * @return The object to set up a function. (NotNull) */ public HpSSQFunction<SuggestElevateWordCB> scalar_GreaterThan() { return xcreateSSQFunction(CK_GT, SuggestElevateWordCB.class); } /** * Prepare ScalarCondition as lessThan. <br /> * {where FOO &lt; (select max(BAR) from ...) * <pre> * cb.query().<span style="color: #DD4747">scalar_LessThan()</span>.max(new SubQuery&lt;SuggestElevateWordCB&gt;() { * public void query(SuggestElevateWordCB subCB) { * subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span> * subCB.query().setBar... * } * }); * </pre> * @return The object to set up a function. (NotNull) */ public HpSSQFunction<SuggestElevateWordCB> scalar_LessThan() { return xcreateSSQFunction(CK_LT, SuggestElevateWordCB.class); } /** * Prepare ScalarCondition as greaterEqual. <br /> * {where FOO &gt;= (select max(BAR) from ...) * <pre> * cb.query().<span style="color: #DD4747">scalar_GreaterEqual()</span>.max(new SubQuery&lt;SuggestElevateWordCB&gt;() { * public void query(SuggestElevateWordCB subCB) { * subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span> * subCB.query().setBar... * } * }); * </pre> * @return The object to set up a function. (NotNull) */ public HpSSQFunction<SuggestElevateWordCB> scalar_GreaterEqual() { return xcreateSSQFunction(CK_GE, SuggestElevateWordCB.class); } /** * Prepare ScalarCondition as lessEqual. <br /> * {where FOO &lt;= (select max(BAR) from ...) * <pre> * cb.query().<span style="color: #DD4747">scalar_LessEqual()</span>.max(new SubQuery&lt;SuggestElevateWordCB&gt;() { * public void query(SuggestElevateWordCB subCB) { * subCB.specify().setFoo... <span style="color: #3F7E5E">// derived column for function</span> * subCB.query().setBar... * } * }); * </pre> * @return The object to set up a function. (NotNull) */ public HpSSQFunction<SuggestElevateWordCB> scalar_LessEqual() { return xcreateSSQFunction(CK_LE, SuggestElevateWordCB.class); } @Override @SuppressWarnings("unchecked") protected <CB extends ConditionBean> void xscalarCondition(final String fn, final SubQuery<CB> sq, final String rd, final HpSSQOption<CB> op) { assertObjectNotNull("subQuery", sq); final SuggestElevateWordCB cb = xcreateScalarConditionCB(); sq.query((CB) cb); final String pp = keepScalarCondition(cb.query()); // for saving query-value op.setPartitionByCBean((CB) xcreateScalarConditionPartitionByCB()); // for using partition-by registerScalarCondition(fn, cb.query(), pp, rd, op); } public abstract String keepScalarCondition(SuggestElevateWordCQ sq); protected SuggestElevateWordCB xcreateScalarConditionCB() { final SuggestElevateWordCB cb = newMyCB(); cb.xsetupForScalarCondition(this); return cb; } protected SuggestElevateWordCB xcreateScalarConditionPartitionByCB() { final SuggestElevateWordCB cb = newMyCB(); cb.xsetupForScalarConditionPartitionBy(this); return cb; } // =================================================================================== // MyselfDerived // ============= public void xsmyselfDerive(final String fn, final SubQuery<SuggestElevateWordCB> sq, final String al, final DerivedReferrerOption op) { assertObjectNotNull("subQuery", sq); final SuggestElevateWordCB cb = new SuggestElevateWordCB(); cb.xsetupForDerivedReferrer(this); try { lock(); sq.query(cb); } finally { unlock(); } final String pp = keepSpecifyMyselfDerived(cb.query()); final String pk = "ID"; registerSpecifyMyselfDerived(fn, cb.query(), pk, pk, pp, "myselfDerived", al, op); } public abstract String keepSpecifyMyselfDerived(SuggestElevateWordCQ sq); /** * Prepare for (Query)MyselfDerived (correlated sub-query). * @return The object to set up a function for myself table. (NotNull) */ public HpQDRFunction<SuggestElevateWordCB> myselfDerived() { return xcreateQDRFunctionMyselfDerived(SuggestElevateWordCB.class); } @Override @SuppressWarnings("unchecked") protected <CB extends ConditionBean> void xqderiveMyselfDerived( final String fn, final SubQuery<CB> sq, final String rd, final Object vl, final DerivedReferrerOption op) { assertObjectNotNull("subQuery", sq); final SuggestElevateWordCB cb = new SuggestElevateWordCB(); cb.xsetupForDerivedReferrer(this); sq.query((CB) cb); final String pk = "ID"; final String sqpp = keepQueryMyselfDerived(cb.query()); // for saving query-value. final String prpp = keepQueryMyselfDerivedParameter(vl); registerQueryMyselfDerived(fn, cb.query(), pk, pk, sqpp, "myselfDerived", rd, vl, prpp, op); } public abstract String keepQueryMyselfDerived(SuggestElevateWordCQ sq); public abstract String keepQueryMyselfDerivedParameter(Object vl); // =================================================================================== // MyselfExists // ============ /** * Prepare for MyselfExists (correlated sub-query). * @param subQuery The implementation of sub-query. (NotNull) */ public void myselfExists(final SubQuery<SuggestElevateWordCB> subQuery) { assertObjectNotNull("subQuery", subQuery); final SuggestElevateWordCB cb = new SuggestElevateWordCB(); cb.xsetupForMyselfExists(this); try { lock(); subQuery.query(cb); } finally { unlock(); } final String pp = keepMyselfExists(cb.query()); registerMyselfExists(cb.query(), pp); } public abstract String keepMyselfExists(SuggestElevateWordCQ sq); // =================================================================================== // MyselfInScope // ============= /** * Prepare for MyselfInScope (sub-query). * @param subQuery The implementation of sub-query. (NotNull) */ public void myselfInScope(final SubQuery<SuggestElevateWordCB> subQuery) { assertObjectNotNull("subQuery", subQuery); final SuggestElevateWordCB cb = new SuggestElevateWordCB(); cb.xsetupForMyselfInScope(this); try { lock(); subQuery.query(cb); } finally { unlock(); } final String pp = keepMyselfInScope(cb.query()); registerMyselfInScope(cb.query(), pp); } public abstract String keepMyselfInScope(SuggestElevateWordCQ sq); // =================================================================================== // Manual Order // ============ /** * Order along manual ordering information. * <pre> * MemberCB cb = new MemberCB(); * ManualOrderBean mob = new ManualOrderBean(); * mob.<span style="color: #DD4747">when_GreaterEqual</span>(priorityDate); <span style="color: #3F7E5E">// e.g. 2000/01/01</span> * cb.query().addOrderBy_Birthdate_Asc().<span style="color: #DD4747">withManualOrder(mob)</span>; * <span style="color: #3F7E5E">// order by </span> * <span style="color: #3F7E5E">// case</span> * <span style="color: #3F7E5E">// when BIRTHDATE &gt;= '2000/01/01' then 0</span> * <span style="color: #3F7E5E">// else 1</span> * <span style="color: #3F7E5E">// end asc, ...</span> * * MemberCB cb = new MemberCB(); * ManualOrderBean mob = new ManualOrderBean(); * mob.<span style="color: #DD4747">when_Equal</span>(CDef.MemberStatus.Withdrawal); * mob.<span style="color: #DD4747">when_Equal</span>(CDef.MemberStatus.Formalized); * mob.<span style="color: #DD4747">when_Equal</span>(CDef.MemberStatus.Provisional); * cb.query().addOrderBy_MemberStatusCode_Asc().<span style="color: #DD4747">withManualOrder(mob)</span>; * <span style="color: #3F7E5E">// order by </span> * <span style="color: #3F7E5E">// case</span> * <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'WDL' then 0</span> * <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'FML' then 1</span> * <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'PRV' then 2</span> * <span style="color: #3F7E5E">// else 3</span> * <span style="color: #3F7E5E">// end asc, ...</span> * </pre> * <p>This function with Union is unsupported!</p> * <p>The order values are bound (treated as bind parameter).</p> * @param mob The bean of manual order containing order values. (NotNull) */ public void withManualOrder(final ManualOrderBean mob) { // is user public! xdoWithManualOrder(mob); } // =================================================================================== // Small Adjustment // ================ /** * Order along the list of manual values. #beforejava8 <br /> * This function with Union is unsupported! <br /> * The order values are bound (treated as bind parameter). * <pre> * MemberCB cb = new MemberCB(); * List&lt;CDef.MemberStatus&gt; orderValueList = new ArrayList&lt;CDef.MemberStatus&gt;(); * orderValueList.add(CDef.MemberStatus.Withdrawal); * orderValueList.add(CDef.MemberStatus.Formalized); * orderValueList.add(CDef.MemberStatus.Provisional); * cb.query().addOrderBy_MemberStatusCode_Asc().<span style="color: #DD4747">withManualOrder(orderValueList)</span>; * <span style="color: #3F7E5E">// order by </span> * <span style="color: #3F7E5E">// case</span> * <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'WDL' then 0</span> * <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'FML' then 1</span> * <span style="color: #3F7E5E">// when MEMBER_STATUS_CODE = 'PRV' then 2</span> * <span style="color: #3F7E5E">// else 3</span> * <span style="color: #3F7E5E">// end asc, ...</span> * </pre> * @param orderValueList The list of order values for manual ordering. (NotNull) */ public void withManualOrder(final List<? extends Object> orderValueList) { // is user public! assertObjectNotNull("withManualOrder(orderValueList)", orderValueList); final ManualOrderBean manualOrderBean = new ManualOrderBean(); manualOrderBean.acceptOrderValueList(orderValueList); withManualOrder(manualOrderBean); } @Override protected void filterFromToOption(final FromToOption option) { option.allowOneSide(); } // =================================================================================== // Very Internal // ============= protected SuggestElevateWordCB newMyCB() { return new SuggestElevateWordCB(); } // very internal (for suppressing warn about 'Not Use Import') protected String xabUDT() { return Date.class.getName(); } protected String xabCQ() { return SuggestElevateWordCQ.class.getName(); } protected String xabLSO() { return LikeSearchOption.class.getName(); } protected String xabSSQS() { return HpSSQSetupper.class.getName(); } }
[ "shinsuke@yahoo.co.jp" ]
shinsuke@yahoo.co.jp
0e137648eb6e3288fb9870ca3a9c1225611ffc76
46a357e6a8e81cd917bd58fb9317fefffa9a7433
/src/main/java/nl/ulso/markdoclet/document/Enumeration.java
0bed2540856b5f4f3206cb52ff8fbd64ec6533d9
[ "MIT" ]
permissive
voostindie/markdoclet
2399513fb0ad565bda26509d68502bbec48e3ccf
4c58983d57a1105281a8bf1d36245a05d347a21b
refs/heads/master
2021-09-24T06:09:30.923282
2021-09-19T09:55:31
2021-09-19T09:55:31
48,572,913
7
0
null
null
null
null
UTF-8
Java
false
false
1,198
java
package nl.ulso.markdoclet.document; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public class Enumeration extends Section { private final List<Constant> constants; private Enumeration(Builder builder) { super(builder); constants = builder.constants.stream() .map(Constant.Builder::build) .collect(Collectors.toList()); } public List<Constant> getConstants() { return Collections.unmodifiableList(constants); } static Builder newBuilder(String name) { return new Builder(name); } public static final class Builder extends Section.Builder<Builder> { private List<Constant.Builder> constants; private Builder(String name) { super(name); constants = new ArrayList<>(); } public Constant.Builder withConstant(String name) { final Constant.Builder builder = Constant.newBuilder(name); constants.add(builder); return builder; } public Enumeration build() { return new Enumeration(this); } } }
[ "vincent@ulso.nl" ]
vincent@ulso.nl
9dcffc0614f57e40cdf01643a4f8d87c8c5f4a73
4d30e853d12642fabd5f2aa440edfac9f29d1400
/test-api-webapp/src/main/java/com/migliaci/myretail/domain/RetailElement.java
c89b91a56525a0e2a4b52462d10108fb40b9ad77
[]
no_license
migliaci/test-api
176b10c7d178cb9232426fd8794a0927e91dfa46
209e7cb950e005262a7914ae7603b60b28dcbf36
refs/heads/master
2020-03-17T01:39:19.417056
2018-05-14T04:22:07
2018-05-14T04:22:07
133,161,540
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package com.migliaci.myretail.domain; /** * POJO representing top-layer element returned from myRetail API. * * @Author migliaci */ public class RetailElement { private Product product; public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } }
[ "migliaci@gmail.com" ]
migliaci@gmail.com
fcd56fd01d96718a8612fd5f4ab1d78789175754
055ab100cd87b861a99871abae2844a37e1da9a2
/phone/DolphinPro_Mobile/src/com/wellav/dolphin/mmedia/netease/team/MessageListView.java
174452748d60cf2756fe46a4adc788bc557ce32b
[]
no_license
jallenchen/Wellav
8a64ddae439c8f0ca2e9da1b194e6e9506328f5a
35a7dc5a74f7b49abbf140f06dd3b22e7ca6e787
refs/heads/master
2020-04-12T12:53:41.760124
2019-04-25T11:29:05
2019-04-25T11:29:05
162,505,564
0
0
null
null
null
null
UTF-8
Java
false
false
2,477
java
package com.wellav.dolphin.mmedia.netease.team; import android.content.Context; import android.util.AttributeSet; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; import android.widget.BaseAdapter; public class MessageListView extends AutoRefreshListView { private IViewReclaimer viewReclaimer; private GestureDetector gestureDetector; private OnListViewEventListener listener; private RecyclerListener recyclerListener = new RecyclerListener() { @Override public void onMovedToScrapHeap(View view) { if (viewReclaimer != null) { viewReclaimer.reclaimView(view); } } }; public MessageListView(Context context) { super(context); init(context); } public MessageListView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public MessageListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context); } private void init(Context context) { setRecyclerListener(recyclerListener); gestureDetector = new GestureDetector(context, new GestureListener()); } private boolean isScroll = false; @Override public boolean onTouchEvent(MotionEvent event) { gestureDetector.onTouchEvent(event); if (event.getAction() == MotionEvent.ACTION_CANCEL || event.getAction() == MotionEvent.ACTION_UP) { isScroll = false; } return super.onTouchEvent(event); } public void setListViewEventListener(OnListViewEventListener listener) { this.listener = listener; } private class GestureListener extends GestureDetector.SimpleOnGestureListener { @Override public boolean onSingleTapUp(MotionEvent e) { if (!isScroll) { if (listener != null) { listener.onListViewStartScroll(); isScroll = true; } } return true; } public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { if (!isScroll) { if (listener != null) { listener.onListViewStartScroll(); isScroll = true; } } return true; } } public void setAdapter(BaseAdapter adapter) { // view reclaimer viewReclaimer = adapter != null && adapter instanceof IViewReclaimer ? (IViewReclaimer) adapter : null; super.setAdapter(adapter); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); } public interface OnListViewEventListener { public void onListViewStartScroll(); } }
[ "jallenchen@126.com" ]
jallenchen@126.com