instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public static String getWhereClause(final Object[] rowData, final List<GridField> gridFields)
{
final int size = gridFields.size();
StringBuilder singleRowWHERE = null;
StringBuilder multiRowWHERE = null;
for (int col = 0; col < size; col++)
{
final GridField field = gridFields.get(col);
if (field.isKe... | return null;
}
return SecureEngine.decrypt(encryptedValue);
}
public static boolean isValueChanged(Object oldValue, Object value)
{
if (isNotNullAndIsEmpty(oldValue))
{
oldValue = null;
}
if (isNotNullAndIsEmpty(value))
{
value = null;
}
boolean bChanged = oldValue == null && value != null... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridTableUtils.java | 1 |
请完成以下Java代码 | public void setIcon(String icon) {
this.icon = icon;
}
public String getFormKey() {
return formKey;
}
public void setFormKey(String formKey) {
this.formKey = formKey;
}
public boolean isSameDeployment() {
return sameDeployment;
}
public void setSameDep... | return candidateUsers;
}
public void setCandidateUsers(List<String> candidateUsers) {
this.candidateUsers = candidateUsers;
}
public List<String> getCandidateGroups() {
return candidateGroups;
}
public void setCandidateGroups(List<String> candidateGroups) {
this.candid... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CasePageTask.java | 1 |
请完成以下Java代码 | public GridField getField()
{
return m_mField;
}
/**
* Set Enabled
*
* @param enabled enabled
*/
@Override
public void setEnabled(boolean enabled)
{
super.setEnabled(enabled);
m_text.setEnabled(enabled);
m_button.setReadWrite(enabled && m_readWrite);
} // setEnabled
@Override
public void a... | @Override
public void addKeyListener(final KeyListener l)
{
m_text.addKeyListener(l);
}
public int getCaretPosition()
{
return m_text.getCaretPosition();
}
public void setCaretPosition(final int position)
{
m_text.setCaretPosition(position);
}
@Override
public final ICopyPasteSupportEditor getCopyP... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VDate.java | 1 |
请完成以下Java代码 | public int getRepoId()
{
return repoId;
}
public static boolean equals(final HuPackingInstructionsId o1, final HuPackingInstructionsId o2)
{
return Objects.equals(o1, o2);
}
public boolean isTemplate()
{
return isTemplateRepoId(repoId);
}
public static boolean isTemplateRepoId(final int repoId)
{
r... | {
return repoId == VIRTUAL.repoId;
}
public boolean isRealPackingInstructions()
{
return isRealPackingInstructionsRepoId(repoId);
}
public static boolean isRealPackingInstructionsRepoId(final int repoId)
{
return repoId > 0
&& !isTemplateRepoId(repoId)
&& !isVirtualRepoId(repoId);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\handlingunits\HuPackingInstructionsId.java | 1 |
请完成以下Java代码 | public void setIsPackagingMaterial(final I_C_InvoiceLine invoiceLine)
{
if (invoiceLine.getC_OrderLine() == null)
{
// in case the c_orderline_id is removed, make sure the flag is on false. The user can set it on true, manually
invoiceLine.setIsPackagingMaterial(false);
return;
}
final de.metas.inter... | .addEqualsFilter(I_C_Invoice_Verification_SetLine.COLUMNNAME_C_InvoiceLine_ID, invoiceLine.getC_InvoiceLine_ID())
.create()
.delete();
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, //
ifColumnsChanged = { I_C_InvoiceLine.COLUMNNAME_M_Product_ID })
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\interceptor\C_InvoiceLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BigInteger getProgressNumberDifference() {
return progressNumberDifference;
}
/**
* Sets the value of the progressNumberDifference property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setProgressNumberDifferenc... | }
return this.kanbanID;
}
/**
* The classification of the product/service in free-text form.Gets the value of the classification property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* r... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\AdditionalLineItemInformationType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ProxyExchangeWebfluxProperties {
/**
* Properties prefix.
*/
public static final String PREFIX = "spring.cloud.gateway.proxy-exchange.webflux";
/**
* Contains headers that are considered case-sensitive by default.
*/
public static Set<String> DEFAULT_SENSITIVE = Set.of("cookie", "authorizatio... | }
public Set<String> getSensitive() {
return sensitive;
}
public void setSensitive(Set<String> sensitive) {
this.sensitive = sensitive;
}
public Set<String> getSkipped() {
return skipped;
}
public void setSkipped(Set<String> skipped) {
this.skipped = skipped;
}
public HttpHeaders convertHeaders() ... | repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webflux\src\main\java\org\springframework\cloud\gateway\webflux\config\ProxyExchangeWebfluxProperties.java | 2 |
请完成以下Java代码 | private String cleanValue(String value)
{
char[] chars = value.toCharArray();
StringBuilder sb = new StringBuilder();
for (char c : chars)
{
char ch = c;
ch = Character.toLowerCase(ch);
if ((ch >= '0' && ch <= '9') // digits
|| (ch >= 'a' && ch <= 'z'))
{
sb.append(ch);
}
}
return ... | if (first == null)
{
return "";
}
return first.trim();
}
if (last == null)
{
return "";
}
return last.trim();
} // getName
/**
* String Representation
*
* @return Info
*/
@Override
public String toString()
{
StringBuilder sb = new StringBuilder("MUser[")
.append(get_ID())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MUser.java | 1 |
请完成以下Java代码 | public PInstanceId getQueryOnlySelectionId()
{
return queryOnlySelectionId;
}
public IQueryFilter<T> getMainFilter()
{
return mainFilter;
}
public ICompositeQueryFilter<T> getMainFilterAsComposite()
{
return (ICompositeQueryFilter<T>)mainFilter;
}
public ICompositeQueryFilter<T> getMainFil... | public QueryLimit getQueryLimit()
{
return queryLimit;
}
public void setQueryLimit(@NonNull final QueryLimit queryLimit)
{
this.queryLimit = queryLimit;
}
public boolean isExplodeORJoinsToUnions()
{
return explodeORJoinsToUnions;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\AbstractQueryBuilderDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private ConditionOutcome getMatchOutcome(String[] locations) {
if (!isJndiAvailable()) {
return ConditionOutcome
.noMatch(ConditionMessage.forCondition(ConditionalOnJndi.class).notAvailable("JNDI environment"));
}
if (locations.length == 0) {
return ConditionOutcome
.match(ConditionMessage.forCondit... | protected static class JndiLocator extends JndiLocatorSupport {
private final String[] locations;
public JndiLocator(String[] locations) {
this.locations = locations;
}
public @Nullable String lookupFirstLocation() {
for (String location : this.locations) {
try {
lookup(location);
return ... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\OnJndiCondition.java | 2 |
请完成以下Java代码 | public void setBusinessKey(String businessKey) {
this.businessKey = businessKey;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
protected void setEntity(ENTITY_TYPE entity) {
this.entity = entity;
}
@Overrid... | }
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
RuntimeEventImpl other = (RuntimeEventImpl) obj;
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-model-shared-impl\src\main\java\org\activiti\api\runtime\event\impl\RuntimeEventImpl.java | 1 |
请完成以下Java代码 | public EngineResource getResourceEntity() {
return resourceEntity;
}
public void setResourceEntity(EngineResource resourceEntity) {
this.resourceEntity = resourceEntity;
}
public CmmnParseResult(EngineDeployment deployment) {
this.deployment = deployment;
}
public Engi... | definitions.add(caseDefinitionEntity);
mapDefinitionsToResources.put(caseDefinitionEntity, resourceEntity);
mapDefinitionsToCmmnModel.put(caseDefinitionEntity, cmmnModel);
}
public EngineResource getResourceForCaseDefinition(CaseDefinitionEntity caseDefinition) {
return mapDefinitio... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\parser\CmmnParseResult.java | 1 |
请完成以下Java代码 | private void createAndSubmitWorkpackage(
@NonNull final IWorkPackageQueue workPackageQueue,
@NonNull final Collection<Object> modelsToEnqueue,
@Nullable final AsyncBatchId asyncBatchId)
{
workPackageQueue.newWorkPackage()
.setUserInChargeId(userIdInCharge)
.parameters(parameters)
.addEle... | this.collectModels = collectModels;
}
@Override
public String toString()
{
return MoreObjects.toStringHelper(this)
.add("collectModels", collectModels)
.add("workpackageProcessorClass", getWorkpackageProcessorClass())
.add("modelType", modelType)
.toString();
}
@Override
protected... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\spi\WorkpackagesOnCommitSchedulerTemplate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getHeaderDescription() {
return headerDescription;
}
/**
* Sets the value of the headerDescription property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHeaderDescription(String value) {
this.heade... | itemList = new ArrayList<ItemListType>();
}
return this.itemList;
}
/**
* A free-text footer description with suceeds the details section.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFooterDescription() {
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DetailsType.java | 2 |
请完成以下Java代码 | public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public void setProcessDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = processDefinitionKey;
}
public void setProcessDefinitionTenantId(String processDefinitionTen... | if (getSuspended()) {
updateSuspensionStateBuilder.suspend();
} else {
updateSuspensionStateBuilder.activate();
}
}
protected UpdateJobDefinitionSuspensionStateBuilder createUpdateSuspensionStateBuilder(ProcessEngine engine) {
UpdateJobDefinitionSuspensionStateSelectBuilder selectBuilder = ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\management\JobDefinitionSuspensionStateDto.java | 1 |
请完成以下Java代码 | public String getBatchId() {
return batchId;
}
public void setBatchId(String batchId) {
this.batchId = batchId;
}
public String getActivityInstanceId() {
return activityInstanceId;
}
public void setActivityInstanceId(String activityInstanceId) {
this.activityInstanceId = activityInstanceI... | public static VariableInstanceDto fromVariableInstance(VariableInstance variableInstance) {
VariableInstanceDto dto = new VariableInstanceDto();
dto.id = variableInstance.getId();
dto.name = variableInstance.getName();
dto.processDefinitionId = variableInstance.getProcessDefinitionId();
dto.process... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\VariableInstanceDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<Map<String,Object>> queryTreeListForDeptRole(@RequestParam(name="departId",required=true) String departId,HttpServletRequest request) {
Result<Map<String,Object>> result = new Result<>();
//全部权限ids
List<String> ids = new ArrayList<>();
try {
List<SysPermission> list = sysPermissionService.... | if(temp==null && oConvertUtils.isEmpty(tempPid)) {
treeList.add(tree);
if(!tree.getIsLeaf()) {
getTreeModelList(treeList, metaList, tree);
}
}else if(temp!=null && tempPid!=null && tempPid.equals(temp.getKey())){
temp.getChildren().add(tree);
if(!tree.getIsLeaf()) {
getTreeModel... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysDepartPermissionController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RestClientBuilderConfigurer {
private final ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder;
private final HttpClientSettings clientSettings;
private final List<RestClientCustomizer> customizers;
public RestClientBuilderConfigurer() {
this(ClientHttpRequestFactoryBuilder.detect(), HttpCl... | * further tuned and default settings can be overridden.
* @param builder the {@link Builder RestClient.Builder} instance to configure
* @return the configured builder
*/
public RestClient.Builder configure(RestClient.Builder builder) {
builder.requestFactory(this.requestFactoryBuilder.build(this.clientSettings... | repos\spring-boot-4.0.1\module\spring-boot-restclient\src\main\java\org\springframework\boot\restclient\autoconfigure\RestClientBuilderConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void configure(HttpSecurity http) throws Exception {
http
.csrf()
.disable()
.addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class)
.exceptionHandling()
.authenticationEntryPoint(problemSupport)
.accessDeniedHandler... | .antMatchers("/api/register").permitAll()
.antMatchers("/api/activate").permitAll()
.antMatchers("/api/authenticate").permitAll()
.antMatchers("/api/account/reset-password/init").permitAll()
.antMatchers("/api/account/reset-password/finish").permitAll()
.antMa... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\config\SecurityConfiguration.java | 2 |
请完成以下Java代码 | public <T> T[] toArray(T[] ts) {
return cookieMap.values().toArray(ts);
}
@Override
public boolean add(Cookie cookie) {
if (cookie == null) {
return false;
}
cookieMap.put(cookie.getName(), cookie);
return true;
}
@Override
public boolean rem... | }
@Override
public boolean removeAll(Collection<?> collection) {
boolean result = false;
for(Object cookie : collection) {
result|= remove(cookie);
}
return result;
}
@Override
public boolean retainAll(Collection<?> collection) {
boolean result =... | repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\security\oauth2\CookieCollection.java | 1 |
请完成以下Java代码 | private Object getRandomBytes() {
byte[] bytes = new byte[16];
getSource().nextBytes(bytes);
return HexFormat.of().withLowerCase().formatHex(bytes);
}
/**
* Add a {@link RandomValuePropertySource} to the given {@link Environment}.
* @param environment the environment to add the random property source to
... | }
T getMin() {
return this.min;
}
T getMax() {
return this.max;
}
@Override
public String toString() {
return this.value;
}
static <T extends Number & Comparable<T>> Range<T> of(String value, Function<String, T> parse) {
T zero = parse.apply("0");
String[] tokens = StringUtils.commaDe... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\RandomValuePropertySource.java | 1 |
请完成以下Java代码 | public int getPickFrom_Order_ID()
{
return get_ValueAsInt(COLUMNNAME_PickFrom_Order_ID);
}
/**
* PickStatus AD_Reference_ID=540919
* Reference name: M_Picking_Candidate_PickStatus
*/
public static final int PICKSTATUS_AD_Reference_ID=540919;
/** ToBePicked = ? */
public static final String PICKSTATUS_T... | @Override
public void setRejectReason (final @Nullable java.lang.String RejectReason)
{
set_Value (COLUMNNAME_RejectReason, RejectReason);
}
@Override
public java.lang.String getRejectReason()
{
return get_ValueAsString(COLUMNNAME_RejectReason);
}
/**
* Status AD_Reference_ID=540734
* Reference name... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Candidate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void startAllRoutes()
{
getRoutes()
.stream()
.filter(CustomRouteController::isReadyToStart)
.sorted(Comparator.comparing(Route::getStartupOrder, Comparator.nullsFirst(Comparator.naturalOrder())))
.forEach(this::start);
}
public void stopAllRoutes()
{
getRoutes()
.stream()
.filte... | @NonNull
private RouteController getRouteController()
{
return camelContext.getRouteController();
}
private static boolean isReadyToStart(@NonNull final Route route)
{
final boolean isStartOnDemand = CamelRoutesGroup.ofCodeOptional(route.getGroup())
.map(CamelRoutesGroup::isStartOnDemand)
.orElse(fals... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\CustomRouteController.java | 2 |
请完成以下Java代码 | public static SupplierApproval ofNullableCode(@Nullable final String code)
{
return code != null ? ofCode(code) : null;
}
public static SupplierApproval ofCode(@NonNull final String code)
{
SupplierApproval type = typesByCode.get(code);
if (type == null)
{
throw new AdempiereException("No " + SupplierA... | private static final ImmutableMap<String, SupplierApproval> typesByCode = Maps.uniqueIndex(Arrays.asList(values()), SupplierApproval::getCode);
public boolean isOneYear()
{
return this == OneYear;
}
public boolean isTwoYears()
{
return this == TwoYears;
}
public boolean isThreeYears()
{
return this == ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\SupplierApproval.java | 1 |
请完成以下Java代码 | public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public List<ProcessDefinition> getDeployedPr... | @Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", name=" + name
+ ", resources=" + resources
+ ", deploymentTime=" + deploymentTime
+ ", validatingSchema=" + validatingSchema
+ ", isNew=" + isNew
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\DeploymentEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExecutionResponse {
protected String id;
protected String url;
protected String parentId;
protected String parentUrl;
protected String superExecutionId;
protected String superExecutionUrl;
protected String processInstanceId;
protected String processInstanceUrl;
protecte... | }
@ApiModelProperty(example = "5")
public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
@ApiModelProperty(example = "http://localhost:8182/runtime/process-i... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ExecutionResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UnacquireOwnedJobsCmd implements Command<Void> {
private static final Logger LOGGER = LoggerFactory.getLogger(UnacquireOwnedJobsCmd.class);
protected final JobServiceConfiguration jobServiceConfiguration;
protected final String lockOwner;
protected final String tenantId;
pub... | List<Job> jobs = jobServiceConfiguration.getJobEntityManager().findJobsByQueryCriteria(jobQuery);
for (Job job : jobs) {
try {
jobServiceConfiguration.getJobManager().unacquire(job);
logJobUnlocking(job);
} catch (Exception e) {
/*
... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\UnacquireOwnedJobsCmd.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static String clean(String s) {
String ss;
ss = s.replace(".", " ").replace(",", " ").replace(";", " ").replace("*", " ").replace("#", " ").replace("-", " ");
return ss;
}
public static double editDistanceWord(String s1, String s2) {
String[] w1 = clean(s1).split("\\s+");... | }
if (count == 0)
count = 1;
return Math.round(d / count * 100);
}
public static double similarity2(String s1, String s2) {
return editDistanceWord(s1, s2);
}
@Override
public int compare(Address o1, Address o2) {
double f1 = similarity2(o1.getAddr(), ... | repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\service\taxiMaster\StringSimilarity.java | 2 |
请完成以下Java代码 | public abstract class AbstractManager {
protected DmnEngineConfiguration dmnEngineConfiguration;
public AbstractManager(DmnEngineConfiguration dmnEngineConfiguration) {
this.dmnEngineConfiguration = dmnEngineConfiguration;
}
// Command scoped
protected CommandContext getCommandContext() ... | return dmnEngineConfiguration;
}
protected DmnDeploymentEntityManager getDeploymentEntityManager() {
return getDmnEngineConfiguration().getDeploymentEntityManager();
}
protected DecisionEntityManager getDecisionTableEntityManager() {
return getDmnEngineConfiguration().getDecisionEntity... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\AbstractManager.java | 1 |
请完成以下Java代码 | protected CEditor createCheckboxEditor(final String label)
{
final VCheckBox cb = new VCheckBox();
cb.setText(label);
cb.setSelected(true);
cb.setFocusable(false);
cb.setRequestFocusEnabled(false);
cb.addVetoableChangeListener(fieldChangedListener);
return cb;
}
@Override
protected CEditor createLook... | field.addVetoableChangeListener(fieldChangedListener);
return field;
}
@Override
protected CEditor createNumberEditor(final String columnName, final String title, final int displayType)
{
final VNumber vn = new VNumber(columnName, false, false, true, displayType, title);
vn.setName(columnName);
vn.addVetoa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\InfoQueryCriteriaGeneral.java | 1 |
请完成以下Java代码 | private void stopScheduledFuture()
{
if (scheduledFuture == null)
{
return;
}
try
{
scheduledFuture.cancel(true);
}
catch (final Exception ex)
{
logger.warn("{}: Failed stopping scheduled future: {}. Ignored and considering it as stopped", this, scheduledFuture, ex);
}
sched... | if (events != null && !events.isEmpty())
{
for (final Object event : events)
{
websocketSender.convertAndSend(topicName, event);
logger.trace("Event sent to {}: {}", topicName, event);
}
}
else
{
logger.trace("Got no events from {}", onPollingEventsSupplier);
}
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\websocket\producers\WebSocketProducersRegistry.java | 1 |
请完成以下Java代码 | private static int skipBackward(final boolean[] pagesCovered,
final int pageTo,
final int limit)
{
int pageToFinal = pageTo;
for (int i = pageTo; i >= limit; i--)
{
if (!pagesCovered[i - 1])
{
break;
}
pageToFinal = i - 1;
}
return pageToFinal;
}
private static int skipFo... | catch (final Exception ignored)
{
}
}
}
}
public PrintingData onlyWithType(@NonNull final OutputType outputType)
{
final ImmutableList<PrintingSegment> filteredSegments = segments.stream()
.filter(segment -> segment.isMatchingOutputType(outputType))
.collect(ImmutableList.toImmutableList());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingData.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class PaymentTermConverter
{
@NonNull
public static PaymentTerm fromRecord(
@NonNull final I_C_PaymentTerm record,
@NonNull final List<I_C_PaymentTerm_Break> breakRecords,
@NonNull final List<I_C_PaySchedule> payScheduleRecords)
{
return PaymentTerm.builder()
.id(extractId(record))
.clientId(Clien... | .build();
}
@NonNull
public static PaymentTermId extractId(@NonNull final I_C_PaymentTerm record)
{
return PaymentTermId.ofRepoId(record.getC_PaymentTerm_ID());
}
public static void updateRecord(final I_C_PaymentTerm record, final @NonNull PaymentTerm paymentTerm)
{
record.setIsComplex(paymentTerm.isComple... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\repository\impl\PaymentTermConverter.java | 2 |
请完成以下Java代码 | public void setAssetValueAmt (BigDecimal AssetValueAmt)
{
set_Value (COLUMNNAME_AssetValueAmt, AssetValueAmt);
}
/** Get Asset value.
@return Book Value of the asset
*/
public BigDecimal getAssetValueAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetValueAmt);
if (bd == null)
return E... | if (C_InvoiceLine_ID < 1)
set_Value (COLUMNNAME_C_InvoiceLine_ID, null);
else
set_Value (COLUMNNAME_C_InvoiceLine_ID, Integer.valueOf(C_InvoiceLine_ID));
}
/** Get Invoice Line.
@return Invoice Detail Line
*/
public int getC_InvoiceLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Retirement.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void exportUser(@Parameter(hidden = true) @RequestParam Map<String, Object> user, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class);
if (!SecureUtil.isAdministrator()) {
queryWrapper.lambda().eq(User::getTenantId, bladeUser.g... | /**
* 第三方注册用户
*/
@PostMapping("/register-guest")
@ApiOperationSupport(order = 15)
@Operation(summary = "第三方注册用户", description = "传入user")
public R registerGuest(User user, Long oauthId) {
return R.status(userService.registerGuest(user, oauthId));
}
/**
* 用户解锁
*/
@PostMapping("/unlock")
@ApiOperation... | repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\UserController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getParcelLabelNumber() {
return parcelLabelNumber;
}
/**
* Sets the value of the parcelLabelNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setParcelLabelNumber(String value) {
this.parce... | *
*/
public String getDpdReference() {
return dpdReference;
}
/**
* Sets the value of the dpdReference property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDpdReference(String value) {
this.dpdRef... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ParcelInformationType.java | 2 |
请完成以下Java代码 | public int getHUCapacity()
{
if (X_M_HU_Item.ITEMTYPE_HUAggregate.equals(item.getItemType()))
{
return Quantity.QTY_INFINITE.intValue();
}
return Services.get(IHandlingUnitsBL.class).getPIItem(item).getQty().intValueExact();
}
@Override
public IProductStorage getProductStorage(final ProductId productId,... | final List<I_M_HU_Item_Storage> storages = dao.retrieveItemStorages(item);
for (final I_M_HU_Item_Storage storage : storages)
{
if (!isEmpty(storage))
{
return false;
}
}
return true;
}
private boolean isEmpty(final I_M_HU_Item_Storage storage)
{
final BigDecimal qty = storage.getQty();
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUItemStorage.java | 1 |
请完成以下Java代码 | public class NonBlockingServer {
private static final int PORT = 6000;
public static void main(String[] args) throws IOException {
ServerSocketChannel serverChannel = ServerSocketChannel.open();
serverChannel.bind(new InetSocketAddress(PORT));
serverChannel.configureBlocking(false);
... | }
}
}
}
}
private static MyObject receiveObject(SocketChannel channel)
throws IOException, ClassNotFoundException {
ByteBuffer buffer = ByteBuffer.allocate(1024);
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
int bytesRead;
... | repos\tutorials-master\core-java-modules\core-java-nio-3\src\main\java\com\baeldung\socketchannel\NonBlockingServer.java | 1 |
请完成以下Java代码 | public void createDisposeCandidates(
@NonNull final HuId huId,
@NonNull final QtyRejectedReasonCode reasonCode)
{
trxManager.runInThreadInheritedTrx(() -> createDisposeCandidatesInTrx(huId, reasonCode));
}
public void createDisposeCandidatesInTrx(
@NonNull final HuId huId,
@NonNull final QtyRejectedRe... | record = InterfaceWrapperHelper.newInstance(I_M_Inventory_Candidate.class);
record.setM_HU_ID(huProductStorage.getHuId().getRepoId());
record.setM_Product_ID(huProductStorage.getProductId().getRepoId());
}
else
{
record = existingRecord;
}
final Quantity qty = huProductStorage.getQty();
record.se... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inventory\InventoryCandidateService.java | 1 |
请完成以下Java代码 | public static LocalDateTime toLocalDateTime(final XMLGregorianCalendar xml)
{
if (xml == null)
{
return null;
}
return xml.toGregorianCalendar().toZonedDateTime().toLocalDateTime();
}
public static ZonedDateTime toZonedDateTime(final XMLGregorianCalendar xml)
{
if (xml == null)
{
return null;
... | public static java.util.Date toDate(final XMLGregorianCalendar xml)
{
return xml == null ? null : xml.toGregorianCalendar().getTime();
}
public static Timestamp toTimestamp(final XMLGregorianCalendar xmlGregorianCalendar)
{
final Date date = toDate(xmlGregorianCalendar);
if (date == null)
{
return null;... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\util\JAXBDateUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DictController {
private final DictService dictService;
private static final String ENTITY_NAME = "dict";
@ApiOperation("导出字典数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('dict:list')")
public void exportDict(HttpServletResponse response, DictQueryCriteria criteri... | @PreAuthorize("@el.check('dict:add')")
public ResponseEntity<Object> createDict(@Validated @RequestBody Dict resources){
if (resources.getId() != null) {
throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID");
}
dictService.create(resources);
r... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\DictController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean availableBalanceIsEnough(BigDecimal amount) {
return this.getAvailableBalance().compareTo(amount) >= 0;
}
public String getAccountNo() {
return accountNo;
}
public void setAccountNo(String accountNo) {
this.accountNo = accountNo == null ? null : accountNo.trim();
}
... | public void setTotalExpend(BigDecimal totalExpend) {
this.totalExpend = totalExpend;
}
public BigDecimal getTodayIncome() {
return todayIncome;
}
public void setTodayIncome(BigDecimal todayIncome) {
this.todayIncome = todayIncome;
}
public BigDecimal getTodayExpend() {... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpAccount.java | 2 |
请完成以下Java代码 | protected I_M_Material_Tracking getMaterialTrackingFromDocumentLineASI(final DocumentLineType documentLine)
{
final IMaterialTrackingAttributeBL materialTrackingAttributeBL = Services.get(IMaterialTrackingAttributeBL.class);
final AttributeSetInstanceId asiId = getM_AttributeSetInstance(documentLine);
final I_M... | /**
*
* @param document
* @return document lines
*/
protected abstract List<DocumentLineType> retrieveDocumentLines(final DocumentType document);
/**
*
* @param documentLine
* @return ASI from document line
*/
protected abstract AttributeSetInstanceId getM_AttributeSetInstance(final DocumentLineType... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\MaterialTrackableDocumentByASIInterceptor.java | 1 |
请完成以下Java代码 | public class ConfigFileContext implements IContext
{
private final Properties properties;
public ConfigFileContext()
{
String configFilename = System.getProperty("config");
// Fallback: use config.properties
if (configFilename == null || configFilename.trim().isEmpty())
{
configFilename = new File(".", ... | {
Util.close(in);
in = null;
}
}
@Override
public String getProperty(final String name)
{
final String property = properties.getProperty(name);
if (property != null)
{
// we don't want things to be screwed up by trailing white spaces in our properties file, so we trim.
// further reading: https... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\ConfigFileContext.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
} | public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-runtime\src\main\java\com\baeldung\sampleapp\web\dto\HeavyResource.java | 1 |
请完成以下Java代码 | public Task getTask() {
return associationManager.getTask();
}
/**
* Returns the currently associated execution or 'null'
*/
public Execution getExecution() {
return associationManager.getExecution();
}
/**
* @see #getExecution()
*/
public String getExecutio... | }
}
protected void assertTaskAssociated() {
if (associationManager.getTask() == null) {
throw new FlowableCdiException("No task associated. Call businessProcess.startTask() first.");
}
}
protected Map<String, Object> getCachedVariables() {
return associationManager.... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\BusinessProcess.java | 1 |
请完成以下Java代码 | public OutboundEventProcessingPipelineBuilder eventProcessingPipeline() {
return new OutboundEventProcessingPipelineBuilderImpl(outboundChannelDefinitionBuilder, kafkaChannel);
}
}
public static class OutboundEventProcessingPipelineBuilderImpl implements OutboundEventProcessingPipelineBuild... | @Override
public OutboundChannelModelBuilder delegateExpressionSerializer(String delegateExpression) {
this.outboundChannel.setSerializerType("expression");
this.outboundChannel.setSerializerDelegateExpression(delegateExpression);
return outboundChannelDefinitionBuilder;
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\OutboundChannelDefinitionBuilderImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductService
{
@NonNull private final IProductBL productBL = Services.get(IProductBL.class);
@NonNull private final IAttributeSetInstanceBL attributeSetInstanceBL = Services.get(IAttributeSetInstanceBL.class);
@NonNull final IAttributeDAO attributeDAO = Services.get(IAttributeDAO.class);
public bool... | {
return AttributeSetInstanceId.NONE;
}
return attributeSetInstanceBL.addAttributes(
AddAttributesRequest.builder()
.productId(productId)
.attributeInstanceBasicInfos(attributes.entrySet()
.stream()
.map(entry -> CreateAttributeInstanceReq.builder()
.attributeCode(entry... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\products\ProductService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | boolean isAlreadyIncluded(@NonNull final AddToResultGroupRequest request)
{
// assume it's matching
// if (!isMatchting(request))
// {
// return false; // only matching requests were ever included
// }
if (request.getBpartner().isSpecificBPartner())
{
return false;
}
final ArrayKey key = request... | // if our bpartnerless request is "earlier" than the latest request (with same key) that we already added, then the quantity of the bpartnerless request is contained within that other request which we already added
return DateAndSeqNo.ofAddToResultGroupRequest(request).isBefore(dateAndSeq);
}
public void addQty(@N... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\atp\AvailableToPromiseResultGroupBuilder.java | 2 |
请完成以下Java代码 | private void updateFlatrateTermsPartner()
{
final List<I_C_Flatrate_Term> flatrateTermsToChange = getFlatrateTermsToChange();
flatrateTermsToChange.forEach(this::updateFlatrateTermPartner);
}
private void updateFlatrateTermPartner(final I_C_Flatrate_Term term)
{
final ImmutableList<I_C_Flatrate_Term> nextT... | final BPartnerContactId bPartnerContactId = BPartnerContactId.ofRepoIdOrNull(p_billBPartnerId, p_billUserId);
final boolean termHasInvoices = C_Flatrate_Term_Change_ProcessHelper.termHasInvoices(term);
final FlatrateTermBillPartnerRequest request = FlatrateTermBillPartnerRequest.builder()
.flatrateTermId(Flat... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\process\C_Flatrate_Term_Change_BillPartner_Base.java | 1 |
请完成以下Java代码 | public static class War implements Layout {
private static final Map<LibraryScope, String> SCOPE_LOCATION;
static {
Map<LibraryScope, String> locations = new HashMap<>();
locations.put(LibraryScope.COMPILE, "WEB-INF/lib/");
locations.put(LibraryScope.CUSTOM, "WEB-INF/lib/");
locations.put(LibraryScope... | @Override
public String getClasspathIndexFileLocation() {
return "WEB-INF/classpath.idx";
}
@Override
public String getLayersIndexFileLocation() {
return "WEB-INF/layers.idx";
}
@Override
public boolean isExecutable() {
return true;
}
}
} | repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\Layouts.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ServerRunner implements CommandLineRunner {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private final SocketIOServer server;
// 下载地址,版本2.1.1:https://bitbucket.org/ariya/phantomjs/downloads/
private static final String PHANTOM_PATH = "phantomjs";
@Resource
... | // openHtml(p.getLoadJs());
// logger.info("Phantomjs 启动成功!");
}
// private void openHtml(String loadJs) {
// String cmdStr = PHANTOM_PATH + " " + loadJs + " " + "http://localhost:9075";
// logger.info("cmdStr=" + cmdStr);
// Runtime rt = Runtime.getRuntime();
// try {
... | repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\echarts\common\ServerRunner.java | 2 |
请完成以下Java代码 | public I_C_BP_BankAccount retrieveSEPABankAccount(I_C_BPartner bPartner)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(bPartner);
final String trxName = InterfaceWrapperHelper.getTrxName(bPartner);
final String whereClause = I_C_BP_BankAccount.COLUMNNAME_C_BPartner_ID + "=?";
final List<Object> para... | .list();
}
@Override
public List<I_SEPA_Export_Line> retrieveLinesChangeRule(Properties ctx, String trxName)
{
//
// Placeholder for future functionality.
return Collections.emptyList();
}
@NonNull
public List<I_SEPA_Export_Line_Ref> retrieveLineReferences(@NonNull final I_SEPA_Export_Line line)
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\SEPADocumentDAO.java | 1 |
请完成以下Java代码 | public OAuth2 tokenEndpointUri(String uri) {
this.oAuth2Settings.tokenEndpointUri(uri);
return this;
}
public OAuth2 clientId(String clientId) {
this.oAuth2Settings.clientId(clientId);
return this;
}
public OAuth2 clientSecret(String clientSecret) {
this.oAuth2Settings.clientSecret(clientSecret... | private final ConnectionBuilder.RecoveryConfiguration recoveryConfiguration;
private Recovery(ConnectionBuilder.RecoveryConfiguration recoveryConfiguration) {
this.recoveryConfiguration = recoveryConfiguration;
}
public Recovery activated(boolean activated) {
this.recoveryConfiguration.activated(activated... | repos\spring-amqp-main\spring-rabbitmq-client\src\main\java\org\springframework\amqp\rabbitmq\client\SingleAmqpConnectionFactory.java | 1 |
请完成以下Java代码 | public DeliveryOrder save(final DeliveryOrder order)
{
final I_GO_DeliveryOrder orderPO = toDeliveryOrderPO(order);
InterfaceWrapperHelper.save(orderPO);
saveAssignedPackageIds(orderPO.getGO_DeliveryOrder_ID(), GOUtils.getSingleDeliveryPosition(order).getPackageIds());
return order.toBuilder()
.id(Delive... | }
final List<Integer> mpackageIds = Services.get(IQueryBL.class)
.createQueryBuilder(I_GO_DeliveryOrder_Package.class)
.addEqualsFilter(I_GO_DeliveryOrder_Package.COLUMN_GO_DeliveryOrder_ID, deliveryOrderRepoId)
.create()
.listDistinct(I_GO_DeliveryOrder_Package.COLUMNNAME_M_Package_ID, Integer.class... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java\de\metas\shipper\gateway\go\GODeliveryOrderRepository.java | 1 |
请完成以下Java代码 | public void insertElementAt(Object obj, int index)
{
}
@Override
public void addElement(Object obj)
{
}
};
public MutableComboBoxModelProxy()
{
super();
}
public MutableComboBoxModelProxy(final MutableComboBoxModel delegate)
{
super();
setDelegate(delegate);
}
private final MutableComboBox... | @Override
public int getSize()
{
return getDelegateToUse().getSize();
}
@Override
public Object getElementAt(int index)
{
return getDelegateToUse().getElementAt(index);
}
@Override
public void setSelectedItem(Object anItem)
{
getDelegateToUse().setSelectedItem(anItem);
}
@Override
public Object ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\MutableComboBoxModelProxy.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getNameOfDriver() {
return nameOfDriver;
}
/**
* Sets the value of the nameOfDriver property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNameOfDriver(String value) {
this.nameOfDriver = value;
... | public void setTransportVehicleLicenseNumber(String value) {
this.transportVehicleLicenseNumber = value;
}
/**
* Gets the value of the deliveryDetailsExtension property.
*
* @return
* possible object is
* {@link DeliveryDetailsExtensionType }
*
*/
pu... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DeliveryDetailsType.java | 2 |
请完成以下Java代码 | public <T> T getInstance(final String name, final Class<T> interfaceClazz)
{
final Object value = get(name);
if (value == null)
{
throw new RuntimeException("No class of " + interfaceClazz + " found for property " + name);
}
else if (value instanceof String)
{
final String classname = value.toString(... | }
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 != null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\Context.java | 1 |
请完成以下Java代码 | public static PaymentReservationStatus ofCode(@NonNull final String code)
{
PaymentReservationStatus type = typesByCode.get(code);
if (type == null)
{
throw new AdempiereException("No " + PaymentReservationStatus.class + " found for code: " + code);
}
return type;
}
private static final ImmutableMap<St... | public void assertEquals(@NonNull final PaymentReservationStatus expected)
{
if (!this.equals(expected))
{
throw new AdempiereException("Invalid reservation status. Expected " + expected + " but got " + this);
}
}
public boolean isWaitingForPayerApproval()
{
return this == WAITING_PAYER_APPROVAL;
}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\reservation\PaymentReservationStatus.java | 1 |
请完成以下Java代码 | public class AuthorizeTokenFilter extends OncePerRequestFilter {
private static final Logger logger = LoggerFactory.getLogger(AuthorizeTokenFilter.class);
private final OAuth2AuthorizedClientManager clientManager;
public AuthorizeTokenFilter(OAuth2AuthorizedClientManager clientManager) {
this.clientManager ... | attrs.put(HttpServletResponse.class.getName(), response);
}).build();
// @formatter:on
var name = token.getName();
try {
var res = clientManager.authorize(authRequest);
if (res == null || hasTokenExpired(res.getAccessToken())) {
logger.warn("Authorize failed for '{}': could not ... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-security\src\main\java\org\camunda\bpm\spring\boot\starter\security\oauth2\impl\AuthorizeTokenFilter.java | 1 |
请完成以下Java代码 | public String toString() {
if (isCaseInstanceExecution()) {
return "CaseInstance[" + getToStringIdentity() + "]";
} else {
return "CmmnExecution["+getToStringIdentity() + "]";
}
}
protected String getToStringIdentity() {
return Integer.toString(System.identityHashCode(this));
}
pub... | throw LOG.unsupportedTransientOperationException(ProcessEngineServicesAware.class.getName());
}
public ProcessEngine getProcessEngine() {
throw LOG.unsupportedTransientOperationException(ProcessEngineServicesAware.class.getName());
}
public CmmnElement getCmmnModelElementInstance() {
throw LOG.unsuppo... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CaseExecutionImpl.java | 1 |
请完成以下Java代码 | default LocalDate getPreviousBusinessDay(@NonNull final LocalDate date, final int targetWorkingDays)
{
Check.assumeGreaterOrEqualToZero(targetWorkingDays, "targetWorkingDays");
LocalDate currentDate = date;
// Skip until we find the first business day
while (!isBusinessDay(currentDate))
{
currentDate = ... | {
currentDate = currentDate.minusDays(1);
final boolean isBusinessDay = isBusinessDay(currentDate);
if (isBusinessDay)
{
workingDays++;
}
if (workingDays >= targetWorkingDays && isBusinessDay)
{
return currentDate;
}
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\calendar\IBusinessDayMatcher.java | 1 |
请完成以下Java代码 | public void setField (GridField mField)
{
m_mField = mField;
EditorContextPopupMenu.onGridFieldSet(this);
} // setField
@Override
public GridField getField() {
return m_mField;
}
/**
* Feature Request [1707462]
* Set VFormat
* @param strMask mask
* @author fer_luck
*/
public void setVF... | }
return text;
} // getText
/**
* Feature Request [1707462]
* Get VFormat
* @return strMask mask
* @author fer_luck
*/
public String getVFormat ()
{
return this.m_VFormat;
} // getVFormat
/**
* Focus Gained.
* Enabled with Obscure
* @param e event
*/
@Override
public void focusGai... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VString.java | 1 |
请完成以下Java代码 | private void assertQtyToIssueToleranceIsRespected_LowerBound(final Quantity qtyIssuedOrReceivedActual)
{
if (issuingToleranceSpec == null)
{
return;
}
final Quantity qtyIssuedOrReceivedActualMin = issuingToleranceSpec.subtractFrom(qtyRequired);
if (qtyIssuedOrReceivedActual.compareTo(qtyIssuedOrReceivedA... | }
}
@NonNull
public OrderBOMLineQuantities convertQuantities(@NonNull final UnaryOperator<Quantity> converter)
{
return toBuilder()
.qtyRequired(converter.apply(qtyRequired))
.qtyRequiredBeforeClose(converter.apply(qtyRequiredBeforeClose))
.qtyIssuedOrReceived(converter.apply(qtyIssuedOrReceived))
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\OrderBOMLineQuantities.java | 1 |
请完成以下Java代码 | private static CarrierProduct fromProductRecord(@NotNull final I_Carrier_Product product)
{
return CarrierProduct.builder()
.id(CarrierProductId.ofRepoId(product.getCarrier_Product_ID()))
.code(product.getExternalId())
.name(product.getName())
.build();
}
@NonNull
public CarrierProduct getOrCreat... | .map(CarrierProductRepository::fromProductRecord)
.orElse(null));
}
@Nullable
public CarrierProduct getCachedShipperProductById(@Nullable final CarrierProductId productId)
{
if (productId == null)
{
return null;
}
return carrierProductsById.getOrLoad(productId.toString(), () ->
queryBL.createQ... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\model\CarrierProductRepository.java | 1 |
请完成以下Java代码 | public static int getPrecision(Properties ctx, int C_UOM_ID)
{
if(C_UOM_ID <= 0)
{
return 2;
}
return Services.get(IUOMDAO.class)
.getStandardPrecision(UomId.ofRepoId(C_UOM_ID))
.toInt();
} // getPrecision
/**
* Load All UOMs
*
* @param ctx context
*/
private static void loadUOMs(Proper... | public MUOM(Properties ctx, int C_UOM_ID, String trxName)
{
super(ctx, C_UOM_ID, trxName);
if (is_new())
{
// setName (null);
// setX12DE355 (null);
setIsDefault(false);
setStdPrecision(2);
setCostingPrecision(6);
}
} // UOM
public MUOM(Properties ctx, ResultSet rs, String trxName)
{
super... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MUOM.java | 1 |
请完成以下Java代码 | public void setEnabled(boolean enabled)
{
super.setEnabled(enabled);
m_text.setEnabled(enabled);
m_button.setReadWrite(enabled && m_readWrite);
} // setEnabled
@Override
public void addActionListener(ActionListener l)
{
listenerList.add(ActionListener.class, l);
} // addActionListener
@Override
pu... | public int getCaretPosition()
{
return m_text.getCaretPosition();
}
public void setCaretPosition(final int position)
{
m_text.setCaretPosition(position);
}
@Override
public final ICopyPasteSupportEditor getCopyPasteSupport()
{
return m_text == null ? NullCopyPasteSupportEditor.instance : m_text.getCopy... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VDate.java | 1 |
请完成以下Java代码 | final class SecurityInfo {
static final SecurityInfo NONE = new SecurityInfo(null, null);
private final Certificate[][] certificateLookups;
private final CodeSigner[][] codeSignerLookups;
private SecurityInfo(Certificate[][] entryCertificates, CodeSigner[][] entryCodeSigners) {
this.certificateLookups = entry... | private static SecurityInfo load(ZipContent content) throws IOException {
int size = content.size();
boolean hasSecurityInfo = false;
Certificate[][] entryCertificates = new Certificate[size][];
CodeSigner[][] entryCodeSigners = new CodeSigner[size][];
try (JarEntriesStream entries = new JarEntriesStream(cont... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\SecurityInfo.java | 1 |
请完成以下Java代码 | public long getSequenceCounter() {
return sequenceCounter;
}
public void setSequenceCounter(long sequenceCounter) {
this.sequenceCounter = sequenceCounter;
}
public Date getRemovalTime() {
return removalTime;
}
public void setRemovalTime(Date removalTime) {
this.removalTime = removalTime;... | }
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", eventType=" + eventType
+ ", executionId=" + executionId
+ ", processDefinitionId=" + processDefinitionId
+ ", processInstanceId=" + processInstanceId
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoryEvent.java | 1 |
请完成以下Java代码 | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
int width = 57;// 图像宽度
int height = 21;// 图像高度
// 定义输出格式
response.setContentType("image/jpeg");
ServletOutputStream out = resp... | request.getSession().setAttribute("rcCaptcha", rs);
ImageIO.write(bimg, "jpeg", out);
try {
out.flush();
} finally {
out.close();
}
}
public Color getRandColor(int fc, int bc) {
Random r = new Random();
if (fc > 255) {
fc = 255... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\shiro\filter\RcCaptchaFilter.java | 1 |
请完成以下Java代码 | public void setCamundaCandidateUsersList(List<String> camundaCandidateUsersList) {
String candidateUsers = StringUtil.joinCommaSeparatedList(camundaCandidateUsersList);
camundaCandidateUsersAttribute.setValue(this, candidateUsers);
}
public String getCamundaDueDate() {
return camundaDueDateAttribute.ge... | return camundaFormRefAttribute.getValue(this);
}
public void setCamundaFormRef(String camundaFormRef) {
camundaFormRefAttribute.setValue(this, camundaFormRef);
}
public String getCamundaFormRefBinding() {
return camundaFormRefBindingAttribute.getValue(this);
}
public void setCamundaFormRefBinding... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\UserTaskImpl.java | 1 |
请完成以下Java代码 | public <ModelType> IAggregationKeyBuilder<ModelType> getDefaultAggregationKeyBuilderOrNull(final Properties ctx, final Class<ModelType> modelClass, final Boolean isSOTrx, final String aggregationUsageLevel)
{
final IAggregationDAO aggregationDAO = Services.get(IAggregationDAO.class);
//
// Load it from database... | final ArrayKey key = mkDefaultAggregationKey(modelClass, aggregationUsageLevel);
defaultAggregationKeyBuilders.put(key, aggregationKeyBuilder);
}
private final ArrayKey mkDefaultAggregationKey(final Class<?> modelClass, final String aggregationUsageLevel)
{
final String tableName = InterfaceWrapperHelper.getTab... | repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\impl\AggregationFactory.java | 1 |
请完成以下Java代码 | public void setRequestBody (final @Nullable java.lang.String RequestBody)
{
set_ValueNoCheck (COLUMNNAME_RequestBody, RequestBody);
}
@Override
public java.lang.String getRequestBody()
{
return get_ValueAsString(COLUMNNAME_RequestBody);
}
@Override
public void setRequestHeaders (final @Nullable java.lang... | public java.lang.String getResponseBody()
{
return get_ValueAsString(COLUMNNAME_ResponseBody);
}
@Override
public void setResponseCode (final int ResponseCode)
{
set_ValueNoCheck (COLUMNNAME_ResponseCode, ResponseCode);
}
@Override
public int getResponseCode()
{
return get_ValueAsInt(COLUMNNAME_Respo... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Log.java | 1 |
请完成以下Java代码 | public void dnsStart(Call call, String domainName) {
logTimedEvent("dnsStart");
}
@Override
public void dnsEnd(Call call, String domainName, List<InetAddress> inetAddressList) {
logTimedEvent("dnsEnd");
}
@Override
public void connectStart(Call call, InetSocketAddress inetSocke... | @Override
public void requestFailed(Call call, IOException ioe) {
logTimedEvent("requestFailed");
}
@Override
public void responseHeadersStart(Call call) {
logTimedEvent("responseHeadersStart");
}
@Override
public void responseHeadersEnd(Call call, Response response) {
... | repos\tutorials-master\libraries-http-2\src\main\java\com\baeldung\okhttp\events\EventTimer.java | 1 |
请完成以下Spring Boot application配置 | spring:
datasource:
driverClassName: org.h2.Driver
url: jdbc:h2:mem:shedlock_db;INIT=CREATE SCHEMA IF NOT EXISTS shedlock;DATABASE_TO_UPPER=false;DB | _CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
username: sa
password: | repos\tutorials-master\spring-boot-modules\spring-boot-libraries\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public Mono<Void> transferGatesReactive(String fromId, String toId, int gatesToTransfer,
RuntimeException exceptionToThrow) {
return Mono.deferContextual(ctx -> {
AirlineGates fromAirlineGates = template.findById(AirlineGates.class).one(fromId);
AirlineGates toAirlineGates = template.findById(AirlineGates.cl... | // This does not have the @Transactional annotation therefore is not executed in a transaction
public AirlineGates findById(String id) {
return template.findById(AirlineGates.class).one(id);
}
// This does not have the @Transactional annotation therefore is not executed in a transaction
public AirlineGates saveR... | repos\spring-data-examples-main\couchbase\transactions\src\main\java\com\example\demo\AirlineGatesService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CommonResult add(@RequestBody MemberProductCollection productCollection) {
int count = memberCollectionService.add(productCollection);
if (count > 0) {
return CommonResult.success(count);
} else {
return CommonResult.failed();
}
}
@ApiOperation("删除... | public CommonResult<CommonPage<MemberProductCollection>> list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
Page<MemberProductCollection> page = mem... | repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\controller\MemberProductCollectionController.java | 2 |
请完成以下Java代码 | public static void processInParameters(List<IOParameter> inParameters, VariableContainer sourceContainer, Map<String, Object> targetContainer,
ExpressionManager expressionManager) {
processParameters(inParameters, sourceContainer, targetContainer::put, targetContainer::put, expressionManager, "In");... | String variableName = null;
if (StringUtils.isNotEmpty(parameter.getTargetExpression())) {
Expression expression = expressionManager.createExpression(parameter.getTargetExpression());
Object variableNameValue = expression.getValue(sourceContainer);
if (variab... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\util\IOParameterUtil.java | 1 |
请完成以下Java代码 | public final class RfQWorkDatesUtil
{
private RfQWorkDatesUtil()
{
}
/**
* If needed, sets DateWorkStart or DateWorkComplete or DeliveryDays based on the other fields.
*
* @param workDatesAware
*/
public static void updateWorkDates(final IRfQWorkDatesAware workDatesAware)
{
// Calculate Complete Date ... | if(dateWorkComplete == null)
{
return;
}
setDeliveryDays(workDatesAware);
}
public static void updateFromDeliveryDays(final IRfQWorkDatesAware workDatesAware)
{
final Timestamp dateWorkStart = workDatesAware.getDateWorkStart();
if(dateWorkStart == null)
{
return;
}
setDateWorkComplete(workDa... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\util\RfQWorkDatesUtil.java | 1 |
请完成以下Java代码 | private Set<DocumentId> retrieveRowIdsByWhereClause(final SqlViewRowsWhereClause sqlWhereClause)
{
if (sqlWhereClause.isNoRecords())
{
return ImmutableSet.of();
}
final SqlViewKeyColumnNamesMap keyColumnNamesMap = sqlViewBinding.getSqlViewKeyColumnNamesMap();
final SqlAndParams sql = SqlAndParams.builde... | {
DB.close(rs, pstmt);
}
}
@Override
public List<Object> retrieveFieldValues(
@NonNull final ViewEvaluationCtx viewEvalCtx,
@NonNull final String selectionId,
@NonNull final String fieldName,
final int limit)
{
final SqlViewRowFieldLoader fieldLoader = sqlViewBinding.getFieldLoader(fieldName);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\SqlViewDataRepository.java | 1 |
请完成以下Java代码 | public void setValueFromPO(final String idPropertyName, final Class<?> parameterType, final Object value)
{
po.set_ValueFromPO(idPropertyName, parameterType, value);
}
@Override
public boolean invokeEquals(final Object[] methodArgs)
{
if (methodArgs == null || methodArgs.length != 1)
{
throw new IllegalA... | public Object invokeParent(final Method method, final Object[] methodArgs) throws Exception
{
return method.invoke(po, methodArgs);
}
@Override
public boolean isCalculated(final String columnName)
{
return getPOInfo().isCalculated(columnName);
}
@Override
public boolean hasColumnName(final String columnNa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POModelInternalAccessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class StockChangeDetail implements BusinessCaseDetail
{
@Nullable
CandidateStockChangeDetailId candidateStockChangeDetailId;
@Nullable
CandidateId candidateId;
@Nullable
Integer freshQuantityOnHandRepoId;
@Nullable
Integer freshQuantityOnHandLineRepoId;
@Nullable
InventoryId inventoryId;
@Nullabl... | public BigDecimal getQty()
{
throw new AdempiereException("StockChangeDetail doesn't carry Qty!");
}
@Nullable
public static StockChangeDetail castOrNull(@Nullable final BusinessCaseDetail businessCaseDetail)
{
if (!(businessCaseDetail instanceof StockChangeDetail))
{
return null;
}
return cast(busin... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\candidate\businesscase\StockChangeDetail.java | 2 |
请完成以下Java代码 | protected final I_C_DocType retrieveCounterDocTypeOrNull(IDocument document)
{
final IDocumentBL docActionBL = Services.get(IDocumentBL.class);
final I_C_DocType docType = docActionBL.getDocTypeOrNull(document);
if (docType == null)
{
return null;
}
if (!docType.isCreateCounter())
{
return null;
... | int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(document.get_TrxName());
if (counterC_BPartner_ID > 0)
{
return InterfaceWrapperHelper.create(document.getCtx(), counterC_BPartner_ID, I_C_BPartner.class, document.get_TrxName());
}
return null;
}
protected final I_AD_Org retrieveCounterOrgOrNull(IDocu... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\document\spi\CounterDocumentHandlerAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PostgRESTConfigId implements RepoIdAware
{
@JsonCreator
public static PostgRESTConfigId ofRepoId(final int repoId)
{
return new PostgRESTConfigId(repoId);
}
@Nullable
@JsonCreator
public static PostgRESTConfigId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId!= null && repoId > ... | }
int repoId;
private PostgRESTConfigId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "S_PostgREST_Config_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\postgrest\config\PostgRESTConfigId.java | 2 |
请完成以下Java代码 | public <ID extends RepoIdAware> ID getId(@NonNull final Class<ID> idType)
{
final RepoIdAware id = getId();
return id != null ? idType.cast(id) : null;
}
public UomId getUomId()
{
return getCostPrice().getUomId();
}
@NonNull
public static UomId extractUniqueUomId(@NonNull final Collection<BOMCostElementP... | public void clearOwnCostPrice()
{
setCostPrice(getCostPrice().withZeroOwnCostPrice());
}
public void clearComponentsCostPrice()
{
setCostPrice(getCostPrice().withZeroComponentsCostPrice());
}
public void setComponentsCostPrice(CostAmount componentsCostPrice)
{
setCostPrice(getCostPrice().withComponentsCo... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMCostElementPrice.java | 1 |
请完成以下Java代码 | public SpinJsonException unableToCreateNode(String objectType) {
return new SpinJsonPropertyException(exceptionMessage("005", "Unable to create node for object of type '{}'", objectType));
}
public SpinJsonException unableToDeserialize(JsonNode jsonNode, JavaType type, Exception cause) {
return new SpinJso... | exceptionMessage("013", "Unable to evaluate JsonPath expression on element '{}'", node.getClass().getName()), cause);
}
public SpinJsonPathException unableToCompileJsonPathExpression(String expression, Exception cause) {
return new SpinJsonPathException(
exceptionMessage("014", "Unable to compile '{}'!",... | repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\JacksonJsonLogger.java | 1 |
请完成以下Java代码 | public class Employee implements Serializable {
private static final long serialVersionUID = -2454619097207585825L;
private int id;
private String name;
private int age;
public Employee() {
}
public Employee(int id, String name) {
this.id = id;
this.name = name;
}
... | public int getId() {
return id;
}
public void setAge(int age) {
this.age = age;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\core-java-modules\core-java-arrays-operations-advanced\src\main\java\com\baeldung\arraycopy\model\Employee.java | 1 |
请完成以下Java代码 | public boolean isLiteralText() {
return true;
}
@Override
public boolean isLeftValue() {
return false;
}
@Override
public boolean isMethodInvocation() {
return false;
}
@Override
public Class<?> getType(Bindings bindings, ELContext context) {
return null;
}
@Override
public boolean isReadOnly(B... | @Override
public Object invoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] paramValues) {
return returnType == null ? value : bindings.convert(value, returnType);
}
@Override
public String toString() {
return "\"" + value + "\"";
}
@Override
public void appe... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\de\odysseus\el\tree\impl\ast\AstText.java | 1 |
请完成以下Java代码 | public Class<? extends ModelEntity> getManagedEntityClass() {
return ModelEntityImpl.class;
}
@Override
public ModelEntity create() {
return new ModelEntityImpl();
}
@Override
@SuppressWarnings("unchecked")
public List<Model> findModelsByQueryCriteria(ModelQueryImpl query, ... | }
@Override
@SuppressWarnings("unchecked")
public List<Model> findModelsByNativeQuery(Map<String, Object> parameterMap, int firstResult, int maxResults) {
return getDbSqlSession().selectListWithRawParameter(
"selectModelByNativeQuery",
parameterMap,
firstResult,
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisModelDataManager.java | 1 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entity Type.
@param EntityType
Dictionary Entity Type; Determines ownership and synchronization
*/
public void set... | */
public void setReplicationType (String ReplicationType)
{
set_Value (COLUMNNAME_ReplicationType, ReplicationType);
}
/** Get Replication Type.
@return Type of Data Replication
*/
public String getReplicationType ()
{
return (String)get_Value(COLUMNNAME_ReplicationType);
}
public I_EXP_Format get... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationTable.java | 1 |
请完成以下Java代码 | public class GitIgnore {
private final GitIgnoreSection general = new GitIgnoreSection(null);
private final GitIgnoreSection sts = new GitIgnoreSection("STS");
private final GitIgnoreSection intellijIdea = new GitIgnoreSection("IntelliJ IDEA");
private final GitIgnoreSection netBeans = new GitIgnoreSection("Net... | }
public GitIgnoreSection getVscode() {
return this.vscode;
}
/**
* Representation of a section of a {@code .gitignore} file.
*/
public static class GitIgnoreSection implements Section {
private final String name;
private final LinkedList<String> items;
public GitIgnoreSection(String name) {
thi... | repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\scm\git\GitIgnore.java | 1 |
请完成以下Java代码 | public Object resolveProperty(String name) {
Object originalValue = delegate.getProperty(name);
if (!(originalValue instanceof String)) {
//Because we read the original property every time, if it isn't a String,
// there's no point in caching it.
return originalValue... | } else {
cache.replace(name, cachedValue, newCachedValue);
}
//return the result calculated this time
return resolved;
}
return originalValue;
}
/**
* <p>Refresh the cache.</p>
*/
public void refresh() {
log.info("Caching... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\CachingResolver.java | 1 |
请完成以下Java代码 | public String getBusinessKey() {
return businessKey;
}
public void setBusinessKey(String businessKey) {
this.businessKey = businessKey;
}
public String getCaseInstanceId() {
return caseInstanceId;
}
public void setCaseInstanceId(String caseInstanceId) {
this.caseInstanceId = caseInstanceI... | public boolean isSkipCustomListeners() {
return skipCustomListeners;
}
public void setSkipCustomListeners(boolean skipCustomListeners) {
this.skipCustomListeners = skipCustomListeners;
}
public boolean isSkipIoMappings() {
return skipIoMappings;
}
public void setSkipIoMappings(boolean skipIoM... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\StartProcessInstanceDto.java | 1 |
请完成以下Java代码 | public ApplicationServerDto getApplicationServer() {
return applicationServer;
}
public void setApplicationServer(ApplicationServerDto applicationServer) {
this.applicationServer = applicationServer;
}
public Map<String, CommandDto> getCommands() {
return commands;
}
public void setCommands(M... | public void setWebapps(Set<String> webapps) {
this.webapps = webapps;
}
public Date getDataCollectionStartDate() {
return dataCollectionStartDate;
}
public void setDataCollectionStartDate(Date dataCollectionStartDate) {
this.dataCollectionStartDate = dataCollectionStartDate;
}
public static I... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\telemetry\InternalsDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private boolean validateSign(HttpServletRequest request) {
String requestSign = request.getParameter("sign");//获得请求签名,如sign=19e907700db7ad91318424a97c54ed57
if (StringUtils.isEmpty(requestSign)) {
return false;
}
List<String> keys = new ArrayList<String>(request.getParameterM... | }
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ... | repos\spring-boot-api-project-seed-master\src\main\java\com\company\project\configurer\WebMvcConfigurer.java | 2 |
请完成以下Java代码 | public List<Deployment> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext
.getDeploymentManager()
.findDeploymentsByQueryCriteria(this, page);
}
//getters ////////////////////////////////////////////////////////
public String getDeploymentId() {
... | return nameLike;
}
public boolean isSourceQueryParamEnabled() {
return sourceQueryParamEnabled;
}
public String getSource() {
return source;
}
public Date getDeploymentBefore() {
return deploymentBefore;
}
public Date getDeploymentAfter() {
return deploymentAfter;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\DeploymentQueryImpl.java | 1 |
请完成以下Java代码 | public I_I_Datev_Payment retrieveImportRecord(final Properties ctx, final ResultSet rs) throws SQLException
{
return new X_I_Datev_Payment(ctx, rs, ITrx.TRXNAME_ThreadInherited);
}
@Override
protected ImportRecordResult importRecord(@NonNull final IMutable<Object> state,
@NonNull final I_I_Datev_Payment impor... | importRecord.setC_Payment_ID(payment.getC_Payment_ID());
InterfaceWrapperHelper.save(importRecord);
return schemaImportResult;
}
private I_C_Payment createNewPayment(@NonNull final I_I_Datev_Payment importRecord)
{
final LocalDate date = TimeUtil.asLocalDate(importRecord.getDateTrx());
final IPaymentBL pa... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impexp\DatevPaymentImportProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(authorize -> authorize.anyRequest()
.authenticated())
.formLogin(Customizer.withDefaults());
return http.build();
}
@Bean
public RegisteredClie... | .scope(OidcScopes.PROFILE)
// Custom MCP scopes
.scope("mcp.read")
.scope("mcp.write")
.clientSettings(ClientSettings.builder()
.requireAuthorizationConsent(false)
.requireProofKey(false)
.build())
.tokenSettings... | repos\tutorials-master\spring-ai-modules\spring-ai-mcp-oauth\oauth2-authorization-server\src\main\java\com\baeldung\mcp\oauth2authorizationserver\config\AuthorizationServerConfig.java | 2 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
mvc:
contentnegotiation:
#favor-path-extension: true # header accept
favor-parameter: true # url ?format=x | ml or format=json
media-types:
json: application/json | repos\springboot-demo-master\ContentNegotiation\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | private static String normalizeValue(@Nullable final String value)
{
return StringUtils.trimBlankToNull(value);
}
@JsonCreator
public static POSOrderExternalId ofString(@NonNull final String value)
{
return new POSOrderExternalId(value);
}
public static Set<POSOrderExternalId> ofCommaSeparatedString(@Nulla... | {
return collection.stream()
.map(POSOrderExternalId::getAsString)
.collect(ImmutableSet.toImmutableSet());
}
@Override
@Deprecated
public String toString() {return value;}
@JsonValue
public String getAsString() {return value;}
public static boolean equals(@Nullable final POSOrderExternalId id1, @Nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSOrderExternalId.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.