instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | private I_MSV3_Vendor_Config createOrUpdateRecord(@NonNull final MSV3ClientConfig config)
{
final I_MSV3_Vendor_Config configRecord;
if (config.getConfigId() != null)
{
final int repoId = config.getConfigId().getRepoId();
configRecord = load(repoId, I_MSV3_Vendor_Config.class);
}
else
{
configReco... | return configRecord;
}
private ClientSoftwareId retrieveSoftwareIndentifier()
{
try
{
final ADSystemInfo adSystem = Services.get(ISystemBL.class).get();
return ClientSoftwareId.of("metasfresh-" + adSystem.getDbVersion());
}
catch (final RuntimeException e)
{
return ClientSoftwareId.of("metasfresh... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\config\MSV3ClientConfigRepository.java | 2 |
请完成以下Java代码 | public class DataEntryDetailsRowsLoader
{
IAttributeSetInstanceBL attributeSetInstanceBL = Services.get(IAttributeSetInstanceBL.class);
@NonNull
LookupDataSource departmentLookup;
@NonNull
LookupDataSource uomLookup;
@NonNull
FlatrateDataEntryService flatrateDataEntryService;
@NonNull
FlatrateDataEntryRepo... | }
}
return result.build();
}
private DataEntryDetailsRow toRow(
final boolean processed,
@NonNull final LookupValue uom,
@NonNull final FlatrateDataEntryDetail detail)
{
final ProductASIDescription productASIDescription = ProductASIDescription.ofString(attributeSetInstanceBL.getASIDescriptionById(de... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\contract\flatrate\model\DataEntryDetailsRowsLoader.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class ScheduledBeanLazyInitializationExcludeFilter implements LazyInitializationExcludeFilter {
private final Set<Class<?>> nonAnnotatedClasses = ConcurrentHashMap.newKeySet(64);
ScheduledBeanLazyInitializationExcludeFilter() {
// Ignore AOP infrastructure such as scoped proxies.
this.nonAnnotatedClasses.add(Ao... | if (!this.nonAnnotatedClasses.contains(targetType)
&& AnnotationUtils.isCandidateClass(targetType, Arrays.asList(Scheduled.class, Schedules.class))) {
Map<Method, Set<Scheduled>> annotatedMethods = MethodIntrospector.selectMethods(targetType,
(MethodIntrospector.MetadataLookup<Set<Scheduled>>) (method) -> {... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\task\ScheduledBeanLazyInitializationExcludeFilter.java | 2 |
请完成以下Java代码 | protected Map<String, List<VariableInstance>> getSortedVariableInstances(Collection<String> variableNames, Collection<String> variableScopeIds) {
List<VariableInstance> variableInstances = queryVariablesInstancesByVariableScopeIds(variableNames, variableScopeIds);
Map<String, List<VariableInstance>> sortedVaria... | protected boolean isEmptyJson(String jsonString) {
return jsonString == null || jsonString.trim().isEmpty() || EMPTY_JSON_BODY.matcher(jsonString).matches();
}
protected InvalidRequestException filterNotFound(Exception cause) {
return new InvalidRequestException(Status.NOT_FOUND, cause, "Filter with id '" ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\runtime\impl\FilterResourceImpl.java | 1 |
请完成以下Java代码 | public Result beforeHU(final IMutable<I_M_HU> hu)
{
huIdAndDownstream.add(HuId.ofRepoId(hu.getValue().getM_HU_ID()));
return Result.CONTINUE;
}
})
.iterate(getById(huId));
return huIdAndDownstream.build();
}
@Override
public <T> Stream<T> streamByQuery(@NonNull final IQueryBuilder<I... | {
return Optional.empty();
}
return queryBL.createQueryBuilder(I_M_HU_PI_Item_Product.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_M_HU_PI_Item_Product.COLUMNNAME_M_HU_PI_Item_Product_ID, piItemProductId)
.andCollect(I_M_HU_PI_Item_Product.COLUMNNAME_M_HU_PI_Item_ID, I_M_HU_PI_Item.class)... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HandlingUnitsDAO.java | 1 |
请完成以下Java代码 | protected void dispatchExecutionCancelled(DelegateExecution execution, FlowElement terminateEndEvent) {
ExecutionEntityManager executionEntityManager = Context.getCommandContext().getExecutionEntityManager();
// subprocesses
for (DelegateExecution subExecution : executionEntityManager.findChild... | return terminateAll;
}
public void setTerminateAll(boolean terminateAll) {
this.terminateAll = terminateAll;
}
public boolean isTerminateMultiInstance() {
return terminateMultiInstance;
}
public void setTerminateMultiInstance(boolean terminateMultiInstance) {
this.term... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\TerminateEndEventActivityBehavior.java | 1 |
请完成以下Java代码 | public int getSalesRep_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set SKU.
@param SKU
Stock Keeping Unit
*/
public void setSKU (String SKU)
{
set_Value (COLUMNNAME_SKU, SKU);
}
/** Get SKU.
@return Stock Keeping ... | set_Value (COLUMNNAME_TaxIndicator, TaxIndicator);
}
/** Get Tax Indicator.
@return Short form for Tax to be printed on documents
*/
public String getTaxIndicator ()
{
return (String)get_Value(COLUMNNAME_TaxIndicator);
}
/** Set UPC/EAN.
@param UPC
Bar Code (Universal Product Code or its superset E... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Invoice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object createCollection() {
// 设置集合名称
String collectionName = "users1";
// 创建集合并返回集合信息
mongoTemplate.createCollection(collectionName);
// 检测新的集合是否存在,返回创建结果
return mongoTemplate.collectionExists(collectionName) ? "创建视图成功" : "创建视图失败";
}
/**
* 创建【固定大小集合】... | * @return 创建集合结果
*/
public Object createCollectionValidation() {
// 设置集合名称
String collectionName = "users3";
// 设置验证条件,只允许岁数大于20的用户信息插入
CriteriaDefinition criteria = Criteria.where("age").gt(20);
// 设置集合选项验证对象
CollectionOptions collectionOptions = CollectionOptio... | repos\springboot-demo-master\mongodb\src\main\java\demo\et\mongodb\service\CreateCollectionService.java | 2 |
请完成以下Java代码 | public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
public I_AD_Window getPO_Window() throws RuntimeException
{
return (I_AD_Window)MTable.... | /** Get Query.
@return SQL
*/
public String getQuery ()
{
return (String)get_Value(COLUMNNAME_Query);
}
/** Set Search Type.
@param SearchType
Which kind of search is used (Query or Table)
*/
public void setSearchType (String SearchType)
{
set_Value (COLUMNNAME_SearchType, SearchType);
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_SearchDefinition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MapPublicKeyCredentialUserEntityRepository implements PublicKeyCredentialUserEntityRepository {
private final Map<String, PublicKeyCredentialUserEntity> usernameToUserEntity = new HashMap<>();
private final Map<Bytes, PublicKeyCredentialUserEntity> idToUserEntity = new HashMap<>();
@Override
public ... | public void save(PublicKeyCredentialUserEntity userEntity) {
if (userEntity == null) {
throw new IllegalArgumentException("userEntity cannot be null");
}
this.usernameToUserEntity.put(userEntity.getName(), userEntity);
this.idToUserEntity.put(userEntity.getId(), userEntity);
}
@Override
public void delet... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\management\MapPublicKeyCredentialUserEntityRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ApiResponse<File> getSingleAttachmentWithHttpInfo(String apiKey, String id) throws ApiException {
com.squareup.okhttp.Call call = getSingleAttachmentValidateBeforeCall(apiKey, id, null, null);
Type localVarReturnType = new TypeToken<File>(){}.getType();
return apiClient.execute(call, loca... | @Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@O... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\api\AttachmentApi.java | 2 |
请完成以下Java代码 | public <D> Mono<D> toEntity(Class<D> entityType) {
return this.responseMono.mapNotNull(this::getValidField).mapNotNull((field) -> field.toEntity(entityType));
}
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1290
@Override
public <D> Mono<D> toEntity(ParameterizedTypeReference<D> e... | public <D> Flux<D> toEntity(Class<D> entityType) {
return this.responseFlux.mapNotNull(this::getValidField).mapNotNull((field) -> field.toEntity(entityType));
}
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1290
@Override
public <D> Flux<D> toEntity(ParameterizedTypeReference<D> e... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DefaultGraphQlClient.java | 1 |
请完成以下Java代码 | public Optional<OrderLineId> getOrderLineIdByReservedVhuId(@NonNull final HuId vhuId)
{
return getEntryByVhuId(vhuId)
.map(entry -> entry.getDocumentRef().getSalesOrderLineId());
}
private Optional<HUReservationEntry> getEntryByVhuId(@NonNull final HuId vhuId)
{
return entriesByVhuId.getOrLoad(vhuId, this:... | return;
}
final List<I_M_HU_Reservation> records = retrieveRecordsByDocumentRef(from, onlyVHUIds);
if (records.isEmpty())
{
return;
}
for (final I_M_HU_Reservation record : records)
{
updateRecordFromDocumentRef(record, to);
saveRecord(record);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\reservation\HUReservationRepository.java | 1 |
请完成以下Java代码 | public JSONAddressDocument createAddressDocument(@RequestBody final JSONCreateAddressRequest request)
{
userSession.assertLoggedIn();
return Execution.callInNewExecution("createAddressDocument", () -> {
final Document addressDoc = addressRepo.createNewFrom(LocationId.ofRepoIdOrNull(request.getTemplateId()));
... | public JSONLookupValuesPage getAttributeTypeahead(
@PathVariable("docId") final int docId,
@PathVariable("attributeName") final String attributeName,
@RequestParam(name = "query") final String query)
{
userSession.assertLoggedIn();
return addressRepo.getAddressDocumentForReading(docId)
.getFieldLooku... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\AddressRestController.java | 1 |
请完成以下Java代码 | public String getSpecialty() {
return specialty;
}
/**
* Sets the value of the specialty property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSpecialty(String value) {
this.specialty = value;
}
/**
... | * {@link String }
*
*/
public String getUidNumber() {
return uidNumber;
}
/**
* Sets the value of the uidNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUidNumber(String value) {
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\BillerAddressType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void addParameter(String key, String value){
this.parameters.put(key, value);
}
public void addParameters(String key, Collection<String> values){
this.parameters.put(key, values);
}
public void setParameters(Map _parameters) {
this.parameters.putAll(_parameters);
}
public String getMethod() {
retur... | }
public boolean isIgnoreContentIfUnsuccess() {
return ignoreContentIfUnsuccess;
}
public void setIgnoreContentIfUnsuccess(boolean ignoreContentIfUnsuccess) {
this.ignoreContentIfUnsuccess = ignoreContentIfUnsuccess;
}
public String getPostData() {
return postData;
}
public void setPostData(String postData... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpParam.java | 2 |
请完成以下Java代码 | public String getF_INFOMOBIL() {
return F_INFOMOBIL;
}
public void setF_INFOMOBIL(String f_INFOMOBIL) {
F_INFOMOBIL = f_INFOMOBIL;
}
public String getF_INFOMAN() {
return F_INFOMAN;
}
public void setF_INFOMAN(String f_INFOMAN) {
F_INFOMAN = f_INFOMAN;
}
... | }
public void setF_AUDITER(String f_AUDITER) {
F_AUDITER = f_AUDITER;
}
public String getF_AUDITTIME() {
return F_AUDITTIME;
}
public void setF_AUDITTIME(String f_AUDITTIME) {
F_AUDITTIME = f_AUDITTIME;
}
public String getF_ISAUDIT() {
return F_ISAUDIT;
... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscExeOffice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class VersionProperties {
/** The defaultVersion. */
private String defaultVersion;
/**
* Flag whether to use API versions that appear in mappings for supported version
* validation (true), or use only explicitly configured versions (false). Defaults to
* true.
*/
private boolean detectSupportedVer... | return requestParamName;
}
public void setRequestParamName(String requestParamName) {
this.requestParamName = requestParamName;
}
public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
public List<String> getSupportedVersions() {
retu... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\VersionProperties.java | 2 |
请完成以下Java代码 | void demo() {
undefined_operations_produce_NaN();
operations_with_no_real_results_produce_NaN();
operations_with_NaN_produce_NaN();
comparison_with_NaN();
check_if_a_value_is_NaN();
assign_NaN_to_missing_values();
}
void undefined_operations_produce_NaN() {
... | System.out.println("Assign NaN to Missing values");
double salaryRequired = Double.NaN;
System.out.println(salaryRequired);
System.out.println();
}
void comparison_with_NaN() {
System.out.println("Comparison with NaN");
final double NAN = Double.NaN;
System.out.p... | repos\tutorials-master\core-java-modules\core-java-numbers-2\src\main\java\com\baeldung\nan\NaNExample.java | 1 |
请完成以下Java代码 | private Optional<I_C_Order> getOrderIdFromIdentifier(final IdentifierString orderIdentifier, final OrgId orgId)
{
return orderDAO.retrieveByOrderCriteria(createOrderQuery(orderIdentifier, orgId));
}
private OrderQuery createOrderQuery(final IdentifierString identifierString, final OrgId orgId)
{
final Identifi... | return builder
.externalId(identifierString.asExternalId())
.build();
}
else if (IdentifierString.Type.DOC.equals(type))
{
return builder
.documentNo(identifierString.asDoc())
.build();
}
else
{
throw new AdempiereException("Invalid identifierString: " + identifierString);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\payment\JsonPaymentService.java | 1 |
请完成以下Java代码 | public boolean hasNext()
{
try
{
boolean next = in.available() > 0;
if (!next) in.close();
return next;
}
catch (IOException e)
{
... | return new Document(in);
}
catch (IOException e)
{
throw new RuntimeException(e);
}
}
};
}
catch (IOException e)
{
throw new RuntimeException(e);
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\FileDataSet.java | 1 |
请完成以下Java代码 | public class SecureScriptContext extends Context {
private long startTime;
private long threadId;
private long startMemory;
protected SecureScriptContext(ContextFactory factory) {
super(factory);
}
public long getStartTime() {
return startTime;
}
public void setStartT... | return threadId;
}
public void setThreadId(long threadId) {
this.threadId = threadId;
}
public long getStartMemory() {
return startMemory;
}
public void setStartMemory(long startMemory) {
this.startMemory = startMemory;
}
} | repos\flowable-engine-main\modules\flowable-secure-javascript\src\main\java\org\flowable\scripting\secure\impl\SecureScriptContext.java | 1 |
请完成以下Java代码 | public Void execute(CommandContext commandContext) {
validateInput();
ExternalTaskEntity externalTask = commandContext.getExternalTaskManager().findExternalTaskById(externalTaskId);
EnsureUtil.ensureNotNull(NotFoundException.class,
"Cannot find external task with id " + externalTaskId, "externalTas... | /**
* Validates the current input of the command.
*/
@Override
protected void validateInput() {
EnsureUtil.ensureNotNull("workerId", workerId);
}
/**
* Validates the caller's workerId against the workerId of the external task.
*/
protected boolean validateWorkerViolation(ExternalTaskEntity ex... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\HandleExternalTaskCmd.java | 1 |
请完成以下Java代码 | public class TransitionInstanceImpl extends ProcessElementInstanceImpl implements TransitionInstance {
protected String executionId;
protected String activityId;
protected String activityName;
protected String activityType;
protected String subProcessInstanceId;
protected String[] incidentIds = NO_IDS;
... | public void setIncidents(Incident[] incidents) {
this.incidents = incidents;
}
public void setSubProcessInstanceId(String subProcessInstanceId) {
this.subProcessInstanceId = subProcessInstanceId;
}
public String getSubProcessInstanceId() {
return subProcessInstanceId;
}
public String toString... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TransitionInstanceImpl.java | 1 |
请完成以下Java代码 | public IReplRequestHandlerResult handleRequest(final PO po, IReplRequestHandlerCtx ctx)
{
final Properties ctxToUse = ctx.getEnvCtxToUse();
if (!Util.same(po.getCtx(), ctxToUse))
{
// this shall not happen, it's an internal error
throw new ReplicationException("PO does not have same context as we need it ... | return result;
}
final PO poToSend = createResponse(ctx, po);
result.setPOToExport(poToSend);
return result;
}
protected PO createResponse(IReplRequestHandlerCtx ctx, PO requestPO)
{
final PO responsePO = requestPO;
return responsePO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\process\rpl\requesthandler\spi\impl\LoadPORequestHandler.java | 1 |
请完成以下Java代码 | private static ThreadPoolTaskScheduler registrationTaskScheduler() {
ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.setPoolSize(1);
taskScheduler.setRemoveOnCancelPolicy(true);
taskScheduler.setThreadNamePrefix("registrationTask");
return taskScheduler;
}
RegistrationA... | public void stopRegisterTask() {
if (scheduledTask != null && !scheduledTask.isDone()) {
scheduledTask.cancel(true);
LOGGER.debug("Canceled registration task");
}
}
public void setAutoDeregister(boolean autoDeregister) {
this.autoDeregister = autoDeregister;
}
public void setAutoRegister(boolean autoR... | repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\registration\RegistrationApplicationListener.java | 1 |
请完成以下Java代码 | public void setDataInputRefs(List<String> dataInputRefs) {
this.dataInputRefs = dataInputRefs;
}
public List<String> getDataOutputRefs() {
return dataOutputRefs;
}
public void setDataOutputRefs(List<String> dataOutputRefs) {
this.dataOutputRefs = dataOutputRefs;
}
@Ove... | if (otherSpec.getDataInputs() != null && !otherSpec.getDataInputs().isEmpty()) {
for (DataSpec dataSpec : otherSpec.getDataInputs()) {
dataInputs.add(dataSpec.clone());
}
}
dataOutputs = new ArrayList<>();
if (otherSpec.getDataOutputs() != null && !otherS... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\IOSpecification.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object visitPrimitiveAsShort(PrimitiveType type, Void parameter) {
return (short) 0;
}
@Override
public Object visitPrimitiveAsInt(PrimitiveType type, Void parameter) {
return 0;
}
@Override
public Object visitPrimitiveAsLong(PrimitiveType type, Void parameter) {
return 0L;
}
@Overrid... | return parseNumber(value, Byte::parseByte, type);
}
@Override
public Object visitPrimitiveAsShort(PrimitiveType type, String value) {
return parseNumber(value, Short::parseShort, type);
}
@Override
public Object visitPrimitiveAsInt(PrimitiveType type, String value) {
return parseNumber(value, Intege... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\ParameterPropertyDescriptor.java | 2 |
请完成以下Java代码 | public String getParentActivityInstanceId() {
return parentActivityInstanceId;
}
/** the id of the activity */
public String getActivityId() {
return activityId;
}
/** type of the activity, corresponds to BPMN element name in XML (e.g. 'userTask') */
public String getActivityType() {
return ac... | public ActivityInstanceIncidentDto[] getIncidents() {
return incidents;
}
public static ActivityInstanceDto fromActivityInstance(ActivityInstance instance) {
ActivityInstanceDto result = new ActivityInstanceDto();
result.id = instance.getId();
result.parentActivityInstanceId = instance.getParentAct... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\ActivityInstanceDto.java | 1 |
请完成以下Java代码 | private void addExceptionDetails(Throwable t, ServerWebExchange exchange) {
if (t != null) {
exchange.getAttributes().put(CIRCUITBREAKER_EXECUTION_EXCEPTION_ATTR, t);
}
}
@Override
public String name() {
return NAME;
}
public static class Config implements HasRouteId {
private @Nullable String name;
... | return this;
}
public @Nullable String getId() {
if (!StringUtils.hasText(name) && StringUtils.hasText(routeId)) {
return routeId;
}
return name;
}
public Set<String> getStatusCodes() {
return statusCodes;
}
public Config setStatusCodes(Set<String> statusCodes) {
this.statusCodes = sta... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SpringCloudCircuitBreakerFilterFactory.java | 1 |
请完成以下Java代码 | public class FirstOrderHiddenMarkovModel extends HiddenMarkovModel
{
/**
* 创建空白的隐马尔可夫模型以供训练
*/
public FirstOrderHiddenMarkovModel()
{
this(null, null, null);
}
public FirstOrderHiddenMarkovModel(float[] start_probability, float[][] transition_probability, float[][] emission_proba... | score = buffer;
// end of swap
for (int s = 0; s < max_s; ++s)
{
score[s] = Integer.MIN_VALUE;
for (int f = 0; f < max_s; ++f)
{
float p = pre[f] + transition_probability[f][s] + emission_probability[s][observation[t... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\hmm\FirstOrderHiddenMarkovModel.java | 1 |
请完成以下Java代码 | public void updateBeforeDisplaying()
{
// nothing
}
protected final AnnotatedTableModel<?> getTableModelOrNull()
{
final JTable table = getTable();
if (table == null)
{
return null;
}
final TableModel tableModel = table.getModel();
if (tableModel instanceof AnnotatedTableModel<?>)
{
return (A... | return null;
}
protected final ListSelectionModel getSelectionModelOrNull()
{
final JTable table = getTable();
if (table == null)
{
return null;
}
final ListSelectionModel selectionModel = table.getSelectionModel();
return selectionModel;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTableAction.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
}
/** Get Ansprechpartner.
@return User within the system - Internal or Business Partner Contact
*/
@Override... | */
public static final int NOTIFICATIONTYPE_AD_Reference_ID=344;
/** EMail = E */
public static final String NOTIFICATIONTYPE_EMail = "E";
/** Notice = N */
public static final String NOTIFICATIONTYPE_Notice = "N";
/** None = X */
public static final String NOTIFICATIONTYPE_None = "X";
/** EMailPlusNotice = B *... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_NotificationGroup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AddQtyToProjectTaskRequest
{
@NonNull ServiceRepairProjectTaskId taskId;
@NonNull ProductId productId;
@NonNull Quantity qtyReserved;
@NonNull Quantity qtyConsumed;
@Builder(toBuilder = true)
private AddQtyToProjectTaskRequest(
@NonNull final ServiceRepairProjectTaskId taskId,
@NonNull final P... | this.productId = productId;
this.qtyReserved = qtyReserved != null ? qtyReserved : firstQtyNotNull.toZero();
this.qtyConsumed = qtyConsumed != null ? qtyConsumed : firstQtyNotNull.toZero();
}
public UomId getUomId()
{
return Quantity.getCommonUomIdOfAll(qtyReserved, qtyConsumed);
}
public AddQtyToProjectTa... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\requests\AddQtyToProjectTaskRequest.java | 2 |
请完成以下Java代码 | public class ReplicationException extends AdempiereException
{
/**
*
*/
private static final long serialVersionUID = 8608172237424907859L;
private final String adMessage;
private final Throwable cause;
/**
* Constructs a new exception with the specified detail message.
*
* @param adMessage the detail... | @Override
protected ITranslatableString buildMessage()
{
final TranslatableStringBuilder message = TranslatableStrings.builder();
if(Check.isNotBlank(adMessage)) // avoide NPE
{
message.appendADMessage(adMessage);
appendParameters(message);
}
if (cause != null)
{
message.append("\nCause: ").ap... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\exceptions\ReplicationException.java | 1 |
请完成以下Java代码 | private ProjectAssetGenerator<byte[]> generateBuild(R request) {
return (context) -> {
byte[] content = generateBuild(context);
publishProjectGeneratedEvent(request, context);
return content;
};
}
/**
* Create a file in the same directory as the given directory using the directory name
* and extensi... | buildWriter.writeBuild(out);
return out.toString().getBytes();
}
else {
throw new IllegalStateException("No BuildWriter implementation found for " + description.getLanguage());
}
}
private void customizeProjectGenerationContext(AnnotationConfigApplicationContext context,
InitializrMetadata metadata) {... | repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\project\ProjectGenerationInvoker.java | 1 |
请完成以下Java代码 | public class NestedTestRow {
private int id;
private String[][] nestedArray;
// Constructors, getters, and setters
public NestedTestRow() {}
public NestedTestRow(int id, String[][] nestedArray) {
this.id = id;
this.nestedArray = nestedArray;
}
public int getId() {
... | public String[][] getNestedArray() {
return nestedArray;
}
public void setNestedArray(String[][] nestedArray) {
this.nestedArray = nestedArray;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) ret... | repos\tutorials-master\persistence-modules\core-java-persistence-3\src\main\java\com\baeldung\resultsetarraytoarraystrings\NestedTestRow.java | 1 |
请完成以下Java代码 | public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Percent.
@param Percent
Percentage
*/
pu... | BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ThresholdMax);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Threshold min.
@param Thresholdmin
Minimum gross amount for withholding calculation
*/
public void setThresholdmin (BigDecimal Thresholdmin)
{
set_Value (COLUMNNAME_Thresholdmin, ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Withholding.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
/**
* PostingSign AD_Refe... | public java.lang.String getPostingSign()
{
return get_ValueAsString(COLUMNNAME_PostingSign);
}
@Override
public void setUserElementString1 (final @Nullable java.lang.String UserElementString1)
{
set_Value (COLUMNNAME_UserElementString1, UserElementString1);
}
@Override
public java.lang.String getUserElem... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_UserChange.java | 1 |
请完成以下Java代码 | public String toString()
{
return ObjectUtils.toString(this);
}
/**
* @return true if there is a query that is currently running because user enabled/disabled some of the facets
*/
public final boolean isQueryRunning()
{
return queryRunning.get();
}
/**
* Filter underlying data model using the active... | .setOnlyEagerRefreshCategories()
.collectAndUpdate(facetsPool);
}
finally
{
queryRunning.set(false);
}
}
/**
* Collect all facets from registered {@link IFacetCollector}s and then set them to {@link IFacetsPool}.
*
* If this executor has already a query which is running ({@link #isQueryRunning... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\impl\FacetExecutor.java | 1 |
请完成以下Java代码 | public PdfCollator close()
{
if (closed)
{
return this;
}
closed = true;
if (pdfCopy == null)
{
return this;
}
pdfDocument.close();
pdfCopy = null;
pdfDocument = null;
return this; | }
public byte[] toByteArray()
{
if (out instanceof ByteArrayOutputStream)
{
close();
final ByteArrayOutputStream baos = (ByteArrayOutputStream)out;
return baos.toByteArray();
}
else
{
throw new RuntimeException("Output stream not supported: " + out); // NOPMD by tsa on 2/28/13 2:15 AM
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\util\PdfCollator.java | 1 |
请完成以下Java代码 | public Builder setDocumentType(@NonNull final WindowId windowId)
{
setDocumentType(DocumentType.Window, windowId.toDocumentId());
return this;
}
public Builder setDocumentType(@NonNull final DocumentType documentType, @NonNull final DocumentId documentTypeId)
{
this.documentType = documentType;
thi... | rowIds.clear();
if (rowId != null)
{
rowIds.add(rowId);
}
return this;
}
public Builder setRowIdsList(final String rowIdsListStr)
{
return setRowIds(DocumentIdsSelection.ofCommaSeparatedString(rowIdsListStr));
}
public Builder setRowIds(final DocumentIdsSelection rowIds)
{
this.rowI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DocumentPath.java | 1 |
请完成以下Java代码 | public class X_C_Workplace_Product extends org.compiere.model.PO implements I_C_Workplace_Product, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -684761921L;
/** Standard Constructor */
public X_C_Workplace_Product (final Properties ctx, final int C_Workplace_Product_ID, @Nu... | @Override
public void setC_Workplace_Product_ID (final int C_Workplace_Product_ID)
{
if (C_Workplace_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Workplace_Product_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Workplace_Product_ID, C_Workplace_Product_ID);
}
@Override
public int getC_Workplace_Prod... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_Product.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
public String getValue() { | return value;
}
public void setValue(String value) {
this.value = value;
}
public String getGreeting() {
return greeting;
}
public void setGreeting(String greeting) {
this.greeting = greeting;
}
} | repos\SpringBootLearning-master\springboot-config\src\main\java\com\forezp\bean\ConfigBean.java | 2 |
请完成以下Java代码 | public void performOperationStep(DeploymentOperation operationContext) {
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
JobExecutorXml jobExecutorXml = getJobExecutorXml(operationContext);
int queueSize = getQueueSize(jobExecutorXml);
int corePoolSize = getC... | return Integer.parseInt(queueSize);
}
private long getKeepAliveTime(JobExecutorXml jobExecutorXml) {
String keepAliveTime = jobExecutorXml.getProperties().get(JobExecutorXml.KEEP_ALIVE_TIME);
if (keepAliveTime == null) {
return DEFAULT_KEEP_ALIVE_TIME_MS;
}
return Long.parseLong(keepAliveTime... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\jobexecutor\StartManagedThreadPoolStep.java | 1 |
请完成以下Java代码 | public Builder setFilters(final Collection<DocumentFilterDescriptor> filters)
{
this.filters = filters;
return this;
}
public Builder addFilter(@NonNull final DocumentFilterDescriptor filter)
{
if (filters == null)
{
filters = new ArrayList<>();
}
filters.add(filter);
return this;
}
... | }
allowedViewCloseActions.add(viewCloseAction);
return this;
}
private ImmutableSet<ViewCloseAction> getAllowedViewCloseActions()
{
return allowedViewCloseActions != null
? ImmutableSet.copyOf(allowedViewCloseActions)
: DEFAULT_allowedViewCloseActions;
}
public Builder setHasTreeSupport... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java | 1 |
请完成以下Java代码 | public class DirectDebitTransactionSDD {
@XmlElement(name = "MndtRltdInf", required = true)
protected MandateRelatedInformationSDD mndtRltdInf;
@XmlElement(name = "CdtrSchmeId")
protected PartyIdentificationSEPA3 cdtrSchmeId;
/**
* Gets the value of the mndtRltdInf property.
*
* @r... | * Gets the value of the cdtrSchmeId property.
*
* @return
* possible object is
* {@link PartyIdentificationSEPA3 }
*
*/
public PartyIdentificationSEPA3 getCdtrSchmeId() {
return cdtrSchmeId;
}
/**
* Sets the value of the cdtrSchmeId property.
* ... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\DirectDebitTransactionSDD.java | 1 |
请完成以下Java代码 | static boolean matchesPkceTokenRequest(HttpServletRequest request) {
return matchesAuthorizationCodeGrantRequest(request)
&& request.getParameter(PkceParameterNames.CODE_VERIFIER) != null;
}
static void validateAndAddDPoPParametersIfAvailable(HttpServletRequest request,
Map<String, Object> additionalParamet... | static void throwError(String errorCode, String parameterName, String errorUri) {
OAuth2Error error = new OAuth2Error(errorCode, "OAuth 2.0 Parameter: " + parameterName, errorUri);
throw new OAuth2AuthenticationException(error);
}
static String normalizeUserCode(String userCode) {
Assert.hasText(userCode, "use... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\web\authentication\OAuth2EndpointUtils.java | 1 |
请完成以下Java代码 | public final class C_Order_CreatePOFromRequisition extends C_Order_CreationProcess implements IProcessPrecondition
{
private final IOrderBL orderBL = Services.get(IOrderBL.class);
@Param(parameterName = "C_DocType_ID", mandatory = true)
private DocTypeId newOrderDocTypeId;
@Param(parameterName = "DateOrdered")
p... | return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt()
{
final I_C_Order purchaseOrder = CreatePurchaseOrderFromRequisitionCommand.builder()
.fromRequisitionId(OrderId.ofRepoId(getRecord_ID()))
.newOrderDocTypeId(newOrderDocTypeId)
.newOrderDateOrdered(newOrderDateOrdered... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\process\C_Order_CreatePOFromRequisition.java | 1 |
请完成以下Java代码 | public static MIndexColumn retrieveOrCreate(final MIndexTable indexTable,
final String columnName, final int seqNo) {
final Properties ctx = indexTable.getCtx();
final String trxName = indexTable.get_TrxName();
final MTable table = (MTable) indexTable.getAD_Table();
final MColumn column = table.getColumn(c... | final Object[] params = { indexTable.get_ID(), column.get_ID() };
MIndexColumn indexColumn = new Query(ctx, Table_Name,
whereClause, trxName).setParameters(params).firstOnly(MIndexColumn.class);
if (indexColumn == null) {
indexColumn = new MIndexColumn(ctx, 0, trxName);
indexColumn.setAD_Index_Table... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MIndexColumn.java | 1 |
请完成以下Java代码 | public class Person {
private Integer personId;
private String name;
private List<Address> addresses;
public Person() {
}
public Person(Integer personId, String name) {
this.personId = personId;
this.name = name;
addresses = new ArrayList<Address>();
}
public Person(String name) {
this.name = name;
... | return personId;
}
public String getName() {
return name;
}
public void addAddress(Address address) {
addresses.add(address);
}
public List<Address> getAddresses() {
return addresses;
}
} | repos\tutorials-master\mybatis\src\main\java\com\baeldung\mybatis\model\Person.java | 1 |
请完成以下Java代码 | public boolean isAllowed(MethodInvocation invocation, Authentication authentication) {
Assert.notNull(invocation, "MethodInvocation required");
Assert.notNull(invocation.getMethod(), "MethodInvocation must provide a non-null getMethod()");
Collection<ConfigAttribute> attrs = this.securityInterceptor.obtainSecurit... | catch (AccessDeniedException unauthorized) {
logger.debug(LogMessage.format("%s denied for %s", invocation, authentication), unauthorized);
return false;
}
}
public void setSecurityInterceptor(AbstractSecurityInterceptor securityInterceptor) {
Assert.notNull(securityInterceptor, "AbstractSecurityIntercepto... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\MethodInvocationPrivilegeEvaluator.java | 1 |
请完成以下Java代码 | class ZipInflaterInputStream extends InflaterInputStream {
private int available;
private boolean extraBytesWritten;
ZipInflaterInputStream(InputStream inputStream, Inflater inflater, int size) {
super(inputStream, inflater, getInflaterBufferSize(size));
this.available = size;
}
private static int getInfla... | public int read(byte[] b, int off, int len) throws IOException {
int result = super.read(b, off, len);
if (result != -1) {
this.available -= result;
}
return result;
}
@Override
protected void fill() throws IOException {
try {
super.fill();
}
catch (EOFException ex) {
if (this.extraBytesWritt... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\ZipInflaterInputStream.java | 1 |
请完成以下Java代码 | public class M_ProductPrice_ActivationBasedOnProductDiscontinuedFlag_Process extends JavaProcess implements IProcessPrecondition
{
private static final AdMessageKey ERROR_MISSING_DISCONTINUED_FROM = AdMessageKey.of("ActivationBasedOnProductDiscontinuedFlag_Process.MissingDiscontinuedFrom");
private final IProductDAO... | if (!discontinuedFrom.isPresent())
{
throw new AdempiereException(ERROR_MISSING_DISCONTINUED_FROM)
.appendParametersToMessage()
.setParameter("ProductId", product.getM_Product_ID());
}
priceListDAO.updateProductPricesIsActive(productFilter, discontinuedFrom.get(), false);
}
else
{
pri... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\process\M_ProductPrice_ActivationBasedOnProductDiscontinuedFlag_Process.java | 1 |
请在Spring Boot框架中完成以下Java代码 | PasswordEncoder passwordEncoder() {
// 使用BCrypt强哈希函数加密方案(密钥迭代次数默认为10)
return new BCryptPasswordEncoder();
}
// 配置 password 授权模式
@Override
public void configure(ClientDetailsServiceConfigurer clients)
throws Exception {
clients.inMemory()
.withClient("pas... | @Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) {
//endpoints.tokenStore(inMemoryTokenStore) //配置令牌的存储(这里存放在内存中)
endpoints.tokenStore(new RedisTokenStore(redisConnectionFactory))
.authenticationManager(authenticationManager)
.userDeta... | repos\springboot-demo-master\oatuth2\src\main\java\com\et\oauth2\config\AuthorizationServerConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private static ActiveMQConnectionFactory createJmsConnectionFactory(ActiveMQProperties properties,
ObjectProvider<ActiveMQConnectionFactoryCustomizer> factoryCustomizers,
ActiveMQConnectionDetails connectionDetails) {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(connectionDetai... | }
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ JmsPoolConnectionFactory.class, PooledObject.class })
static class PooledConnectionFactoryConfiguration {
@Bean(destroyMethod = "stop")
@ConditionalOnBooleanProperty("spring.activemq.pool.enabled")
JmsPoolConnectionFactory jmsConnectionFact... | repos\spring-boot-4.0.1\module\spring-boot-activemq\src\main\java\org\springframework\boot\activemq\autoconfigure\ActiveMQConnectionFactoryConfiguration.java | 2 |
请完成以下Java代码 | public class RotateArray {
private RotateArray() {
throw new IllegalStateException("Rotate array algorithm utility methods class");
}
/**
*
* @param arr array to apply rotation to
* @param k number of rotations
*/
public static void bruteForce(int[] arr, int k) {
ch... | int prev = arr[start];
do {
int next = (current + k) % arr.length;
int temp = arr[next];
arr[next] = prev;
prev = temp;
current = next;
count++;
} while (start != current);
}
}
/**
... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-7\src\main\java\com\baeldung\algorithms\rotatearray\RotateArray.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8080
shutdown: graceful
spring:
jpa:
database: POSTGRESQL
show-sql: true
generate-ddl: true
hibernate:
ddl-auto: create-drop
properties:
hibernate:
jdbc:
lob:
non_contextual_creation: true
datasource:
platform: postgres
url | : jdbc:postgresql://localhost:5432/postgres
username: postgres
password: secret
lifecycle:
timeout-per-shutdown-phase: 20s | repos\spring-examples-java-17\spring-bank\bank-server\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/**
* PostingType AD_Reference_ID=125
* Reference name: _Posting Type
*/
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public ... | @Override
public void setRecord_ID (int Record_ID)
{
if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Datensatz-ID.
@return Direct internal record ID
*/
@Override
public int getRecord_ID ()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_ActivityChangeRequest_Source_v.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static HttpResponse httpsRequest2(String requestUrl, String method, String outputStr) throws IOException {
HttpsURLConnection connection = null;
try {
SSLSocketFactory ssf = null;
try {
// 创建SSLContext对象,并使用我们指定的信任管理器初始化
TrustManager[] tm = ... | if (null != outputStr) {
OutputStream outputStream = connection.getOutputStream();
// 注意编码格式,防止中文乱码
outputStream.write(outputStr.getBytes("UTF-8"));
outputStream.close();
}
return new HttpResponse(connection);
} catch (IOExc... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\https\HttpClientUtil.java | 2 |
请完成以下Java代码 | public class HashcodeBuilder
{
private final static int prime = 31;
private int hashcode = 0;
public HashcodeBuilder()
{
super();
}
public HashcodeBuilder append(Object value)
{
return appendHashcode(value == null ? 0 : value.hashCode());
}
/**
* Converts given {@link BigDecimal} to {@link Double} an... | public HashcodeBuilder append(Map<?, ?> map, boolean handleEmptyMapAsNull)
{
if (handleEmptyMapAsNull && (map == null || map.isEmpty()))
{
return append((Object)null);
}
return append(map);
}
public int toHashcode()
{
return hashcode;
}
/**
* Sames as {@link #toHashcode()} because:
* <ul>
* ... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\HashcodeBuilder.java | 1 |
请完成以下Java代码 | public void setId(String value) {
this.id = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* ... | */
public String getBedarf() {
return bedarf;
}
/**
* Sets the value of the bedarf property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBedarf(String value) {
... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\VerfuegbarkeitsanfrageEinzelne.java | 1 |
请完成以下Java代码 | public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNam... | /** Set Sql WHERE.
@param WhereClause
Fully qualified SQL WHERE clause
*/
public void setWhereClause (String WhereClause)
{
set_Value (COLUMNNAME_WhereClause, WhereClause);
}
/** Get Sql WHERE.
@return Fully qualified SQL WHERE clause
*/
public String getWhereClause ()
{
return (String)get_Valu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReportView.java | 1 |
请完成以下Java代码 | public JavaType resolveAbstractType(DeserializationConfig config, BeanDescription typeDesc) {
return findTypeMapping(config, typeDesc.getType());
}
};
resolver.addMapping(Task.class, TaskImpl.class);
resolver.addMapping(TaskCandidateUser.class, TaskCandidateUserImpl.c... | module.registerSubtypes(new NamedType(GetTasksPayload.class, GetTasksPayload.class.getSimpleName()));
module.registerSubtypes(
new NamedType(GetTaskVariablesPayload.class, GetTaskVariablesPayload.class.getSimpleName())
);
module.registerSubtypes(new NamedType(ReleaseTaskPayload.cla... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-model-impl\src\main\java\org\activiti\api\task\conf\impl\TaskModelAutoConfiguration.java | 1 |
请完成以下Java代码 | public class UserDto {
private String firstName;
private String lastName;
private String displayName;
private String id;
public UserDto(String id, String firstName, String lastName) {
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
if (firstName == null && lastName == nu... | public String getDisplayName() {
return displayName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserDto userDto = (UserDto) o;
if (firstName != null ? !firstName.equals(userDto.firstName) : userDto.fir... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\task\UserDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String auditHeaders(@NonNull final Map<String, Object> headers)
{
final StringBuilder headersStringCollector = new StringBuilder(" ========================= Headers ======================== \n");
try
{
final ObjectMapper objectMapper = JsonObjectMapperHolder.newJsonObjectMapper();
return headersS... | }
}
@NonNull
private String getHeadersErrorMessage(@NonNull final Exception exception, @NonNull final Map<String, Object> headers)
{
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
exception.printStackTrace(pw);
return "\n Got exception while parsing request headers... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\AuditFileTrailUtil.java | 2 |
请完成以下Java代码 | public org.compiere.model.I_M_Shipper getM_Shipper()
{
return get_ValueAsPO(COLUMNNAME_M_Shipper_ID, org.compiere.model.I_M_Shipper.class);
}
@Override
public void setM_Shipper(final org.compiere.model.I_M_Shipper M_Shipper)
{
set_ValueFromPO(COLUMNNAME_M_Shipper_ID, org.compiere.model.I_M_Shipper.class, M_Sh... | else
set_ValueNoCheck (COLUMNNAME_M_Shipper_RoutingCode_ID, M_Shipper_RoutingCode_ID);
}
@Override
public int getM_Shipper_RoutingCode_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_RoutingCode_ID);
}
@Override
public void setName (final @Nullable java.lang.String Name)
{
set_Value (COLUMNNAME_Nam... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipper_RoutingCode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @ResponseBody ResponseEntity<String> get() {
return new ResponseEntity<>("GET Response", HttpStatus.OK);
}
@GetMapping("/get/{id}")
public @ResponseBody ResponseEntity<String> getById(@PathVariable String id) {
return new ResponseEntity<>("GET Response : " + id, HttpStatus.OK);
}... | public @ResponseBody ResponseEntity<String> put() {
return new ResponseEntity<>("PUT Response", HttpStatus.OK);
}
@DeleteMapping("/delete")
public @ResponseBody ResponseEntity<String> delete() {
return new ResponseEntity<>("DELETE Response", HttpStatus.OK);
}
@PatchMapping("/patch"... | repos\tutorials-master\spring-web-modules\spring-mvc-basics-3\src\main\java\com\baeldung\boot\controller\RequestMappingShortcutsController.java | 2 |
请完成以下Java代码 | public StringAttributeBuilder idAttribute() {
return (StringAttributeBuilder) super.idAttribute();
}
/**
* Create a new {@link AttributeReferenceBuilder} for the reference source element instance
*
* @param referenceTargetElement the reference target model element instance
* @return the new attribu... | throw new ModelException("An attribute cannot have more than one reference");
}
this.referenceBuilder = referenceBuilder;
}
@Override
public void performModelBuild(Model model) {
super.performModelBuild(model);
if (referenceBuilder != null) {
((ModelBuildOperation) referenceBuilder).perfor... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\attribute\StringAttributeBuilderImpl.java | 1 |
请完成以下Java代码 | public void onDeviceUpdate(Device device) {
this.profileId = device.getDeviceProfileId();
var data = device.getDeviceData();
if (data.getTransportConfiguration() != null && data.getTransportConfiguration().getType().equals(DeviceTransportType.COAP)) {
CoapDeviceTransportConfiguration... | updatedAttrs.put(newUpdatedAttrs.getKv().getKey(), newUpdatedAttrs);
}
deletedKeys.addAll(msg.getSharedDeletedList());
for (String deletedKey : msg.getSharedDeletedList()) {
updatedAttrs.remove(deletedKey);
}
missedAttributeUpdates = TransportP... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\client\TbCoapClientState.java | 1 |
请完成以下Java代码 | public void setCM_Container_ID (int CM_Container_ID)
{
if (CM_Container_ID < 1)
set_ValueNoCheck (COLUMNNAME_CM_Container_ID, null);
else
set_ValueNoCheck (COLUMNNAME_CM_Container_ID, Integer.valueOf(CM_Container_ID));
}
/** Get Web Container.
@return Web Container contains content like images, text e... | set_Value (COLUMNNAME_IsValid, Boolean.valueOf(IsValid));
}
/** Get Valid.
@return Element is valid
*/
public boolean isValid ()
{
Object oo = get_Value(COLUMNNAME_IsValid);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Container_Element.java | 1 |
请完成以下Java代码 | public class ELExecutionContext {
protected Map<Integer, Map<String, Object>> ruleResults = new LinkedHashMap<>();
protected Map<String, Object> stackVariables;
protected DecisionExecutionAuditContainer auditContainer;
protected Map<String, List<Object>> outputValues = new LinkedHashMap<>();
protec... | public Map<String, List<Object>> getOutputValues() {
return outputValues;
}
public void addOutputValues(String outputName, List<Object> outputValues) {
this.outputValues.put(outputName, outputValues);
}
public BuiltinAggregator getAggregator() {
return aggregator;
}
pu... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\el\ELExecutionContext.java | 1 |
请完成以下Java代码 | public class RequiredFactorError {
private final RequiredFactor requiredFactor;
private final Reason reason;
RequiredFactorError(RequiredFactor requiredFactor, Reason reason) {
Assert.notNull(requiredFactor, "RequiredFactor must not be null");
Assert.notNull(reason, "Reason must not be null");
if (reason ==... | public int hashCode() {
return Objects.hash(this.requiredFactor, this.reason);
}
@Override
public String toString() {
return "RequiredFactorError{" + "requiredFactor=" + this.requiredFactor + ", reason=" + this.reason + '}';
}
public static RequiredFactorError createMissing(RequiredFactor requiredFactor) {
... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\RequiredFactorError.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PathVariablesController {
private List<Item> items = new ArrayList<Item>();
public PathVariablesController() {
Item item1 = new Item(1, "First Item");
List<Detail> item1Details = new ArrayList<>();
item1Details.add(new Detail(1, "Green"));
item1Details.add(new D... | model.addAttribute("item", new Item(2, "Second Item"));
}
return "pathvariables/view";
}
@GetMapping("/pathvars/item/{itemId}/detail/{detailId}")
public String multiplePathVariable(@PathVariable("itemId") int itemId, @PathVariable("detailId") int detailId, Model model) {
... | repos\tutorials-master\spring-web-modules\spring-thymeleaf-2\src\main\java\com\baeldung\thymeleaf\pathvariables\PathVariablesController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setup() throws NoSuchAlgorithmException {
refreshSecrets();
}
public SigningKeyResolver getSigningKeyResolver() {
return signingKeyResolver;
}
public Map<String, String> getSecrets() {
return secrets;
}
public void setSecrets(Map<String, String> secrets) {
... | }
public byte[] getHS384SecretBytes() {
return TextCodec.BASE64.decode(secrets.get(SignatureAlgorithm.HS384.getJcaName()));
}
public byte[] getHS512SecretBytes() {
return TextCodec.BASE64.decode(secrets.get(SignatureAlgorithm.HS512.getJcaName()));
}
public Map<String, String> refr... | repos\tutorials-master\security-modules\jjwt\src\main\java\io\jsonwebtoken\jjwtfun\service\SecretService.java | 2 |
请完成以下Java代码 | public void linkToFlatrateDataEntryIfExists(final I_C_Invoice_Clearing_Alloc ica)
{
final I_C_Flatrate_DataEntry dataEntry = retrieveDataEntry(ica.getC_Invoice_Cand_ToClear(), ica.getC_Flatrate_Term());
if (dataEntry != null)
{
ica.setC_Flatrate_DataEntry(dataEntry);
}
}
private I_C_Flatrate_DataEntry re... | UomId.ofRepoIdOrNull(term.getC_UOM_ID()),
true); // onlyNonSim
final I_C_Flatrate_DataEntry dataEntry;
if (entries.isEmpty())
{
dataEntry = null;
}
else
{
dataEntry = entries.get(0);
Check.assume(entries.size() == 1, "There is only one non-sim entry");
}
return dataEntry;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\interceptor\C_Invoice_Clearing_Alloc.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UnitConversionType {
@XmlElement(name = "BaseUnit", required = true)
protected UnitType baseUnit;
@XmlElement(name = "TargetUnit", required = true)
protected UnitType targetUnit;
@XmlElement(name = "Factor", required = true)
protected BigDecimal factor;
@XmlElement(name = "Base... | *
*/
public BigDecimal getFactor() {
return factor;
}
/**
* Sets the value of the factor property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setFactor(BigDecimal value) {
this.factor = value;
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\UnitConversionType.java | 2 |
请完成以下Java代码 | public class NotificationData {
private long id;
private String name;
private String email;
private String mobile;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void... | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
} | repos\tutorials-master\spring-reactive-modules\spring-reactor\src\main\java\com\baeldung\reactorbus\domain\NotificationData.java | 1 |
请完成以下Java代码 | public static boolean isOverlapping(
@Nullable final Timestamp start1,
@Nullable final Timestamp end1,
@Nullable final Timestamp start2,
@Nullable final Timestamp end2)
{
return isOverlapping(toInstantsRange(start1, end1), toInstantsRange(start2, end2));
}
public static boolean isOverlapping(@NonNull ... | if (dayFrom.getDayOfMonth() == 31)
{
dayFrom = dayFrom.withDayOfMonth(30);
}
if (dayTo.getDayOfMonth() == 31)
{
dayTo = dayTo.withDayOfMonth(30);
}
final long months = ChronoUnit.MONTHS.between(
YearMonth.from(dayFrom), YearMonth.from(dayTo));
final int daysLeft = dayTo.getDayOfMonth() - dayFr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\TimeUtil.java | 1 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTablePrefix() {
return tablePrefix;
}
public void setTablePrefix(String tablePrefix) {
this.tablePrefix = tablePrefix;
}
public static List<String> getSchemaUpdateValues()... | }
public void setJdbcBatchProcessing(boolean jdbcBatchProcessing) {
this.jdbcBatchProcessing = jdbcBatchProcessing;
}
@Override
public String toString() {
return joinOn(this.getClass())
.add("type=" + type)
.add("schemaUpdate=" + schemaUpdate)
.add("schemaName=" + schemaName)
.... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\DatabaseProperty.java | 1 |
请完成以下Java代码 | public void setEntityType (java.lang.String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entitäts-Art.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
@Override
public java.lang.String getEntityType ()
{
return (java.lang.String)get_Value(COLUMNNAM... | @Override
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\pricing\model\X_C_PricingRule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTaxableAmount() {
return taxableAmount;
}
/**
* Sets the value of the taxableAmount property.
*
* @param value
* allowed object is
* {@link String }
*
*/
... | *
*/
public void setTaxAmount(String value) {
this.taxAmount = value;
}
/**
* Gets the value of the adjustmentAmount property.
*
* @return
* possible object is
* {@link String... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\REMADVExtensionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Saml2Error implements Serializable {
private static final long serialVersionUID = 620L;
private final String errorCode;
private final String description;
/**
* Constructs a {@code Saml2Error} using the provided parameters.
* @param errorCode the error code
* @param description the error descr... | * @param description the error description
* @return the resulting {@link Saml2Error}
* @since 7.0
*/
public static Saml2Error decryptionError(String description) {
return new Saml2Error(Saml2ErrorCodes.DECRYPTION_ERROR, description);
}
/**
* Construct an {@link Saml2ErrorCodes#RELYING_PARTY_REGISTRATION_... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\core\Saml2Error.java | 2 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_M_LotCtlExclude[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_AD_Table getAD_Table() throws RuntimeException
{
return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name)
.getPO(getAD_Table_I... | set_ValueNoCheck (COLUMNNAME_M_LotCtlExclude_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_LotCtlExclude_ID, Integer.valueOf(M_LotCtlExclude_ID));
}
/** Get Exclude Lot.
@return Exclude the ability to create Lots in Attribute Sets
*/
public int getM_LotCtlExclude_ID ()
{
Integer ii = (Integer)get_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_LotCtlExclude.java | 1 |
请完成以下Java代码 | public class TenantIdProviderProcessInstanceContext {
protected ProcessDefinition processDefinition;
protected VariableMap variables;
protected DelegateExecution superExecution;
protected DelegateCaseExecution superCaseExecution;
public TenantIdProviderProcessInstanceContext(ProcessDefinition processDefi... | public VariableMap getVariables() {
return variables;
}
/**
* @return the super execution. Null if the starting process instance is a root process instance and not started using a call activity.
* If the process instance is started using a call activity, this method returns the execution in the super pro... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\multitenancy\TenantIdProviderProcessInstanceContext.java | 1 |
请完成以下Java代码 | public UnProcessPickingCandidatesResult execute()
{
final List<PickingCandidate> pickingCandidates = pickingCandidateRepository.getByIds(pickingCandidateIds);
pickingCandidates.forEach(this::assertEligibleForProcessing);
trxManager.runInThreadInheritedTrx(() -> pickingCandidates.forEach(this::processInTrx));
... | if (packedToHUId == null)
{
return;
}
final I_M_HU packedToHU = handlingUnitsBL.getById(packedToHUId);
if (handlingUnitsBL.isDestroyed(packedToHU))
{
// shall not happen
return;
}
if (X_M_HU.HUSTATUS_Picked.equals(packedToHU.getHUStatus()))
{
handlingUnitsBL.setHUStatus(packedToHU, PlainCo... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\UnProcessPickingCandidatesCommand.java | 1 |
请完成以下Java代码 | public class MultiValuePart {
protected final String name;
protected final Object body;
protected final String filename;
protected final String mimeType;
protected MultiValuePart(String name, Object body, String filename) {
this.name = name;
this.body = body;
this.filename ... | }
public String getMimeType() {
return mimeType;
}
public static MultiValuePart fromText(String name, String value) {
return new MultiValuePart(name, value, null);
}
public static MultiValuePart fromFile(String name, byte[] value, String filename) {
return new MultiValuePa... | repos\flowable-engine-main\modules\flowable-http-common\src\main\java\org\flowable\http\common\api\MultiValuePart.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void init() {
LOG.info("init ...");
printService.print("init ...");
printServiceErr.print("init ....");
printService.print(dataService.getData());
printServiceOut.print("init .....");
}
@Override
public String printDefault(String message) {
return prin... | @Override
public String getData() {
return dataService.getData();
}
@Override
public String getDataPrototype() {
return dataServicePrototype.getData();
}
@PreDestroy
public void shutdown() {
LOG.info("##destroy.");
}
} | repos\spring-examples-java-17\spring-di\src\main\java\itx\examples\springboot\di\services\ClientServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Double getDoubleValue() {
return doubleValue;
}
@Override
public void setDoubleValue(Double doubleValue) {
this.doubleValue = doubleValue;
}
@Override
public String getTextValue() {
return textValue;
}
@Override
public void setTextValue(String textVa... | sb.append(", processInstanceId=").append(processInstanceId);
}
if (processDefinitionId != null) {
sb.append(", processDefinitionId=").append(processDefinitionId);
}
if (scopeId != null) {
sb.append(", scopeId=").append(scopeId);
}
if (subScopeId !=... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\VariableInstanceEntityImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public POJOLookupMap getDB()
{
return db;
}
@Override
public I_C_InvoiceLine createInvoiceLine(org.compiere.model.I_C_Invoice invoice)
{
throw new UnsupportedOperationException();
}
@Override
public List<I_C_LandedCost> retrieveLandedCosts(I_C_InvoiceLine invoiceLine, String whereClause, String trxName)
... | BigDecimal sum = BigDecimal.ZERO;
for (final I_C_AllocationLine line : retrieveAllocationLines(invoice))
{
final I_C_AllocationHdr ah = line.getC_AllocationHdr();
final BigDecimal lineAmt = amountAccessor.getValue(line);
if ((null != ah) && (ah.getC_Currency_ID() != invoice.getC_Currency_ID()))
{
f... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\PlainInvoiceDAO.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static void copyToDbRecord(
@NonNull final HUTraceEvent huTraceRecord,
@NonNull final I_M_HU_Trace dbRecord)
{
if (huTraceRecord.getDocTypeId().isPresent())
{
dbRecord.setC_DocType_ID(huTraceRecord.getDocTypeId().get().getRepoId()); // note that zero means "new", and not "nothing" or null
}
// ... | dbRecord.setQty(huTraceRecord.getQty().toBigDecimal());
dbRecord.setC_UOM_ID(UomId.toRepoId(huTraceRecord.getQty().getUomId()));
dbRecord.setVHUStatus(huTraceRecord.getVhuStatus());
dbRecord.setM_HU_Trx_Line_ID(huTraceRecord.getHuTrxLineId());
dbRecord.setM_HU_ID(huTraceRecord.getTopLevelHuId().getRepoId());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\trace\repository\HuTraceEventToDbRecordUtil.java | 2 |
请完成以下Java代码 | public void addDefinition(T definition) {
cache.put(definition.getId(), definition);
}
public T getDefinition(String id) {
return cache.get(id);
}
public void removeDefinitionFromCache(String id) {
cache.remove(id);
}
public void clear() {
cache.clear();
}
public Cache<String, T> get... | protected abstract void checkInvalidDefinitionId(String definitionId);
protected abstract void checkDefinitionFound(String definitionId, T definition);
protected abstract void checkInvalidDefinitionByKey(String definitionKey, T definition);
protected abstract void checkInvalidDefinitionByKeyAndTenantId(String ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\ResourceDefinitionCache.java | 1 |
请完成以下Java代码 | public String getIconName()
{
return iconName;
}
public static PPOrderLineType cast(final IViewRowType type)
{
return (PPOrderLineType)type;
}
public boolean canReceive()
{
return canReceive;
}
public boolean canIssue()
{
return canIssue;
}
public boolean isBOMLine()
{
return this == BOMLine_... | || this == HU_VHU
|| this == HU_Storage;
}
public static PPOrderLineType ofHUEditorRowType(final HUEditorRowType huType)
{
final PPOrderLineType type = huType2type.get(huType);
if (type == null)
{
throw new IllegalArgumentException("No type found for " + huType);
}
return type;
}
private static ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\PPOrderLineType.java | 1 |
请完成以下Java代码 | private int getQueueSize(JobExecutorXml jobExecutorXml) {
String queueSize = jobExecutorXml.getProperties().get(JobExecutorXml.QUEUE_SIZE);
if (queueSize == null) {
return DEFAULT_QUEUE_SIZE;
}
return Integer.parseInt(queueSize);
}
private long getKeepAliveTime(JobExecutorXml jobExecutorXml) ... | private int getMaxPoolSize(JobExecutorXml jobExecutorXml) {
String maxPoolSize = jobExecutorXml.getProperties().get(JobExecutorXml.MAX_POOL_SIZE);
if (maxPoolSize == null) {
return DEFAULT_MAX_POOL_SIZE;
}
return Integer.parseInt(maxPoolSize);
}
private int getCorePoolSize(JobExecutorXml jobE... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\jobexecutor\StartManagedThreadPoolStep.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
public String getLicencePic() {
return licence... | public void setUserType(Integer userType) {
this.userType = userType;
}
@Override
public String toString() {
return "RegisterReq{" +
"username='" + username + '\'' +
", password='" + password + '\'' +
", phone='" + phone + '\'' +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\user\RegisterReq.java | 2 |
请完成以下Java代码 | public String showVetList(@RequestParam(defaultValue = "1") int page, Model model) {
// Here we are returning an object of type 'Vets' rather than a collection of Vet
// objects so it is simpler for Object-Xml mapping
Vets vets = new Vets();
Page<Vet> paginated = findPaginated(page);
vets.getVetList().addAll(... | private Page<Vet> findPaginated(int page) {
int pageSize = 5;
Pageable pageable = PageRequest.of(page - 1, pageSize);
return vetRepository.findAll(pageable);
}
@GetMapping({ "/vets" })
public @ResponseBody Vets showResourcesVetList() {
// Here we are returning an object of type 'Vets' rather than a collecti... | repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\vet\VetController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MscManagedProcessEngine implements Service<ProcessEngine> {
private final static Logger LOGG = Logger.getLogger(MscManagedProcessEngine.class.getName());
protected Supplier<MscRuntimeContainerDelegate> runtimeContainerDelegateSupplier;
/** the process engine managed by this service */
protected ... | bindingService = BindingUtil.createJndiBindings(context.getChildTarget(), processEngineServiceBindingServiceName, jndiName, managedReferenceFactory);
// log info message
LOGG.info("jndi binding for process engine " + processEngine.getName() + " is " + jndiName);
}
protected void removeProcessEngineJndiBin... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessEngine.java | 2 |
请完成以下Java代码 | private void validateQtyEntered(@NonNull final I_PP_Order_Candidate ppOrderCandidateRecord)
{
final BigDecimal qtyEntered = ppOrderCandidateRecord.getQtyEntered();
final BigDecimal qtyProcessed = ppOrderCandidateRecord.getQtyProcessed();
final String adLanguage = Env.getAD_Language();
if (qtyEntered.compareT... | final String adLanguage = Env.getAD_Language();
if (ppOrderCandidateRecord.getQtyToProcess().compareTo(actualQtyLeftToBeProcessed) > 0)
{
final String qtyToProcessColumnTrl = msgBL.translatable(I_PP_Order_Candidate.COLUMNNAME_QtyToProcess).translate(adLanguage);
throw new AdempiereException(MSG_QTY_TO_PROCE... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\model\interceptor\PP_Order_Candidate.java | 1 |
请完成以下Java代码 | public static final class Builder
{
private static final Logger logger = LogManager.getLogger(DocumentLayoutColumnDescriptor.Builder.class);
private String internalName;
private final List<DocumentLayoutElementGroupDescriptor.Builder> elementGroupsBuilders = new ArrayList<>();
private Builder()
{
}
@O... | {
logger.trace("Skip adding {} to {} because it does not have element line", elementGroup, this);
return false;
}
return true;
}
public Builder setInternalName(String internalName)
{
this.internalName = internalName;
return this;
}
public Builder addElementGroups(@NonNull final List<Doc... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutColumnDescriptor.java | 1 |
请完成以下Java代码 | public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
ServerHttpRequest request = exchange.getRequest();
HttpHeaders headers = request.getHeaders();
HashMap<String, Long> longHeaders = new HashMap<>();
for (Map.Entry<String, List<String>> headerEntry : headers.headerSet()) {
... | public static class Config {
private DataSize maxSize = DataSize.ofBytes(16000L);
private @Nullable String errorHeaderName;
public DataSize getMaxSize() {
return maxSize;
}
public void setMaxSize(DataSize maxSize) {
this.maxSize = maxSize;
}
public @Nullable String getErrorHeaderName() {
ret... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RequestHeaderSizeGatewayFilterFactory.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.