instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class JavaCompilerUtils {
private final JavaCompiler compiler;
private final StandardJavaFileManager standardFileManager;
private final Path outputDirectory;
private static final Logger logger = LoggerFactory.getLogger(JavaCompilerUtils.class);
public JavaCompilerUtils(Path outputDirectory... | JavaFileObject sourceObject = new InMemoryJavaFile(className, sourceCode);
return compile(Collections.singletonList(sourceObject));
}
private boolean compile(Iterable<? extends JavaFileObject> compilationUnits) {
DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
... | repos\tutorials-master\core-java-modules\core-java-compiler\src\main\java\com\baeldung\compilerapi\JavaCompilerUtils.java | 1 |
请完成以下Java代码 | public PageData<ApiKeyInfo> findApiKeysByUserId(TenantId tenantId, UserId userId, PageLink pageLink) {
log.trace("Executing findApiKeysByUserId [{}][{}]", tenantId, userId);
validateId(userId, id -> INCORRECT_USER_ID + id);
return apiKeyInfoDao.findByUserId(tenantId, userId, pageLink);
}
... | validateId(userId, id -> INCORRECT_USER_ID + id);
Set<String> values = apiKeyDao.deleteByUserId(tenantId, userId);
values.forEach(value -> publishEvictEvent(new ApiKeyEvictEvent(value)));
}
@Override
public ApiKey findApiKeyByValue(String value) {
log.trace("Executing findApiKeyByVa... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\pat\ApiKeyServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public URL getPersistenceUnitRootUrl() {
return null;
}
@Override
public List<String> getManagedClassNames() {
return managedClassNames;
}
@Override
public boolean excludeUnlistedClasses() {
return false;
}
@Override
public SharedCacheMode getSharedCache... | @Override
public ClassLoader getClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
@Override
public void addTransformer(ClassTransformer transformer) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ClassLoader g... | repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\daopattern\config\PersistenceUnitInfoImpl.java | 2 |
请完成以下Java代码 | public Object getNextValue()
{
int minutes = ((Integer)getValue()).intValue();
minutes += m_snapSize;
if (minutes >= 60)
minutes -= 60;
//
int steps = minutes / m_snapSize;
return steps * m_snapSize;
} // getNextValue
/**
* Return previous full step value
*
* @return previous snap... | public Object getPreviousValue()
{
int minutes = ((Integer)getValue()).intValue();
minutes -= m_snapSize;
if (minutes < 0)
minutes += 60;
//
int steps = minutes / m_snapSize;
if (minutes % m_snapSize != 0)
steps++;
if (steps * m_snapSize > 59)
steps = 0;
return steps * m_snapSize;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\Calendar.java | 1 |
请完成以下Java代码 | private I_AD_Migration getCreateMigration(final IMigrationLoggerContext mctx, final String entityType)
{
String entityTypeActual = entityType;
if (entityTypeActual == null)
{
entityTypeActual = getDefaultEntityType();
}
final String key = entityTypeActual;
I_AD_Migration migration = mctx.getMigration(k... | migration.setName(name);
}
protected String getDefaultEntityType()
{
boolean dict = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
return dict ? "D" : "U";
}
protected IMigrationLoggerContext getSessionMigrationLoggerContext(final MFSession session)
{
final String key = getClass().getCanonicalName();
IMigratio... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\logger\impl\MigrationLogger.java | 1 |
请完成以下Java代码 | public void addTreeCheckingListener(TreeCheckingListener tsl) {
this.checkingModel.addTreeCheckingListener(tsl);
}
/**
* Removes a <code>TreeChecking</code> listener.
*
* @param tsl the <code>TreeChckingListener</code> to remove
*/
public void removeTreeCheckingListene... | TreePath[] childrenPath = new TreePath[childrenNumber];
for (int childIndex = 0; childIndex < childrenNumber; childIndex++) {
childrenPath[childIndex] = path.pathByAddingChild(getModel().getChild(node, childIndex));
expandSubTree(childrenPath[childIndex]);
}
}
/**
* @return a string repres... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\it\cnr\imaa\essi\lablib\gui\checkboxtree\CheckboxTree.java | 1 |
请完成以下Java代码 | protected IShipmentScheduleSegment createSegmentForInOutLine(final int bPartnerId, final @NonNull I_M_InOutLine inoutLine)
{
final ShipmentScheduleSegmentBuilder storageSegmentBuilder = ShipmentScheduleSegments.builder();
storageSegmentBuilder
.productId(inoutLine.getM_Product_ID())
.locatorId(inoutLine.ge... | {
if (pickedNotDeliveredRecord.getM_TU_HU_ID() > 0)
{
maybeCanRestrictToCertainPartners = true;
// note that the C_BPartner_ID might still be 0. If any one of several IDs is 0, then there won't be a restriction.
final I_M_HU tu = pickedNotDeliveredRecord.getM_TU_HU();
storageSegmentBuilder.bpartn... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\impl\HUShipmentScheduleInvalidateBL.java | 1 |
请完成以下Java代码 | public static String htmlEscape(String input) {
if (StringUtils.hasText(input)) {
//input = input.replaceAll("\\{", "%7B").replaceAll("}", "%7D").replaceAll("\\\\", "%5C");
String htmlStr = HtmlUtils.htmlEscape(input, "UTF-8");
//& -> &
return htmlStr.replace(... | File[] files = dirFile.listFiles();
for (int i = 0; i < Objects.requireNonNull(files).length; i++) {
// 删除子文件
if (files[i].isFile()) {
flag = KkFileUtils.deleteFileByName(files[i].getAbsolutePath());
if (!flag) {
break;
... | repos\kkFileView-master\server\src\main\java\cn\keking\utils\KkFileUtils.java | 1 |
请完成以下Java代码 | public BigDecimal getPastDue91_Plus ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue91_Plus);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Past Due.
@param PastDueAmt Past Due */
public void setPastDueAmt (BigDecimal PastDueAmt)
{
set_Value (COLUMNNAME_PastDueAmt, PastDueAmt... | return bd;
}
/** Set Statement date.
@param StatementDate
Date of the statement
*/
public void setStatementDate (Timestamp StatementDate)
{
set_Value (COLUMNNAME_StatementDate, StatementDate);
}
/** Get Statement date.
@return Date of the statement
*/
public Timestamp getStatementDate ()
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_Aging.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void registerStompEndpoints(@NonNull final StompEndpointRegistry registry)
{
registry.addEndpoint("/stomp")
.setAllowedOriginPatterns("http://*", "https://*")
.withSockJS();
}
@Override
public void configureMessageBroker(@NonNull final MessageBrokerRegistry config)
{
// use the /topic prefix fo... | }
private static class LoggingChannelInterceptor implements ChannelInterceptor
{
private static final Logger logger = LogManager.getLogger(LoggingChannelInterceptor.class);
@Override
public void afterSendCompletion(final @NonNull Message<?> message, final @NonNull MessageChannel channel, final boolean sent, f... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java\de\metas\server\config\WebsocketConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private static PPOrderBOMLineId extractOrderBOMLineId(@NonNull final I_PP_Order_BOMLine record)
{
return PPOrderBOMLineId.ofRepoId(record.getPP_Order_BOMLine_ID());
}
private List<I_M_HU> splitOutCUsFromSourceHUs(@NonNull final ProductId productId, @NonNull final Quantity qtyCU)
{
final SourceHUsCollection sou... | private void createIssueSchedule(final I_PP_Order_Qty ppOrderQtyRecord)
{
final Quantity qtyIssued = Quantitys.of(ppOrderQtyRecord.getQty(), UomId.ofRepoId(ppOrderQtyRecord.getC_UOM_ID()));
issueScheduleService.createSchedule(
PPOrderIssueScheduleCreateRequest.builder()
.ppOrderId(ppOrderId)
.ppOr... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\issue_what_was_received\IssueWhatWasReceivedCommand.java | 2 |
请完成以下Java代码 | public String toString ()
{
StringBuffer sb = new StringBuffer ("MReport[")
.append(get_ID()).append(" - ").append(getName());
if (getDescription() != null)
sb.append("(").append(getDescription()).append(")");
sb.append(" - C_AcctSchema_ID=").append(getC_AcctSchema_ID())
.append(", C_Calendar_ID=").appe... | */
public MReportColumnSet getColumnSet()
{
return m_columnSet;
}
/**
* Get Line Set
* @return Line Set
*/
public MReportLineSet getLineSet()
{
return m_lineSet;
}
} // MReport | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\report\MReport.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String getUOMCode(@Nullable final String unitId)
{
if (unitId == null)
{
processLogger.logMessage("Shopware unit id is null, fallback to default UOM: PCE ! ProductId: " + product.getId(),
routeContext.getPInstanceId());
return DEFAULT_PRODUCT_UOM;
}
if (routeContext.getUomMappings().is... | if (externalCode == null)
{
processLogger.logMessage("No externalCode found for unit id: " + unitId + ", fallback to default UOM: PCE ! ProductId: " + product.getId(),
routeContext.getPInstanceId());
return DEFAULT_PRODUCT_UOM;
}
final JsonUOM jsonUOM = routeContext.getUomMappings().get(externalC... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\product\ProductUpsertRequestProducer.java | 2 |
请完成以下Java代码 | public class X_ExternalSystem_Other_ConfigParameter extends org.compiere.model.PO implements I_ExternalSystem_Other_ConfigParameter, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -1879854408L;
/** Standard Constructor */
public X_ExternalSystem_Other_ConfigParameter (final P... | public int getExternalSystem_Config_ID()
{
return get_ValueAsInt(COLUMNNAME_ExternalSystem_Config_ID);
}
@Override
public void setExternalSystem_Other_ConfigParameter_ID (final int ExternalSystem_Other_ConfigParameter_ID)
{
if (ExternalSystem_Other_ConfigParameter_ID < 1)
set_ValueNoCheck (COLUMNNAME_Ext... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Other_ConfigParameter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void putCancelQuit(List<String> userIds, Integer tenantId) {
userTenantMapper.putCancelQuit(userIds, tenantId);
}
@Override
public Integer userTenantIzExist(String userId, Integer tenantId) {
return userTenantMapper.userTenantIzExist(userId,tenantId);
}
@Override
public ... | @Override
public void refuseJoinTenant(String userId, Integer tenantId) {
userTenantMapper.refuseJoinTenant(userId,tenantId);
}
@Override
public SysUserTenant getUserTenantByTenantId(String userId, Integer tenantId) {
return userTenantMapper.getUserTenantByTenantId(userId,tenantId);
... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysUserTenantServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String addUI() {
return "pay/product/add";
}
/**
* 函数功能说明 : 保存
*
* @参数: @return
* @return String
* @throws
*/
@RequiresPermissions("pay:product:add")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public String add(Model model, RpPayProduct rpPayProduct, DwzAjax dwz) {
rp... | model.addAttribute("pageParam", pageParam);
model.addAttribute("rpPayProduct", rpPayProduct);
return "pay/product/lookupList";
}
/**
* 函数功能说明 : 审核
*
* @参数: @return
* @return String
* @throws
*/
@RequiresPermissions("pay:product:add")
@RequestMapping(value = "/audit", method ={RequestMethod.... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\controller\pay\PayProductController.java | 2 |
请完成以下Java代码 | private final boolean isEmpty()
{
final JTextComponent textComponent = getTextComponent();
if (textComponent == null)
{
return false;
}
final String text = textComponent.getText();
return Check.isEmpty(text, false);
}
private void doCopy()
{
final JTextComponent textComponent = getTextComponent();... | textComponent.cut();
}
private void doPaste()
{
final JTextComponent textComponent = getTextComponent();
if (textComponent == null)
{
return;
}
textComponent.paste();
}
private void doSelectAll()
{
final JTextComponent textComponent = getTextComponent();
if (textComponent == null)
{
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\editor\JComboBoxCopyPasteSupportEditor.java | 1 |
请完成以下Java代码 | private static String executeJar(String createJarCommand) {
executeCommand(COMPILE_COMMAND);
executeCommand(createJarCommand);
return executeCommand(EXECUTE_JAR_COMMAND);
}
private static String executeCommand(String command) {
String output = null;
try {
out... | BufferedReader outputReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = "";
while ((line = outputReader.readLine()) != null) {
output.append(line + "\n");
}
return output.toString();
}
private static Process runProcess(String ... | repos\tutorials-master\core-java-modules\core-java-jar\src\main\java\com\baeldung\manifest\ExecuteJarFile.java | 1 |
请完成以下Java代码 | public void setGiftPointNew(Integer giftPointNew) {
this.giftPointNew = giftPointNew;
}
public Integer getUsePointLimitOld() {
return usePointLimitOld;
}
public void setUsePointLimitOld(Integer usePointLimitOld) {
this.usePointLimitOld = usePointLimitOld;
}
public Inte... | sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", productId=").append(productId);
sb.append(", priceOld=").append(priceOld);
sb.append(", priceNew=").append(priceNew);
sb.ap... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductOperateLog.java | 1 |
请完成以下Java代码 | public Dimension getFromRecord(@NonNull final I_M_ForecastLine record)
{
return Dimension.builder()
.projectId(ProjectId.ofRepoIdOrNull(record.getC_Project_ID()))
.campaignId(record.getC_Campaign_ID())
.activityId(ActivityId.ofRepoIdOrNull(record.getC_Activity_ID()))
.userElementString1(record.getUse... | @Override
public void updateRecord(final I_M_ForecastLine record, final Dimension from)
{
record.setC_Project_ID(ProjectId.toRepoId(from.getProjectId()));
record.setC_Campaign_ID(from.getCampaignId());
record.setC_Activity_ID(ActivityId.toRepoId(from.getActivityId()));
record.setUserElementString1(from.getUse... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\dimension\ForecastLineDimensionFactory.java | 1 |
请完成以下Java代码 | public class StaticHeadersWriter implements HeaderWriter {
private final List<Header> headers;
/**
* Creates a new instance
* @param headers the {@link Header} instances to use
*/
public StaticHeadersWriter(List<Header> headers) {
Assert.notEmpty(headers, "headers cannot be null or empty");
this.headers ... | @Override
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
for (Header header : this.headers) {
if (!response.containsHeader(header.getName())) {
for (String value : header.getValues()) {
response.addHeader(header.getName(), value);
}
}
}
}
@Override
publi... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\StaticHeadersWriter.java | 1 |
请完成以下Java代码 | public List<String> getTags() {
return tags;
}
/**
* Sets the {@link #tags}.
*
* @param tags
* the new {@link #tags}
*/
public void setTags(List<String> tags) {
this.tags = tags;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
f... | return false;
} else if (!author.equals(other.author))
return false;
if (tags == null) {
if (other.tags != null)
return false;
} else if (!tags.equals(other.tags))
return false;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return fal... | repos\tutorials-master\persistence-modules\java-mongodb-3\src\main\java\com\baeldung\mongo\tagging\Post.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
Class<? extends T> candidate = getComponentType(annotationClass(), context, metadata);
return determineOutcome(candidate, context.getEnvironment());
}
@SuppressWarnings("unchecked")
protected Class<? extends T> g... | private ConditionOutcome determineOutcome(Class<? extends T> componentClass, PropertyResolver resolver) {
String key = PREFIX + normalizeComponentName(componentClass) + SUFFIX;
ConditionMessage.Builder messageBuilder = forCondition(annotationClass().getName(), componentClass.getName());
if ("false".equalsIgnoreCa... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\conditional\OnEnabledComponent.java | 2 |
请完成以下Java代码 | public I_GL_Journal getGL_Journal() throws RuntimeException
{
return (I_GL_Journal)MTable.get(getCtx(), I_GL_Journal.Table_Name)
.getPO(getGL_Journal_ID(), get_TrxName()); }
/** Set Journal.
@param GL_Journal_ID
General Ledger Journal
*/
public void setGL_Journal_ID (int GL_Journal_ID)
{
if (GL_J... | Integer ii = (Integer)get_Value(COLUMNNAME_GL_Journal_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Recognized Amount.
@param RecognizedAmt Recognized Amount */
public void setRecognizedAmt (BigDecimal RecognizedAmt)
{
set_ValueNoCheck (COLUMNNAME_RecognizedAmt, RecognizedAmt);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition_Run.java | 1 |
请完成以下Java代码 | public void setQty(final BigDecimal qty)
{
infoWindow.setValueByColumnName(IHUPackingAware.COLUMNNAME_Qty_CU, rowIndexModel, qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal qty = infoWindow.getValue(rowIndexModel, IHUPackingAware.COLUMNNAME_Qty_CU);
return qty;
}
@Override
public void se... | {
throw new UnsupportedOperationException();
}
@Override
public void setC_BPartner_ID(final int partnerId)
{
throw new UnsupportedOperationException();
}
@Override
public int getC_BPartner_ID()
{
final KeyNamePair bpartnerKNP = infoWindow.getValue(rowIndexModel, IHUPackingAware.COLUMNNAME_C_BPartner_ID)... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\HUPackingAwareInfoWindowAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private PickingJobCreateRepoRequest.Step createStepRequest_PickFromHU(final @NonNull PickingPlanLine planLine)
{
final ProductId productId = planLine.getProductId();
final Quantity qtyToPick = planLine.getQty();
final PickFromHU pickFromHU = Objects.requireNonNull(planLine.getPickFromHU());
final PickingJobC... | }
/**
* If the given HU is a top level CU, and it has the storage quantity greater than the qty we have to pick,
* then split out a top level CU for the qty we have to pick.
* <p>
* Why do we do this?
* We do this because when we reserve the HU/Qty, the reservation service is splitting out the reserved Qty ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobCreateCommand.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Optional<User> login(Email email, String rawPassword) {
return userRepository.findFirstByEmail(email)
.filter(user -> user.matchesPassword(rawPassword, passwordEncoder));
}
@Override
@Transactional(readOnly = true)
public Optional<User> findById(long id) {
return ... | public User updateUser(long id, UserUpdateRequest request) {
final var user = userRepository.findById(id).orElseThrow(NoSuchElementException::new);
request.getEmailToUpdate()
.ifPresent(user::changeEmail);
request.getUserNameToUpdate()
.ifPresent(user::changeName)... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\UserService.java | 2 |
请完成以下Java代码 | public int getAD_Window_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Window_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Descrip... | }
/** Get Konferenz.
@return Konferenz */
@Override
public boolean isConference ()
{
Object oo = get_Value(COLUMNNAME_IsConference);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_SortPref_Hdr.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static UserDetailsImpl build(User user) {
return new UserDetailsImpl(user.getId(), user.getUsername(), user.getPassword());
}
public Long getId() {
return id;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
@Override
public Collectio... | return true;
}
@Override
public boolean isAccountNonLocked() {
return true;
}
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
public boolean isEnabled() {
return true;
}
@Override
public boolean equals(Object o) {
... | repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\jwtsignkey\userservice\UserDetailsImpl.java | 2 |
请完成以下Java代码 | public Iterator<I_PP_Order> retrieveAllModelsWithMissingCandidates(@NonNull final QueryLimit limit)
{
return dao.retrievePPOrdersWithMissingICs(limit);
}
/**
* Does nothing.
*/
@Override
public void setOrderedData(final I_C_Invoice_Candidate ic)
{
// nothing to do; the value won't change
}
/**
* <ul... | /**
* @return {@link OnInvalidateForModelAction#RECREATE_ASYNC}.
*/
@Override
public final OnInvalidateForModelAction getOnInvalidateForModelAction()
{
return OnInvalidateForModelAction.RECREATE_ASYNC;
}
/* package */boolean isInvoiceable(final Object model)
{
final I_PP_Order ppOrder = InterfaceWrapperH... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\ic\spi\impl\PP_Order_MaterialTracking_Handler.java | 1 |
请完成以下Java代码 | public List<HistoricMilestoneInstance> executeList(CommandContext commandContext) {
return CommandContextUtil.getHistoricMilestoneInstanceEntityManager(commandContext).findHistoricMilestoneInstancesByQueryCriteria(this);
}
@Override
public String getId() {
return id;
}
public Strin... | return reachedBefore;
}
public Date getReachedAfter() {
return reachedAfter;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public boolean isWithoutTenantId() {
return withoutTenantId;
}
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricMilestoneInstanceQueryImpl.java | 1 |
请完成以下Java代码 | private QuickInputDescriptor getQuickInputEntityDescriptorOrNull(final QuickInputDescriptorKey key)
{
return descriptors.getOrLoad(key, this::createQuickInputDescriptorOrNull);
}
private QuickInputDescriptor createQuickInputDescriptorOrNull(final QuickInputDescriptorKey key)
{
final IQuickInputDescriptorFactor... | return null;
}
private IQuickInputDescriptorFactory getQuickInputDescriptorFactory(final IQuickInputDescriptorFactory.MatchingKey matchingKey)
{
final ImmutableList<IQuickInputDescriptorFactory> matchingFactories = factories.get(matchingKey);
if (matchingFactories.isEmpty())
{
return null;
}
if (match... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\quickinput\QuickInputDescriptorFactoryService.java | 1 |
请完成以下Java代码 | public class HttpBasicServerAuthenticationEntryPoint implements ServerAuthenticationEntryPoint {
private static final String WWW_AUTHENTICATE = "WWW-Authenticate";
private static final String DEFAULT_REALM = "Realm";
private static String WWW_AUTHENTICATE_FORMAT = "Basic realm=\"%s\"";
private String headerValu... | });
}
/**
* Sets the realm to be used
* @param realm the realm. Default is "Realm"
*/
public void setRealm(String realm) {
this.headerValue = createHeaderValue(realm);
}
private static String createHeaderValue(String realm) {
Assert.notNull(realm, "realm cannot be null");
return String.format(WWW_AUT... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\authentication\HttpBasicServerAuthenticationEntryPoint.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TestServiceImpl implements TestService {
private static final Logger LOGGER = LoggerFactory.getLogger(TestServiceImpl.class);
@Autowired
private JestClient jestClient;
@Override
public void saveEntity(Entity entity) {
Index index = new Index.Builder(entity).index(Entity.INDEX... | jestClient.execute(bulk.build());
LOGGER.info("ES 插入完成");
} catch (IOException e) {
e.printStackTrace();
LOGGER.error(e.getMessage());
}
}
/**
* 在ES中搜索内容
*/
@Override
public List<Entity> searchEntity(String searchContent){
SearchSour... | repos\Spring-Boot-In-Action-master\springboot_es_demo\src\main\java\com\hansonwang99\springboot_es_demo\service\impl\TestServiceImpl.java | 2 |
请完成以下Java代码 | public void setRenderedAddress(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentDeliveryLocationAdapter.super.setRenderedAddress(from);
}
@Override
public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL)
{
return documentLocationBL.toPlainDocu... | {
return delegate;
}
public void setFrom(final @NonNull BPartnerLocationAndCaptureId dropshipLocationId, final @Nullable BPartnerContactId dropshipContactId)
{
setDropShip_BPartner_ID(dropshipLocationId.getBpartnerRepoId());
setDropShip_Location_ID(dropshipLocationId.getBPartnerLocationRepoId());
setDropShi... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\location\adapter\ContractDropshipLocationAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Flux<Article> findNewestArticlesFilteredBy(@Nullable String tag,
@Nullable String authorId,
@Nullable User favoritedBy,
int limit,
... | return mongoTemplate.find(query, Article.class);
}
private Criteria authorIdEquals(String it) {
return where(Article.AUTHOR_ID_FIELD_NAME).is(it);
}
private Criteria tagsContains(String it) {
return where(Article.TAGS_FIELD_NAME).all(it);
}
private Criteria isFavoriteArticleBy... | repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\article\repository\ArticleManualRepository.java | 2 |
请完成以下Java代码 | public class BusinessRulesCollection
{
public final static BusinessRulesCollection EMPTY = new BusinessRulesCollection(ImmutableList.of());
@NonNull private final ImmutableList<BusinessRule> list;
@NonNull private final ImmutableMap<BusinessRuleId, BusinessRule> byId;
@NonNull private final ImmutableListMultimap<A... | {
return !list.isEmpty() ? new BusinessRulesCollection(list) : EMPTY;
}
public ImmutableSet<AdTableId> getTriggerTableIds() {return byTriggerTableId.keySet();}
public ImmutableList<BusinessRuleAndTriggers> getByTriggerTableId(@NonNull final AdTableId triggerTableId) {return this.byTriggerTableId.get(triggerTable... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\business_rule\descriptor\model\BusinessRulesCollection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static final class PropertiesLiquibaseConnectionDetails implements LiquibaseConnectionDetails {
private final LiquibaseProperties properties;
PropertiesLiquibaseConnectionDetails(LiquibaseProperties properties) {
this.properties = properties;
}
@Override
public @Nullable String getUsername() {
return... | return (driverClassName != null) ? driverClassName : LiquibaseConnectionDetails.super.getDriverClassName();
}
}
@FunctionalInterface
interface SpringLiquibaseCustomizer {
/**
* Customize the given {@link SpringLiquibase} instance.
* @param springLiquibase the instance to configure
*/
void customize... | repos\spring-boot-4.0.1\module\spring-boot-liquibase\src\main\java\org\springframework\boot\liquibase\autoconfigure\LiquibaseAutoConfiguration.java | 2 |
请完成以下Spring Boot application配置 | spring:
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
destinations:
queues:
NYSE:
exchange: nyse
routing-key: NYSE
IBOV:
exchange: ibov
routing- | key: IBOV
topics:
weather:
exchange: alerts
routing-key: WEATHER | repos\tutorials-master\spring-reactive-modules\spring-webflux-amqp\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getApprovedScopes() {
return approvedScopes;
}
public void setApprovedScopes(String approvedScopes) {
this.approvedScopes = approvedScopes;
}
... | return redirectUri;
}
public void setRedirectUri(String redirectUri) {
this.redirectUri = redirectUri;
}
public LocalDateTime getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(LocalDateTime expirationDate) {
this.expirationDate = expirationDa... | repos\tutorials-master\security-modules\oauth2-framework-impl\oauth2-authorization-server\src\main\java\com\baeldung\oauth2\authorization\server\model\AuthorizationCode.java | 1 |
请完成以下Java代码 | private int changeFieldLength(final int adColumnId, final String columnName, final int length, final String tableName)
{
int rowsEffected = -1;
final String selectSql = "SELECT FieldLength FROM AD_Column WHERE AD_Column_ID=" + adColumnId;
final String alterSql = "ALTER TABLE " + tableName + " MODIFY " + columnN... | DB.executeUpdateAndThrowExceptionOnFail(updateSql, ITrx.TRXNAME_ThreadInherited);
}
}
catch (final SQLException ex)
{
throw new DBException(ex, selectSql);
}
finally
{
DB.close(rs, selectStmt);
}
// Update number of rows effected.
rowsEffected++;
return rowsEffected;
} // changeFieldLeng... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\ColumnEncryption.java | 1 |
请完成以下Java代码 | protected String getImportOrderBySql()
{
return I_I_Datev_Payment.COLUMNNAME_C_BPartner_ID;
}
@Override
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 I... | 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 class BatchPartResource extends BatchPartBaseResource {
@Autowired
protected RestResponseFactory restResponseFactory;
@Autowired
protected ProcessEngineConfigurationImpl processEngineConfiguration;
@ApiOperation(value = "Get a single batch part", tags = { "Batch parts" })
@ApiRespo... | @ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the requested batch part was found and the batch part document has been returned. The response contains the raw batch part document and always has a Content-type of application/json."),
@ApiResponse(code = 404, message = "Indi... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\management\BatchPartResource.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private String computeBPartnerNameToExport(@NonNull final JsonResponseBPartner jsonResponseBPartner)
{
final String bpartnerName = Stream.of(jsonResponseBPartner.getName(),
jsonResponseBPartner.getName2(),
jsonResponseBPartner.getName3())
.filter(Check::isNotBlank)
.collect(Collecto... | {
if (Check.isEmpty(roles))
{
return null;
}
return roles.stream()
.map(JsonResponseContactRole::getName)
.collect(ImmutableList.toImmutableList());
}
@NonNull
private static JsonVendor.JsonVendorBuilder initVendorWithLocationFields(@NonNull final JsonResponseLocation jsonResponseLocation)
{
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\to_grs\bpartner\processor\ExportVendorProcessor.java | 2 |
请完成以下Java代码 | protected void handleOrderByCreateTimeConfig(ExternalTaskClientBuilder builder) {
String orderByCreateTime = clientConfiguration.getOrderByCreateTime();
if (STRING_ORDER_BY_ASC_VALUE.equals(orderByCreateTime)) {
builder.orderByCreateTime().asc();
return;
}
if (STRING_ORDER_BY_DESC_VALUE.eq... | public void setClientConfiguration(ClientConfiguration clientConfiguration) {
this.clientConfiguration = clientConfiguration;
}
public List<ClientRequestInterceptor> getRequestInterceptors() {
return requestInterceptors;
}
protected void close() {
if (client != null) {
client.stop();
}
... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\client\ClientFactory.java | 1 |
请完成以下Java代码 | public void invalidateView(final ViewId viewId)
{
getViewsStorageFor(viewId).invalidateView(viewId);
logger.trace("Invalided view {}", viewId);
}
@Override
public void invalidateView(final IView view)
{
invalidateView(view.getViewId());
}
@Override
public void notifyRecordsChangedAsync(@NonNull final Ta... | {
return;
}
final MutableInt notifiedCount = MutableInt.zero();
for (final IView view : views)
{
try
{
final boolean watchedByFrontend = isWatchedByFrontend(view.getViewId());
view.notifyRecordsChanged(recordRefs, watchedByFrontend);
notifiedCount.incrementAndGet();
}
catch (final Ex... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewsRepository.java | 1 |
请完成以下Java代码 | public MaterialDescriptor withQuantity(@NonNull final BigDecimal quantity)
{
final MaterialDescriptor result = MaterialDescriptor.builder()
.quantity(quantity)
.date(this.date)
.productDescriptor(this)
.warehouseId(this.warehouseId)
.locatorId(this.locatorId)
.customerId(this.customerId)
... | }
public MaterialDescriptor withCustomerId(@Nullable final BPartnerId customerId)
{
final MaterialDescriptor result = MaterialDescriptor.builder()
.warehouseId(this.warehouseId)
.locatorId(this.locatorId)
.date(this.date)
.productDescriptor(this)
.customerId(customerId)
.quantity(this.quant... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\MaterialDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getHANDLINGINSTRCODE() {
return handlinginstrcode;
}
/**
* Sets the value of the handlinginstrcode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHANDLINGINSTRCODE(String value) {
this.handl... | }
/**
* Gets the value of the hazardousmatname property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHAZARDOUSMATNAME() {
return hazardousmatname;
}
/**
* Sets the value of the hazardousmatname property.
* ... | 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\PHAND1.java | 2 |
请完成以下Java代码 | public static Supplier<ICalloutInstance> supplier(final String methodNameFQ)
{
Check.assumeNotEmpty(methodNameFQ, "methodNameFQ not empty");
final String classname;
final String methodName;
final int methodStartIdx = methodNameFQ.lastIndexOf('.');
if (methodStartIdx != -1) // no class
{
class... | return Objects.hash(id);
}
@Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
final MethodNameCalloutInstance other = EqualsBuilder.getOther(this, obj);
if (other == null)
{
return false;
}
return id.equals(other.id);
}
@Override
public void execute(fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\api\impl\MethodNameCalloutInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class JacksonConfiguration {
@Bean
@ConditionalOnSingleCandidate(ObjectMapper.class)
ClusterEnvironmentBuilderCustomizer jacksonClusterEnvironmentBuilderCustomizer(ObjectMapper objectMapper) {
return new JacksonClusterEnvironmentBuilderCustomizer(
objectMapper.copy().registerModule(new JsonValueMo... | }
@Override
public String getConnectionString() {
String connectionString = this.properties.getConnectionString();
Assert.state(connectionString != null, "'connectionString' must not be null");
return connectionString;
}
@Override
public @Nullable String getUsername() {
return this.properties.ge... | repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseAutoConfiguration.java | 2 |
请完成以下Java代码 | public class EncryptableConfigurationPropertySourcesPropertySource extends PropertySource<Iterable<ConfigurationPropertySource>>
implements EncryptablePropertySource<Iterable<ConfigurationPropertySource>> {
private final PropertySource<Iterable<ConfigurationPropertySource>> delegate;
/**
* <p>Con... | }
private ConfigurationProperty findConfigurationProperty(String name) {
try {
return findConfigurationProperty(ConfigurationPropertyName.of(name));
}
catch (InvalidConfigurationPropertyNameException ex) {
// simulate non-exposed version of ConfigurationPropertyName.... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\wrapper\EncryptableConfigurationPropertySourcesPropertySource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class FreeMarkerAutoConfiguration {
private static final Log logger = LogFactory.getLog(FreeMarkerAutoConfiguration.class);
private final ApplicationContext applicationContext;
private final FreeMarkerProperties properties;
FreeMarkerAutoConfiguration(ApplicationContext applicationContext, FreeMark... | }
private List<TemplateLocation> getLocations() {
List<TemplateLocation> locations = new ArrayList<>();
for (String templateLoaderPath : this.properties.getTemplateLoaderPath()) {
TemplateLocation location = new TemplateLocation(templateLoaderPath);
locations.add(location);
}
return locations;
}
priv... | repos\spring-boot-4.0.1\module\spring-boot-freemarker\src\main\java\org\springframework\boot\freemarker\autoconfigure\FreeMarkerAutoConfiguration.java | 2 |
请完成以下Java代码 | public final class MixedMoney
{
public static final MixedMoney EMPTY = new MixedMoney(ImmutableMap.of());
@NonNull private final ImmutableMap<CurrencyId, Money> map;
private MixedMoney(@NonNull final Map<CurrencyId, Money> map)
{
this.map = ImmutableMap.copyOf(map);
}
public static Collector<Money, ?, MixedM... | public String toString()
{
return MoreObjects.toStringHelper(this)
.addValue(map.values())
.toString();
}
public Optional<Money> toNoneOrSingleValue()
{
if (map.isEmpty())
{
return Optional.empty();
}
else if (map.size() == 1)
{
return map.values().stream().findFirst();
}
else
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\money\MixedMoney.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getResetKey() {
return resetKey;
}
public void setResetKey(String resetKey) {
this.resetKey = resetKey;
}
public Instant getResetDate() {
return resetDate;
}
public void setResetDate(Instant resetDate) {
this.resetDate = resetDate;
}
publ... | public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof User)) {
return false;
}
return id != null && id.equals(((User) o).id);
}
@Override
public int hashCode() {
// see https://vladmihalcea.com/how-to-imp... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\User.java | 2 |
请完成以下Java代码 | protected final List<PaymentToReconcileRow> getSelectedPaymentToReconcileRows()
{
return streamSelectedRows()
.collect(ImmutableList.toImmutableList());
}
protected ViewId getBanksStatementReconciliationViewId()
{
return getView().getBankStatementViewId();
}
protected final BankStatementReconciliationVi... | protected final BankStatementLineRow getSingleSelectedBankStatementRowOrNull()
{
final ViewRowIdsSelection selection = getParentViewRowIdsSelection();
if (selection == null || selection.isEmpty())
{
return null;
}
final ImmutableList<BankStatementLineRow> rows = getBanksStatementReconciliationView()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\process\PaymentsToReconcileViewBasedProcess.java | 1 |
请完成以下Java代码 | private static Percent extractPercentage(final I_C_CompensationGroup_SchemaLine schemaLinePO)
{
final BigDecimal percentageBD = schemaLinePO.getCompleteOrderDiscount();
return percentageBD != null && percentageBD.signum() != 0
? Percent.of(percentageBD)
: null;
}
private GroupMatcher createGroupMatcher(... | return GroupMatchers.ALWAYS;
}
else
{
final GroupMatcherFactory groupMatcherFactory = groupMatcherFactoriesByType.get(type);
if (groupMatcherFactory == null)
{
throw new AdempiereException("No " + GroupMatcherFactory.class + " found for type=" + type)
.setParameter("schemaLine", compensationLin... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\GroupTemplateRepository.java | 1 |
请完成以下Java代码 | public double doubleValue() {
return (double)sum();
}
/**
* Serialization proxy, used to avoid reference to the non-public
* Striped64 superclass in serialized forms.
* @serial include
*/
private static class SerializationProxy implements Serializable {
private static fi... | /**
* Returns a
* <a href="../../../../serialized-form.html#java.util.concurrent.atomic.LongAdder.SerializationProxy">
* SerializationProxy</a>
* representing the state of this instance.
*
* @return a {@link SerializationProxy}
* representing the state of this instance
*/
pri... | repos\tutorials-master\jmh\src\main\java\com\baeldung\falsesharing\LongAdder.java | 1 |
请完成以下Java代码 | public boolean isEnabled() {return sysConfigBL.getBooleanValue(SYSCONFIG_Enabled, true);}
@Override
public void schedule(@NonNull final DocumentPostRequest request)
{
schedule(DocumentPostMultiRequest.of(request));
}
@Override
public void schedule(@NonNull DocumentPostMultiRequest requests)
{
if (!isEnable... | // TODO check Profiles.isProfileActive(Profiles.PROFILE_AccountingService) ... maybe not
// TODO check if disabled? maybe not....
logger.debug("Posting directly: {}", this);
final Properties ctx = Env.newTemporaryCtx();
Env.setClientId(ctx, request.getClientId());
try (final IAutoCloseable ignored = Env.sw... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\api\impl\PostingService.java | 1 |
请完成以下Java代码 | public class UserRequest
implements Serializable
{
private final static long serialVersionUID = -1L;
protected int id;
@XmlElement(required = true)
protected String name;
/**
* Gets the value of the id property.
*
*/
public int getId() {
return id;
}
/**
... | */
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
} | repos\tutorials-master\xml-modules\jaxb\src\main\java\com\baeldung\jaxb\gen\UserRequest.java | 1 |
请完成以下Java代码 | default boolean isNoResult(final Object result)
{
return result == null
|| Util.same(result, EMPTY_RESULT);
}
@Override
default boolean isNullExpression()
{
return false;
}
/**
* Resolves all variables which available and returns a new string expression.
*
* @param ctx
* @return string expressi... | *
* @return cached expression
*/
default ICachedStringExpression caching()
{
return CachedStringExpression.wrapIfPossible(this);
}
/**
* @return same as {@link #toString()} but the whole string representation will be on one line (new lines are stripped)
*/
default String toOneLineString()
{
return t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\IStringExpression.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getDeviceInfo() {
re... | public String getGoodsTag() {
return goodsTag;
}
public void setGoodsTag(String goodsTag) {
this.goodsTag = goodsTag;
}
public String getNotifyUrl() {
return notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\weixinpay\WeiXinPrePay.java | 2 |
请完成以下Java代码 | protected String doIt()
{
final List<I_C_OrderLine> selectedOrderLines = getSelectedOrderLines();
Check.assumeNotEmpty(selectedOrderLines, "selectedOrderLines is not empty");
final ListMultimap<GroupTemplate, OrderLineId> orderLineIdsByGroupTemplate = extractOrderLineIdsByGroupTemplate(selectedOrderLines);
if... | orderLineIdsByGroupTemplate.put(groupTemplate, OrderLineId.ofRepoId(orderLine.getC_OrderLine_ID()));
}
return orderLineIdsByGroupTemplate;
}
@Nullable
private GroupTemplate extractGroupTemplate(final I_C_OrderLine orderLine)
{
final ProductId productId = ProductId.ofRepoIdOrNull(orderLine.getM_Product_ID());... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\process\C_Order_CreateCompensationMultiGroups.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CustomerEditor extends VerticalLayout implements KeyNotifier {
private final CustomerRepository repository;
/**
* The currently edited customer
*/
private Customer customer;
/* Fields to edit properties in Customer entity */
TextField firstName = new TextField("First name");
TextField lastName... | public interface ChangeHandler {
void onChange();
}
public final void editCustomer(Customer c) {
if (c == null) {
setVisible(false);
return;
}
final boolean persisted = c.getId() != null;
if (persisted) {
// Find fresh entity for editing
// In a more complex app, you might want to load
// th... | repos\springboot-demo-master\vaadin\src\main\java\com\et\vaadin\view\CustomerEditor.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static class UUISelection
{
int size;
String uuid;
Instant time;
}
public <T, ET extends T> TypedSqlQuery<ET> createUUIDSelectionQuery(
@NonNull final IContextAware ctx,
@NonNull final Class<ET> clazz,
@NonNull final String querySelectionUUID)
{
final String tableName = InterfaceWrapperHelp... | + ", " + I_T_Query_Selection.COLUMNNAME_Line + " as " + SELECTION_LINE_ALIAS
+ " FROM " + I_T_Query_Selection.Table_Name
+ ") s "
+ "\n LEFT OUTER JOIN " + tableName + " ON (" + keyColumnNameFQ + "=s.ZZ_Record_ID)";
final String selectionWhereClause = "s.ZZ_UUID=?";
final String selectionOrderBy = "s."... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\selection\QuerySelectionHelper.java | 2 |
请完成以下Java代码 | public class ParticipantImpl extends BaseElementImpl implements Participant {
protected static Attribute<String> nameAttribute;
protected static AttributeReference<Process> processRefAttribute;
protected static ElementReferenceCollection<Interface, InterfaceRef> interfaceRefCollection;
protected static Element... | public ParticipantImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public Process getProcess() {
return processRefAttribute.g... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ParticipantImpl.java | 1 |
请完成以下Java代码 | public final class DelegatingRequestMatcherHeaderWriter implements HeaderWriter {
private final RequestMatcher requestMatcher;
private final HeaderWriter delegateHeaderWriter;
/**
* Creates a new instance
* @param requestMatcher the {@link RequestMatcher} to use. If returns true, the
* delegateHeaderWriter ... | @Override
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
if (this.requestMatcher.matches(request)) {
this.delegateHeaderWriter.writeHeaders(request, response);
}
}
@Override
public String toString() {
return getClass().getName() + " [requestMatcher=" + this.requestMat... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\DelegatingRequestMatcherHeaderWriter.java | 1 |
请完成以下Java代码 | public int getConfirmQueryRecords()
{
return constraint.getConfirmQueryRecords();
}
/**
* Converts the given <code>maxQueryRecords</code> restriction to an actual number of rows.
*
* If there was NO maximum number of rows configured, then ZERO will be returned.
*
* @return maximum number of rows allow... | private WindowMaxQueryRecordsConstraint getConstraint()
{
return getUserRolePermissions()
.getConstraint(WindowMaxQueryRecordsConstraint.class)
.orElse(WindowMaxQueryRecordsConstraint.DEFAULT);
}
private IUserRolePermissions getUserRolePermissions()
{
if (userRolePermissions != null)
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\GridTabMaxRowsRestrictionChecker.java | 1 |
请完成以下Java代码 | private ViewRowIdsOrderedSelection create()
{
return huEditorViewRepository.createSelection(viewEvaluationCtx, viewId, filters, orderBys, filterConverterCtx);
}
public ViewRowIdsOrderedSelection get()
{
return defaultSelectionRef.computeIfNull(this::create);
}
/**
* @return true if selection was ... | defaultSelectionRef.computeIfNull(this::create); // make sure it's not null (might be null if it was invalidated)
final ViewRowIdsOrderedSelection defaultSelectionNew = defaultSelectionRef.compute(mapper);
return !ViewRowIdsOrderedSelection.equals(defaultSelectionOld, defaultSelectionNew);
}
public void del... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuffer_HighVolume.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Class<? extends BatchEntity> getManagedEntityClass() {
return BatchEntityImpl.class;
}
@Override
public BatchEntity create() {
return new BatchEntityImpl();
}
@Override
@SuppressWarnings("unchecked")
public List<Batch> findBatchesBySearchKey(String searchKey) {
... | }
@Override
public void deleteBatches(BatchQueryImpl batchQuery) {
getDbSqlSession().delete("bulkDeleteBytesForBatches", batchQuery, getManagedEntityClass());
getDbSqlSession().delete("bulkDeleteBatchPartsForBatches", batchQuery, getManagedEntityClass());
getDbSqlSession().delete("bulkD... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\data\impl\MybatisBatchDataManager.java | 2 |
请完成以下Java代码 | public String getModelTableNameOrNull(final Object model)
{
if (model == null)
{
return null;
}
final IInterfaceWrapperHelper helper = getHelperThatCanHandleOrNull(model);
if (helper == null)
{
return null;
}
return helper.getModelTableNameOrNull(model);
}
@Override
public boolean isNew(final... | }
@Nullable
@Override
public <T> T computeDynAttributeIfAbsent(@NonNull final Object model, @NonNull final String attributeName, @NonNull final Supplier<T> supplier)
{
return getHelperThatCanHandle(model).computeDynAttributeIfAbsent(model, attributeName, supplier);
}
@Override
public <T extends PO> T getPO(f... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\CompositeInterfaceWrapperHelper.java | 1 |
请完成以下Java代码 | public ConfirmPanel build()
{
return new ConfirmPanel(this);
}
public Builder withCancelButton(final boolean withCancelButton)
{
this.withCancelButton = withCancelButton;
return this;
}
public Builder withNewButton(final boolean withNewButton)
{
this.withNewButton = withNewButton;
return ... | }
/**
* Advice builder to create the buttons with text on them.
*/
public Builder withText()
{
return withText(true);
}
/**
* Advice builder to create the buttons without any text on them.
*
* NOTE: this is the default option anyway. You can call it just to explicitly state the obvious.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ConfirmPanel.java | 1 |
请完成以下Java代码 | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException, ServletException {
final SavedRequest savedRequest = this.requestCache.getRequest(request, response);
final String redirectUrl = (savedRequest != null) ? savedRequest.g... | private final String redirectUrl;
private AuthenticationSuccess(String redirectUrl) {
this.redirectUrl = redirectUrl;
}
public String getRedirectUrl() {
return this.redirectUrl;
}
public boolean isAuthenticated() {
return true;
}
}
} | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\HttpMessageConverterAuthenticationSuccessHandler.java | 1 |
请完成以下Java代码 | public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
return this.requiresLogout.matches(exchange)
.filter((result) -> result.isMatch())
.switchIfEmpty(chain.filter(exchange).then(Mono.empty()))
.map((result) -> exchange)
.flatMap(this::flatMapAuthentication)
.flatMap((authentica... | * @param logoutSuccessHandler the handler to use
*/
public void setLogoutSuccessHandler(ServerLogoutSuccessHandler logoutSuccessHandler) {
Assert.notNull(logoutSuccessHandler, "logoutSuccessHandler cannot be null");
this.logoutSuccessHandler = logoutSuccessHandler;
}
/**
* Sets the {@link ServerLogoutHandle... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\authentication\logout\LogoutWebFilter.java | 1 |
请完成以下Java代码 | private void doLogout(HttpServletRequest request, HttpServletResponse response) {
Authentication auth = this.securityContextHolderStrategy.getContext().getAuthentication();
this.handlers.logout(request, response, auth);
}
/**
* Sets the {@link SecurityContextHolderStrategy} to use. The default action is to us... | }
/**
* A {@link SessionInformationExpiredStrategy} that writes an error message to the
* response body.
*
* @author Rob Winch
* @since 4.2
*/
private static final class ResponseBodySessionInformationExpiredStrategy
implements SessionInformationExpiredStrategy {
@Override
public void onExpiredSes... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\session\ConcurrentSessionFilter.java | 1 |
请完成以下Java代码 | public class JdkProxySourceClassUtil {
private static Logger logger = LoggerFactory.getLogger(JdkProxySourceClassUtil.class);
private JdkProxySourceClassUtil() {
}
/**
* @param proxyClassName 代理类名称($proxy4)
* @param aClass 目标类对象
*/
public static void writeClassToDisk(String ... | FileOutputStream fos = null;
try {
fos = new FileOutputStream(path);
fos.write(classFile);
fos.flush();
} catch (IOException e) {
logger.error(e.getMessage(), e);
} finally {
if (fos != null) {
try {
... | repos\spring-boot-student-master\spring-boot-student-mybatis\src\main\java\com\xiaolyuh\mybatis\JdkProxySourceClassUtil.java | 1 |
请完成以下Java代码 | public Float getLifeexpectancy() {
return lifeexpectancy;
}
public void setLifeexpectancy(Float lifeexpectancy) {
this.lifeexpectancy = lifeexpectancy;
}
public Float getGnp() {
return gnp;
}
public void setGnp(Float gnp) {
this.gnp = gnp;
}
public Flo... | }
public void setGovernmentform(String governmentform) {
this.governmentform = governmentform == null ? null : governmentform.trim();
}
public String getHeadofstate() {
return headofstate;
}
public void setHeadofstate(String headofstate) {
this.headofstate = headofstate ==... | repos\spring-boot-quick-master\quick-modules\dao\src\main\java\com\modules\entity\Country.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_ChargeType[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set C... | {
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Name.
@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 (Strin... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ChargeType.java | 1 |
请完成以下Java代码 | public void setStatusDB(final String text)
{
setStatusDB(text, null);
} // setStatusDB
/**
* Set Status DB Info
*
* @param no no
*/
public void setStatusDB(final int no)
{
setStatusDB(String.valueOf(no), null);
} // setStatusDB
/**
* Set Info Line
*
* @param text text
*/
@Override
pub... | return;
}
if (!Env.getUserRolePermissions().isShowPreference())
{
return;
}
//
final RecordInfo info = new RecordInfo(SwingUtils.getFrame(this), adTableId, recordId);
AEnv.showCenterScreen(info);
}
public void removeBorders()
{
statusLine.setBorder(BorderFactory.createEmptyBorder());
statusDB... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\StatusBar.java | 1 |
请完成以下Java代码 | private static HashSet<Integer> collectValueIfPositive(@Nullable HashSet<Integer> collector, int value)
{
if (value <= 0)
{
return collector;
}
if (collector == null)
{
collector = new HashSet<>();
}
collector.add(value);
return collector;
}
private static int singleElementOrZero(@Nullable H... | {
if (collection == null)
{
return 0;
}
if (collection.size() != 1)
{
return 0;
}
final Integer element = collection.iterator().next();
return element != null ? element : 0;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\dimension\Dimension.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PemSslBundleProperties extends SslBundleProperties {
/**
* Keystore properties.
*/
private final Store keystore = new Store();
/**
* Truststore properties.
*/
private final Store truststore = new Store();
public Store getKeystore() {
return this.keystore;
}
public Store getTruststore()... | private boolean verifyKeys;
public @Nullable String getType() {
return this.type;
}
public void setType(@Nullable String type) {
this.type = type;
}
public @Nullable String getCertificate() {
return this.certificate;
}
public void setCertificate(@Nullable String certificate) {
this.certifi... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\PemSslBundleProperties.java | 2 |
请完成以下Java代码 | /* package */class ICNetAmtToInvoiceChecker implements IAggregator<BigDecimal, I_C_Invoice_Candidate>
{
private static final String SYSCONFIG_FailIfNetAmtToInvoiceChecksumNotMatch = "de.metas.invoicecandidate.api.impl.ICNetAmtToInvoiceChecker.FailIfNetAmtToInvoiceChecksumNotMatch";
// Parameters
private BigDecimal ... | public void assertExpectedNetAmtToInvoice(@NonNull final BigDecimal netAmtToInvoiceExpected)
{
Check.assume(netAmtToInvoiceExpected.signum() != 0, "netAmtToInvoiceExpected != 0");
final BigDecimal netAmtToInvoiceActual = getValue();
if (netAmtToInvoiceExpected.compareTo(netAmtToInvoiceActual) != 0)
{
fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\ICNetAmtToInvoiceChecker.java | 1 |
请完成以下Java代码 | private HUEditorRowAttributesProvider getAttributesProviderOrNull()
{
return attributesProvider;
}
public Builder setAttributesProvider(@Nullable final HUEditorRowAttributesProvider attributesProvider)
{
this.attributesProvider = attributesProvider;
return this;
}
public Builder addIncludedRow(@N... | /**
* @param currentRow the row that is currently constructed using this builder
*/
private ImmutableMultimap<OrderLineId, HUEditorRow> prepareIncludedOrderLineReservations(@NonNull final HUEditorRow currentRow)
{
final ImmutableMultimap.Builder<OrderLineId, HUEditorRow> includedOrderLineReservationsBuilde... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRow.java | 1 |
请完成以下Java代码 | public DmnEvaluationException noScriptEngineFoundForLanguage(String expressionLanguage) {
return new DmnEvaluationException(exceptionMessage(
"003",
"Unable to find script engine for expression language '{}'.", expressionLanguage)
);
}
public DmnEngineException decisionTypeNotSupported(DmnDecis... | public DmnDecisionResultException decisionOutputHasMoreThanOneValue(DmnDecisionResultEntries result) {
return new DmnDecisionResultException(exceptionMessage(
"010",
"Unable to get single decision result entry as it has more than one entry '{}'", result)
);
}
public DmnDecisionResultException d... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnEngineLogger.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: mall-admin
profiles:
active: dev #默认为开发环境
servlet:
multipart:
enabled: true #开启文件上传
max-file-size: 10MB #限制文件上传大小为10M
mvc:
pathmatch:
matching-strategy: ant_path_matcher
mybatis:
mapper-locations:
- classpath:dao/*.xml
- classpath*:com/**/m... |
- /minio/upload
aliyun:
oss:
endpoint: oss-cn-shenzhen.aliyuncs.com # oss对外服务的访问域名
accessKeyId: test # 访问身份验证中用到用户标识
accessKeySecret: test # 用户用于加密签名字符串和oss用来验证签名字符串的密钥
bucketName: macro-oss # oss的存储空间
policy:
expire: 300 # 签名有效期(S)
maxSize: 10 # 上传文件大小(M)
callback: http://39... | repos\mall-master\mall-admin\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public String toString()
{
StringBuilder sb = new StringBuilder("AdempiereServerMgr[");
sb.append("Servers=").append(m_servers.size())
.append(",ContextSize=").append(_ctx.size())
.append(",Started=").append(m_start)
.append("]");
return sb.toString();
} // toString
/**
* Get Description
*
*... | for (int i = 0; i < m_servers.size(); i++)
{
AdempiereServer server = m_servers.get(i);
if (server.isAlive())
noRunning++;
else
noStopped++;
}
String info = String.valueOf(m_servers.size())
+ " - Running=" + noRunning
+ " - Stopped=" + noStopped;
return info;
} // getServerCount
/**
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java-legacy\org\compiere\server\AdempiereServerMgr.java | 1 |
请完成以下Java代码 | public boolean applies(final IPricingContext pricingCtx, final IPricingResult result)
{
return includedPricingRules.applies(pricingCtx, result);
}
/**
* Iterates the ctx's {@code pricingCtx}'s priceList's PLVs from a PLV to its respective base-PLV
* and applies the sub-pricing-rules until a price is found or... | private PriceListVersionId getPriceListVersionIdEffective(final IPricingContext pricingCtx, @NonNull final ZonedDateTime date)
{
final I_M_PriceList_Version contextPLV = pricingCtx.getM_PriceList_Version();
if (contextPLV != null)
{
return contextPLV.isActive() ? PriceListVersionId.ofRepoId(contextPLV.getM_Pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\PriceListVersionPricingRule.java | 1 |
请完成以下Java代码 | public void suspend() {
}
@Override
public void resume() {
}
@Override
public void flush() {
}
@Override
public void beforeCommit(boolean readOnly) {
}
@Override
public void beforeCompletion() {
} | @Override
public void afterCommit() {
}
@Override
public void afterCompletion(int status) {
}
@Override
public int getOrder() {
return transactionSynchronizationAdapterOrder;
}
}
} | repos\flowable-engine-main\modules\flowable-spring-common\src\main\java\org\flowable\common\spring\SpringTransactionContext.java | 1 |
请完成以下Java代码 | public B credentials(@Nullable Object credentials) {
Assert.isInstanceOf(Jwt.class, credentials, "credentials must be of type Jwt");
return token((Jwt) credentials);
}
/**
* Use this {@code token} as the token, principal, and credentials. Also sets the
* {@code name} to {@link Jwt#getSubject}.
* @pa... | * @param name the name to use
* @return the {@link Builder} for further configurations
*/
public B name(String name) {
this.name = name;
return (B) this;
}
@Override
public JwtAuthenticationToken build() {
return new JwtAuthenticationToken(this);
}
}
} | repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\authentication\JwtAuthenticationToken.java | 1 |
请完成以下Java代码 | public static boolean isTypeMatching(@NonNull final GlobalQRCode globalQRCode)
{
return HUQRCodeJsonConverter.isTypeMatching(globalQRCode);
}
private static String extractPrintableTopText(final HUQRCode qrCode)
{
final StringBuilder result = new StringBuilder();
final HUQRCodeProductInfo product = qrCode.ge... | @Override
public Optional<LocalDate> getBestBeforeDate()
{
return getAttribute(AttributeConstants.ATTR_BestBeforeDate).map(HUQRCodeAttribute::getValueAsLocalDate);
}
@Override
public Optional<LocalDate> getProductionDate()
{
return getAttribute(AttributeConstants.ProductionDate).map(HUQRCodeAttribute::getVal... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\model\HUQRCode.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setCarrier_Goods_Type_ID (final int Carrier_Goods_Type_ID)
{
if (Carrier_Goods_Type_ID < 1)
set_ValueNoCheck (COLUMNNAME_Carrier_Goods_Type_ID, null);
else
... | @Override
public int getM_Shipper_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_Goods_Type.java | 1 |
请完成以下Java代码 | private static Executor createAsyncExecutor()
{
final CustomizableThreadFactory asyncThreadFactory = new CustomizableThreadFactory(SecurPharmActionProcessor.class.getSimpleName());
asyncThreadFactory.setDaemon(true);
return Executors.newSingleThreadExecutor(asyncThreadFactory);
}
@Override
public void setSe... | private AsyncSecurPharmActionsHandler(
@NonNull final SecurPharmActionsHandler delegate,
@NonNull final Executor executor)
{
this.delegate = delegate;
this.executor = executor;
}
public void handleActionRequest(@NonNull final SecurPharmaActionRequest request)
{
executor.execute(() -> delegate.... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\actions\AsyncSecurPharmActionsDispatcher.java | 1 |
请完成以下Java代码 | public SetJobRetriesByJobsAsyncBuilder jobQuery(JobQuery query) {
this.jobQuery = query;
return this;
}
@Override
public SetJobRetriesByJobsAsyncBuilder jobIds(List<String> jobIds) {
this.jobIds = jobIds;
return this;
}
@Override
public SetJobRetriesAsyncBuilder dueDate(Date dueDate) {
... | @Override
public Batch executeAsync() {
validateParameters();
return commandExecutor.execute(new SetJobsRetriesBatchCmd(jobIds, jobQuery, retries, dueDate, isDueDateSet));
}
protected void validateParameters() {
ensureNotNull("commandExecutor", commandExecutor);
ensureNotNull("retries", retries);... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\management\SetJobRetriesByJobsAsyncBuilderImpl.java | 1 |
请完成以下Java代码 | public class ProcessElementInstanceImpl implements ProcessElementInstance {
protected static final String[] NO_IDS = new String[0];
protected String id;
protected String parentActivityInstanceId;
protected String processInstanceId;
protected String processDefinitionId;
public String getId() {
return ... | public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ProcessElementInstanceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PersonController {
@Autowired
PersonService personService;
Logger logger = LoggerFactory.getLogger(PersonController.class);
@GetMapping("/persons/{id}")
public PersonEntity getPerson(@PathVariable("id") Long id) {
return personService.findPersonById(id);
}
@GetMappin... | @PutMapping("/persons/{id}")
public ResponseEntity<PersonEntity> updatePerson(@PathVariable("id") Long id, @RequestBody PersonEntity person){
try {
PersonEntity entity = personService.updatePerson(id, person);
return new ResponseEntity<>(entity, HttpStatus.OK);
}
catc... | repos\tutorials-master\persistence-modules\hibernate6\src\main\java\com\baeldung\hibernatejfr\rest\PersonController.java | 2 |
请完成以下Java代码 | public String getProcessInstanceId() {
return processInstanceId;
}
public String getCaseInstanceId() {
return caseInstanceId;
}
public String getExecutionId() {
return executionId;
}
public String getCaseExecutionId() {
return caseExecutionId;
}
public String getTaskId() {
return... | return excludeTaskRelated;
}
public String getDetailId() {
return detailId;
}
public String[] getProcessInstanceIds() {
return processInstanceIds;
}
public Date getOccurredBefore() {
return occurredBefore;
}
public Date getOccurredAfter() {
return occurredAfter;
}
public boolean... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricDetailQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class X_QRCode_Attribute_Config extends org.compiere.model.PO implements I_QRCode_Attribute_Config, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -1935730608L;
/** Standard Constructor */
public X_QRCode_Attribute_Config (final Properties ctx, final int QRCode_Attribu... | @Override
public I_QRCode_Configuration getQRCode_Configuration()
{
return get_ValueAsPO(COLUMNNAME_QRCode_Configuration_ID, I_QRCode_Configuration.class);
}
@Override
public void setQRCode_Configuration(final I_QRCode_Configuration QRCode_Configuration)
{
set_ValueFromPO(COLUMNNAME_QRCode_Configuration_ID, ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_QRCode_Attribute_Config.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public final class VatCodeId implements RepoIdAware
{
@JsonCreator
public static VatCodeId ofRepoId(final int repoId)
{
return new VatCodeId(repoId);
}
public static VatCodeId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new VatCodeId(repoId) : null;
}
public static int toRepoId(@Nullable final ... | int repoId;
private VatCodeId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Vat_Code_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\VatCodeId.java | 2 |
请完成以下Java代码 | public class LwM2mResourceObserve {
@Schema(description = "LwM2M Resource Observe id.", example = "0")
int id;
@Schema(description = "LwM2M Resource Observe name.", example = "Data")
String name;
@Schema(description = "LwM2M Resource Observe observe.", example = "false")
boolean observe;
@Sc... | name = name.replaceAll("_", " ");
String [] nameCamel1 = name.split(" ");
String [] nameCamel2 = new String[nameCamel1.length];
int[] idx = { 0 };
Stream.of(nameCamel1).forEach((s -> {
nameCamel2[idx[0]] = toProperCase(idx[0]++, s);
}));
return String.join(""... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\lwm2m\LwM2mResourceObserve.java | 1 |
请完成以下Java代码 | public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final User other = (User) obj;
if (id == null) {
if... | } else if (!password.equals(other.password)) {
return false;
}
if (privileges == null) {
if (other.privileges != null) {
return false;
}
} else if (!privileges.equals(other.privileges)) {
return false;
}
if (username... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\persistence\model\User.java | 1 |
请完成以下Java代码 | public boolean isEnableFeelLegacyBehavior() {
return enableFeelLegacyBehavior;
}
/**
* Controls whether the FEEL legacy behavior is enabled or not
*
* @param enableFeelLegacyBehavior the FEEL legacy behavior
*/
public void setEnableFeelLegacyBehavior(boolean enableFeelLegacyBehavior) {
this.e... | /**
* @return whether blank table outputs are swallowed or returned as {@code null}.
*/
public boolean isReturnBlankTableOutputAsNull() {
return returnBlankTableOutputAsNull;
}
/**
* Controls whether blank table outputs are swallowed or returned as {@code null}.
*
* @param returnBlankTableOutp... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DefaultDmnEngineConfiguration.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.