instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public static void precedence_example() {
boolean x = true;
boolean y = false;
System.out.println(!x && y); // prints false
System.out.println(!(x && y)); // prints true
}
public static void pitfalls_ComplexConditionsExample() {
int count = 9;
int total = 100;... | if (count < 10 && total < 1000) {
System.out.println("Some more work to do");
}
}
public static void exitEarlyExample() {
boolean isValid = false;
if(!isValid) {
throw new IllegalArgumentException("Invalid input");
}
// Code to execute when isVal... | repos\tutorials-master\core-java-modules\core-java-lang-syntax-2\src\main\java\com\baeldung\core\operators\notoperator\NotOperator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getExecutionId() {
return executionId;
}
public void setExecutionId(String executionId) {
this.executionId = executionId;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
... | this.variableNameLike = variableNameLike;
}
@JsonTypeInfo(use = Id.CLASS, defaultImpl = QueryVariable.class)
public List<QueryVariable> getVariables() {
return variables;
}
public void setVariables(List<QueryVariable> variables) {
this.variables = variables;
}
public void ... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricVariableInstanceQueryRequest.java | 2 |
请完成以下Java代码 | public void addShipmentSchedule(final I_M_ShipmentSchedule schedule)
{
final IProductStorage storage = new ShipmentScheduleQtyPickedProductStorage(schedule);
final GenericAllocationSourceDestination sourceOrDestination = new GenericAllocationSourceDestination(storage,
(I_M_HU_Item)null, // we don't have any HU... | }
for (final I_M_ShipmentSchedule schedule : schedules)
{
addShipmentSchedule(schedule);
}
}
@Override
public IAllocationResult unload(final IAllocationRequest request)
{
// Make sure that request has no referenced object because we will use the shipment schedules are referenced objects.
Check.assum... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\ShipmentScheduleListAllocationSource.java | 1 |
请完成以下Java代码 | public ResponseEntity<JsonError> handleDBUniqueConstraintException(@NonNull final DBUniqueConstraintException e)
{
return logAndCreateError(
e,
"At least one record already existed in the system:" + e.getMessage(),
HttpStatus.UNPROCESSABLE_ENTITY);
}
@ExceptionHandler(Exception.class)
public Response... | return logAndCreateError(e, null, status);
}
private ResponseEntity<JsonError> logAndCreateError(
@NonNull final Exception e,
@Nullable final String detail,
@NonNull final HttpStatus status)
{
final String logMessage = coalesceSuppliers(
() -> detail,
e::getMessage,
() -> e.getClass().getSimp... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\exception\RestResponseEntityExceptionHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void configure(AuthorizationServerSecurityConfigurer security)
throws Exception {
security.passwordEncoder(passwordEncoder);
}
/**
* We set our authorization storage feature specifying that we would use the
* JDBC store for token and authorization code storage.<br>
* <br>
*
* We also attach th... | }
/**
* Configure the {@link AuthenticationManagerBuilder} with initial
* configuration to setup users.
*
* @author anilallewar
*
*/
@Configuration
@Order(Ordered.LOWEST_PRECEDENCE - 20)
protected static class AuthenticationManagerConfiguration extends
GlobalAuthenticationConfigurerAdapter {
@A... | repos\spring-boot-microservices-master\auth-server\src\main\java\com\rohitghatol\microservice\auth\config\OAuthConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void configure(AuthorizationServerEndpointsConfigurer endpoints)
throws Exception {
endpoints.authorizationCodeServices(authorizationCodeServices())
.authenticationManager(auth).tokenStore(tokenStore())
.approvalStoreDisabled();
}
/**
* Setup the client application which attempts to get access ... | */
@Configuration
@Order(Ordered.LOWEST_PRECEDENCE - 20)
protected static class AuthenticationManagerConfiguration extends
GlobalAuthenticationConfigurerAdapter {
@Autowired
private DataSource dataSource;
/**
* Setup 2 users with different roles
*/
@Override
public void init(AuthenticationManage... | repos\spring-boot-microservices-master\auth-server\src\main\java\com\rohitghatol\microservice\auth\config\OAuthConfiguration.java | 2 |
请完成以下Java代码 | public String getLieferscheinnummer() {
return lieferscheinnummer;
}
/**
* Sets the value of the lieferscheinnummer property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLieferscheinnummer(String value) {
this.l... | * allowed object is
* {@link RetoureGrund }
*
*/
public void setRetouregrund(RetoureGrund value) {
this.retouregrund = value;
}
/**
* Gets the value of the charge property.
*
* @return
* possible object is
* {@link String }
*
... | 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\RetourePositionType.java | 1 |
请完成以下Java代码 | public int getKeepResponseDays()
{
return get_ValueAsInt(COLUMNNAME_KeepResponseDays);
}
/**
* Method AD_Reference_ID=541306
* Reference name: Http_Method
*/
public static final int METHOD_AD_Reference_ID=541306;
/** GET = GET */
public static final String METHOD_GET = "GET";
/** POST = POST */
publi... | public java.lang.String getNotifyUserInCharge()
{
return get_ValueAsString(COLUMNNAME_NotifyUserInCharge);
}
@Override
public void setPathPrefix (final @Nullable java.lang.String PathPrefix)
{
set_Value (COLUMNNAME_PathPrefix, PathPrefix);
}
@Override
public java.lang.String getPathPrefix()
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_API_Audit_Config.java | 1 |
请完成以下Java代码 | public void setPayment_WriteOff_A(final org.compiere.model.I_C_ValidCombination Payment_WriteOff_A)
{
set_ValueFromPO(COLUMNNAME_Payment_WriteOff_Acct, org.compiere.model.I_C_ValidCombination.class, Payment_WriteOff_A);
}
@Override
public void setPayment_WriteOff_Acct (final int Payment_WriteOff_Acct)
{
set_V... | {
return get_ValueAsInt(COLUMNNAME_RealizedGain_Acct);
}
@Override
public org.compiere.model.I_C_ValidCombination getRealizedLoss_A()
{
return get_ValueAsPO(COLUMNNAME_RealizedLoss_Acct, org.compiere.model.I_C_ValidCombination.class);
}
@Override
public void setRealizedLoss_A(final org.compiere.model.I_C_V... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_BankAccount_Acct.java | 1 |
请完成以下Java代码 | public MAlertRecipient[] getRecipients (boolean reload)
{
if (m_recipients != null && !reload)
return m_recipients;
//FR: [ 2214883 ] Remove SQL code and Replace for Query - red1
String whereClause = "AD_Alert_ID=?";
List <MAlertRecipient> list = new Query(getCtx(), MAlertRecipient.Table_Name, whereClause, ... | TreeSet<UserId> users = new TreeSet<>();
for (int i = 0; i < recipients.length; i++)
{
MAlertRecipient recipient = recipients[i];
if (recipient.getAD_User_ID() >= 0) // System == 0
{
users.add(UserId.ofRepoId(recipient.getAD_User_ID()));
}
final RoleId roleId = RoleId.ofRepoIdOrNull(recipient.ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAlert.java | 1 |
请完成以下Java代码 | protected I_AD_MigrationStep getAD_MigrationStep()
{
return step;
}
/**
* Get current migration executor context.
*
* @return {@link IMigrationExecutorContext} migrationExecutorContext
*/
protected IMigrationExecutorContext getMigrationExecutorContext()
{
return migrationExecutorContext;
}
/**
*... | {
final StringBuilder sb = new StringBuilder();
sb.append("Step ").append(step.getSeqNo());
if (!Check.isEmpty(msg, true))
{
sb.append(": ").append(msg.trim());
}
if (resolution != null)
{
sb.append(" [").append(resolution).append("]");
}
if(isError)
{
logger.error(sb.toString());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\AbstractMigrationStepExecutor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JSONDataEntryRecord
{
Map<Integer, LocalDate> dates;
Map<Integer, DataEntryListValueId> listValues;
Map<Integer, BigDecimal> numbers;
Map<Integer, String> strings;
Map<Integer, Boolean> yesNos;
Map<Integer, CreatedUpdatedInfo> createdUpdatedInfos;
@Builder
@JsonCreator | private JSONDataEntryRecord(
@Singular @JsonProperty("dates") final Map<Integer, LocalDate> dates,
@Singular @JsonProperty("listValues") final Map<Integer, DataEntryListValueId> listValues,
@Singular @JsonProperty("numbers") final Map<Integer, BigDecimal> numbers,
@Singular @JsonProperty("strings") final Ma... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\data\json\JSONDataEntryRecord.java | 2 |
请完成以下Java代码 | public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public HttpHeaders getHt... | public byte[] getBodyBytes() {
return bodyBytes;
}
public void setBodyBytes(byte[] bodyBytes) {
this.bodyBytes = bodyBytes;
}
public boolean isBodyResponseHandled() {
return bodyResponseHandled;
}
public void setBodyResponseHandled(boolean bodyResponseHandled) {
... | repos\flowable-engine-main\modules\flowable-http-common\src\main\java\org\flowable\http\common\api\HttpResponse.java | 1 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder
.defineType(TextAnnotation.class, BPMN_ELEMENT_TEXT_ANNOTATION).namespaceUri(BPMN20_NS)
.extendsType(Artifact.class)
.instanceProvider(new ModelTypeInstanceProvider<TextAnnotation>() {
... | }
public String getTextFormat() {
return textFormatAttribute.getValue(this);
}
public void setTextFormat(String textFormat) {
textFormatAttribute.setValue(this, textFormat);
}
public Text getText() {
return textChild.getChild(this);
}
public void setText(Text text) {
textChild.setChild... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\TextAnnotationImpl.java | 1 |
请完成以下Java代码 | public String getCreationDate() {
return creationDate;
}
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = even... | public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
} | repos\tutorials-master\netflix-modules\hollow\src\main\java\com\baeldung\hollow\model\MonitoringEvent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Region timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Der Zeitstempel der letzten Änderung
* @return timestamp
**/
@Schema(description = "Der Zeitstempel der letzten Änderung")
public OffsetDateTime getTimestamp() {
return timestamp;
}
pu... | StringBuilder sb = new StringBuilder();
sb.append("class Region {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(" label: ").append(toIndentedString(label)).append("\n");
sb.append(" parent: ").append(toIndentedString(parent)).append("\n");
sb.append(" ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\Region.java | 2 |
请完成以下Java代码 | public long size()
{
return topLevelRowsById.size();
}
public List<PurchaseRow> getPage(final int firstRow, final int pageLength)
{
return topLevelRowsById.values().stream()
.skip(firstRow >= 0 ? firstRow : 0)
.limit(pageLength > 0 ? pageLength : DEFAULT_PAGE_LENGTH)
.collect(ImmutableList.toImmuta... | updateRow(idOfRowToPatch, request, editorToUse);
}
private void updateRow(
@NonNull final PurchaseRowId idOfRowToPatch,
@NonNull final PurchaseRowChangeRequest request,
@NonNull final PurchaseGroupRowEditor editor)
{
topLevelRowsById.compute(idOfRowToPatch.toGroupRowId(), (groupRowId, groupRow) -> {
i... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\purchasePlanning\view\PurchaseRowsCollection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getScopeDefinitionId() {
return scopeDefinitionId;
}
public void setScopeDefinitionId(String scopeDefinitionId) {
this.scopeDefinitionId = scopeDefinitionId;
}
@ApiModelProperty(example = "14")
public String getScopeId() {
return scopeId;
}
public voi... | }
@ApiModelProperty(example = "someTenantId")
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getFormKey() {
return formKey;
}
public void setFormKey(String formKey) {
... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\task\TaskResponse.java | 2 |
请完成以下Java代码 | public int getM_HU_PackagingCode_LU_Fallback_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_PackagingCode_LU_Fallback_ID);
}
@Override
public de.metas.handlingunits.model.I_M_HU_PI_Item getM_HU_PI_Item()
{
return get_ValueAsPO(COLUMNNAME_M_HU_PI_Item_ID, de.metas.handlingunits.model.I_M_HU_PI_Item.class);
}
... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setUPC (final @Nullable java.lang.String UPC)
{
set_Value (COLUMNNAME_UPC, UPC);
}
@Override
public java.lang.String getUPC()
{
return get_ValueAsString(COLUMNNAME_UPC);
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Item_Product.java | 1 |
请完成以下Java代码 | protected String getActiveValue(String originalValue, String propertyName, ObjectNode taskElementProperties) {
String activeValue = originalValue;
if (taskElementProperties != null) {
JsonNode overrideValueNode = taskElementProperties.get(propertyName);
if (overrideValueNode != n... | if (taskElementProperties != null) {
JsonNode overrideValuesNode = taskElementProperties.get(propertyName);
if (overrideValuesNode != null) {
if (overrideValuesNode.isNull() || !overrideValuesNode.isArray() || overrideValuesNode.size() == 0) {
activeValues = n... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\TaskActivityBehavior.java | 1 |
请完成以下Java代码 | public void setDistrict(final String district)
{
this.district = district;
this.districtSet = true;
}
public void setRegion(final String region)
{
this.region = region;
this.regionSet = true;
}
public void setCountryCode(final String countryCode)
{
this.countryCode = countryCode;
this.countryCodeSe... | public void setBillTo(final Boolean billTo)
{
this.billTo = billTo;
this.billToSet = true;
}
public void setBillToDefault(final Boolean billToDefault)
{
this.billToDefault = billToDefault;
this.billToDefaultSet = true;
}
public void setSyncAdvise(final SyncAdvise syncAdvise)
{
this.syncAdvise = syncA... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v1\request\JsonRequestLocation.java | 1 |
请完成以下Java代码 | public void updateFromRecipientId(@NonNull final I_C_Doc_Outbound_Log docOutboundlogRecord)
{
final DocOutBoundRecipientId userId = DocOutBoundRecipientId.ofRepoIdOrNull(docOutboundlogRecord.getCurrentEMailRecipient_ID());
if (userId == null)
{
docOutboundlogRecord.setCurrentEMailAddress(null);
return;
}... | {
// reset everything
docOutboundlogRecord.setCurrentEMailRecipient_ID(-1);
docOutboundlogRecord.setCurrentEMailAddress(null);
docOutboundlogRecord.setIsInvoiceEmailEnabled(false);
return;
}
final int invoiceTableId = Services.get(IADTableDAO.class).retrieveTableId(I_C_Invoice.Table_Name);
if (doc... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\interceptor\C_Doc_Outbound_Log.java | 1 |
请完成以下Java代码 | private PriceListId getPharmacyPriceListIdOrNull()
{
if (externalSystemType == null || !externalSystemType.isAlberta() || Check.isBlank(externalSystemConfigValue))
{
return null;
}
return externalSystemService.getByTypeAndValue(ExternalSystemType.Alberta, externalSystemConfigValue)
.map(ExternalSystemP... | }
@NonNull
private Stream<I_M_Product> streamProductsToExport()
{
if (isSingleExport())
{
Check.assumeNotNull(productIdentifier, "ProductIdentifier must be set in case of single export!");
final ProductId productId = productLookupService.resolveProductExternalIdentifier(productIdentifier, RestUtils.retri... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\product\command\GetProductsCommand.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setUpdated(OffsetDateTime updated) {
this.updated = updated;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CustomerMapping customerMapping = (CustomerMapping) ... | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CustomerMapping {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n");
sb.append(" updated: ").a... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\CustomerMapping.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getOrderedByPartyGLN() {
return orderedByPartyGLN;
}
/**
* Sets the value of the orderedByPartyGLN property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOrderedByPartyGLN(String value) {
this.order... | /**
* Gets the value of the nonReturnableContainer property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isNonReturnableContainer() {
return nonReturnableContainer;
}
/**
* Sets the value of the nonReturnableContainer... | 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\INVOICListLineItemExtensionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private boolean nullSafeEquals(Object o1, Object o2) {
if (o1 == o2) {
return true;
}
if (o1 == null || o2 == null) {
return false;
}
return o1.equals(o2);
}
private int nullSafeHashCode(Object o) {
return (o != null) ? o.hashCode() : 0;
}
@Override
public String toString() {
StringBuilder st... | }
public static String newItemMetadataPrefix(String prefix, String suffix) {
return prefix.toLowerCase(Locale.ENGLISH) + ConventionUtils.toDashedCase(suffix);
}
/**
* The item type.
*/
public enum ItemType {
/**
* Group item type.
*/
GROUP,
/**
* Property item type.
*/
PROPERTY
}
} | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ItemMetadata.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ReturnT<String> triggerJob(HttpServletRequest request, int id, String executorParam, String addressList) {
// login user
XxlJobUser loginUser = (XxlJobUser) request.getAttribute(LoginService.LOGIN_IDENTITY_KEY);
// trigger
return xxlJobService.trigger(loginUser, id, executorParam, addressList);
}
@Req... | lastTime = JobScheduleHelper.generateNextValidTime(paramXxlJobInfo, lastTime);
if (lastTime != null) {
result.add(DateUtil.formatDateTime(lastTime));
} else {
break;
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
return new ReturnT<List<String>>(ReturnT.FAIL_CODE, (I18nUti... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\controller\JobInfoController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ActivityId implements RepoIdAware
{
int repoId;
@JsonCreator
public static ActivityId ofRepoId(final int repoId)
{
return new ActivityId(repoId);
}
@Nullable
public static ActivityId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new ActivityId(repoId) : null;
}
public static int t... | {
return id != null ? id.getRepoId() : -1;
}
private ActivityId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Activity_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\acct\api\ActivityId.java | 2 |
请完成以下Java代码 | public I_M_HU_LUTU_Configuration createNewLUTUConfiguration(final I_PP_Order_BOMLine ppOrderBOMLine)
{
PPOrderUtil.assertReceipt(ppOrderBOMLine);
final org.eevolution.model.I_PP_Order ppOrder = ppOrderBOMLine.getPP_Order();
final BPartnerId bpartnerId = BPartnerId.ofRepoIdOrNull(ppOrder.getC_BPartner_ID());
f... | }
@Override
public void updateLUTUConfigurationFromDocumentLine(@NonNull final I_M_HU_LUTU_Configuration lutuConfiguration, @NonNull final I_PP_Order_BOMLine documentLine)
{
final I_PP_Order ppOrder = InterfaceWrapperHelper.create(documentLine.getPP_Order(), I_PP_Order.class);
PPOrderDocumentLUTUConfigurationHa... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\PPOrderBOMLineDocumentLUTUConfigurationHandler.java | 1 |
请完成以下Java代码 | public CmmnParser getCmmnParser() {
return cmmnParser;
}
public void setCmmnParser(CmmnParser cmmnParser) {
this.cmmnParser = cmmnParser;
}
public CaseDefinitionDiagramHelper getCaseDefinitionDiagramHelper() {
return caseDefinitionDiagramHelper;
}
public void setCaseDe... | return resource;
}
@Override
public boolean enableSafeXml() {
return cmmnEngineConfiguration.isEnableSafeCmmnXml();
}
@Override
public String xmlEncoding() {
return cmmnEngineConfiguration.getXmlEncoding();
}
@Override
pu... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\deployer\CmmnDeployer.java | 1 |
请完成以下Java代码 | public void setMemberIcon(String memberIcon) {
this.memberIcon = memberIcon;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getCreateTime() {
return createTime;
}
public v... | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", subjectId=").append(subjectId);
sb.append(", memberNickN... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsSubjectComment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class XmlVat
{
@Nullable
String vatNumber;
@NonNull
BigDecimal vat;
@Singular
List<XmlVatRate> vatRates;
public XmlVat withMod(@Nullable final VatMod vatMod)
{
if (vatMod == null)
{
return this;
}
final XmlVatBuilder builder = XmlVat.builder();
if (vatMod.getVatNumber() != null)
{
b... | // When it comes to the vat amount and rates, we don't just "patch", but replace the whole thing.
return builder
.vat(vatMod.getVat())
.clearVatRates()
.vatRates(vatMod.getVatRates())
.build();
}
@Value
@Builder
public static class VatMod
{
@NonNull
BigDecimal vat;
@Nullable
String vatN... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\request\model\payload\body\vat\XmlVat.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public long getAmount() {
return amount;
}
/**
* Sets the value of the amount property.
*
*/
public void setAmount(long value) {
this.amount = value;
}
/**
* Gets the value of the currency property.
*
* @return
* possible object is
* ... | }
/**
* Sets the value of the currency property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCurrency(String value) {
this.currency = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\HigherInsurance.java | 2 |
请完成以下Java代码 | public void setDataEntry_Section_ID (int DataEntry_Section_ID)
{
if (DataEntry_Section_ID < 1)
set_ValueNoCheck (COLUMNNAME_DataEntry_Section_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DataEntry_Section_ID, Integer.valueOf(DataEntry_Section_ID));
}
/** Get Sektion.
@return Sektion */
@Override
p... | */
@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);
i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Line.java | 1 |
请完成以下Java代码 | public void setImported (final @Nullable java.sql.Timestamp Imported)
{
set_Value (COLUMNNAME_Imported, Imported);
}
@Override
public java.sql.Timestamp getImported()
{
return get_ValueAsTimestamp(COLUMNNAME_Imported);
}
@Override
public void setIsMatchAmounts (final boolean IsMatchAmounts)
{
set_Valu... | {
return get_ValueAsBoolean(COLUMNNAME_IsMatchAmounts);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\org\adempiere\banking\model\X_C_BankStatement_Import_File.java | 1 |
请完成以下Java代码 | protected void closeJarFile() {
synchronized (this.archiveLock) {
this.archiveUseCount--;
}
}
@Override
protected boolean isMultiRelease() {
Boolean multiRelease = this.multiRelease;
if (multiRelease == null) {
synchronized (this.archiveLock) {
multiRelease = this.multiRelease;
if (multiReleas... | this.archive.close();
}
}
catch (IOException ex) {
// Ignore
}
this.archive = null;
this.archiveEntries = null;
}
}
}
private JarURLConnection connect() throws IOException {
URLConnection connection = this.url.openConnection();
ResourceUtils.useCachesIfNecessary(connection);
... | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\servlet\NestedJarResourceSet.java | 1 |
请完成以下Java代码 | public String toString()
{
return ObjectUtils.toString(this);
}
private final void updateFromAction()
{
final String displayName = action.getDisplayName();
setText(displayName);
// setToolTipText(displayName);
setOpaque(false);
setChecked(action.isToggled());
}
public final boolean isChecked()
{
... | setEnabled(false);
try
{
action.setToggled(isChecked());
action.execute();
}
catch (Exception e)
{
final int windowNo = Env.getWindowNo(this);
Services.get(IClientUI.class).error(windowNo, e);
}
finally
{
setEnabled(true);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\sideactions\swing\CheckableSideActionComponent.java | 1 |
请完成以下Java代码 | public void setActive(final Boolean active)
{
this.active = active;
activeSet = true;
}
public void setSeqNo(final Integer seqNo)
{
this.seqNo = seqNo;
seqNoSet = true;
}
public void setProductNo(final String productNo)
{
this.productNo = productNo;
productNoSet = true;
}
public void setDescri... | public void setExclusionFromSalesReason(final String exclusionFromSalesReason)
{
this.exclusionFromSalesReason = exclusionFromSalesReason;
exclusionFromSalesReasonSet = true;
}
public void setDropShip(final Boolean dropShip)
{
this.dropShip = dropShip;
dropShipSet = true;
}
public void setUsedForVendor(... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestBPartnerProductUpsert.java | 1 |
请完成以下Java代码 | public void setEnabledCustom(final boolean enabledCustom)
{
if (this.enabledCustom == enabledCustom)
{
return;
}
this.enabledCustom = enabledCustom;
update();
}
public void setEnabledByCaptureSequence(final LocationCaptureSequence captureSequence)
{
final boolean enabled = captureSequenc... | public void setLabelText(final String labelText)
{
label.setText(labelText);
}
public JLabel getLabel()
{
return label;
}
public JComponent getField()
{
return field;
}
}
} // VLocationDialog | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLocationDialog.java | 1 |
请完成以下Java代码 | public String getDbName()
{
return dbName;
}
@Override
public String getDbUser()
{
return dbUser;
}
@Override
public String getDbPassword()
{
return dbPassword;
}
@Override
public IScriptsRegistry getScriptsRegistry()
{
return scriptsRegistry;
}
@Override
public Connection getConnection()
{... | if (conn == null)
{
final ISQLDatabaseDriver dbDriver = SQLDatabaseDriverFactory.get().getSQLDatabaseDriver(dbType);
if (dbDriver == null)
{
throw new IllegalStateException("No driver found for database type: " + dbType);
}
}
try
{
if (conn != null && !conn.isClosed())
{
return conn;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\impl\SQLDatabase.java | 1 |
请完成以下Java代码 | public class C_OrderLine
{
private final DimensionService dimensionService = SpringContextHolder.instance.getBean(DimensionService.class);
private final OrderGroupRepository orderGroupRepo = SpringContextHolder.instance.getBean(OrderGroupRepository.class);
private final IProductAcctDAO productAcctDAO = Services.get(... | dimensionService.updateRecord(orderLine, orderLineDimension.withActivityId(productActivityId));
}
private ActivityId getGroupActivityId(final I_C_OrderLine orderLine)
{
if (orderLine.getC_Order_CompensationGroup_ID() <= 0)
{
return null;
}
final GroupId groupId = OrderGroupRepository.extractGroupIdOrNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\activity\model\validator\C_OrderLine.java | 1 |
请完成以下Java代码 | public class AD_User_TabCallout extends TabCalloutAdapter
{
private final IMKTGChannelDao mktgChannelDao = Services.get(IMKTGChannelDao.class);
private final IUserDAO userDAO = Services.get(IUserDAO.class);
private final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class);
private static final AdMessageKey... | }
boolean canBeSaved = true;
if (mktgChannelDao.retrieveMarketingChannelsCountForUser(UserId.ofRepoId(user.getAD_User_ID())) <= 0)
{
canBeSaved = false;
}
if (!canBeSaved)
{
throw new AdempiereException(MSG_CAN_NOT_REMOVE_CHANNEL).markAsUserValidationError();
}
}
private boolean isMarketingChan... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\callout\AD_User_TabCallout.java | 1 |
请完成以下Java代码 | public void setPP_Maturing_Candidates_v_ID (final int PP_Maturing_Candidates_v_ID)
{
if (PP_Maturing_Candidates_v_ID < 1)
set_ValueNoCheck (COLUMNNAME_PP_Maturing_Candidates_v_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PP_Maturing_Candidates_v_ID, PP_Maturing_Candidates_v_ID);
}
@Override
public int ... | @Override
public void setPP_Product_BOMVersions_ID (final int PP_Product_BOMVersions_ID)
{
if (PP_Product_BOMVersions_ID < 1)
set_ValueNoCheck (COLUMNNAME_PP_Product_BOMVersions_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PP_Product_BOMVersions_ID, PP_Product_BOMVersions_ID);
}
@Override
public int g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_Maturing_Candidates_v.java | 1 |
请完成以下Java代码 | public void setParamValue (final java.lang.String ParamValue)
{
set_Value (COLUMNNAME_ParamValue, ParamValue);
}
@Override
public java.lang.String getParamValue()
{
return get_ValueAsString(COLUMNNAME_ParamValue);
}
@Override
public org.compiere.model.I_PP_ComponentGenerator getPP_ComponentGenerator()
{... | @Override
public int getPP_ComponentGenerator_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_ComponentGenerator_ID);
}
@Override
public void setPP_ComponentGenerator_Param_ID (final int PP_ComponentGenerator_Param_ID)
{
if (PP_ComponentGenerator_Param_ID < 1)
set_ValueNoCheck (COLUMNNAME_PP_ComponentGenerat... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_ComponentGenerator_Param.java | 1 |
请完成以下Java代码 | private IQueryBuilder<I_C_Flatrate_Term> existingSubscriptionsQueryBuilder(@NonNull final OrgId orgId, @NonNull final BPartnerId bPartnerId, @NonNull final Instant date)
{
return queryBL.createQueryBuilder(I_C_Flatrate_Term.class)
.addEqualsFilter(I_C_Flatrate_Term.COLUMNNAME_AD_Org_ID, orgId)
.addEqualsFilt... | return true; // if this term has no C_Order_Term_ID, then it *is* one of those running terms
}
final Instant instant = TimeUtil.asInstant(flatrateTerm.getC_Order_Term().getDateOrdered());
final IQueryBuilder<I_C_Flatrate_Term> queryBuilder = //
existingSubscriptionsQueryBuilder(OrgId.ofRepoId(flatrateTerm.ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\FlatrateDAO.java | 1 |
请完成以下Java代码 | public void setProcessing (final boolean Processing)
{
set_Value (COLUMNNAME_Processing, Processing);
}
@Override
public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
@Override
public void setRevision (final @Nullable java.lang.String Revision)
{
set_Value (COLUMNNAME_Re... | {
return get_ValueAsInt(COLUMNNAME_SerialNo_Sequence_ID);
}
@Override
public void setValidFrom (final java.sql.Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
@Override
public java.sql.Timestamp getValidFrom()
{
return get_ValueAsTimestamp(COLUMNNAME_ValidFrom);
}
@Override
pu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_BOM.java | 1 |
请完成以下Java代码 | public class PostDao {
private Logger logger = Logger.getLogger(PostController.class.getName());
private SessionFactory sessionFactory;
public PostDao() {}
@Inject
public PostDao(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
public Object add(Post post) {
S... | Session session = sessionFactory.openSession();
session.beginTransaction();
Post post = (Post) session.get(Post.class, id);
session.getTransaction().commit();
session.close();
return post;
}
public List<Post> all() {
Session session = sessionFactory.openSession();
ses... | repos\tutorials-master\web-modules\vraptor\src\main\java\com\baeldung\daos\PostDao.java | 1 |
请完成以下Java代码 | public static String buildStringRestriction(@Nullable final String criteriaFunction, final String columnSQL, @Nullable final Object value, final boolean isIdentifier, final List<Object> params)
{
final String valueStr = prepareSearchString(value, isIdentifier);
String whereClause;
if (Check.isBlank(criteriaFunct... | {
if (value == null || value.toString().length() == 0)
{
return null;
}
String valueStr;
if (isIdentifier)
{
// metas-2009_0021_AP1_CR064: begin
valueStr = ((String)value).trim();
if (!valueStr.startsWith("%"))
valueStr = "%" + value;
// metas-2009_0021_AP1_CR064: end
if (!valueStr.end... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\FindHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | final class RedirectParameters {
private final String id;
private final Issuer issuer;
private final String algorithm;
private final byte[] signature;
private final byte[] content;
RedirectParameters(Map<String, String> parameters, String parametersQuery, RequestAbstractType request) {
this.... | }
Issuer getIssuer() {
return this.issuer;
}
byte[] getContent() {
return this.content;
}
String getAlgorithm() {
return this.algorithm;
}
byte[] getSignature() {
return this.signature;
}
boolean hasSignature() {
return this.signature != null;
}
}
}
interfac... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\internal\OpenSamlOperations.java | 2 |
请完成以下Java代码 | private String extractMailContent(final UserNotificationRequest request)
{
final body htmlBody = new body();
final String htmlBodyString = extractContentText(request, /* html */true);
if (!Check.isEmpty(htmlBodyString))
{
Splitter.on("\n")
.splitToList(htmlBodyString.trim())
.forEach(htmlLine -> h... | {
formatter.recordDisplayText(targetRecord, targetRecordDisplayText);
}
final AdWindowId targetWindowId = targetRecordAction.getAdWindowId().orElse(null);
if (targetWindowId != null)
{
formatter.recordWindowId(targetRecord, targetWindowId);
}
}
else if (targetAction instanceof TargetViewActi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\NotificationSenderTemplate.java | 1 |
请完成以下Java代码 | public class PP_Order_SyncTo_LeichMehl extends PP_Order_SyncTo_ExternalSystem
{
private final ExportPPOrderToLeichMehlService exportPPOrderToLeichMehlService = SpringContextHolder.instance.getBean(ExportPPOrderToLeichMehlService.class);
private static final String PARAM_EXTERNAL_SYSTEM_CONFIG_LEICHMEHL_ID = I_Extern... | return ExternalSystemLeichMehlConfigId.ofRepoId(externalSystemConfigLeichMehlId);
}
@Override
protected String getExternalSystemParam()
{
return PARAM_EXTERNAL_SYSTEM_CONFIG_LEICHMEHL_ID;
}
@Override
protected ExportToExternalSystemService getExportPPOrderToExternalSystem()
{
return exportPPOrderToLeichMe... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\leichmehl\export\pporder\PP_Order_SyncTo_LeichMehl.java | 1 |
请完成以下Java代码 | private static class DefaultGLCategories
{
private final ImmutableMap<GLCategoryType, GLCategory> byCategoryType;
private final ImmutableList<GLCategory> list;
DefaultGLCategories(final ImmutableList<GLCategory> list)
{
this.byCategoryType = Maps.uniqueIndex(list, GLCategory::getCategoryType);
this.list... | {
return Optional.of(category.getId());
}
return getDefaultId();
}
public Optional<GLCategoryId> getDefaultId()
{
return !list.isEmpty()
? Optional.of(list.get(0).getId())
: Optional.empty();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\GLCategoryRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonOutOfStockNoticeRequest
{
@ApiModelProperty(
value = "Identifier of the product in question. Can be\n"
+ "* a plain `<M_Product_ID>`,\n"
+ "* the M_Product.Value as `<val-M_Product.Value>`\n"
+ "* or something like `ext-<ExternalSystemName>-<M_Product_ID.ExternalId>`")
@NonNull
@Js... | @JsonProperty("attributeSetInstance")
@JsonInclude(JsonInclude.Include.NON_NULL)
JsonAttributeSetInstance attributeSetInstance;
@Builder
public JsonOutOfStockNoticeRequest(
@NonNull @JsonProperty("productIdentifier") final String productIdentifier,
@Nullable @JsonProperty("attributeSetInstance") final JsonAt... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\v2\warehouse\JsonOutOfStockNoticeRequest.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected VariableServiceConfiguration getVariableServiceConfiguration() {
String engineType = getEngineType(variableInstanceEntity.getScopeType());
Map<String, AbstractEngineConfiguration> engineConfigurationMap = Context.getCommandContext().getEngineConfigurations();
AbstractEngineConfiguratio... | if (!(engineConfiguration instanceof HasVariableServiceConfiguration)) {
throw new FlowableException("Variable entity engine scope has no variable service configuration " + engineType);
}
return (VariableServiceConfiguration) engineConfiguration.getServiceConfigurations().get(Engine... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\TraceableObject.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Review implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String content;
@ManyToOne(fetch = FetchType.LAZY)
private Book book;
@ManyToOne(fetch = FetchType.LAZY)
... | public Book getBook() {
return book;
}
public void setBook(Book book) {
this.book = book;
}
public Article getArticle() {
return article;
}
public void setArticle(Article article) {
this.article = article;
}
public Magazine getMagazine() {
retu... | repos\Hibernate-SpringBoot-master\HibernateSpringBootChooseOnlyOneAssociation\src\main\java\com\bookstore\entity\Review.java | 2 |
请完成以下Java代码 | public void setAD_User_SortPref_Hdr_ID (int AD_User_SortPref_Hdr_ID)
{
if (AD_User_SortPref_Hdr_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_User_SortPref_Hdr_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_SortPref_Hdr_ID, Integer.valueOf(AD_User_SortPref_Hdr_ID));
}
/** Get Sortierbegriff pro Benutzer... | {
set_Value (COLUMNNAME_IsAscending, Boolean.valueOf(IsAscending));
}
/** Get Aufsteigender.
@return Aufsteigender */
@Override
public boolean isAscending ()
{
Object oo = get_Value(COLUMNNAME_IsAscending);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_SortPref_Line.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HistoricTaskLogEntryBuilder timeStamp(Date timeStamp) {
this.timeStamp = timeStamp;
return this;
}
@Override
public HistoricTaskLogEntryBuilder userId(String userId) {
this.userId = userId;
return this;
}
@Override
public HistoricTaskLogEntryBuilder data(... | @Override
public String getTaskId() {
return taskId;
}
@Override
public Date getTimeStamp() {
return timeStamp;
}
@Override
public String getUserId() {
return userId;
}
@Override
public String getData() {
return data;
}
@Override
pub... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\BaseHistoricTaskLogEntryBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
public String getPropagatedStageInstanceId() {
return propagatedStageInstanceId;
}
public void setPropagatedStageInstanceId(String propagatedSt... | this.tenantId = tenantId;
}
public String getTenantId() {
return tenantId;
}
public void setCategory(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
} | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskInstanceResponse.java | 2 |
请完成以下Spring Boot application配置 | # mongodb \u914D\u7F6E
spring.data.mongodb.uri=mongodb://192.168.0.75:20000/manage
#spring.data.mongodb.uri=mongodb://localhost:27017/manage
# \u6D4B\u8BD5\u73AF\u5883\u53D6\u6D88thymeleaf\u7F13\u5B58
spring.thymeleaf.cache=false
spring.session.store-type=redis
# \u8BBE\u7F6Esession\u5931\u6548\u65F6\u95F4
spring.sessi... | 700\u5927\u7A7A\u95F2\u8FDE\u63A5 \u9ED8\u8BA4 8
spring.redis.lettuce.pool.max-idle=8
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 \u9ED8\u8BA4 0
spring.redis.lettuce.pool.min-idle=0
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
spring.redis.timeout=0
spring.mail.host=smtp.126.... | repos\spring-boot-leaning-master\2.x_42_courses\第 5-8 课: 综合实战客户管理系统(二)\user-manage-plus\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public int size()
{
return documentList.size();
}
@Override
public void clear()
{
documentList.clear();
}
@Override
public IDataSet shrink(int[] idMap)
{
Iterator<Document> iterator = iterator();
while (iterator.hasNext())
{
Docum... | Integer feature = entry.getKey();
if (idMap[feature] == -1) continue;
tfMap.put(idMap[feature], entry.getValue());
}
// 检查是否是空白文档
if (tfMap.size() == 0) iterator.remove();
else document.tfMap = tfMap;
}
return this;
}
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\MemoryDataSet.java | 1 |
请完成以下Java代码 | private List<I_M_PackageLine> getPackageLine(int M_Package_ID)
{
String whereClause = I_M_PackageLine.COLUMNNAME_M_Package_ID + " = ?";
return new Query(Env.getCtx(), I_M_PackageLine.Table_Name, whereClause, null)
.setClient_ID()
.setParameters(M_Package_ID)
.list(I_M_PackageLine.class);
}
@Override... | EMail email = client.createEMail(
to,
text.getName(),
message,
true);
if (email == null)
{
throw new AdempiereException("Cannot create email. Check log.");
}
while (st.hasMoreTokens())
{
email.addTo(EMailAddress.ofString(st.nextToken()));
}
send(email);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\model\validator\ShipperTransportationMailNotification.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EDIImpCCurrencyLookupISOCodeType {
@XmlElement(name = "ISO_Code", required = true)
protected String isoCode;
/**
* Gets the value of the isoCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getISOCode() {
... | }
/**
* Sets the value of the isoCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setISOCode(String value) {
this.isoCode = value;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIImpCCurrencyLookupISOCodeType.java | 2 |
请完成以下Java代码 | public MetricsRegistry getMetricsRegistry() {
return metricsRegistry;
}
public CommandExecutor getCommandExecutor() {
return commandExecutor;
}
public MetricsCollectionTask getMetricsCollectionTask() {
return metricsCollectionTask;
}
public void setMetricsCollectionTask(MetricsCollectionTask ... | protected class ReportDbMetricsValueCmd implements Command<Void> {
protected String name;
protected long value;
public ReportDbMetricsValueCmd(String name, long value) {
this.name = name;
this.value = value;
}
@Override
public Void execute(CommandContext commandContext) {
co... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\reporter\DbMetricsReporter.java | 1 |
请完成以下Java代码 | public final class NullLookupDataSource implements LookupDataSource
{
public static final transient NullLookupDataSource instance = new NullLookupDataSource();
private NullLookupDataSource() { }
@Override
public DocumentZoomIntoInfo getDocumentZoomInto(final int id)
{
throw new UnsupportedOperationException();... | @Override
public @NonNull LookupValuesList findByIdsOrdered(final @NonNull Collection<?> ids)
{
if (ids.isEmpty())
{
return LookupValuesList.EMPTY;
}
return ids.stream()
.map(NullLookupDataSource::toUnknownLookupValue)
.filter(Objects::nonNull)
.collect(LookupValuesList.collect());
}
@Overr... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\NullLookupDataSource.java | 1 |
请完成以下Java代码 | public class UserCredentialsDto {
protected String password;
protected String authenticatedUserPassword;
// transformers //////////////////////////////////
public static UserCredentialsDto fromUser(User user) {
UserCredentialsDto result = new UserCredentialsDto();
result.setPassword(user.getPassword(... | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getAuthenticatedUserPassword() {
return authenticatedUserPassword;
}
public void setAuthenticatedUserPassword(String authenticatedUserPassword) {
this.authen... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\identity\UserCredentialsDto.java | 1 |
请完成以下Java代码 | public HUEditorViewBuilder setParameters(final Map<String, Object> parameters)
{
parameters.forEach(this::setParameter);
return this;
}
ImmutableMap<String, Object> getParameters()
{
return parameters != null ? ImmutableMap.copyOf(parameters) : ImmutableMap.of();
}
@Nullable
public <T> T getParameter(@No... | HUEditorViewBuffer createRowsBuffer(@NonNull final SqlDocumentFilterConverterContext context)
{
final ViewId viewId = getViewId();
final DocumentFilterList stickyFilters = getStickyFilters();
final DocumentFilterList filters = getFilters();
if (HUEditorViewBuffer_HighVolume.isHighVolume(stickyFilters))
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuilder.java | 1 |
请完成以下Java代码 | public boolean isUp() {
return STATUS_UP.equals(status);
}
public boolean isOffline() {
return STATUS_OFFLINE.equals(status);
}
public boolean isDown() {
return STATUS_DOWN.equals(status);
}
public boolean isUnknown() {
return STATUS_UNKNOWN.equals(status);
}
public static Comparator<String> severit... | /*
* Key "details" is present when accessing Spring Boot Actuator Health using
* Accept-Header {@link org.springframework.boot.actuate.endpoint.ApiVersion#V2}.
*/
if (body.containsKey("details")) {
details = (Map<String, ?>) body.get("details");
}
else if (body.containsKey("components")) {
details ... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\domain\values\StatusInfo.java | 1 |
请完成以下Java代码 | public class Quote {
private String symbol;
private double price;
/**
* @return the symbol
*/
public String getSymbol() {
return symbol;
}
/**
* @param symbol the symbol to set
*/
public void setSymbol(String symbol) {
this.symbol = symbol; | }
/**
* @return the price
*/
public double getPrice() {
return price;
}
/**
* @param price the price to set
*/
public void setPrice(double price) {
this.price = price;
}
} | repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\java\com\baeldung\springcloudgateway\oauth\backend\domain\Quote.java | 1 |
请完成以下Java代码 | private XMLPersonType createXmlPersonType(@NonNull final PersonType person)
{
return XMLPersonType.builder()
.familyName(person.getFamilyname())
.givenName(person.getGivenname())
.build();
}
private XmlRejected createXmlRejected(@NonNull final RejectedType rejected)
{
final XmlRejectedBuilder rejec... | private List<XmlError> createXmlErrors(@NonNull final List<ErrorType> error)
{
final ImmutableList.Builder<XmlError> errorsBuilder = ImmutableList.builder();
for (final ErrorType errorType : error)
{
final XmlError xmlError = XmlError
.builder()
.code(errorType.getCode())
.errorValue(errorType... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\Invoice440ToCrossVersionModelTool.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private <T> Optional<T> getBeanOrNull(Class<T> type) {
ApplicationContext context = getBuilder().getSharedObject(ApplicationContext.class);
if (context == null) {
return Optional.empty();
}
try {
return Optional.of(context.getBean(type));
}
catch (NoSuchBeanDefinitionException ex) {
return Optional... | private PublicKeyCredentialUserEntityRepository userEntityRepository() {
return new MapPublicKeyCredentialUserEntityRepository();
}
private WebAuthnRelyingPartyOperations webAuthnRelyingPartyOperations(
PublicKeyCredentialUserEntityRepository userEntities, UserCredentialRepository userCredentials) {
Optional<... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\WebAuthnConfigurer.java | 2 |
请完成以下Java代码 | public Map<String, Mapping> getInputs() {
return inputs;
}
public void setInputs(Map<String, Mapping> inputs) {
this.inputs = inputs;
}
public Mapping getInputMapping(String inputName) {
return inputs.get(inputName);
}
public Map<String, Mapping> getOutputs() {
... | this.mappingType = mappingType;
}
public enum MappingType {
MAP_ALL,
MAP_ALL_INPUTS,
MAP_ALL_OUTPUTS,
}
public boolean isEphemeral() {
return this.ephemeral;
}
public void setEphemeral(boolean ephemeral) {
this.ephemeral = ephemeral;
}
} | repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\model\ProcessVariablesMapping.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ShipmentScheduleDeletedHandler implements MaterialEventHandler<ShipmentScheduleDeletedEvent>
{
private static final Logger logger = LogManager.getLogger(ShipmentScheduleDeletedHandler.class);
private final CandidateChangeService candidateChangeHandler;
private final CandidateRepositoryRetrieval candida... | .type(CandidateType.DEMAND)
.businessCase(CandidateBusinessCase.SHIPMENT)
.demandDetailsQuery(demandDetailsQuery)
.build();
final Candidate candidate = candidateRepository.retrieveLatestMatchOrNull(candidatesQuery);
if (candidate == null)
{
Loggables.withLogger(logger, Level.DEBUG).addLog("Found n... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\shipmentschedule\ShipmentScheduleDeletedHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private boolean checkNeedConvert(boolean mediaTypes) {
//1.检查开关是否开启
if ("true".equals(ConfigConstants.getMediaConvertDisable())) {
return mediaTypes;
}
return false;
}
private static String convertToMp4(String filePath, String outFilePath, FileAttribute fileAttribute... | recorder.setAudioBitrate(frameGrabber.getAudioBitrate());
recorder.setAudioOptions(frameGrabber.getAudioOptions());
recorder.setAudioChannels(frameGrabber.getAudioChannels());
recorder.start();
while (true) {
captured_frame = frameGrabber.grabFrame();
... | repos\kkFileView-master\server\src\main\java\cn\keking\service\impl\MediaFilePreviewImpl.java | 2 |
请完成以下Java代码 | public class C_RfQ
{
@Init
public void registerCallout()
{
Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this);
}
@Init
void configureCopyWithDetailsSupport()
{
CopyRecordFactory.enableForTableName(I_C_RfQ.Table_Name);
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ... | @CalloutMethod(columnNames = I_C_RfQ.COLUMNNAME_DeliveryDays, skipIfCopying = true)
public void onDeliveryDays(final I_C_RfQ rfq)
{
if (InterfaceWrapperHelper.isNull(rfq, I_C_RfQ.COLUMNNAME_DeliveryDays))
{
return;
}
final IRfQWorkDatesAware workDatesAware = InterfaceWrapperHelper.create(rfq, IRfQWorkDates... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\model\interceptor\C_RfQ.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityFilterConfig {
protected PathFilterConfig pathFilter;
public PathFilterConfig getPathFilter() {
return pathFilter;
}
public void setPathFilter(PathFilterConfig pathFilter) {
this.pathFilter = pathFilter;
}
public static class PathFilterConfig {
protected List<PathMatche... | this.path = path;
}
public String getMethods() {
return methods;
}
public void setMethods(String methods) {
this.methods = methods;
}
public String getAuthorizer() {
return authorizer;
}
public void setAuthorizer(String authorizer) {
this.authorizer = authorizer;
... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\SecurityFilterConfig.java | 2 |
请完成以下Java代码 | public void setAD_Column_ID (int AD_Column_ID)
{
if (AD_Column_ID < 1)
set_Value (COLUMNNAME_AD_Column_ID, null);
else
set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID));
}
/** Get Column.
@return Column in the table
*/
public int getAD_Column_ID ()
{
Integer ii = (Integer)get_... | public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entity Type.
@param EntityType
Dictionary Entity Type; Determines ownership and synchronization
*/
public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entity Type.
@return Dictionary E... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Index_Column.java | 1 |
请完成以下Java代码 | public static boolean isTerminal(ArrayList<Configuration> beam)
{
for (Configuration configuration : beam)
if (!configuration.state.isTerminalState())
return false;
return true;
}
public static void commitAction(int action, int label, float score, ArrayList<Inte... | newConfig.addAction(3 + label);
}
else if (action == 3)
{
leftArc(newConfig.state, label);
newConfig.addAction(3 + dependencyRelations.size() + label);
}
else if (action == 4)
{
unShift(newConfig.state);
newConfig.addAction(... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\transition\parser\ArcEager.java | 1 |
请完成以下Java代码 | public abstract class AbstractJpaDAO<T extends Serializable> {
private Class<T> clazz;
@PersistenceContext
private EntityManager entityManager;
public final void setClazz(final Class<T> clazzToSet) {
this.clazz = clazzToSet;
}
public T findOne(final long id) {
return entityMa... | public long countAllRowsUsingHibernateCriteria() {
Session session = entityManager.unwrap(Session.class);
Criteria criteria = session.createCriteria(clazz);
criteria.setProjection(Projections.rowCount());
Long count = (Long) criteria.uniqueResult();
return count != null ? count :... | repos\tutorials-master\persistence-modules\spring-hibernate-5\src\main\java\com\baeldung\hibernate\cache\dao\AbstractJpaDAO.java | 1 |
请完成以下Java代码 | public InboundEventDeserializer<T> getInboundEventDeserializer() {
return inboundEventDeserializer;
}
public void setInboundEventDeserializer(InboundEventDeserializer<T> inboundEventDeserializer) {
this.inboundEventDeserializer = inboundEventDeserializer;
}
public InboundEventK... | this.inboundEventTenantDetector = inboundEventTenantDetector;
}
public InboundEventPayloadExtractor<T> getInboundEventPayloadExtractor() {
return inboundEventPayloadExtractor;
}
public void setInboundEventPayloadExtractor(InboundEventPayloadExtractor<T> inboundEventPayloadExtractor) {
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\pipeline\DefaultInboundEventProcessingPipeline.java | 1 |
请完成以下Java代码 | public class ContextServlet extends HttpServlet {
protected static final String PATH = "/context";
protected static final String LABEL_FROM_HTTP_SERVLET = "1) From HttpServlet: ";
protected static final String LABEL_FROM_SERVLET_CONFIG = "2) From ServletConfig: ";
protected static final String LABEL_F... | // 3. Getting the Context From the HttpServletRequest (Servlet 3.0+)
ServletContext contextFromRequest = req.getServletContext();
resp.getWriter()
.println(LABEL_FROM_HTTP_SERVLET_REQUEST + contextFromRequest);
resp.getWriter()
.println();
// 4. Retrieving Throu... | repos\tutorials-master\web-modules\jakarta-servlets-2\src\main\java\com\baeldung\context\ContextServlet.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CommentController {
@Resource
private CommentService commentService;
@GetMapping("/comments")
public String list(HttpServletRequest request) {
request.setAttribute("path", "comments");
return "admin/comment";
}
@GetMapping("/comments/list")
@ResponseBody
p... | }
if (commentService.checkDone(ids)) {
return ResultGenerator.genSuccessResult();
} else {
return ResultGenerator.genFailResult("审核失败");
}
}
@PostMapping("/comments/delete")
@ResponseBody
public Result delete(@RequestBody Integer[] ids) {
if (ids.... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\CommentController.java | 2 |
请完成以下Java代码 | public void setBusinessKey(String businessKey) {
this.businessKey = businessKey;
}
public boolean isInheritBusinessKey() {
return inheritBusinessKey;
}
public void setInheritBusinessKey(boolean inheritBusinessKey) {
this.inheritBusinessKey = inheritBusinessKey;
}
publi... | this.processInstanceIdVariableName = processInstanceIdVariableName;
}
@Override
public CallActivity clone() {
CallActivity clone = new CallActivity();
clone.setValues(this);
return clone;
}
public void setValues(CallActivity otherElement) {
super.setValues(otherElem... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\CallActivity.java | 1 |
请完成以下Java代码 | public int size() {
return variables.size();
}
};
}
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("{\n");
for (Entry<String, TypedValue> variable : variables.entrySet()) {
stringBuilder.append(" ");
stringBuilder.appen... | public Map<String, Object> asValueMap() {
return new HashMap<String, Object>(this);
}
public TypedValue resolve(String variableName) {
return getValueTyped(variableName);
}
public boolean containsVariable(String variableName) {
return containsKey(variableName);
}
public VariableContext asVari... | repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\VariableMapImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceLineId implements RepoIdAware
{
@JsonCreator
public static InvoiceLineId ofRepoId(final int repoId)
{
return new InvoiceLineId(repoId);
}
public static InvoiceLineId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new InvoiceLineId(repoId) : null;
}
@NonNull
public static Optio... | {
return repoId;
}
public static int toRepoId(@Nullable final InvoiceLineId invoiceLineId)
{
return toRepoIdOr(invoiceLineId, -1);
}
public static int toRepoIdOr(@Nullable final InvoiceLineId invoiceLineId, final int defaultValue)
{
return invoiceLineId != null ? invoiceLineId.getRepoId() : defaultValue;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\invoice\InvoiceLineId.java | 2 |
请完成以下Java代码 | private void moveHandlingUnit(final I_M_HU hu, final LocatorId locatorToId)
{
final SourceHUsService sourceHuService = SourceHUsService.get();
//
// Make sure HU's current locator is the locator from which we need to move
// final int huLocatorIdOld = hu.getM_Locator_ID();
final LocatorId locatorFromId = IH... | // already created from a lager to another.
// So no HU leftovers.
final IContextAware contextProvider = InterfaceWrapperHelper.getContextAware(hu);
final IMutableHUContext huContext = huContextFactory.createMutableHUContext(contextProvider);
huStatusBL.setHUStatus(huContext, hu, X_M_HU.HUSTATUS_Active);
//... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\movement\api\impl\HUMovementBL.java | 1 |
请完成以下Java代码 | public void setM_Product(org.compiere.model.I_M_Product M_Product)
{
set_ValueFromPO(COLUMNNAME_M_Product_ID, org.compiere.model.I_M_Product.class, M_Product);
}
/** Set Produkt.
@param M_Product_ID
Produkt, Leistung, Artikel
*/
@Override
public void setM_Product_ID (int M_Product_ID)
{
if (M_Product... | @Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Gültig ab.
@param ValidFrom
... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_C_BPartner_Allotment.java | 1 |
请完成以下Java代码 | private synchronized AdempiereDatabase getDatabaseOrNull()
{
return _database;
}
/**
* Get Connection String
*
* @return connection string or empty string if database was not initialized
*/
public String getConnectionURL()
{
final AdempiereDatabase db = getDatabaseOrNull();
if (db != null)
{
re... | *
* @return transaction isolation name
*/
@SuppressWarnings("unused")
private static String getTransactionIsolationInfo(int transactionIsolation)
{
if (transactionIsolation == Connection.TRANSACTION_NONE)
{
return "NONE";
}
if (transactionIsolation == Connection.TRANSACTION_READ_COMMITTED)
{
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\CConnection.java | 1 |
请完成以下Java代码 | public class ELException extends RuntimeException {
@Serial
private static final long serialVersionUID = -6228042809457459161L;
/**
* Creates an ELException with no detail message
*/
public ELException() {
super();
}
/**
* Creates an ELException with the provided detail message.
*
* @p... | * @param cause the originating cause of this exception
*/
public ELException(Throwable cause) {
super(cause);
}
/**
* Creates an ELException with the given detail message and root cause.
*
* @param message the detail message
* @param cause the originating cause of this exception
*/
public EL... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\ELException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setConfigFields(
@NonNull final FTSConfigId configId,
@NonNull final Set<ESFieldName> esFieldNames)
{
final HashMap<ESFieldName, I_ES_FTS_Config_Field> records = queryBL.createQueryBuilder(I_ES_FTS_Config_Field.class)
.addEqualsFilter(I_ES_FTS_Config_Field.COLUMNNAME_ES_FTS_Config_ID, configId)... | @Getter
private final FTSConfigSourceTablesMap sourceTables;
private FTSConfigsMap(
@NonNull final List<FTSConfig> configs,
@NonNull final FTSConfigSourceTablesMap sourceTables)
{
this.configs = ImmutableList.copyOf(configs);
this.configsByESIndexName = Maps.uniqueIndex(configs, FTSConfig::getEsInd... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSConfigRepository.java | 2 |
请完成以下Java代码 | public void setP_UsageVariance_Acct (int P_UsageVariance_Acct)
{
set_Value (COLUMNNAME_P_UsageVariance_Acct, Integer.valueOf(P_UsageVariance_Acct));
}
/** Get Usage Variance.
@return The Usage Variance account is the account used Manufacturing Order
*/
@Override
public int getP_UsageVariance_Acct ()
{
... | {
set_Value (COLUMNNAME_P_WIP_Acct, Integer.valueOf(P_WIP_Acct));
}
/** Get Work In Process.
@return The Work in Process account is the account used Manufacturing Order
*/
@Override
public int getP_WIP_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_WIP_Acct);
if (ii == null)
return 0;
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Acct.java | 1 |
请完成以下Java代码 | public Object getValue(VariableScope variableScope) {
ELContext elContext = Context.getProcessEngineConfiguration()
.getExpressionManager()
.getElContext(variableScope);
return getValueFromContext(elContext, Context.getProcessEngineConfiguration().getDelegateInterceptor());
}... | }
@Override
public Object getValue(
ExpressionManager expressionManager,
DelegateInterceptor delegateInterceptor,
Map<String, Object> availableVariables
) {
ELContext elContext = expressionManager.getElContext(availableVariables);
return getValueFromContext(elContext... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\el\JuelExpression.java | 1 |
请完成以下Java代码 | public int getDoc_User_ID(@NonNull final DocumentTableFields docFields)
{
return extractDunningDoc(docFields).getCreatedBy();
}
@Override
public LocalDate getDocumentDate(@NonNull final DocumentTableFields docFields)
{
return TimeUtil.asLocalDate(extractDunningDoc(docFields).getDunningDate());
}
/**
* Se... | InterfaceWrapperHelper.save(line);
}
//
// Delivery stop (https://github.com/metasfresh/metasfresh/issues/2499)
dunningBL.makeDeliveryStopIfNeeded(dunningDocRecord);
dunningDocRecord.setProcessed(true);
return IDocument.STATUS_Completed;
}
@Override
public void reactivateIt(@NonNull final DocumentTab... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\DunningDocDocumentHandler.java | 1 |
请完成以下Java代码 | public Stream<CostElementId> streamCostElementIds()
{
return pricesByElementId.keySet().stream();
}
public BOMCostElementPrice getCostElementPriceOrNull(@NonNull final CostElementId costElementId)
{
return pricesByElementId.get(costElementId);
}
public void clearOwnCostPrice(@NonNull final CostElementId cos... | {
final BOMCostElementPrice elementCostPrice = getCostElementPriceOrNull(costElementId);
if (elementCostPrice != null)
{
elementCostPrice.clearComponentsCostPrice();
}
}
ImmutableList<BOMCostElementPrice> getElementPrices()
{
return ImmutableList.copyOf(pricesByElementId.values());
}
<T extends Repo... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMCostPrice.java | 1 |
请完成以下Java代码 | public AppDeployment deploy(AppDeploymentBuilderImpl deploymentBuilder) {
return commandExecutor.execute(new DeployCmd(deploymentBuilder));
}
@Override
public AppDefinition getAppDefinition(String appDefinitionId) {
return commandExecutor.execute(new GetDeploymentAppDefinitionCmd(appDef... | commandExecutor.execute(new DeleteDeploymentCmd(deploymentId, cascade));
}
@Override
public AppDeploymentQuery createDeploymentQuery() {
return configuration.getAppDeploymentEntityManager().createDeploymentQuery();
}
@Override
public AppDefinitionQuery createAppDefinitionQuery(... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\AppRepositoryServiceImpl.java | 1 |
请完成以下Java代码 | public Object put(Object key, Object value)
{
return getDelegate().put(key, value);
}
@Override
public Object remove(Object key)
{
return getDelegate().remove(key);
}
@Override
public void putAll(Map<? extends Object, ? extends Object> t)
{
getDelegate().putAll(t);
}
@Override
public void clear()
... | @Override
public void store(Writer writer, String comments) throws IOException
{
getDelegate().store(writer, comments);
}
@Override
public void store(OutputStream out, String comments) throws IOException
{
getDelegate().store(out, comments);
}
@Override
public void loadFromXML(InputStream in) throws IOEx... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\AbstractPropertiesProxy.java | 1 |
请完成以下Java代码 | public static void agentmain(String agentArgs, Instrumentation inst) {
LOGGER.info("[Agent] In agentmain method");
String className = "com.baeldung.instrumentation.application.MyAtm";
transformClass(className,inst);
}
private static void transformClass(String className, Instrumentation... | targetCls = clazz;
targetClassLoader = targetCls.getClassLoader();
transform(targetCls, targetClassLoader, instrumentation);
return;
}
}
throw new RuntimeException("Failed to find class [" + className + "]");
}
private static void tran... | repos\tutorials-master\core-java-modules\core-java-jvm\src\main\java\com\baeldung\instrumentation\agent\MyInstrumentationAgent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public V2 getV2() {
return this.v2;
}
public static class V1 {
/**
* ID of the custom device that is exporting metrics to Dynatrace.
*/
private @Nullable String deviceId;
/**
* Group for exported metrics. Used to specify custom device group name in the
* Dynatrace UI.
*/
private @Nullable ... | /**
* Whether to fall back to the built-in micrometer instruments for Timer and
* DistributionSummary.
*/
private boolean useDynatraceSummaryInstruments = true;
/**
* Whether to export meter metadata (unit and description) to the Dynatrace
* backend.
*/
private boolean exportMeterMetadata = tru... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\dynatrace\DynatraceProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getCompactionThreshold() {
return this.compactionThreshold;
}
public void setCompactionThreshold(int compactionThreshold) {
this.compactionThreshold = compactionThreshold;
}
public DirectoryProperties[] getDirectory() {
return this.directoryProperties;
}
public void setDirectory(Direc... | }
public int getQueueSize() {
return this.queueSize;
}
public void setQueueSize(int queueSize) {
this.queueSize = queueSize;
}
public long getTimeInterval() {
return this.timeInterval;
}
public void setTimeInterval(long timeInterval) {
this.timeInterval = timeInterval;
}
public int ge... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\DiskStoreProperties.java | 2 |
请完成以下Java代码 | protected final void appendParameters(final TranslatableStringBuilder message)
{
final ITranslatableString parametersStr = buildParametersString();
if (TranslatableStrings.isBlank(parametersStr))
{
return;
}
if (!message.isEmpty())
{
message.append("\n");
}
message.append(parametersStr);
}
pu... | public final boolean isUserValidationError()
{
return userValidationError;
}
public static boolean isUserValidationError(final Throwable ex)
{
return (ex instanceof AdempiereException) && ((AdempiereException)ex).isUserValidationError();
}
/**
* Fluent version of {@link #addSuppressed(Throwable)}
*/
pu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\exceptions\AdempiereException.java | 1 |
请完成以下Java代码 | public long getWaitTime() {
if (idleLevel > 0) {
return calculateIdleTime();
}
else if (backoffLevel > 0) {
return calculateBackoffTime();
}
else if (executionSaturated) {
return executionSaturationWaitTime;
}
else {
return 0;
}
}
protected long calculateIdle... | backoffTime = maxBackoffWaitTime;
}
else {
backoffTime = (long) (baseBackoffWaitTime * Math.pow(backoffIncreaseFactor, backoffLevel - 1));
}
if (applyJitter) {
// add a bounded random jitter to avoid multiple job acquisitions getting exactly the same
// polling interval
backoffT... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\BackoffJobAcquisitionStrategy.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.