instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class PricingConditionsResult
{
public static final PricingConditionsResult ZERO = builder().build();
Percent discount;
PaymentTermId paymentTermId;
CurrencyId currencyId;
BigDecimal priceListOverride;
BigDecimal priceStdOverride;
BigDecimal priceLimitOverride;
PricingConditionsId pricingConditionsId;... | this.currencyId = currencyId;
this.priceListOverride = priceListOverride;
this.priceStdOverride = priceStdOverride;
this.priceLimitOverride = priceLimitOverride;
this.pricingConditionsBreak = pricingConditionsBreak;
this.pricingConditionsId = extractPricingConditionsId(pricingConditionsId, pricingConditionsB... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\service\PricingConditionsResult.java | 2 |
请完成以下Java代码 | public class X509AuthenticationFilter extends AbstractPreAuthenticatedProcessingFilter {
private X509PrincipalExtractor principalExtractor = new SubjectX500PrincipalExtractor();
@Override
protected @Nullable Object getPreAuthenticatedPrincipal(HttpServletRequest request) {
X509Certificate cert = extractClientCer... | private @Nullable X509Certificate extractClientCertificate(HttpServletRequest request) {
X509Certificate[] certs = (X509Certificate[]) request.getAttribute("jakarta.servlet.request.X509Certificate");
if (certs != null && certs.length > 0) {
this.logger.debug(LogMessage.format("X.509 client authentication certifi... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\x509\X509AuthenticationFilter.java | 1 |
请完成以下Java代码 | public String getRel() {
return this.rel;
}
public void setRel(String rel) {
this.rel = rel;
}
public boolean isTemplated() {
return this.templated;
}
public void setTemplated(boolean templated) {
this.templated = templated;
}
public String getDescription() {
return this.description;
}
public v... | while (matcher.find()) {
String variable = matcher.group(1);
this.templateVariables.add(variable);
}
this.templated = !this.templateVariables.isEmpty();
}
/**
* Expand the link using the specified parameters.
* @param parameters the parameters value
* @return an URI where all variables have been expa... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\Link.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Budget.
@param GL_Budget_ID
... | }
/** Get Primary.
@return Indicates if this is the primary budget
*/
public boolean isPrimary ()
{
Object oo = get_Value(COLUMNNAME_IsPrimary);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_Budget.java | 1 |
请完成以下Java代码 | public void setDefaultFlow(String defaultFlow) {
this.defaultFlow = defaultFlow;
}
public MultiInstanceLoopCharacteristics getLoopCharacteristics() {
return loopCharacteristics;
}
public void setLoopCharacteristics(MultiInstanceLoopCharacteristics loopCharacteristics) {
this.lo... | }
public void setMapExceptions(List<MapExceptionEntry> mapExceptions) {
this.mapExceptions = mapExceptions;
}
public void setValues(Activity otherActivity) {
super.setValues(otherActivity);
setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue());
se... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\Activity.java | 1 |
请完成以下Java代码 | public boolean containsKey (final IValidationContext evalCtx, final Object key)
{
return getLocation(key, ITrx.TRXNAME_None) != null;
} // containsKey
/**************************************************************************
* Get Location
* @param key ID as string or integer
* @param trxName trans... | return I_C_Location.Table_Name;
}
@Override
public String getColumnName()
{
return I_C_Location.Table_Name + "." + I_C_Location.COLUMNNAME_C_Location_ID;
} // getColumnName
@Override
public String getColumnNameNotFQ()
{
return I_C_Location.COLUMNNAME_C_Location_ID;
}
/**
* Return data as sorted Ar... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MLocationLookup.java | 1 |
请完成以下Java代码 | public Builder setInvalid(final String invalidReason)
{
Check.assumeNotEmpty(invalidReason, "invalidReason is not empty");
this.invalidReason = invalidReason;
logger.trace("Layout section was marked as invalid: {}", this);
return this;
}
public Builder setClosableMode(@NonNull final ClosableMode clos... | {
return invalidReason != null;
}
public boolean isNotEmpty()
{
return streamElementBuilders().findAny().isPresent();
}
private Stream<DocumentLayoutElementDescriptor.Builder> streamElementBuilders()
{
return columnsBuilders.stream().flatMap(DocumentLayoutColumnDescriptor.Builder::streamElementBu... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSectionDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public at.erpel.schemas._1p0.documents.extensions.edifact.DocumentExtensionType getDocumentExtension() {
return documentExtension;
}
/**
* Sets the value of the documentExtension property.
*
* @param value
* allowed object is
* {@link at.erpel.schemas._1p0.documents.ex... | * possible object is
* {@link ErpelDocumentExtensionType }
*
*/
public ErpelDocumentExtensionType getErpelDocumentExtension() {
return erpelDocumentExtension;
}
/**
* Sets the value of the erpelDocumentExtension property.
*
* @param value
* allow... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\DocumentExtensionType.java | 2 |
请完成以下Java代码 | public class IPOnlineUtil {
private static RestTemplate restTemplate;
private final RestTemplate template;
public static final String IP_API_URL = "http://ip-api.com/json/";
public IPOnlineUtil(RestTemplate restTemplate) {
this.template = restTemplate;
}
/**
* init RestTemplate
... | * get country by ip
*
* @param ip
* @return
*/
public static CountryInfo getCountryByIpOnline(String ip) {
ResponseEntity<CountryInfo> entity = restTemplate.getForEntity(
IP_API_URL + ip + "?lang=zh-CN",
CountryInfo.class
);
return entity.g... | repos\springboot-demo-master\ipfilter\src\main\java\com\et\ipfilter\util\IPOnlineUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getResourceType() {
return this.resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public @Nullable Map<String, String> getResourceLabels() {
return this.resourceLabels;
}
public void setResourceLabels(@Nullable Map<String, String> resourc... | public String getMetricTypePrefix() {
return this.metricTypePrefix;
}
public void setMetricTypePrefix(String metricTypePrefix) {
this.metricTypePrefix = metricTypePrefix;
}
public boolean isAutoCreateMetricDescriptors() {
return this.autoCreateMetricDescriptors;
}
public void setAutoCreateMetricDescripto... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\stackdriver\StackdriverProperties.java | 2 |
请完成以下Java代码 | final class ThreadLocalLoggableHolder
{
/**
* Temporary set the current thread level loggable to given one.
* The method is designed to be used in try-with-resources block, so the previous thread level loggable will be restored when the returned closeable will be closed.
*/
/* package */ IAutoCloseable temporar... | @Nullable
/* package */ ILoggable getLoggableOr(@Nullable final ILoggable defaultLoggable)
{
final ILoggable loggable = loggableRef.get();
return loggable != null ? loggable : defaultLoggable;
}
/**
* Holds the {@link ILoggable} instance of current thread
*/
public static final ThreadLocalLoggableHolder i... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\ThreadLocalLoggableHolder.java | 1 |
请完成以下Java代码 | public IAttributeValueCallout getAttributeValueCallout(final I_M_Attribute attribute)
{
throw new AttributeNotFoundException(attribute, this);
}
@Override
public void onChildAttributeStorageAdded(final IAttributeStorage childAttributeStorage)
{
throw new HUException("Null storage cannot have children");
}
... | return "NullAttributeStorage []";
}
@Override
public BigDecimal getStorageQtyOrZERO()
{
// no storage quantity available; assume ZERO
return BigDecimal.ZERO;
}
/**
* @return <code>false</code>.
*/
@Override
public boolean isVirtual()
{
return false;
}
@Override
public boolean isNew(final I_M_At... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\NullAttributeStorage.java | 1 |
请完成以下Java代码 | public long executeCount(CommandContext commandContext) {
return CommandContextUtil.getUserEntityManager(commandContext).findUserCountByQueryCriteria(this);
}
@Override
public List<User> executeList(CommandContext commandContext) {
return CommandContextUtil.getUserEntityManager(commandConte... | return groupId;
}
public List<String> getGroupIds() {
return groupIds;
}
public String getFullNameLike() {
return fullNameLike;
}
public String getFullNameLikeIgnoreCase() {
return fullNameLikeIgnoreCase;
}
public String getDisplayName() {
return displ... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\UserQueryImpl.java | 1 |
请完成以下Java代码 | public void onUserLogin(int AD_Org_ID, int AD_Role_ID, int AD_User_ID)
{
if (!isAvailable())
{
return;
}
// Don't start the printing client for System Administrators because we will clutter our migration scripts
if (AD_Role_ID == Env.CTXVALUE_AD_Role_ID_System)
{
return;
}
try
{
//
// G... | printingClient.start();
}
}
}
catch (Throwable t)
{
clientStartupIssue = t;
logger.warn(t.getLocalizedMessage(), t);
Services.get(IClientUI.class).error(Env.WINDOW_MAIN, "Printing client not available", t.getLocalizedMessage());
}
}
@Override
public void beforeLogout(final MFSession session... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\model\validator\SwingPrintingClientValidator.java | 1 |
请完成以下Java代码 | public Stream<? extends IViewRow> streamByIds(final DocumentIdsSelection rowIds)
{
return rows.streamTopLevelRowsByIds(rowIds);
}
public List<PurchaseRow> getRows()
{
return rows.getAll();
}
@Override
public void notifyRecordsChanged(
@NonNull final TableRecordReferenceSet recordRefs,
final boolean w... | // notify the frontend
final DocumentId groupRowDocumentId = idOfChangedRow.toGroupRowId().toDocumentId();
ViewChangesCollector
.getCurrentOrAutoflush()
.collectRowChanged(this, groupRowDocumentId);
}
@Override
public List<RelatedProcessDescriptor> getAdditionalRelatedProcessDescriptors()
{
return a... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\purchasePlanning\view\PurchaseView.java | 1 |
请完成以下Java代码 | public class SaveProcessDefinitionInfoCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected String processDefinitionId;
protected ObjectNode infoNode;
public SaveProcessDefinitionInfoCmd(String processDefinitionId, ObjectNode infoNode) {
this.... | ProcessDefinitionInfoEntity definitionInfoEntity =
definitionInfoEntityManager.findProcessDefinitionInfoByProcessDefinitionId(processDefinitionId);
if (definitionInfoEntity == null) {
definitionInfoEntity = definitionInfoEntityManager.create();
definitionInfoEntity.setProcess... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\SaveProcessDefinitionInfoCmd.java | 1 |
请完成以下Java代码 | public String getCategory() {
return category;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public String getName() {
return name;
}
@Override
public String getKey() {
return key;
}
@Override
public S... | public void setVersion(int version) {
this.version = version;
}
@Override
public void setKey(String key) {
this.key = key;
}
@Override
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
@Override
public void setDeployment... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\persistence\entity\AppDefinitionEntityImpl.java | 1 |
请完成以下Java代码 | public String getPrefix() {
return "spring.rabbit.stream.listener";
}
@Override
public KeyName[] getLowCardinalityKeyNames() {
return ListenerLowCardinalityTags.values();
}
};
/**
* Low cardinality tags.
*/
public enum ListenerLowCardinalityTags implements KeyName {
/**
* Listener id.
*... | */
public static class DefaultRabbitStreamListenerObservationConvention
implements RabbitStreamListenerObservationConvention {
/**
* A singleton instance of the convention.
*/
public static final DefaultRabbitStreamListenerObservationConvention INSTANCE =
new DefaultRabbitStreamListenerObservationCon... | repos\spring-amqp-main\spring-rabbit-stream\src\main\java\org\springframework\rabbit\stream\micrometer\RabbitStreamListenerObservation.java | 1 |
请完成以下Java代码 | public DecisionRequirementsDefinitionResource getDecisionRequirementsDefinitionByKey(String decisionRequirementsDefinitionKey) {
DecisionRequirementsDefinition decisionRequirementsDefinition = getProcessEngine().getRepositoryService()
.createDecisionRequirementsDefinitionQuery()
.decisionRequirementsDef... | public DecisionRequirementsDefinitionResource getDecisionRequirementsDefinitionByKeyAndTenantId(String decisionRequirementsDefinitionKey, String tenantId) {
DecisionRequirementsDefinition decisionRequirementsDefinition = getProcessEngine().getRepositoryService()
.createDecisionRequirementsDefinitionQuery()
... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\DecisionRequirementsDefinitionRestServiceImpl.java | 1 |
请完成以下Java代码 | public Date resolveDuedate(String duedate, int maxIterations) {
try {
DurationHelper dh = new DurationHelper(duedate, clockReader);
return dh.getDateAfter();
} catch (Exception e) {
throw new FlowableException("couldn't resolve duedate: " + e.getMessage(), e);
... | //
// protected Date addSingleUnitQuantity(Date startDate, String
// singleUnitQuantity) {
// int spaceIndex = singleUnitQuantity.indexOf(' ');
// if (spaceIndex==-1 || singleUnitQuantity.length() > spaceIndex+1) {
// throw new
// ActivitiException("invalid duedate format: "+singleUnitQuantity);... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\calendar\DurationBusinessCalendar.java | 1 |
请完成以下Java代码 | protected ExecutionEntity intersect(Set<ExecutionEntity> executions, String[] executionIds) {
Set<String> executionIdSet = new HashSet<String>();
for (String executionId : executionIds) {
executionIdSet.add(executionId);
}
for (ExecutionEntity execution : executions) {
if (executionIdSet.co... | }
return executions;
}
protected List<ExecutionEntity> findLeaves(List<ExecutionEntity> executions) {
List<ExecutionEntity> leaves = new ArrayList<ExecutionEntity>();
for (ExecutionEntity execution : executions) {
if (isLeaf(execution)) {
leaves.add(execution);
}
}
return... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ActivityExecutionTreeMapping.java | 1 |
请完成以下Java代码 | public void setQtyOrdered (BigDecimal QtyOrdered)
{
set_Value (COLUMNNAME_QtyOrdered, QtyOrdered);
}
/** Get Bestellte Menge.
@return Bestellte Menge
*/
public BigDecimal getQtyOrdered ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered);
if (bd == null)
return Env.ZERO;
return bd;
... | else
set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID));
}
/** Get Referenced Order Line.
@return Reference to corresponding Sales/Purchase Order
*/
public int getRef_OrderLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Ref_OrderLine_ID);
if (ii == null)
return 0;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_C_OrderLine_Overview.java | 1 |
请完成以下Java代码 | public String getProperty(final String name, final String defaultValue)
{
final String value = getProperty(name);
if (value == null)
{
return defaultValue;
}
return value;
}
public int getPropertyAsInt(final String name, final int defaultValue)
{
final Object value = get(name);
if (value == null)... | }
}
public <T> T get(final String name)
{
if (props.containsKey(name))
{
@SuppressWarnings("unchecked")
final T value = (T)props.get(name);
return value;
}
// Check other sources
for (final IContext source : sources)
{
final String valueStr = source.getProperty(name);
if (valueStr != nul... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\Context.java | 1 |
请完成以下Java代码 | public MutableAcl getFromCache(ObjectIdentity objectIdentity) {
Assert.notNull(objectIdentity, "ObjectIdentity required");
return getFromCache((Object) objectIdentity);
}
@Override
public MutableAcl getFromCache(Serializable pk) {
Assert.notNull(pk, "Primary key (identifier) required");
return getFromCache(... | private MutableAcl initializeTransientFields(MutableAcl value) {
if (value instanceof AclImpl) {
FieldUtils.setProtectedFieldValue("aclAuthorizationStrategy", value, this.aclAuthorizationStrategy);
FieldUtils.setProtectedFieldValue("permissionGrantingStrategy", value, this.permissionGrantingStrategy);
}
if ... | repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\domain\SpringCacheBasedAclCache.java | 1 |
请完成以下Java代码 | public class InfoProductSubstitute implements IInfoProductDetail
{
private final Logger log = LogManager.getLogger(getClass());
private IMiniTable substituteTbl = null;
private String m_sqlSubstitute;
public InfoProductSubstitute()
{
initUI();
init();
}
private void initUI()
{
MiniTable table = new Min... | pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, M_Product_ID);
pstmt.setInt(2, M_PriceList_Version_ID);
rs = pstmt.executeQuery();
substituteTbl.loadTable(rs);
rs.close();
}
catch (Exception e)
{
log.warn(sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoProductSubstitute.java | 1 |
请完成以下Java代码 | public BPartnerLocation newLocation(@NonNull final ExternalIdentifier locationIdentifier)
{
final BPartnerLocationBuilder locationBuilder = BPartnerLocation.builder();
final BPartnerLocation location;
switch (locationIdentifier.getType())
{
case METASFRESH_ID:
throw new AdempiereException("No inserts a... | {
return id2UnusedLocation.values();
}
public void resetBillToDefaultFlags()
{
for (final BPartnerLocation bpartnerLocation : getUnusedLocations())
{
bpartnerLocation.getLocationType().setBillToDefault(false);
}
}
public void resetShipToDefaultFlags()
{
for (final BPartnerLocation bpartnerLocation ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\bpartner\bpartnercomposite\jsonpersister\ShortTermLocationIndex.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Adempiere adempiere(final WebRestApiContextProvider webuiContextProvider)
{
Env.setContextProvider(webuiContextProvider);
AdempiereException.enableCaptureLanguageOnConstructionTime(); // because usually at the time the message is (lazy) parsed the user session context is no longer available.
InterfaceWr... | });
}
@Bean(ConfigConstants.BEANNAME_WebuiTaskScheduler)
public TaskScheduler webuiTaskScheduler()
{
final ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.setThreadNamePrefix("webui-task-scheduler-");
taskScheduler.setDaemon(true);
taskScheduler.setPoolSize(10);
retur... | repos\metasfresh-new_dawn_uat\backend\metasfresh-webui-api\src\main\java\de\metas\ui\web\WebRestApiApplication.java | 2 |
请完成以下Java代码 | public Set<String> getRequestedScopes() {
Set<String> requestedScopes = getAuthorization().getAttribute(OAuth2ParameterNames.SCOPE);
return (requestedScopes != null) ? requestedScopes : Collections.emptySet();
}
/**
* Constructs a new {@link Builder} with the provided
* {@link OAuth2DeviceVerificationAuthent... | }
/**
* Sets the {@link OAuth2AuthorizationConsent authorization consent}.
* @param authorizationConsent the {@link OAuth2AuthorizationConsent}
* @return the {@link Builder} for further configuration
*/
public Builder authorizationConsent(OAuth2AuthorizationConsent authorizationConsent) {
return put... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2DeviceVerificationAuthenticationContext.java | 1 |
请完成以下Java代码 | private I_C_BP_PurchaseSchedule createOrUpdateRecord(@NonNull final BPPurchaseSchedule schedule)
{
final I_C_BP_PurchaseSchedule scheduleRecord;
if (schedule.getBpPurchaseScheduleId() != null)
{
final int repoId = schedule.getBpPurchaseScheduleId().getRepoId();
scheduleRecord = load(repoId, I_C_BP_Purchase... | if (daysOfWeek.contains(DayOfWeek.TUESDAY))
{
scheduleRecord.setOnTuesday(true);
}
if (daysOfWeek.contains(DayOfWeek.WEDNESDAY))
{
scheduleRecord.setOnWednesday(true);
}
if (daysOfWeek.contains(DayOfWeek.THURSDAY))
{
scheduleRecord.setOnThursday(true);
}
if (daysOfWeek.contains(DayOfWeek.FRID... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\BPPurchaseScheduleRepository.java | 1 |
请完成以下Java代码 | public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
initStartTimeAsDate();
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
initEndTimeAsDate();... | @Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
BatchWindowConfiguration that = (BatchWindowConfiguration) o;
if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null)
retur... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\BatchWindowConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SSLEngine createClientSslEngine(String peerHost, int peerPort, String endpointIdentification) {
SslBundle sslBundle = this.sslBundle;
Assert.state(sslBundle != null, "'sslBundle' must not be null");
SSLEngine sslEngine = sslBundle.createSslContext().createSSLEngine(peerHost, peerPort);
sslEngine.setUseCl... | @Override
public Set<String> reconfigurableConfigs() {
return Set.of(SSL_BUNDLE_CONFIG_NAME);
}
@Override
public @Nullable KeyStore keystore() {
SslBundle sslBundle = this.sslBundle;
Assert.state(sslBundle != null, "'sslBundle' must not be null");
return sslBundle.getStores().getKeyStore();
}
@Override
... | repos\spring-boot-4.0.1\module\spring-boot-kafka\src\main\java\org\springframework\boot\kafka\autoconfigure\SslBundleSslEngineFactory.java | 2 |
请完成以下Java代码 | public BigDecimal calculateBaseAmt(@NonNull final BigDecimal amount, final boolean taxIncluded, final int scale)
{
try (final MDC.MDCCloseable ignored = TableRecordMDC.putTableRecordReference(I_C_Tax.Table_Name, taxId))
{
if (isWholeTax)
{
log.debug("C_Tax has isWholeTax=true; -> return ZERO");
retur... | }
else if (isReverseCharge)
{
Check.assume(!taxIncluded, "TaxIncluded shall NOT be set when IsReverseCharge is set");
taxAmt = BigDecimal.ZERO;
reverseChargeAmt = amount.multiply(multiplier);
}
else if (!taxIncluded) // $100 * 6 / 100 == $6 == $100 * 0.06
{
taxAmt = amount.multiply(multiplier);... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\Tax.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTaskCandidateGroup() {
return taskCandidateGroup;
}
public void setTaskCandidateGroup(String taskCandidateGroup) {
this.taskCandidateGroup = taskCandidateGroup;
}
public boolean isIgnoreTaskAssignee() {
return ignoreTaskAssignee;
}
public void setIgnor... | this.rootScopeId = rootScopeId;
}
public String getParentScopeId() {
return parentScopeId;
}
public void setParentScopeId(String parentScopeId) {
this.parentScopeId = parentScopeId;
}
public Set<String> getScopeIds() {
return scopeIds;
}
public void setScopeId... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskInstanceQueryRequest.java | 2 |
请完成以下Java代码 | private Mono<FindArticlesRequest> createFindArticleRequest(String tag, String author, String favoritedByUser, int offset, int limit) {
var request = new FindArticlesRequest()
.setOffset(offset)
.setLimit(limit)
.setTag(tag);
return addToRequestAuthorId(aut... | private Mono<String> getAuthorId(String author) {
if (author == null) {
return Mono.empty();
}
return userRepository.findByUsername(author).map(User::getId);
}
private Mono<User> getFavoritedBy(String favoritedBy) {
if (favoritedBy == null) {
return Mono.... | repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\article\ArticlesFinder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DTRSD1 getDTRSD1() {
return dtrsd1;
}
/**
* Sets the value of the dtrsd1 property.
*
* @param value
* allowed object is
* {@link DTRSD1 }
*
*/
public void setDTRSD1(DTRSD1 value) {
this.dtrsd1 = value;
}
/**
* Gets the va... | /**
* Gets the value of the dqvar1 property.
*
* @return
* possible object is
* {@link DQVAR1 }
*
*/
public DQVAR1 getDQVAR1() {
return dqvar1;
}
/**
* Sets the value of the dqvar1 property.
*
* @param value
* allowed object ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DETAILXlief.java | 2 |
请完成以下Java代码 | public void windowClosing(WindowEvent e)
{
findPanel.doCancel();
}
});
AEnv.showCenterWindow(builder.getParentFrame(), this);
} // Find
@Override
public void dispose()
{
findPanel.dispose();
removeAll();
super.dispose();
} // dispose | /**************************************************************************
* Get Query - Retrieve result
*
* @return String representation of query
*/
public MQuery getQuery()
{
return findPanel.getQuery();
} // getQuery
/**
* @return true if cancel button pressed
*/
public boolean isCancel()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\Find.java | 1 |
请完成以下Java代码 | public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
public Customer(Integer id, String name, Long phone, String locali... | int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
... | repos\tutorials-master\libraries-apache-commons-collections\src\main\java\com\baeldung\commons\collections\collectionutils\Customer.java | 1 |
请完成以下Java代码 | public class WEBUI_Picking_ForcePickToExistingHU extends WEBUI_Picking_PickQtyToExistingHU
implements IProcessPrecondition
{
@Override
protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
final Optional<ProcessPreconditionsResolution> preconditionsResolution = checkValidSelection();
if (p... | return ProcessPreconditionsResolution.accept();
}
protected String doIt() throws Exception
{
validatePickingToHU();
forcePick(getQtyToPack(), getPackToHuId());
invalidateView();
invalidateParentView();
return MSG_OK;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_ForcePickToExistingHU.java | 1 |
请完成以下Java代码 | public boolean containsKey(Object key) {
return outputValues.containsKey(key);
}
@Override
public Set<String> keySet() {
return outputValues.keySet();
}
@Override
public Collection<Object> values() {
List<Object> values = new ArrayList<Object>();
for (TypedValue typedValue : outputValues.... | throw new UnsupportedOperationException("decision output is immutable");
}
@Override
public void clear() {
throw new UnsupportedOperationException("decision output is immutable");
}
@Override
public Set<Entry<String, Object>> entrySet() {
Set<Entry<String, Object>> entrySet = new HashSet<Entry<Str... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionResultEntriesImpl.java | 1 |
请完成以下Java代码 | public void deleteTenants() {
log.trace("Executing deleteTenants");
tenantsRemover.removeEntities(TenantId.SYS_TENANT_ID, TenantId.SYS_TENANT_ID);
}
@Override
public PageData<TenantId> findTenantsIds(PageLink pageLink) {
log.trace("Executing findTenantsIds");
Validator.valid... | };
@Override
public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findTenantById(TenantId.fromUUID(entityId.getId())));
}
@Override
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) {
ret... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\tenant\TenantServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ConfigDataLocationNotFoundException extends ConfigDataNotFoundException {
private final ConfigDataLocation location;
/**
* Create a new {@link ConfigDataLocationNotFoundException} instance.
* @param location the location that could not be found
*/
public ConfigDataLocationNotFoundException(Confi... | */
public ConfigDataLocation getLocation() {
return this.location;
}
@Override
public @Nullable Origin getOrigin() {
return Origin.from(this.location);
}
@Override
public String getReferenceDescription() {
return getReferenceDescription(this.location);
}
private static String getMessage(ConfigDataLoca... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataLocationNotFoundException.java | 2 |
请完成以下Java代码 | public Set<String> getMetrics() {
return metrics;
}
@CamundaQueryParam(value = "subscriptionStartDate", converter = DateConverter.class)
public void setSubscriptionStartDate(Date subscriptionStartDate) {
this.subscriptionStartDate = subscriptionStartDate;
if (subscriptionStartDate != null) {
/... | public void validateAndPrepareQuery() {
if (subscriptionStartDate == null || !subscriptionStartDate.before(ClockUtil.now())) {
throw new InvalidRequestException(Response.Status.BAD_REQUEST,
"subscriptionStartDate parameter has invalid value: " + subscriptionStartDate);
}
if (startDate != nul... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\admin\impl\plugin\base\dto\MetricsAggregatedQueryDto.java | 1 |
请完成以下Java代码 | public void setManualActual (BigDecimal ManualActual)
{
set_Value (COLUMNNAME_ManualActual, ManualActual);
}
/** Get Manual Actual.
@return Manually entered actual value
*/
public BigDecimal getManualActual ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ManualActual);
if (bd == null)
return... | public int getPA_Achievement_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PA_Achievement_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_PA_Measure getPA_Measure() throws RuntimeException
{
return (I_PA_Measure)MTable.get(getCtx(), I_PA_Measure.Table_Name)
.getPO(getPA_Meas... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Achievement.java | 1 |
请完成以下Java代码 | public PartyIdentification32CHNameAndId getInitgPty() {
return initgPty;
}
/**
* Sets the value of the initgPty property.
*
* @param value
* allowed object is
* {@link PartyIdentification32CHNameAndId }
*
*/
public void setInitgPty(PartyIdentificatio... | * possible object is
* {@link BranchAndFinancialInstitutionIdentification4 }
*
*/
public BranchAndFinancialInstitutionIdentification4 getFwdgAgt() {
return fwdgAgt;
}
/**
* Sets the value of the fwdgAgt property.
*
* @param value
* allowed object... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\GroupHeader32CH.java | 1 |
请完成以下Java代码 | public void checkPath(TreePath path) {
this.model.checkSubTree(path);
this.model.updatePathGreyness(path);
this.model.updateAncestorsGreyness(path);
}
@Override
public void uncheckPath(TreePath path) {
this.model.uncheckSubTree(path);
this.model.updatePathGreyness(path);
this.model.updateAncestorsGre... | this.model.updatePathGreyness(parent);
this.model.updateAncestorsGreyness(parent);
}
/*
* (non-Javadoc)
*
* @see it.cnr.imaa.essi.lablib.gui.checkboxtree.TreeCheckingMode#updateCheckAfterStructureChanged(javax.swing.tree.TreePath)
*/
@Override
public void updateChe... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\it\cnr\imaa\essi\lablib\gui\checkboxtree\PropagateTreeCheckingMode.java | 1 |
请完成以下Java代码 | void changeBio(String bio) {
profile.changeBio(bio);
}
void changeImage(Image image) {
profile.changeImage(image);
}
public Long getId() {
return id;
}
public Email getEmail() {
return email;
}
public UserName getName() {
return profile.getUser... | return profile.getBio();
}
Image getImage() {
return profile.getImage();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
final var user = (User) o;
return email.equals(user.... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\User.java | 1 |
请完成以下Java代码 | public static CacheInvalidateMultiRequest fromTableNameAndRecordId(final String tableName, final int recordId)
{
if (tableName == null)
{
return all();
}
else if (recordId < 0)
{
return allRecordsForTable(tableName);
}
else
{
return rootRecord(tableName, recordId);
}
}
public static Cache... | public String toString()
{
final int requestsCount = requests.size();
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("requestsCount", requestsCount)
.add("requests", requestsCount > 0 ? requests : null)
.toString();
}
public boolean isResetAll()
{
return requests.stream().anyM... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\CacheInvalidateMultiRequest.java | 1 |
请完成以下Java代码 | private void fireLocalAndRemoteListenersAfterTrxCommit(final @NonNull SumUpTransactionStatusChangedEvent event)
{
trxManager.accumulateAndProcessAfterCommit(
SumUpEventsDispatcher.class.getSimpleName(),
ImmutableList.of(event),
this::fireLocalAndRemoteListenersNow);
}
private void fireLocalAndRemoteLi... | public void fireStatusChangedIfNeeded(
@NonNull final SumUpTransaction trx,
@NonNull final SumUpTransaction trxPrev)
{
if (!isForceSendingChangeEvents() && hasChanges(trx, trxPrev))
{
return;
}
fireLocalAndRemoteListenersAfterTrxCommit(SumUpTransactionStatusChangedEvent.ofChangedTransaction(trx, trxP... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\SumUpEventsDispatcher.java | 1 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Suchschluessel.
@param Value
Suchschluessel fuer den Eintrag im erforderlichen Format - muss eindeutig sein
*/
public void setValue (String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** G... | return (String)get_Value(COLUMNNAME_Value);
}
/** Set Breite.
@param Width Breite */
public void setWidth (BigDecimal Width)
{
set_Value (COLUMNNAME_Width, Width);
}
/** Get Breite.
@return Breite */
public BigDecimal getWidth ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Width);
if (bd... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_M_PackagingContainer.java | 1 |
请完成以下Java代码 | public void setSubject (String Subject)
{
set_Value (COLUMNNAME_Subject, Subject);
}
/** Get Subject.
@return Email Message Subject
*/
public String getSubject ()
{
return (String)get_Value(COLUMNNAME_Subject);
}
public I_W_MailMsg getW_MailMsg() throws RuntimeException
{
return (I_W_MailMsg)MT... | public void setW_MailMsg_ID (int W_MailMsg_ID)
{
if (W_MailMsg_ID < 1)
set_ValueNoCheck (COLUMNNAME_W_MailMsg_ID, null);
else
set_ValueNoCheck (COLUMNNAME_W_MailMsg_ID, Integer.valueOf(W_MailMsg_ID));
}
/** Get Mail Message.
@return Web Store Mail Message Template
*/
public int getW_MailMsg_ID () ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserMail.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ApiResponse<ArticleMapping> updateInsuranceContractWithHttpInfo(String albertaApiKey, String tenant, String id, Article body) throws ApiException {
com.squareup.okhttp.Call call = updateInsuranceContractValidateBeforeCall(albertaApiKey, tenant, id, body, null, null);
Type localVarReturnType = new... | @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-article-api\src\main\java\io\swagger\client\api\DefaultApi.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class HardwarePrinterId implements RepoIdAware
{
@JsonCreator
public static HardwarePrinterId ofRepoId(final int repoId)
{
return new HardwarePrinterId(repoId);
}
public static HardwarePrinterId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new HardwarePrinterId(repoId) : null;
}
public st... | return hardwarePrinterId != null ? hardwarePrinterId.getRepoId() : -1;
}
int repoId;
private HardwarePrinterId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "AD_PrinterHW_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\HardwarePrinterId.java | 2 |
请完成以下Java代码 | public class HistoricProcessInstanceQueryProperty implements QueryProperty {
private static final long serialVersionUID = 1L;
private static final Map<String, HistoricProcessInstanceQueryProperty> properties = new HashMap<
String,
HistoricProcessInstanceQueryProperty
>();
public stati... | "RES.TENANT_ID_"
);
public static final HistoricProcessInstanceQueryProperty INCLUDED_VARIABLE_TIME =
new HistoricProcessInstanceQueryProperty("VAR.LAST_UPDATED_TIME_");
private String name;
public HistoricProcessInstanceQueryProperty(String name) {
this.name = name;
propertie... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricProcessInstanceQueryProperty.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_W_CounterCount[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_C_BPartner getC_BPartner() throws RuntimeException
{
return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name)
.getPO(getC_B... | @param Name
Alphanumeric identifier of the entity
*/
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
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_CounterCount.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SpringProcessEngineConfigurator extends ProcessEngineConfigurator {
@Override
public void configure(AbstractEngineConfiguration engineConfiguration) {
if (processEngineConfiguration == null) {
processEngineConfiguration = new SpringProcessEngineConfiguration();
}
... | springProcessEngineConfiguration.setBeans(springProcessEngineConfiguration.getBeans());
}
initEngine();
initServiceConfigurations(engineConfiguration, processEngineConfiguration);
}
@Override
public SpringProcessEngineConfiguration getProcessEngineConfiguration() {
return ... | repos\flowable-engine-main\modules\flowable-spring-configurator\src\main\java\org\flowable\engine\spring\configurator\SpringProcessEngineConfigurator.java | 2 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context)
{
if (context.isNoSelection())
{
return ProcessPreconditionsResolution.rejectWithInternalReason("No Selection");
}
return ProcessPreconditionsResolution.accept();
}
@Override
protecte... | .stream()
.filter(p -> !p.isAllocated() && DocStatus.ofCode(p.getDocStatus()).isCompleted())
.collect(Collectors.toList());
paymentBL.setPaymentOrderAndInvoiceIdsAndAllocateItIfNecessary(filteredPayments);
return MSG_OK;
}
private List<I_C_Payment> getSelectedPayments()
{
return retrieveSelectedReco... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\process\C_Payment_UpdateOrderAndInvoiceId.java | 1 |
请完成以下Java代码 | public class MovementDAO implements IMovementDAO
{
final private IQueryBL queryBL = Services.get(IQueryBL.class);
@Override
public I_M_MovementLine getLineById(@NonNull final MovementLineId movementLineId)
{
return load(movementLineId, I_M_MovementLine.class);
}
@Override
public List<I_M_MovementLine> retri... | @Override
public List<I_M_Movement> retrieveMovementsForDDOrder(final int ddOrderId)
{
return queryBL.createQueryBuilder(I_M_Movement.class)
.addEqualsFilter(I_M_Movement.COLUMN_DD_Order_ID, ddOrderId)
.create()
.list();
}
@Override
public void save(@NonNull final I_M_Movement movement)
{
saveRec... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mmovement\api\impl\MovementDAO.java | 1 |
请完成以下Java代码 | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getCurrentDevice() {
return currentDevice;
}
public void setCurrentDevice(String currentDevice) {
this.currentDevice = currentD... | .add("password='" + password + "'")
.add("currentDevice='" + currentDevice + "'")
.toString();
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof User))
return false;
User user = (User) o;
... | repos\tutorials-master\persistence-modules\java-jpa-3\src\main\java\com\baeldung\ignorable\fields\User.java | 1 |
请完成以下Java代码 | public class WordCountRoute extends RouteBuilder {
public static final String receiveTextUri = "seda:receiveText?concurrentConsumers=5";
public static final String splitWordsUri = "seda:splitWords?concurrentConsumers=5";
public static final String toLowerCaseUri = "seda:toLowerCase?concurrentConsumers=5";
... | .transform(ExpressionBuilder.bodyExpression(body -> body.toString()
.toLowerCase()))
.end()
.to(countWordsUri);
from(countWordsUri).transform(ExpressionBuilder.bodyExpression(List.class, body -> body.stream()
.collect(Collectors.groupingBy(Function.identity(), Collec... | repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\seda\apachecamel\WordCountRoute.java | 1 |
请完成以下Java代码 | private ContextPath newChild(@NonNull final ContextPathElement element)
{
return new ContextPath(ImmutableList.<ContextPathElement>builder()
.addAll(elements)
.add(element)
.build());
}
public AdWindowId getAdWindowId()
{
return AdWindowId.ofRepoId(elements.get(0).getId());
}
@Override
public i... | return new ContextPathElement(name, id);
}
else
{
return new ContextPathElement(json, -1);
}
}
catch (final Exception ex)
{
throw new AdempiereException("Failed parsing: " + json, ex);
}
}
public static ContextPathElement ofName(@NonNull final String name) {return new ContextPathElement(na... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ContextPath.java | 1 |
请完成以下Java代码 | public HistoricDetailQuery orderPartiallyByOccurrence() {
orderBy(HistoricDetailQueryProperty.SEQUENCE_COUNTER);
return this;
}
public HistoricDetailQuery orderByTenantId() {
return orderBy(HistoricDetailQueryProperty.TENANT_ID);
}
// getters and setters ///////////////////////////////////////////... | public boolean getExcludeTaskRelated() {
return excludeTaskRelated;
}
public String getDetailId() {
return detailId;
}
public String[] getProcessInstanceIds() {
return processInstanceIds;
}
public Date getOccurredBefore() {
return occurredBefore;
}
public Date getOccurredAfter() {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricDetailQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | CommandLineRunner seedUsersAndGroups(final IdmIdentityService identityService) {
return new CommandLineRunner() {
@Override
public void run(String... strings) throws Exception {
// install groups & users
Group adminGroup = identityService.newGroup("admin"... | identityService.createMembership("jbarrez", "user");
identityService.createMembership("jbarrez", "admin");
identityService.createMembership("filiphr", "user");
identityService.createMembership("jlong", "user");
}
};
}
public static void main(S... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-rest-api-security\src\main\java\flowable\Application.java | 2 |
请完成以下Java代码 | protected String doIt()
{
final Set<SumUpTransactionId> ids = getSelectedIdsAsSet();
if (ids.isEmpty())
{
throw new AdempiereException("@NoSelection@");
}
final BulkUpdateByQueryResult result = sumUpService.bulkUpdateTransactions(SumUpTransactionQuery.ofLocalIds(ids), true);
return result.getSummary().... | {
return ImmutableSet.of();
}
else if (selectedRowIds.isAll())
{
return getView().streamByIds(selectedRowIds)
.map(row -> row.getId().toId(SumUpTransactionId::ofRepoId))
.collect(ImmutableSet.toImmutableSet());
}
else
{
return selectedRowIds.toIds(SumUpTransactionId::ofRepoId);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup.webui\src\main\java\de\metas\payment\sumup\webui\process\SUMUP_Transaction_UpdateSelectedRows.java | 1 |
请完成以下Java代码 | public static class SqlServerTimelyExecutor implements InitializingBean, SmartLifecycle {
private final ExecutorService executor = ThreadPoolEnum.INSTANCE.getInstance();
private DebeziumEngine<?> debeziumEngine;
@Override
public void start() {
log.warn(ThreadPoolEnum.SQL_SER... | private final ExecutorService es;
/**
* 枚举 (构造器默认为私有)
*/
ThreadPoolEnum() {
final ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat(SQL_SERVER_LISTENER_POOL + "-%d").build();
es = new ThreadPoolExecutor(8, 16, 60,
... | repos\springboot-demo-master\debezium\src\main\java\com\et\debezium\config\ChangeEventConfig.java | 1 |
请完成以下Java代码 | public Map<RefundConfig, BigDecimal> retrieveAssignedQuantities(
@NonNull final InvoiceCandidateId invoiceCandidateId)
{
if (Adempiere.isUnitTestMode())
{
return retrieveAssignedQuantityUnitTestMode(invoiceCandidateId);
}
final IQueryBL queryBL = Services.get(IQueryBL.class);
final List<I_C_Invoice_C... | final IQueryBL queryBL = Services.get(IQueryBL.class);
final List<I_C_Invoice_Candidate_Assignment> assignmentRecords = queryBL
.createQueryBuilder(I_C_Invoice_Candidate_Assignment.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_C_Invoice_Candidate_Assignment.COLUMN_C_Invoice_Candidate_Term_ID, i... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\AssignmentAggregateService.java | 1 |
请完成以下Java代码 | public String home() {
return String.format("%s is running!",
environment.getProperty("spring.application.name", "UNKNOWN"));
}
public static class CustomerHolder {
public static CustomerHolder from(Customer customer) {
return new CustomerHolder(customer);
}
private boolean cacheMiss = true;
priv... | public CustomerHolder setCacheMiss(boolean cacheMiss) {
this.cacheMiss = cacheMiss;
return this;
}
public boolean isCacheMiss() {
return this.cacheMiss;
}
public Customer getCustomer() {
return customer;
}
}
}
// end::class[] | repos\spring-boot-data-geode-main\spring-geode-samples\caching\multi-site\src\main\java\example\app\caching\multisite\client\web\CustomerController.java | 1 |
请完成以下Java代码 | public String getProperty(String key)
{
return getDelegate().getProperty(key);
}
@Override
public String getProperty(String key, String defaultValue)
{
return getDelegate().getProperty(key, defaultValue);
}
@Override
public Enumeration<?> propertyNames()
{
return getDelegate().propertyNames();
} | @Override
public Set<String> stringPropertyNames()
{
return getDelegate().stringPropertyNames();
}
@Override
public void list(PrintStream out)
{
getDelegate().list(out);
}
@Override
public void list(PrintWriter out)
{
getDelegate().list(out);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\AbstractPropertiesProxy.java | 1 |
请完成以下Java代码 | public class OrderDropShipLocationAdapter
implements IDocumentDeliveryLocationAdapter, RecordBasedLocationAdapter<OrderDropShipLocationAdapter>
{
private final I_C_Order delegate;
OrderDropShipLocationAdapter(@NonNull final I_C_Order delegate)
{
this.delegate = delegate;
}
@Override
public int getDropShip_B... | delegate.setDeliveryToAddress(address);
}
@Override
public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentDeliveryLocationAdapter.super.setRenderedAddressAndCapturedLocation(from);
}
@Override
public void setRenderedAddress(final @NonNull Rendere... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\location\adapter\OrderDropShipLocationAdapter.java | 1 |
请完成以下Java代码 | public PPOrderQuantities reduce(@NonNull final OrderQtyChangeRequest request)
{
return toBuilder()
.qtyReceived(getQtyReceived().add(request.getQtyReceivedToAdd()))
.qtyScrapped(getQtyScrapped().add(request.getQtyScrappedToAdd()))
.qtyRejected(getQtyRejected().add(request.getQtyRejectedToAdd()))
.qty... | {
return toBuilder()
.qtyRequiredToProduce(converter.apply(getQtyRequiredToProduce()))
.qtyRequiredToProduceBeforeClose(converter.apply(getQtyRequiredToProduceBeforeClose()))
.qtyReceived(converter.apply(getQtyReceived()))
.qtyScrapped(converter.apply(getQtyScrapped()))
.qtyRejected(converter.appl... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\PPOrderQuantities.java | 1 |
请完成以下Java代码 | public void setRequeueOnRollback(boolean requeueOnRollback) {
this.requeueOnRollback = requeueOnRollback;
}
public final void addConnection(Connection connection) {
Assert.notNull(connection, "Connection must not be null");
if (!this.connections.contains(connection)) {
this.connections.add(connection);
}
... | if (channel != ConsumerChannelRegistry.getConsumerChannel()) { // NOSONAR
channel.close();
}
else {
if (logger.isDebugEnabled()) {
logger.debug("Skipping close of consumer channel: " + channel.toString());
}
}
}
catch (Exception ex) {
logger.debug("Could not close synchronized... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\RabbitResourceHolder.java | 1 |
请完成以下Java代码 | public void deleteInvoiceCandidates(@NonNull final I_C_Flatrate_Term term)
{
Services.get(IInvoiceCandDAO.class).deleteAllReferencingInvoiceCandidates(term);
}
/**
* Does nothing; Feel free to override.
*/
@Override
public void afterSaveOfNextTermForPredecessor(final I_C_Flatrate_Term next, final I_C_Flatra... | */
@Override
public void afterFlatrateTermEnded(final I_C_Flatrate_Term term)
{
// nothing
}
/**
* Does nothing; Feel free to override.
*/
@Override
public void beforeSaveOfNextTermForPredecessor(final I_C_Flatrate_Term next, final I_C_Flatrate_Term predecessor)
{
// nothing
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\spi\FallbackFlatrateTermEventListener.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
} | public String getYearPublished() {
return yearPublished;
}
public void setYearPublished(String yearPublished) {
this.yearPublished = yearPublished;
}
public float[] getEmbedding() {
return embedding;
}
public void setEmbedding(float[] embedding) {
this.embeddin... | repos\tutorials-master\persistence-modules\spring-data-vector\src\main\java\com\baeldung\springdata\pgvector\Book.java | 1 |
请完成以下Java代码 | private Map<String, Integer> getProdIdCountMap(OrderProcessContext orderProcessContext) {
OrderInsertReq orderInsertReq = (OrderInsertReq) orderProcessContext.getOrderProcessReq().getReqData();
return orderInsertReq.getProdIdCountMap();
}
/**
* 查询产品详情
* @param prodIdCountMap 产品ID-库存 ... | /**
* 构建产品查询请求
* @param prodIdCountMap 产品ID-库存 映射
* @return 产品查询请求列表
*/
private List<ProdQueryReq> buildProdQueryReq(Map<String, Integer> prodIdCountMap) {
List<ProdQueryReq> prodQueryReqList = Lists.newArrayList();
for (String prodId : prodIdCountMap.keySet()) {
Pro... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\component\datatransfer\ProdCountMapTransferComponent.java | 1 |
请完成以下Java代码 | public class StringBuilderBenchmark {
@Benchmark
public void testStringAdd() {
String a = "";
for (int i = 0; i < 10; i++) {
a += i;
}
print(a);
}
@Benchmark
public void testStringBuilderAdd() {
StringBuilder sb = new StringBuilder();
for... | }
print(sb.toString());
}
private void print(String a) {
}
public static void main(String[] args) throws RunnerException {
Options options = new OptionsBuilder()
.include(StringBuilderBenchmark.class.getSimpleName())
.output("E:/Benchmark.log")
... | repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\string\StringBuilderBenchmark.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<List<String>> loadDictItem(@RequestParam(name = "ids") String ids, @RequestParam(name = "delNotExist", required = false, defaultValue = "true") boolean delNotExist) {
Result<List<String>> result = new Result<>();
// 非空判断
if (StringUtils.isBlank(ids)) {
result.setSuccess(false);
result.set... | result.setSuccess(true);
result.setResult(rdList);
return result;
}
/**
* 根据父级id批量查询子节点
* @param parentIds
* @return
*/
@GetMapping("/getChildListBatch")
public Result getChildListBatch(@RequestParam("parentIds") String parentIds) {
try {
QueryWrapper<SysCategory> queryWrapper = new Qu... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysCategoryController.java | 2 |
请完成以下Java代码 | public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getPattern() {
return pattern;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public Integ... | }
@Override
public int hashCode() {
return Objects.hash(parseStrategy, fieldName, pattern, matchStrategy);
}
@Override
public String toString() {
return "GatewayParamFlowItemEntity{" +
"parseStrategy=" + parseStrategy +
", fieldName='" + fieldName + ... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\gateway\GatewayParamFlowItemEntity.java | 1 |
请完成以下Java代码 | public static OrgId ofRepoId(final int repoId)
{
final OrgId orgId = ofRepoIdOrNull(repoId);
if (orgId == null)
{
throw new AdempiereException("Invalid AD_Org_ID: " + repoId);
}
return orgId;
}
/**
* @return {@link #ANY} if the given {@code repoId} is zero; {@code null} if it is less than zero.
*/
... | public boolean isAny()
{
return repoId == Env.CTXVALUE_AD_Org_ID_Any;
}
/**
* @return {@code true} if the org in question is not {@code *} (i.e. "ANY"), but a specific organisation's ID
*/
public boolean isRegular()
{
return !isAny();
}
public void ifRegular(@NonNull final Consumer<OrgId> consumer)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\OrgId.java | 1 |
请完成以下Java代码 | public static AcctSchemaElementType ofCode(@NonNull final String code)
{
final AcctSchemaElementType type = ofCodeOrNull(code);
if (type == null)
{
throw new AdempiereException("No " + AcctSchemaElementType.class + " found for code: " + code);
}
return type;
}
public static AcctSchemaElementType ofCode... | public boolean isDeletable()
{
// Acct Schema Elements "Account" and "Org" should be mandatory - teo_sarca BF [ 1795817 ]
return this != Account && this != Organization;
}
public boolean isUserDefinedElements()
{
return this == AcctSchemaElementType.UserList1
|| this == AcctSchemaElementType.UserList2
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\AcctSchemaElementType.java | 1 |
请完成以下Java代码 | public class AuthenticatedVoter implements AccessDecisionVoter<Object> {
public static final String IS_AUTHENTICATED_FULLY = "IS_AUTHENTICATED_FULLY";
public static final String IS_AUTHENTICATED_REMEMBERED = "IS_AUTHENTICATED_REMEMBERED";
public static final String IS_AUTHENTICATED_ANONYMOUSLY = "IS_AUTHENTICATED... | if (isFullyAuthenticated(authentication)) {
return ACCESS_GRANTED;
}
}
if (IS_AUTHENTICATED_REMEMBERED.equals(attribute.getAttribute())) {
if (this.authenticationTrustResolver.isRememberMe(authentication)
|| isFullyAuthenticated(authentication)) {
return ACCESS_GRANTED;
}
}... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\AuthenticatedVoter.java | 1 |
请完成以下Java代码 | public boolean isUserInChargeUserEditable()
{
return false;
}
/**
* <ul>
* <li>QtyEntered := C_OLCand.Qty
* <li>C_UOM_ID := C_OLCand's effective UOM
* <li>QtyOrdered := C_OLCand.Qty's converted to effective product's UOM
* <li>DateOrdered := C_OLCand.DateCandidate
* <li>C_Order_ID: untouched
* </ul>... | ic.setQtyDelivered(ic.getQtyOrdered()); // when changing this, make sure to threat ProductType.Service specially
ic.setQtyDeliveredInUOM(ic.getQtyEntered());
ic.setDeliveryDate(ic.getDateOrdered());
}
@Override
public PriceAndTax calculatePriceAndTax(@NonNull final I_C_Invoice_Candidate ic)
{
final ZoneId t... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\invoicecandidate\spi\impl\C_OLCand_Handler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
public BookstoreService(AuthorRepository authorRepository) {
this.authorRepository = authorRepository;
}
@Transactional
public void doTimeConsumingTask() throws InterruptedException {
System.out.prin... | // was opened (acquired from the connection pool) or not
Thread.sleep(40000);
System.out.println("Done, now query the database ...");
System.out.println("The database connection should be acquired now ...");
Author author = authorRepository.findById(1L).get();
// at th... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDelayConnection\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public static String getFileName(File file, FileFilter filter)
{
return getFile(file, filter).getAbsolutePath();
} // getFileName
/**
* Verify file with filter
* @param file file
* @param filter filter
* @return file
*/
public static File getFile(File file, FileFilter filter)
{
String fName = fil... | fName += '.' + eff.getExtension();
return new File(fName);
}
String ext = fName.substring(pos+1);
// correct extension
if (ext.equalsIgnoreCase(eff.getExtension()))
return file;
fName += '.' + eff.getExtension();
return new File(fName);
} // getFile
} // ExtensionFileFilter | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\ExtensionFileFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DefaultHousekeeperClient implements HousekeeperClient {
private final HousekeeperConfig config;
private final TbQueueProducer<TbProtoQueueMsg<ToHousekeeperServiceMsg>> producer;
private final TopicPartitionInfo submitTpi;
private final TbQueueCallback submitCallback;
public DefaultHou... | log.trace("Task type {} is disabled, ignoring {}", taskType, task);
return;
}
log.debug("[{}][{}][{}] Submitting task: {}", task.getTenantId(), task.getEntityId().getEntityType(), task.getEntityId(), task);
/*
* using msg key as entity id so that msgs related to certain ent... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\housekeeper\DefaultHousekeeperClient.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class FlowableAppProperties {
/**
* The location where the App resources are located.
* Default is {@code classpath*:/apps/}
*/
private String resourceLocation = "classpath*:/apps/";
/**
* The suffixes for the resources that need to be scanned.
* Default is {@code **.zi... | public void setResourceSuffixes(List<String> resourceSuffixes) {
this.resourceSuffixes = resourceSuffixes;
}
public boolean isDeployResources() {
return deployResources;
}
public void setDeployResources(boolean deployResources) {
this.deployResources = deployResources;
}
... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\app\FlowableAppProperties.java | 2 |
请完成以下Java代码 | public void setRequestType (String RequestType)
{
set_Value (COLUMNNAME_RequestType, RequestType);
}
/** Get Request Type.
@return Request Type */
public String getRequestType ()
{
return (String)get_Value(COLUMNNAME_RequestType);
}
/** Set Status Code.
@param StatusCode Status Code */
public voi... | set_Value (COLUMNNAME_UserAgent, UserAgent);
}
/** Get User Agent.
@return Browser Used
*/
public String getUserAgent ()
{
return (String)get_Value(COLUMNNAME_UserAgent);
}
/** Set Web Session.
@param WebSession
Web Session ID
*/
public void setWebSession (String WebSession)
{
set_Value (COL... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WebAccessLog.java | 1 |
请完成以下Java代码 | public void setnetdate (final @Nullable java.sql.Timestamp netdate)
{
set_Value (COLUMNNAME_netdate, netdate);
}
@Override
public java.sql.Timestamp getnetdate()
{
return get_ValueAsTimestamp(COLUMNNAME_netdate);
}
@Override
public void setNetDays (final int NetDays)
{
set_Value (COLUMNNAME_NetDays, N... | set_Value (COLUMNNAME_singlevat, singlevat);
}
@Override
public BigDecimal getsinglevat()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_singlevat);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void settaxfree (final boolean taxfree)
{
set_Value (COLUMNNAME_taxfree, taxfree);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_120_v.java | 1 |
请完成以下Java代码 | public void on(Message message, Channel channel) throws IOException {
channel.basicAck(message.getMessageProperties().getDeliveryTag(), true);
log.debug("FANOUT_QUEUE_A " + new String(message.getBody()));
}
/**
* FANOUT广播队列监听二.
*
* @param message the message
* @param channel... | log.debug("FANOUT_QUEUE_B " + new String(message.getBody()));
}
/**
* DIRECT模式.
*
* @param message the message
* @param channel the channel
* @throws IOException the io exception 这里异常需要处理
*/
@RabbitListener(queues = {"DIRECT_QUEUE"})
public void message(Message message, C... | repos\SpringBootBucket-master\springboot-rabbitmq\src\main\java\com\xncoding\pos\mq\Receiver.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setIsAllowIssuingAnyHU (final boolean IsAllowIssuingAnyHU)
{
set_Value (COLUMNNAME_IsAllowIssuingAnyHU, IsAllowIssuingAnyHU);
}
@Override
public boolean isAllo... | return get_ValueAsBoolean(COLUMNNAME_IsScanResourceRequired);
}
@Override
public void setMobileUI_MFG_Config_ID (final int MobileUI_MFG_Config_ID)
{
if (MobileUI_MFG_Config_ID < 1)
set_ValueNoCheck (COLUMNNAME_MobileUI_MFG_Config_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MobileUI_MFG_Config_ID, Mobi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_MFG_Config.java | 1 |
请完成以下Java代码 | public final class DefaultPrintingRecordTextProvider implements IRecordTextProvider
{
public static final transient DefaultPrintingRecordTextProvider instance = new DefaultPrintingRecordTextProvider();
public static final String MSG_CLIENT_REPORTS_PRINT_ERROR = "de.metas.printing.C_Print_Job_Instructions.ClientRepor... | }
final IContextAware context = PlainContextAware.newOutOfTrxAllowThreadInherited(Env.getCtx());
final I_C_Print_Job_Instructions printJobInstructions = referencedRecord.getModel(context, I_C_Print_Job_Instructions.class);
return getTextMessage(printJobInstructions);
}
public Optional<String> getTextMessage(f... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\spi\impl\DefaultPrintingRecordTextProvider.java | 1 |
请完成以下Java代码 | public class ScriptExecutionListener implements ExecutionListener {
private static final long serialVersionUID = 1L;
private Expression script;
private Expression language;
private Expression resultVariable;
@Override
public void notify(DelegateExecution execution) {
if (script == ... | if (resultVariable != null) {
execution.setVariable(resultVariable.getExpressionText(), result);
}
}
public void setScript(Expression script) {
this.script = script;
}
public void setLanguage(Expression language) {
this.language = language;
}
public void se... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\listener\ScriptExecutionListener.java | 1 |
请完成以下Java代码 | public class OutboundChannelModel extends ChannelModel {
protected String serializerType;
protected String serializerDelegateExpression;
protected String pipelineDelegateExpression;
@JsonIgnore
protected Object outboundEventChannelAdapter;
@JsonIgnore
protected Object outboundEventProces... | public void setSerializerDelegateExpression(String serializerDelegateExpression) {
this.serializerDelegateExpression = serializerDelegateExpression;
}
public String getPipelineDelegateExpression() {
return pipelineDelegateExpression;
}
public void setPipelineDelegateExpression(String p... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\OutboundChannelModel.java | 1 |
请完成以下Java代码 | public void setDynAttrProductPriceAttributeAware(final IAttributeSetInstanceAware asiAware, final Optional<IProductPriceAware> productPriceAware)
{
if (asiAware == null)
{
return; // nothing to do
}
DYN_ATTR_IProductPriceAware.setValue(asiAware, productPriceAware.orElse(null));
}
@Override
public void s... | DYN_ATTR_IProductPriceAware.setValue(asiAware, productPriceAware);
}
@Override
public Optional<IProductPriceAware> getDynAttrProductPriceAttributeAware(final IAttributeSetInstanceAware asiAware)
{
return DYN_ATTR_IProductPriceAware.getValueIfExists(asiAware);
}
@Value
private static class PricingAttribute im... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\attributebased\impl\AttributePricingBL.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DatasourceSelectorAspect {
@Pointcut("execution(public * com.xkcoding.dynamic.datasource.controller.*.*(..))")
public void datasourcePointcut() {
}
/**
* 前置操作,拦截具体请求,获取header里的数据源id,设置线程变量里,用于后续切换数据源
*/
@Before("datasourcePointcut()")
public void doBefore(JoinPoint joinPo... | if (StringUtils.hasText(configIdInHeader)) {
long configId = Long.parseLong(configIdInHeader);
DatasourceConfigContextHolder.setCurrentDatasourceConfig(configId);
} else {
DatasourceConfigContextHolder.setDefaultDatasource();
}
}
}
... | repos\spring-boot-demo-master\demo-dynamic-datasource\src\main\java\com\xkcoding\dynamic\datasource\aspect\DatasourceSelectorAspect.java | 2 |
请完成以下Java代码 | public void setValues(UserTask otherElement) {
super.setValues(otherElement);
setAssignee(otherElement.getAssignee());
setOwner(otherElement.getOwner());
setFormKey(otherElement.getFormKey());
setSameDeployment(otherElement.isSameDeployment());
setDueDate(otherElement.get... | formProperties = new ArrayList<>();
if (otherElement.getFormProperties() != null && !otherElement.getFormProperties().isEmpty()) {
for (FormProperty property : otherElement.getFormProperties()) {
formProperties.add(property.clone());
}
}
taskListeners = n... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\UserTask.java | 1 |
请完成以下Java代码 | public DeploymentQueryImpl createDeploymentQuery() {
return new DeploymentQueryImpl();
}
public ModelQueryImpl createModelQueryImpl() {
return new ModelQueryImpl();
}
public ProcessDefinitionQueryImpl createProcessDefinitionQuery() {
return new ProcessDefinitionQueryImpl();
... | public HistoricActivityInstanceQueryImpl createHistoricActivityInstanceQuery() {
return new HistoricActivityInstanceQueryImpl();
}
public HistoricTaskInstanceQueryImpl createHistoricTaskInstanceQuery() {
return new HistoricTaskInstanceQueryImpl();
}
public HistoricDetailQueryImpl creat... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\db\DbSqlSession.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Connector discardTextConnector() {
return integrationContext -> {
String contentToDiscard = (String) integrationContext.getInBoundVariables().get("content");
contentToDiscard += " :( ";
integrationContext.addOutBoundVariable("content", contentToDiscard);
lo... | );
}
private String pickRandomString() {
String[] texts = {
"hello from london",
"Hi there from activiti!",
"all good news over here.",
"I've tweeted about activiti today.",
"other boring projects.",
"activiti cloud - Cloud Native ... | repos\Activiti-develop\activiti-examples\activiti-api-basic-process-example\src\main\java\org\activiti\examples\DemoApplication.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DATEV_ExportFile extends JavaProcess implements IProcessPrecondition
{
@Autowired
private DATEVExportFormatRepository exportFormatRepo;
@Param(parameterName = I_DATEV_ExportFormat.COLUMNNAME_DATEV_ExportFormat_ID, mandatory = true)
private int datevExportFormatId;
public DATEV_ExportFile()
{
Spri... | }
private IExportDataSource createDataSource(@NonNull final DATEVExportFormat exportFormat, final int datevExportId)
{
Check.assume(datevExportId > 0, "datevExportId > 0");
final JdbcExporterBuilder builder = new JdbcExporterBuilder(I_DATEV_ExportLine.Table_Name)
.addEqualsWhereClause(I_DATEV_ExportLine.COL... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\process\DATEV_ExportFile.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Roo implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "ID")
private Long id;
@Column(name = "NAME")
private String name;
public Roo() {
}
public Roo(final String name) {
... | }
} else if (!name.equals(other.name)) {
return false;
}
return true;
}
public Long getId() {
return id;
}
public String getName() {
return name;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
... | repos\tutorials-master\persistence-modules\spring-hibernate-6\src\main\java\com\baeldung\hibernate\cache\model\Roo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public PmsOperator findOperatorByLoginName(String loginName) {
return pmsOperatorDao.findByLoginName(loginName);
}
/**
* 保存操作員信息及其关联的角色.
*
* @param pmsOperator
* .
* @param roleOperatorStr
* .
*/
@Transactional
public void saveOperator(PmsOperator pmsOperator, String roleOpe... | }
}
}
Iterator<Long> iterator = delMap.keySet().iterator();
while (iterator.hasNext()) {
long roleId = iterator.next();
pmsOperatorRoleDao.deleteByRoleIdAndOperatorId(roleId, pmsOperator.getId());
}
}
/**
* 修改操作員信息及其关联的角色.
*
* @param pmsOperator
* .
* @param roleOperatorStr
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\service\impl\PmsOperatorServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Branch {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
public Branch() {
}
public Branch(String name) {
this.name = name;
}
@OneToMany(mappedBy = "mainBranch")
@LazyCollection(LazyCollectionOption.TRUE)
... | public void setMainEmployees(List<Employee> mainEmployees) {
this.mainEmployees = mainEmployees;
}
public List<Employee> getSubEmployees() {
return subEmployees;
}
public void setSubEmployees(List<Employee> subEmployees) {
this.subEmployees = subEmployees;
}
public Lis... | repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\lazycollection\model\Branch.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.