instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public SecurityFilterChain filterChain(HttpSecurity http, SAMLProcessingFilter samlProcessingFilter) throws Exception {
http
.csrf()
.disable();
http
.httpBasic()
.authenticationEntryPoint(samlEntryPoint);
http
.addFilterBefore(metadataGeneratorFilter(),... | http
.logout()
.addLogoutHandler((request, response, authentication) -> {
try {
response.sendRedirect("/saml/logout");
} catch (IOException e) {
e.printStackTrace();
}
});
http.authenticationProvider(samlAuthenticationP... | repos\tutorials-master\spring-security-modules\spring-security-saml\src\main\java\com\baeldung\saml\config\WebSecurityConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public SAMLProcessingFilter samlWebSSOProcessingFilter(AuthenticationManager authenticationManager) {
SAMLProcessingFilter samlWebSSOProcessingFilter = new SAMLProcessingFilter();
samlWebSSOProcessingFilter.setAuthenticationManager(authenticationManager);
samlWebSSOProcessingFilter.setAuthentica... | http
.addFilterBefore(metadataGeneratorFilter(), ChannelProcessingFilter.class)
.addFilterAfter(samlProcessingFilter, BasicAuthenticationFilter.class)
.addFilterBefore(samlProcessingFilter, CsrfFilter.class);
http
.authorizeRequests()
.antMatchers("/").permitAll()
... | repos\tutorials-master\spring-security-modules\spring-security-saml\src\main\java\com\baeldung\saml\config\WebSecurityConfig.java | 2 |
请完成以下Java代码 | private static long invalidateNoFail(@Nullable final CacheInterface cacheInstance)
{
try (final IAutoCloseable ignored = CacheMDC.putCache(cacheInstance))
{
if (cacheInstance == null)
{
return 0;
}
return cacheInstance.reset();
}
catch (final Exception ex)
{
// log but don't fa... | private static long invalidateNoFail(final CacheInterface cacheInstance, final TableRecordReference recordRef)
{
try (final IAutoCloseable ignored = CacheMDC.putCache(cacheInstance))
{
return cacheInstance.resetForRecordId(recordRef);
}
catch (final Exception ex)
{
// log but don't fail
log... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CacheMgt.java | 1 |
请完成以下Java代码 | public boolean isExitCriterion() {
return isExitCriterion;
}
public void setExitCriterion(boolean isExitCriterion) {
this.isExitCriterion = isExitCriterion;
}
public String getExitType() {
return exitType;
}
public void setExitType(String exitType) {
this.exitType... | @Override
public List<Association> getOutgoingAssociations() {
return outgoingAssociations;
}
@Override
public void setOutgoingAssociations(List<Association> outgoingAssociations) {
this.outgoingAssociations = outgoingAssociations;
}
@Override
public String toString() {
... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Criterion.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CountryController {
@Autowired
private CountryService countryService;
@RequestMapping
public ModelAndView getAll(Country country) {
ModelAndView result = new ModelAndView("index");
List<Country> countryList = countryService.getAllByWeekend(country);
result.addObjec... | result.addObject("country", country);
return result;
}
@RequestMapping(value = "/delete/{id}")
public ModelAndView delete(@PathVariable Integer id, RedirectAttributes ra) {
ModelAndView result = new ModelAndView("redirect:/countries");
countryService.deleteById(id);
ra.addFl... | repos\MyBatis-Spring-Boot-master\src\main\java\tk\mybatis\springboot\controller\CountryController.java | 2 |
请完成以下Java代码 | private static String getFailureMessage(Throwable th) {
String failureMessage;
if (th != null) {
if (!StringUtils.isEmpty(th.getMessage())) {
failureMessage = th.getMessage();
} else {
failureMessage = th.getClass().getSimpleName();
}
... | private void persistDebugOutput(TbMsg msg, Set<String> relationTypes) {
persistDebugOutput(msg, relationTypes, null, null);
}
private void persistDebugOutput(TbMsg msg, Set<String> relationTypes, Throwable error, String failureMessage) {
RuleNode ruleNode = nodeCtx.getSelf();
if (DebugM... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\ruleChain\DefaultTbContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getJmx() {
return this.jmx;
}
public void setJmx(String jmx) {
this.jmx = jmx;
}
public String getLocator() {
return this.locator;
}
public void setLocator(String locator) {
this.locator = locator;
} | public String getServer() {
return this.server;
}
public void setServer(String server) {
this.server = server;
}
public String getWeb() {
return this.web;
}
public void setWeb(String web) {
this.web = web;
}
}
} | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\SslProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Iterator<FTSJoinColumn> iterator()
{
return joinColumns.iterator();
}
public String buildJoinCondition(
@NonNull final String targetTableNameOrAlias,
@Nullable final String selectionTableNameOrAlias)
{
Check.assumeNotEmpty(targetTableNameOrAlias, "targetTableNameOrAlias not empty");
final Strin... | sql.append("(")
.append(selectionTableNameOrAliasWithDot).append(joinColumn.getSelectionTableColumnName()).append(" IS NULL")
.append(" OR ")
.append(targetTableNameOrAlias).append(".").append(joinColumn.getTargetTableColumnName())
.append(" IS NOT DISTINCT FROM ")
.append(selectionTableNa... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSJoinColumnList.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static final class StaticResourceRequestMatcher
extends ApplicationContextRequestMatcher<DispatcherServletPath> {
private final Set<StaticResourceLocation> locations;
private volatile @Nullable RequestMatcher delegate;
private StaticResourceRequestMatcher(Set<StaticResourceLocation> locations) {
s... | private Stream<RequestMatcher> getDelegateMatchers(DispatcherServletPath dispatcherServletPath) {
return getPatterns(dispatcherServletPath).map(PathPatternRequestMatcher.withDefaults()::matcher);
}
private Stream<String> getPatterns(DispatcherServletPath dispatcherServletPath) {
return this.locations.stream(... | repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\web\servlet\StaticResourceRequest.java | 2 |
请完成以下Java代码 | private Set<ConfigAttribute> getUnsupportedAttributes(Collection<ConfigAttribute> attrDefs) {
Set<ConfigAttribute> unsupportedAttributes = new HashSet<>();
for (ConfigAttribute attr : attrDefs) {
if (!this.channelDecisionManager.supports(attr)) {
unsupportedAttributes.add(attr);
}
}
return unsupported... | }
protected @Nullable ChannelDecisionManager getChannelDecisionManager() {
return this.channelDecisionManager;
}
protected FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {
return this.securityMetadataSource;
}
public void setChannelDecisionManager(ChannelDecisionManager channelDecisionMa... | repos\spring-security-main\access\src\main\java\org\springframework\security\web\access\channel\ChannelProcessingFilter.java | 1 |
请完成以下Java代码 | public void assertAssignable(final I_M_HU hu, final Object model, final String trxName) throws HUNotAssignableException
{
final I_M_ReceiptSchedule receiptSchedule = getReceiptScheduleOrNull(model);
if (receiptSchedule == null)
{
// does not apply
return;
}
//
// Only HUs which have HUStatus=Plannin... | */
@Override
public void onHUAssigned(final I_M_HU hu, final Object model, final String trxName)
{
final I_M_ReceiptSchedule receiptSchedule = getReceiptScheduleOrNull(model);
if (receiptSchedule == null)
{
// does not apply
return;
}
//
// Update HU's locator (if needed)
final WarehouseId wareh... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\ReceiptScheduleHUAssignmentListener.java | 1 |
请完成以下Java代码 | private Object getBody(@NonNull final ContentCachingResponseWrapper responseWrapper)
{
if (responseWrapper.getContentSize() <= 0)
{
return null;
}
final MediaType contentType = getContentType(responseWrapper);
if (contentType == null)
{
return null;
}
else if (contentType.includes(MediaType.TEXT... | {
if (bodyCandidate == null)
{
return null;
}
final MediaType contentType = getContentType(httpHeaders);
if (contentType == null)
{
return null;
}
else if (contentType.includes(MediaType.TEXT_PLAIN))
{
return bodyCandidate;
}
else if (contentType.includes(MediaType.APPLICATION_JSON))
{... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\dto\ApiResponseMapper.java | 1 |
请完成以下Java代码 | public Set<String> getReferencedEntityIds() {
Set<String> referencedEntityIds = new HashSet<>();
return referencedEntityIds;
}
@Override
public Map<String, Class> getReferencedEntitiesIdAndClass() {
Map<String, Class> referenceIdAndClass = new HashMap<>();
if (processInstanceId != null){
r... | }
if (getByteArrayValueId() != null){
referenceIdAndClass.put(getByteArrayValueId(), ByteArrayEntity.class);
}
return referenceIdAndClass;
}
/**
*
* @return <code>true</code> <code>processDefinitionId</code> is introduced in 7.13,
* the check is used to created missing history at {@lin... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\VariableInstanceEntity.java | 1 |
请完成以下Java代码 | public String firstLabel()
{
return labelMap.keySet().iterator().next();
}
/**
*
* @param param 类似 “希望 v 7685 vn 616” 的字串
* @return
*/
public static Item create(String param)
{
if (param == null) return null;
String mark = "\\s"; // 分隔符,历史格式用空格,但是现在觉得用... | return create(array);
}
public static Item create(String param[])
{
if (param.length % 2 == 0) return null;
Item item = new Item(param[0]);
int natureCount = (param.length - 1) / 2;
for (int i = 0; i < natureCount; ++i)
{
item.labelMap.put(param[1 + 2 * i... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\item\Item.java | 1 |
请完成以下Java代码 | public void setURL3 (final @Nullable java.lang.String URL3)
{
set_Value (COLUMNNAME_URL3, URL3);
}
@Override
public java.lang.String getURL3()
{
return get_ValueAsString(COLUMNNAME_URL3);
}
@Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Overr... | {
return get_ValueAsString(COLUMNNAME_VATaxID);
}
@Override
public void setVendorCategory (final @Nullable java.lang.String VendorCategory)
{
set_Value (COLUMNNAME_VendorCategory, VendorCategory);
}
@Override
public java.lang.String getVendorCategory()
{
return get_ValueAsString(COLUMNNAME_VendorCatego... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setPassword(@Nullable String password) {
this.password = password;
}
public @Nullable String getRetentionPolicy() {
return this.retentionPolicy;
}
public void setRetentionPolicy(@Nullable String retentionPolicy) {
this.retentionPolicy = retentionPolicy;
}
public @Nullable String getRetentionD... | }
public boolean isAutoCreateDb() {
return this.autoCreateDb;
}
public void setAutoCreateDb(boolean autoCreateDb) {
this.autoCreateDb = autoCreateDb;
}
public @Nullable InfluxApiVersion getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(@Nullable InfluxApiVersion apiVersion) {
this... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\influx\InfluxProperties.java | 2 |
请完成以下Java代码 | public class DeviceQRCodeJsonConverter
{
public static GlobalQRCodeType GLOBAL_QRCODE_TYPE = GlobalQRCodeType.ofString("SCALE");
public static String toGlobalQRCodeJsonString(final DeviceQRCode qrCode)
{
return toGlobalQRCode(qrCode).getAsString();
}
public static GlobalQRCode toGlobalQRCode(final DeviceQRCode... | .setParameter("globalQRCode", globalQRCode); // avoid adding it to error message, it might be quite long
}
final GlobalQRCodeVersion version = globalQRCode.getVersion();
if (GlobalQRCodeVersion.equals(globalQRCode.getVersion(), JsonConverterV1.GLOBAL_QRCODE_VERSION))
{
return JsonConverterV1.fromGlobalQRCod... | repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\qrcode\DeviceQRCodeJsonConverter.java | 1 |
请完成以下Java代码 | public ParameterValueProvider getVersionTagValueProvider() {
return versionTagValueProvider;
}
public void setVersionTagValueProvider(ParameterValueProvider version) {
this.versionTagValueProvider = version;
}
public void setTenantIdProvider(ParameterValueProvider tenantIdProvider) {
this.tenantId... | return defaultTenantId;
}
}
public ParameterValueProvider getTenantIdProvider() {
return tenantIdProvider;
}
/**
* @return true if any of the references that specify the callable element are non-literal and need to be resolved with
* potential side effects to determine the process or case defini... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\BaseCallableElement.java | 1 |
请完成以下Java代码 | public class InstantAndOrgId implements Comparable<InstantAndOrgId>
{
@NonNull private final Instant instant;
@NonNull private final OrgId orgId;
private InstantAndOrgId(@NonNull final Instant instant, @NonNull final OrgId orgId)
{
this.instant = instant;
this.orgId = orgId;
}
public @NonNull static Instant... | return new InstantAndOrgId(timestamp.toInstant(), orgId);
}
public @NonNull static InstantAndOrgId ofTimestamp(@NonNull final java.sql.Timestamp timestamp, final int orgRepoId)
{
return new InstantAndOrgId(timestamp.toInstant(), OrgId.ofRepoId(orgRepoId));
}
public @NonNull OrgId getOrgId() {return orgId;}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\InstantAndOrgId.java | 1 |
请完成以下Java代码 | public int getAD_Issue_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Issue_ID);
}
@Override
public void setConfigSummary (final @Nullable java.lang.String ConfigSummary)
{
set_Value (COLUMNNAME_ConfigSummary, ConfigSummary);
}
@Override
public java.lang.String getConfigSummary()
{
return get_ValueAsStri... | return get_ValueAsInt(COLUMNNAME_DHL_ShipmentOrderRequest_ID);
}
@Override
public void setDurationMillis (final int DurationMillis)
{
set_Value (COLUMNNAME_DurationMillis, DurationMillis);
}
@Override
public int getDurationMillis()
{
return get_ValueAsInt(COLUMNNAME_DurationMillis);
}
@Override
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java-gen\de\metas\shipper\gateway\dhl\model\X_Dhl_ShipmentOrder_Log.java | 1 |
请完成以下Java代码 | public Date getStartTime() {
return null;
}
@Override
public String getStartUserId() {
return null;
}
@Override
public String getCallbackId() {
return null;
}
@Override
public String getCallbackType() {
return null;
} | @Override
public String getReferenceId() {
return null;
}
@Override
public String getReferenceType() {
return null;
}
@Override
public String getPropagatedStageInstanceId() {
return null;
}
} | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5ProcessInstanceWrapper.java | 1 |
请完成以下Java代码 | private CompositeSqlLookupFilter build()
{
final IValidationRuleFactory validationRuleFactory = Services.get(IValidationRuleFactory.class);
final ArrayList<SqlLookupFilter> filters = new ArrayList<>();
for (LookupDescriptorProvider.LookupScope scope : adValRuleIdByScope.keySet())
{
final AdValRuleId adVal... | this.lookupTableName = lookupTableName;
}
public void setCtxTableName(final String ctxTableName)
{
assertNotBuilt();
this.ctxTableName = ctxTableName;
}
public void setCtxColumnName(final String ctxColumnName)
{
assertNotBuilt();
this.ctxColumnName = ctxColumnName;
}
public void setDisplayType(final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\CompositeSqlLookupFilterBuilder.java | 1 |
请完成以下Java代码 | public class X_PMM_Message extends org.compiere.model.PO implements I_PMM_Message, org.compiere.model.I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1982151971L;
/** Standard Constructor */
public X_PMM_Message (Properties ctx, int PMM_Message_ID, String trxName)
{
super... | public void setMsgText (java.lang.String MsgText)
{
set_Value (COLUMNNAME_MsgText, MsgText);
}
/** Get Message Text.
@return Textual Informational, Menu or Error Message
*/
@Override
public java.lang.String getMsgText ()
{
return (java.lang.String)get_Value(COLUMNNAME_MsgText);
}
/** Set PMM_Message... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_Message.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Foo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(nullable = false)
private String name;
@Version
private long version;
public Foo() {
super();
}
public Foo(final String name) {
super();
... | //
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-2\src\main\java\com\baeldung\mime\Foo.java | 2 |
请完成以下Java代码 | public static ILoggable console(@Nullable final String prefix)
{
return ConsoleLoggable.withPrefix(prefix);
}
public static ILoggable logback(@NonNull final Logger logger, @NonNull final Level logLevel)
{
return new LogbackLoggable(logger, logLevel);
}
public static IAutoCloseable temporarySetLoggable(final... | * Create a new {@link ILoggable} instance that delegates {@link #addLog(String, Object...)} invocations to the thread-local instance and in addition logs to the given logger.
*/
public static ILoggable withLogger(@NonNull final Logger logger, @NonNull final Level level)
{
return new LoggableWithLogger(get(), logg... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\Loggables.java | 1 |
请完成以下Java代码 | public void setCardCtryCd(String value) {
this.cardCtryCd = value;
}
/**
* Gets the value of the cardBrnd property.
*
* @return
* possible object is
* {@link GenericIdentification1 }
*
*/
public GenericIdentification1 getCardBrnd() {
return c... | /**
* Gets the value of the addtlCardData property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddtlCardData() {
return addtlCardData;
}
/**
* Sets the value of the addtlCardData property.
*
* @param valu... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\PaymentCard4.java | 1 |
请完成以下Java代码 | class DeferredServletContainerInitializers
implements ServletContainerInitializer, TomcatEmbeddedContext.DeferredStartupExceptions {
private static final Log logger = LogFactory.getLog(DeferredServletContainerInitializers.class);
private final Iterable<ServletContextInitializer> initializers;
private volatile @... | catch (Exception ex) {
this.startUpException = ex;
// Prevent Tomcat from logging and re-throwing when we know we can
// deal with it in the main thread, but log for information here.
if (logger.isErrorEnabled()) {
logger.error("Error starting Tomcat context. Exception: " + ex.getClass().getName() + ". ... | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\servlet\DeferredServletContainerInitializers.java | 1 |
请完成以下Java代码 | private int determineAcct (int C_AcctSchema_ID, int M_Product_ID, int C_Charge_ID, BigDecimal lineAmt)
{
int invoiceAcct =0;
if (M_Product_ID == 0 && C_Charge_ID != 0)
{
if(lineAmt.signum() > 0){
String sqlb = "SELECT CH_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? and C_AcctSchema_ID=?";
invo... | }
}
return invoiceAcct;
}
/**
* Get tax posting accounts for invoice.
*
*
*/
private int determineTaxAcct (int C_AcctSchema_ID, int C_Tax_ID)
{
int invoiceAcct =0;
String sqlb = "SELECT T_Expense_Acct FROM C_Tax_Acct WHERE C_AcctSchema_ID=? and C_Tax_ID=?";
invoiceAcct = DB.getSQLV... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\FA\CreateInvoicedAsset.java | 1 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getM_MovementConfirm_ID()));
}
/** Set Move Line Confirm.
@param M_MovementLineConfirm_ID
Inventory Move Line Confirmation
*/
public void setM_MovementLineConfirm_ID (int M_MovementLineConfirm_ID)
{
if (... | {
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MovementLineConfirm.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Class<?> getObjectType() {
return MapReactiveUserDetailsService.class;
}
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
this.userDetails.setResourceLoader(resourceLoader);
}
/**
* Sets the location of a Resource that is a Properties file in the format defined in
* {@link ... | */
public static ReactiveUserDetailsServiceResourceFactoryBean fromResource(Resource propertiesResource) {
ReactiveUserDetailsServiceResourceFactoryBean result = new ReactiveUserDetailsServiceResourceFactoryBean();
result.setResource(propertiesResource);
return result;
}
/**
* Create a ReactiveUserDetailsSe... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\core\userdetails\ReactiveUserDetailsServiceResourceFactoryBean.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String ajaxPaymentList(HttpServletRequest request, @RequestBody JSONParam[] params) throws IllegalAccessException, InvocationTargetException {
// convertToMap定义于父类,将参数数组中的所有元素加入一个HashMap
HashMap<String, String> paramMap = convertToMap(params);
String sEcho = paramMap.get("sEcho");
int start = Integer.par... | settMap.put("userNo", userInfo.getUserNo());
settMap.put("settStatus", status);
settMap.put("merchantRequestNo", merchantRequestNo);
settMap.put("beginDate", beginDate);
settMap.put("endDate", endDate);
PageBean pageBean = rpSettQueryService.querySettRecordListPage(pageParam, settMap);
Long count = Long.... | repos\roncoo-pay-master\roncoo-pay-web-merchant\src\main\java\com\roncoo\pay\controller\sett\SettController.java | 2 |
请完成以下Java代码 | public static ScriptInfo parseScriptInfo(XMLStreamReader xtr) throws Exception {
boolean readyWithChildElements = false;
while (!readyWithChildElements && xtr.hasNext()) {
xtr.next();
if (xtr.isStartElement()) {
if (xtr.getLocalName().equals(CmmnXmlConstants.ELEME... | CmmnXmlUtil.addXMLLocation(script, xtr);
if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_SCRIPT_LANGUAGE))) {
script.setLanguage(xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_SCRIPT_LANGUAGE));
}
if (StringUtils.isNotEmpty(xtr.getAttributeVa... | repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\util\ListenerXmlConverterUtil.java | 1 |
请完成以下Java代码 | public int getM_ForecastLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_ForecastLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_M_RequisitionLine getM_RequisitionLine() throws RuntimeException
{
return (I_M_RequisitionLine)MTable.get(getCtx(), I_M_RequisitionLine.Tabl... | else
set_Value (COLUMNNAME_M_RequisitionLine_ID, Integer.valueOf(M_RequisitionLine_ID));
}
/** Get Requisition Line.
@return Material Requisition Line
*/
public int getM_RequisitionLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_RequisitionLine_ID);
if (ii == null)
return 0;
return ii... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DemandDetail.java | 1 |
请完成以下Java代码 | public void setName(String name) {
this.name = name;
}
public NameAgeEntity getAge() {
return age;
}
public void setAge(NameAgeEntity age) {
this.age = age;
}
public NameCountriesEntity getCountries() {
return countries;
}
public void setCountries(Name... | if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (age == null) {
if (other.age != null)
return false;
} else if (!age.equals(other.age))
return false;
... | repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\business\entities\NameAnalysisEntity.java | 1 |
请完成以下Java代码 | private FilterSql.RecordsToAlwaysIncludeSql toAlwaysIncludeSql(final @NonNull Set<HuId> alwaysIncludeHUIds)
{
return !alwaysIncludeHUIds.isEmpty()
? FilterSql.RecordsToAlwaysIncludeSql.ofColumnNameAndRecordIds(I_M_HU.COLUMNNAME_M_HU_ID, alwaysIncludeHUIds)
: null;
}
private IHUQueryBuilder newHUQuery()
{... | return FilterSql.builder()
.whereClause(whereClause)
.alwaysIncludeSql(toAlwaysIncludeSql(alwaysIncludeHUIds))
.build();
}
@Override
public FilterSql acceptNone() {return FilterSql.ALLOW_NONE;}
@Override
public FilterSql acceptOnly(@NonNull final HuIdsFilterList fixedHUIds, @NonNull final Set<HuId> a... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\filter\HUIdsFilterDataToSqlCaseConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static IDeviceConfigPool of(@NonNull final Collection<IDeviceConfigPool> pools)
{
Check.assumeNotEmpty(pools, "pools is not empty");
if (pools.size() == 1)
{
return pools.iterator().next();
}
else
{
return new CompositeDeviceConfigPool(pools);
}
}
public static IDeviceConfigPool compose(... | @Override
public Set<AttributeCode> getAllAttributeCodes()
{
return pools.stream()
.flatMap(pool -> pool.getAllAttributeCodes().stream())
.collect(ImmutableSet.toImmutableSet());
}
@Override
public List<DeviceConfig> getDeviceConfigsForAttributeCode(@NonNull final AttributeCode attributeCode)
{
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\config\CompositeDeviceConfigPool.java | 2 |
请在Spring Boot框架中完成以下Java代码 | static boolean isRecordIdColumnName(@Nullable final String columnName)
{
if (columnName == null)
{
// should not happen
return false;
}
// name must end with "Record_ID"
if (!columnName.endsWith(ITableRecordReference.COLUMNNAME_Record_ID))
{
return false;
}
// classical case
if (columnName... | * @throws org.adempiere.ad.table.exception.NoSingleKeyColumnException if the given table does not have exactly one key column.
*/
String getSingleKeyColumn(String tableName);
/**
* For the given <code>tableName</code> and <code>recordColumnName</code>, return the name of the column that contains the respective <... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\service\IColumnBL.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void bulkUpdateJobLockWithoutRevisionCheck(List<JobEntity> jobEntities, String lockOwner, Date lockExpirationTime) {
Map<String, Object> params = new HashMap<>(3);
params.put("lockOwner", lockOwner);
params.put("lockExpirationTime", lockExpirationTime);
bulkUpdateEntities("update... | @Override
public void deleteJobsByExecutionId(String executionId) {
DbSqlSession dbSqlSession = getDbSqlSession();
if (isEntityInserted(dbSqlSession, "execution", executionId)) {
deleteCachedEntities(dbSqlSession, jobsByExecutionIdMatcher, executionId);
} else {
bulkD... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisJobDataManager.java | 2 |
请完成以下Java代码 | public String getAttendType() {
return attendType;
}
public void setAttendType(String attendType) {
this.attendType = attendType;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Overr... | sb.append(", name=").append(name);
sb.append(", createTime=").append(createTime);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);
sb.append(", attendCount=").append(attendCount);
sb.append(", attentionCount=").append(attentionCount);
... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsTopic.java | 1 |
请完成以下Java代码 | public class MailTaskJsonConverter extends BaseBpmnJsonConverter {
public static void fillTypes(
Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap,
Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap
) {
fillJsonTypes(conve... | ) {
ServiceTask task = new ServiceTask();
task.setType(ServiceTask.MAIL_TASK);
addField(PROPERTY_MAILTASK_TO, elementNode, task);
addField(PROPERTY_MAILTASK_FROM, elementNode, task);
addField(PROPERTY_MAILTASK_SUBJECT, elementNode, task);
addField(PROPERTY_MAILTASK_CC, el... | repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\MailTaskJsonConverter.java | 1 |
请完成以下Java代码 | public int getNetDays ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NetDays);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valu... | public void setQty (int Qty)
{
set_Value (COLUMNNAME_Qty, Integer.valueOf(Qty));
}
/** Get Quantity.
@return Quantity
*/
public int getQty ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Qty);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Start Date.
@param StartDate
First ef... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Year.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AuthorizationManagerRequestMatcherRegistry rememberMe() {
return access(this.authorizationManagerFactory.rememberMe());
}
/**
* Specify that URLs are allowed by anonymous users.
* @return the {@link AuthorizationManagerRequestMatcherRegistry} for further
* customization
* @since 5.8
*/
p... | * @since 6.3
*/
public final class AuthorizedUrlVariable {
private final String variable;
private AuthorizedUrlVariable(String variable) {
this.variable = variable;
}
/**
* Compares the value of a path variable in the URI with an `Authentication`
* attribute
* <p>
* For example, ... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AuthorizeHttpRequestsConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setMetadataFilename(String metadataFilename) {
Assert.hasText(metadataFilename, "metadataFilename cannot be empty");
Assert.isTrue(metadataFilename.contains("{registrationId}"),
"metadataFilename must contain a {registrationId} match variable");
Assert.isInstanceOf(Saml2MetadataResponseResolverAda... | registrationId = relyingPartyRegistration.getRegistrationId();
String metadata = this.metadataResolver.resolve(relyingPartyRegistration);
String fileName = this.metadataFilename.replace("{registrationId}", registrationId);
return new Saml2MetadataResponse(metadata, fileName);
}
void setRequestMatcher(Requ... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\web\Saml2MetadataFilter.java | 2 |
请完成以下Java代码 | private static AddressDisplaySequence getAddressDisplaySequence(final PickingJobField field)
{
final String pattern = StringUtils.trimBlankToNull(field.getPattern());
if (pattern == null)
{
return null;
}
return AddressDisplaySequence.ofNullable(pattern);
}
private Optional<String> getRuestplatz(@NonN... | return bpLocationId != null
? renderedAddressProvider.getAddress(bpLocationId, displaySequence)
: null;
}
@Value
@Builder
private static class Context
{
@Nullable String salesOrderDocumentNo;
@Nullable String customerName;
@Nullable ZonedDateTime preparationDate;
@Nullable BPartnerLocationId deliv... | repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\DisplayValueProvider.java | 1 |
请完成以下Java代码 | public static final class Builder
{
private final Map<ArrayKey, DocTypeSequence> docTypeSequences = new HashMap<>();
private DocSequenceId defaultDocNoSequenceId = null;
private Builder()
{
}
public DocTypeSequenceMap build()
{
return new DocTypeSequenceMap(this);
}
public void addDocSequenceId... | private static final class DocTypeSequence
{
private final ClientId adClientId;
private final OrgId adOrgId;
private final DocSequenceId docSequenceId;
private DocTypeSequence(
@Nullable final ClientId adClientId,
@Nullable final OrgId adOrgId,
@NonNull final DocSequenceId docSequenceId)
{
th... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\DocTypeSequenceMap.java | 1 |
请完成以下Java代码 | private void setAdditionalContactFields(
@NonNull final JsonCustomerBuilder customerBuilder,
@NonNull final OrderAndLineId orderAndLineId)
{
final I_C_Order orderRecord = orderDAO.getById(orderAndLineId.getOrderId());
customerBuilder
.contactEmail(orderRecord.getEMail())
.contactName(orderRecord.ge... | private void setAdditionalContactFieldsForOxidOrder(
@NonNull final ShipmentSchedule shipmentSchedule,
@NonNull final BPartnerComposite composite,
@NonNull final JsonCustomerBuilder customerBuilder,
@Nullable final BPartnerContactId contactId)
{
if (contactId == null)
{
return;
}
final BPartner... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\shipping\ShipmentCandidateAPIService.java | 1 |
请完成以下Java代码 | public final class DocumentDescriptor implements ETagAware
{
public static Builder builder()
{
return new Builder();
}
private final DocumentLayoutDescriptor layout;
private final DocumentEntityDescriptor entityDescriptor;
// ETag support
private static final Supplier<ETag> nextETagSupplier = ETagAware.newET... | default:
{
throw new IllegalArgumentException("Invalid viewDataType: " + viewDataType);
}
}
}
public DocumentEntityDescriptor getEntityDescriptor()
{
return entityDescriptor;
}
@Override
public ETag getETag()
{
return eTag;
}
//
public static final class Builder
{
private DocumentLayoutD... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentDescriptor.java | 1 |
请完成以下Java代码 | public class Outer {
// Static Nested class
static class StaticNested {
public String message() {
return "This is a static Nested Class";
}
}
// Non-static Nested class
class Nested {
public String message() {
return "This is a non-static Nested Clas... | }
// Nested interface within a class
interface HelloOuter {
public String hello(String name);
}
// Enum within a class
enum Color {
RED, GREEN, BLUE;
}
}
interface HelloWorld {
public String greet(String name);
// Nested class within an interface
class InnerClass... | repos\tutorials-master\core-java-modules\core-java-lang-oop-types-3\src\main\java\com\baeldung\classfile\Outer.java | 1 |
请完成以下Java代码 | public String getExporterVersion() {
return exporterVersion;
}
public void setExporterVersion(String exporterVersion) {
this.exporterVersion = exporterVersion;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = auth... | }
public boolean containsNamespacePrefix(String prefix) {
return namespaceMap.containsKey(prefix);
}
public String getNamespace(String prefix) {
return namespaceMap.get(prefix);
}
public Map<String, String> getNamespaces() {
return namespaceMap;
}
public Map<String, ... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CmmnModel.java | 1 |
请完成以下Java代码 | private IQueryBuilder<I_C_Invoice_Candidate> createICQueryBuilder(final IQueryFilter<I_C_Invoice_Candidate> userSelectionFilter)
{
final IQueryBuilder<I_C_Invoice_Candidate> queryBuilder = Services.get(IQueryBL.class)
.createQueryBuilder(I_C_Invoice_Candidate.class, getCtx(), ITrx.TRXNAME_None)
.filter(userS... | }
return queryBuilder;
}
@Nullable
private ProcessCaptionMapper processCaptionMapper(final IQueryFilter<I_C_Invoice_Candidate> selectionFilter)
{
final IQuery<I_C_Invoice_Candidate> query = prepareNetAmountsToInvoiceForSelectionQuery(selectionFilter);
return processCaptionMapperHelper.getProcessCaptionMappe... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\process\C_Invoice_Candidate_EnqueueSelectionForInvoicing.java | 1 |
请完成以下Java代码 | public base setTarget (String target)
{
addAttribute ("target", target);
return this;
}
/**
* Sets the lang="" and xml:lang="" attributes
*
* @param lang
* the lang="" and xml:lang="" attributes
*/
public Element setLang (String lang)
{
addAttribute ("lang", lang);
addAttribute ("xml... | */
public base addElement (Element element)
{
addElementToRegistry (element);
return (this);
}
/**
* Adds an Element to the element.
*
* @param element
* Adds an Element to the element.
*/
public base addElement (String element)
{
addElementToRegistry (element);
return (this);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\base.java | 1 |
请完成以下Java代码 | public Barcode getBarcode()
{
return m_barcode;
} // getBarcode
/**
* Is Barcode Valid
* @return true if valid
*/
public boolean isValid()
{
return m_valid;
} // isValid
/**
* Layout and Calculate Size
* Set p_width & p_height
* @return true if calculated
*/
protected boolean calculate... | int x = (int)location.x;
if (MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight.equals(p_FieldAlignmentType))
x += p_maxWidth - p_width;
else if (MPrintFormatItem.FIELDALIGNMENTTYPE_Center.equals(p_FieldAlignmentType))
x += (p_maxWidth - p_width) / 2;
int y = (int)location.y;
try {
int w = m_barcod... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\BarcodeElement.java | 1 |
请完成以下Java代码 | public String getCamundaJobPriority() {
return camundaJobPriorityAttribute.getValue(this);
}
public void setCamundaJobPriority(String jobPriority) {
camundaJobPriorityAttribute.setValue(this, jobPriority);
}
@Override
public String getCamundaTaskPriority() {
return camundaTaskPriorityAttribute.g... | camundaHistoryTimeToLiveAttribute.removeAttribute(this);
} else {
camundaHistoryTimeToLiveAttribute.setValue(this, historyTimeToLive);
}
}
@Override
public Boolean isCamundaStartableInTasklist() {
return camundaIsStartableInTasklistAttribute.getValue(this);
}
@Override
public void setCam... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ProcessImpl.java | 1 |
请完成以下Java代码 | public void addCandidateStarterUser(String caseDefinitionId, String userId) {
commandExecutor.execute(new AddIdentityLinkForCaseDefinitionCmd(caseDefinitionId, userId, null, configuration));
}
@Override
public void addCandidateStarterGroup(String caseDefinitionId, String groupId) {
commandE... | }
@Override
public void changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId) {
commandExecutor.execute(new SetDeploymentParentDeploymentIdCmd(deploymentId, newParentDeploymentId));
}
@Override
public List<DmnDecision> getDecisionsForCaseDefinition(Strin... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\CmmnRepositoryServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPassword() {
return user.getPassword();
}
@Override
@JSONField(serialize = false)
public String getUsername() {
return user.getUsername();
}
@JSONField(serialize = false)
@Override
public boolean isAccountNonExpired() {
return true;
}
@... | @Override
public boolean isAccountNonLocked() {
return true;
}
@JSONField(serialize = false)
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
@JSONField(serialize = false)
public boolean isEnabled() {
return user.getEnabled();
... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\security\service\dto\JwtUserDto.java | 2 |
请完成以下Java代码 | public ValueType getParent() {
return null;
}
public boolean canConvertFromTypedValue(TypedValue typedValue) {
return false;
}
public TypedValue convertFromTypedValue(TypedValue typedValue) {
throw unsupportedConversion(typedValue.getType());
}
protected IllegalArgumentException unsupportedCo... | if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
return true;
}
protected Boolean isTransient(Map<String, Object> valueInfo) {
if (valueInfo != null && valueInfo.containsKey(VALUE_INFO_TRANSIENT)) {
Object isTransient... | repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\type\AbstractValueTypeImpl.java | 1 |
请完成以下Java代码 | public ExecutionResource getExecution(String executionId) {
return new ExecutionResourceImpl(getProcessEngine(), executionId, getObjectMapper());
}
@Override
public List<ExecutionDto> getExecutions(UriInfo uriInfo, Integer firstResult,
Integer maxResults) {
ExecutionQueryDto queryDto = new Executio... | ExecutionQueryDto queryDto = new ExecutionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
return queryExecutionsCount(queryDto);
}
@Override
public CountResultDto queryExecutionsCount(ExecutionQueryDto queryDto) {
ProcessEngine engine = getProcessEngine();
queryDto.setObjectMapper(getObjec... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\ExecutionRestServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UniversalBankTransactionType {
@XmlElement(name = "BeneficiaryAccount")
protected List<AccountType> beneficiaryAccount;
@XmlElement(name = "PaymentReference")
protected String paymentReference;
@XmlAttribute(name = "ConsolidatorPayable", namespace = "http://erpel.at/schemas/1p0/documen... | *
*/
public String getPaymentReference() {
return paymentReference;
}
/**
* Sets the value of the paymentReference property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPaymentReference(String value) {
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\UniversalBankTransactionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setSwaggerOpen(Boolean swaggerOpen) {
this.swaggerOpen = swaggerOpen;
}
public Integer getSessionInvalidateTime() {
return sessionInvalidateTime;
}
public void setSessionInvalidateTime(Integer sessionInvalidateTime) {
this.sessionInvalidateTime = sessionInvalidateTi... | public void setHeartbeatTimeout(Integer heartbeatTimeout) {
this.heartbeatTimeout = heartbeatTimeout;
}
public String getPicsPath() {
return picsPath;
}
public void setPicsPath(String picsPath) {
this.picsPath = picsPath;
}
public String getPosapiUrlPrefix() {
... | repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\config\properties\MyProperties.java | 2 |
请完成以下Java代码 | private void createDD_OrderLine(final I_DD_Order ddOrder, final RawMaterialsReturnDDOrderLineCandidate candidate)
{
Check.assume(candidate.isValid(), "candidate is valid: {}", candidate);
final IAttributeSetInstanceAware attributeSetInstanceAware = candidate.getM_Product();
final Quantity qtyToMove = Quantity.o... | ddOrderline.setC_UOM_ID(qtyToMove.getUomId().getRepoId());
ddOrderline.setQtyEntered(qtyToMove.toBigDecimal());
ddOrderline.setQtyOrdered(qtyToMove.toBigDecimal());
ddOrderline.setTargetQty(qtyToMove.toBigDecimal());
//
// Dates
ddOrderline.setDateOrdered(ddOrder.getDateOrdered());
ddOrderline.setDatePro... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\process\DD_Order_GenerateRawMaterialsReturn.java | 1 |
请完成以下Java代码 | public Session getSession() {
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", this.host);
props.put("mail.smtp.port", this.port);
return Session.getInstance(props, new A... | multipart.addBodyPart(attachmentPart2);
message.setContent(multipart);
Transport.send(message);
}
private File getFile(String filename) {
try {
URI uri = this.getClass()
.getClassLoader()
.getResource(filename)
.toURI();
... | repos\tutorials-master\core-java-modules\core-java-networking-2\src\main\java\com\baeldung\mail\mailwithattachment\MailWithAttachmentService.java | 1 |
请完成以下Java代码 | public int getBill_User_ID()
{
return getC_Flatrate_Term().getBill_User_ID();
}
@Override
public int getC_Currency_ID()
{
return Services.get(IPriceListDAO.class).getById(PriceListId.ofRepoId(getM_PriceList_Version().getM_PriceList_ID())).getC_Currency_ID();
}
@Override
public CountryId getCountryId()
{
... | }
return pricingSystemId;
}
@Override
public I_C_Flatrate_Term getC_Flatrate_Term()
{
if (_flatrateTerm == null)
{
_flatrateTerm = Services.get(IFlatrateDAO.class).getById(materialTracking.getC_Flatrate_Term_ID());
// shouldn't be null because we prevent even material-tracking purchase orders without ... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\MaterialTrackingAsVendorInvoicingInfo.java | 1 |
请完成以下Java代码 | public final class TableName
{
private final String tableName;
private static final Interner<TableName> interner = Interners.newStrongInterner();
private TableName(@NonNull final String tableName)
{
final String tableNameNorm = StringUtils.trimBlankToNull(tableName);
if (tableNameNorm == null)
{
throw ne... | {
return getAsString();
}
public String getAsString()
{
return tableName;
}
public boolean equalsIgnoreCase(@Nullable final String otherTableName)
{
return tableName.equalsIgnoreCase(otherTableName);
}
public static boolean equals(@Nullable TableName tableName1, @Nullable TableName tableName2)
{
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\TableName.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfig {
private final RequestHeaderAuthenticationProvider requestHeaderAuthenticationProvider;
@Value("${api.auth.header.name}")
private String apiAuthHeaderName;
@Autowired
public SecurityConfig( RequestHeaderAuthenticationProvider requestHeaderAuthenticationProvider){
... | }
@Bean
public RequestHeaderAuthenticationFilter requestHeaderAuthenticationFilter() {
RequestHeaderAuthenticationFilter filter = new RequestHeaderAuthenticationFilter();
filter.setPrincipalRequestHeader(apiAuthHeaderName);
filter.setExceptionIfHeaderMissing(false);
filter.setRe... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-5\src\main\java\com\baeldung\customauth\configuration\SecurityConfig.java | 2 |
请完成以下Java代码 | public void save(@NonNull final I_M_AttributeInstance ai)
{
asiDAO.save(ai);
}
@Override
public Set<AttributeId> getAttributeIdsByAttributeSetInstanceId(@NonNull final AttributeSetInstanceId attributeSetInstanceId)
{
return asiDAO.getAttributeIdsByAttributeSetInstanceId(attributeSetInstanceId);
}
@Override... | public Object string()
{
return DB.getSQLValueStringEx(ITrx.TRXNAME_ThreadInherited, defaultValueSQL);
}
@Override
public Object number()
{
return DB.getSQLValueBDEx(ITrx.TRXNAME_ThreadInherited, defaultValueSQL);
}
@Override
public Object date()
{
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeSetInstanceBL.java | 1 |
请完成以下Java代码 | public boolean isWindow()
{
return windowId != null;
}
public boolean isProcess()
{
return processId != null;
}
public boolean isView()
{
return viewId != null;
}
public DocumentPath toSingleDocumentPath()
{
if (windowId != null)
{
return DocumentPath.singleWindowDocumentPath(windowId, documen... | // Process
else if (processId != null)
{
builder.setDocumentType(DocumentType.Process, processId.toDocumentId());
}
else
{
throw new AdempiereException("Cannot identify the document type because it's not window nor process")
.setParameter("documentPath", this);
}
return builder
.setDocumen... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentPath.java | 1 |
请完成以下Java代码 | public String getFilename() {
return filename;
}
/**
* Sets the value of the filename property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFilename(String value) {
this.filename = value;
}
/**
* G... | }
/**
* Sets the value of the mimeType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMimeType(String value) {
this.mimeType = value;
}
} | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\DocumentType.java | 1 |
请完成以下Java代码 | public static KieContainer loadKieContainer() throws RuntimeException {
//通过kmodule.xml 找到规则文件,这个文件默认放在resources/META-INF文件夹
log.info("准备创建 KieContainer");
if (kieContainer == null) {
log.info("首次创建:KieContainer");
// 设置drools的日期格式
System.setProperty("drools.... | log.info("KieContainer创建完毕");
return kieContainer;
}
/**
* 根据kiesession 名称创建KieSession ,每次调用都是一个新的KieSession
* @param name kiesession的名称
* @return 一个新的KieSession,每次使用后要销毁
*/
public static KieSession getKieSessionByName(String name) {
if (kieContainer == null) {
... | repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\utils\DroolsUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserCacheManager {
@Resource
private RedisUtils redisUtils;
@Value("${login.user-cache.idle-time}")
private long idleTime;
/**
* 返回用户缓存
* @param userName 用户名
* @return JwtUserDto
*/
public JwtUserDto getUserCache(String userName) {
// 转小写
userNa... | redisUtils.set(LoginProperties.cacheKey + userName, user, time);
}
}
/**
* 清理用户缓存信息
* 用户信息变更时
* @param userName 用户名
*/
@Async
public void cleanUserCache(String userName) {
// 转小写
userName = StringUtils.lowerCase(userName);
if (StringUtils.isNotEmpty(u... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\security\service\UserCacheManager.java | 2 |
请完成以下Java代码 | public class NeverFailAutoDeploymentStrategy extends AbstractAutoDeploymentStrategy {
protected static final Logger LOGGER = LoggerFactory.getLogger(NeverFailAutoDeploymentStrategy.class);
public static final String DEPLOYMENT_MODE = "never-fail";
public NeverFailAutoDeploymentStrategy(ApplicationUpgrade... | deploymentBuilder.addInputStream(resourceName, resource);
} else {
LOGGER.error(
"The following resource wasn't included in the deployment since it is invalid:\n{}",
resourceName
);
}
}
deploymentBuilder = l... | repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\autodeployment\NeverFailAutoDeploymentStrategy.java | 1 |
请完成以下Java代码 | private static ThreadPoolExecutor createPlannerThreadExecutor()
{
final CustomizableThreadFactory threadFactory = CustomizableThreadFactory.builder()
.setThreadNamePrefix("QueueProcessorPlanner")
.setDaemon(true)
.build();
return new ThreadPoolExecutor(
1, // corePoolSize
1, // maximumPoolSize... | .build();
return new ThreadPoolExecutor(
1, // corePoolSize
100, // maximumPoolSize
1000, // keepAliveTime
TimeUnit.MILLISECONDS, // timeUnit
// SynchronousQueue has *no* capacity. Therefore, each new submitted task will directly cause a new thread to be started,
// which is exactly what we ... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\planner\AsyncProcessorPlanner.java | 1 |
请完成以下Java代码 | public class DBRes_pt extends ListResourceBundle
{
/** Data */
//Characters encoded to UTF8 Hex, so no more problems with svn commits
//Fernando Lucktemberg - CenturuyOn Consultoria
static final Object[][] contents = new String[][]
{
{ "CConnectionDialog", "Conex\u00e3o" },
{ "Name", "Nome"... | { "Overwrite", "Sobrescrever" },
{ "ConnectionProfile", "Connection" },
{ "LAN", "LAN" },
{ "TerminalServer", "Terminal Server" },
{ "VPN", "VPN" },
{ "WAN", "WAN" },
{ "ConnectionError", "Erro de Conex\u00e3o" },
{ "ServerNotActive", "Servidor n\u00e3o Ativo" }
};
/**
* Get Cont... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\connectiondialog\i18n\DBRes_pt.java | 1 |
请完成以下Java代码 | public String getJobHandlerConfiguration() {
return jobHandlerConfiguration;
}
public void setJobHandlerConfiguration(String jobHandlerConfiguration) {
this.jobHandlerConfiguration = jobHandlerConfiguration;
}
public String getRepeat() {
return repeat;
}
public void se... | return exceptionMessage;
}
public void setExceptionMessage(String exceptionMessage) {
this.exceptionMessage = StringUtils.abbreviate(exceptionMessage, MAX_EXCEPTION_MESSAGE_LENGTH);
}
@Override
public String getTenantId() {
return tenantId;
}
public void setTenantId(String... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AbstractJobEntity.java | 1 |
请完成以下Java代码 | private void assignSerialNumberToCU(final HuId huId, final String serialNo)
{
final I_M_HU hu = handlingUnitsRepo.getById(huId);
final IContextAware ctxAware = getContextAware(hu);
final IHUContext huContext = handlingUnitsBL.createMutableHUContext(ctxAware);
final IAttributeStorage attributeStorage = getAt... | {
return HUTransformService.builder()
.referencedObjects(getContextDocumentLines())
.build();
}
/**
* @return context document/lines (e.g. the receipt schedules)
*/
private List<TableRecordReference> getContextDocumentLines()
{
if (view == null)
{
return ImmutableList.of();
}
return view.... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUIHUCreationWithSerialNumberService.java | 1 |
请完成以下Java代码 | public Mono<Authentication> authenticate(Authentication authentication) {
return Mono.defer(() -> {
OAuth2AuthorizationCodeAuthenticationToken token = (OAuth2AuthorizationCodeAuthenticationToken) authentication;
// Section 3.1.2.1 Authentication Request -
// https://openid.net/specs/openid-connect-core-1_0.h... | private Mono<OAuth2LoginAuthenticationToken> onSuccess(OAuth2AuthorizationCodeAuthenticationToken authentication) {
OAuth2AccessToken accessToken = authentication.getAccessToken();
Map<String, Object> additionalParameters = authentication.getAdditionalParameters();
OAuth2UserRequest userRequest = new OAuth2UserRe... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\authentication\OAuth2LoginReactiveAuthenticationManager.java | 1 |
请完成以下Java代码 | protected Set<Class<?>> getCustomMybatisMapperClasses(List<String> customMyBatisMappers) {
Set<Class<?>> mybatisMappers = new HashSet<>();
for (String customMybatisMapperClassName : customMyBatisMappers) {
try {
Class customMybatisClass = Class.forName(customMybatisMapperClas... | return super.managementServiceBeanBean(processEngine);
}
@Bean
@ConditionalOnMissingBean
public TaskExecutor taskExecutor() {
return new SimpleAsyncTaskExecutor();
}
@Bean
@ConditionalOnMissingBean
@Override
public IntegrationContextManager integrationContextManagerBean(Pro... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\AbstractProcessEngineAutoConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private ItemMetadata resolveItemMetadataGroup(String prefix, MetadataGenerationEnvironment environment) {
Element propertyElement = environment.getTypeUtils().asElement(getType());
String nestedPrefix = ConfigurationMetadata.nestedPrefix(prefix, getName());
String dataType = environment.getTypeUtils().getQualifie... | * Resolve the default value for this property.
* @param environment the metadata generation environment
* @return the default value or {@code null}
*/
protected abstract Object resolveDefaultValue(MetadataGenerationEnvironment environment);
/**
* Resolve the {@link ItemDeprecation} for this property.
* @pa... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\PropertyDescriptor.java | 2 |
请完成以下Java代码 | protected void appendDetail(final StringBuffer buffer, final String fieldName, final Collection<?> col)
{
appendSummarySize(buffer, fieldName, col.size());
final ExtendedReflectionToStringBuilder builder = new ExtendedReflectionToStringBuilder(
col.toArray(), // object
this, // style,
buffer, //buff... | static class MutableInteger
{
private int value;
MutableInteger(final int value)
{
this.value = value;
}
public final int get()
{
return value;
}
public final void increment()
{
++value;
}
public final void decrement()
{
--value;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\text\RecursiveIndentedMultilineToStringStyle.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BigDecimal getQtyDelta()
{
BigDecimal qtyDelta = candidate.getQuantity();
if (previousQty != null)
{
qtyDelta = qtyDelta.subtract(previousQty);
}
return qtyDelta;
}
/**
* @return {@code true} if before the save, there already was a record with a different date.
*/
public boolean isDateMoved... | {
return candidate.withQuantity(getQtyDelta());
}
/**
* Convenience method that returns a new instance whose included {@link Candidate} has the given id.
*/
public CandidateSaveResult withCandidateId(@Nullable final CandidateId candidateId)
{
return toBuilder()
.candidate(candidate.withId(candidateId))... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\CandidateSaveResult.java | 2 |
请完成以下Java代码 | public void setAD_Attachment_ID (final int AD_Attachment_ID)
{
if (AD_Attachment_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Attachment_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Attachment_ID, AD_Attachment_ID);
}
@Override
public int getAD_Attachment_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_At... | return get_ValueAsString(COLUMNNAME_FileName);
}
@Override
public void setTags (final @Nullable java.lang.String Tags)
{
set_Value (COLUMNNAME_Tags, Tags);
}
@Override
public java.lang.String getTags()
{
return get_ValueAsString(COLUMNNAME_Tags);
}
/**
* Type AD_Reference_ID=540751
* Reference na... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AttachmentEntry.java | 1 |
请完成以下Spring Boot application配置 | grpc:
server:
port: 9090
logging:
pattern:
console: "[%d{yyyy-MM-dd HH:mm:ss.SSS}] %-5level [%t] [%logger - %line]: %m%n"
level:
com.ba | eldung.helloworld.provider: info
include-application-name: false | repos\tutorials-master\spring-boot-modules\spring-boot-3-grpc\helloworld-grpc-provider\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public class CommonResult<T> implements Serializable {
public static Integer CODE_SUCCESS = 0;
/**
* 错误码
*/
private Integer code;
/**
* 错误提示
*/
private String message;
/**
* 返回数据
*/
private T data;
/**
* 将传入的 result 对象,转换成另外一个泛型结果的对象
*
* 因为... | }
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
@JsonIgnore
public boolean isSuccess() {
... | repos\SpringBoot-Labs-master\lab-22\lab-22-validation-01\src\main\java\cn\iocoder\springboot\lab22\validation\core\vo\CommonResult.java | 1 |
请完成以下Java代码 | protected void installKeyboardActions (JLabel l)
{
// super.installKeyboardActions(l);
int dka = l.getDisplayedMnemonic();
if (dka != 0)
{
Component lf = l.getLabelFor();
if (lf != null)
{
ActionMap actionMap = l.getActionMap();
actionMap.put(PRESS, ACTION_PRESS);
InputMap inputMap = ... | FocusTraversalPolicy policy = container.getFocusTraversalPolicy();
Component comp = policy.getDefaultComponent(container);
if (comp != null)
{
comp.requestFocus();
return;
}
}
Container rootAncestor = container.getFocusCycleRootAnc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\AdempiereLabelUI.java | 1 |
请完成以下Java代码 | public class Person {
private String firstName;
private String lastName;
private int age;
private List<PhoneNumber> phoneNumbers;
@DiffExclude
private Address address;
public Person(String firstName, String lastName, int age, List<PhoneNumber> phoneNumbers, Address address) {
this.f... | public Address getAddress() {
return address;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Person person = (Person) o;
return age == person.age && Objects.... | repos\tutorials-master\core-java-modules\core-java-lang-6\src\main\java\com\baeldung\compareobjects\Person.java | 1 |
请完成以下Java代码 | public String completeIt(final DocumentTableFields docFields)
{
final I_M_Forecast forecast = extractForecast(docFields);
forecast.setDocAction(IDocument.ACTION_None);
return IDocument.STATUS_Completed;
}
@Override
public void approveIt(final DocumentTableFields docFields)
{
}
@Override
public void reje... | @Override
public void reverseCorrectIt(final DocumentTableFields docFields)
{
throw new UnsupportedOperationException();
}
@Override
public void reverseAccrualIt(final DocumentTableFields docFields)
{
throw new UnsupportedOperationException();
}
@Override
public void reactivateIt(final DocumentTableField... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\mforecast\ForecastDocumentHandler.java | 1 |
请完成以下Java代码 | private void findById(List<Author> authors) {
Author author1 = this.authorRepository.findById(authors.get(0).getId()).orElse(null);
Author author2 = this.authorRepository.findById(authors.get(1).getId()).orElse(null);
System.out.printf("findById(): author1 = %s%n", author1);
System.out.printf("findById(): auth... | }
private List<Author> insertAuthors() {
Author author1 = this.authorRepository.save(new Author(null, "Josh Long",
Set.of(new Book(null, "Reactive Spring"), new Book(null, "Cloud Native Java"))));
Author author2 = this.authorRepository.save(
new Author(null, "Martin Kleppmann", Set.of(new Book(null, "Desi... | repos\spring-data-examples-main\jpa\graalvm-native\src\main\java\com\example\data\jpa\CLR.java | 1 |
请完成以下Java代码 | public void updateCurrencyRate(final I_SAP_GLJournal glJournal)
{
final BigDecimal currencyRate = computeCurrencyRate(glJournal);
if (currencyRate == null)
{
return;
}
glJournal.setCurrencyRate(currencyRate);
}
@Nullable
private BigDecimal computeCurrencyRate(final I_SAP_GLJournal glJournal)
{
//
... | }
final CurrencyConversionTypeId conversionTypeId = CurrencyConversionTypeId.ofRepoIdOrNull(glJournal.getC_ConversionType_ID());
Instant dateAcct = TimeUtil.asInstant(glJournal.getDateAcct());
if (dateAcct == null)
{
dateAcct = SystemTime.asInstant();
}
final ClientId adClientId = ClientId.ofRepoId(gl... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\callout\SAP_GLJournal.java | 1 |
请完成以下Java代码 | public void updateFailedJobRetriesByJobDefinitionId(String jobDefinitionId, int retries, Date dueDate, boolean isDueDateSet) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("jobDefinitionId", jobDefinitionId);
parameters.put("retries", retries);
parameters.put("dueDate", dueDate);
... | protected ListQueryParameterObject configureParameterizedQuery(Object parameter) {
return getTenantManager().configureQuery(parameter);
}
protected boolean isEnsureJobDueDateNotNull() {
return Context.getProcessEngineConfiguration().isEnsureJobDueDateNotNull();
}
/**
* Sometimes we get a notificati... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\JobManager.java | 1 |
请完成以下Java代码 | public boolean isActive()
{
return active;
}
}
default RegisterListenerRequest newEventListener(@NonNull final TrxEventTiming timing)
{
return new RegisterListenerRequest(this, timing);
}
/**
* This method shall only be called by the framework. Instead, call {@link #newEventListener(TrxEventTiming)}
... | }
/**
* This method shall only be called by the framework.
*/
void fireBeforeCommit(ITrx trx);
/**
* This method shall only be called by the framework.
*/
void fireAfterCommit(ITrx trx);
/**
* This method shall only be called by the framework.
*/
void fireAfterRollback(ITrx trx);
/**
* This met... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\ITrxListenerManager.java | 1 |
请完成以下Java代码 | public java.lang.String getDescription ()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
/** Set Frequency.
@param Frequency
Frequency of events
*/
@Override
public void setFrequency (int Frequency)
{
set_Value (COLUMNNAME_Frequency, Integer.valueOf(Frequency));
}
/** Get Frequen... | }
/** Set Payment amount.
@param PayAmt
Amount being paid
*/
@Override
public void setPayAmt (java.math.BigDecimal PayAmt)
{
set_Value (COLUMNNAME_PayAmt, PayAmt);
}
/** Get Payment amount.
@return Amount being paid
*/
@Override
public java.math.BigDecimal getPayAmt ()
{
BigDecimal bd = (Bi... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_C_RecurrentPaymentLine.java | 1 |
请完成以下Spring Boot application配置 | jwt.sessionTime=86400
logging.level.org.springframework.data.mongodb.core.ReactiveMongoTemplate=DEBUG
spring.data.mongodb.auto-index-creation=true
#spring.data.mongodb.username=root
#spring.data.mongodb. | password=1234
#spring.data.mongodb.port=27017
#spring.data.mongodb.database=realworld-db | repos\realworld-spring-webflux-master\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public ImmutableList<OLCand> validateOLCands(@NonNull final List<OLCand> olCandList)
{
setValidationProcessInProgress(true); // avoid the InterfaceWrapperHelper.save to trigger another validation from a MV.
final OLCandFactory olCandFactory = new OLCandFactory();
final ImmutableList.Builder<OLCand> validatedOlCa... | {
setValidationProcessInProgress(true); // avoid the InterfaceWrapperHelper.save to trigger another validation from a MV.
final ImmutableList.Builder<OLCandValidationResult> olCandValidationResultBuilder = ImmutableList.builder();
try
{
for (final I_C_OLCand cand : olCandList)
{
validate(cand);
I... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandValidatorService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static MethodInterceptor preFilterAuthorizationMethodInterceptor(
ObjectProvider<PrePostMethodSecurityConfiguration> _prePostMethodSecurityConfiguration) {
return new DeferringMethodInterceptor<>(preFilterPointcut,
() -> _prePostMethodSecurityConfiguration.getObject().preFilterMethodInterceptor);
}
@Bean
@... | @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
static SecurityHintsRegistrar prePostAuthorizeExpressionHintsRegistrar() {
return new PrePostAuthorizeHintsRegistrar();
}
@Override
public void setImportMetadata(AnnotationMetadata importMetadata) {
EnableMethodSecurity annotation = importMetadata.getAnnotations().get(... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\PrePostMethodSecurityConfiguration.java | 2 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final I_M_Product product = InterfaceWrapperHelper.create(getCtx(), getRecord_ID(), I_M_Product.class, getTrxName());
if (product == null)
{
return "@NotFound@" + "@M_Product_ID@";
}
final I_M_Product targetProduct = InterfaceWrapperHelper.create(getCtx(), p_t... | // in case the two products have different mappings, will pick the one from the current product,
// set it to the target and update all the other products that have the target's ex-mapping with the current one
final List<I_M_Product> mappedProducts = Services.get(IProductDAO.class).retrieveAllMappedProducts(targ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\process\M_Product_Create_Mappings_Process.java | 1 |
请完成以下Java代码 | public String getViewUrl(@NonNull final String windowId, @NonNull final String viewId)
{
return getFrontendURL(SYSCONFIG_VIEW_PATH, ImmutableMap.<String, Object>builder()
.put(PARAM_windowId, windowId)
.put(PARAM_viewId, viewId)
.build());
}
@Nullable
public String getResetPasswordUrl(final String to... | {
final String url = StringUtils.trimBlankToNull(sysConfigBL.getValue(SYSCONFIG_APP_API_URL));
if (url != null && !url.equals("-"))
{
return url;
}
final String frontendUrl = getFrontendURL();
if (frontendUrl != null)
{
return frontendUrl + "/app";
}
return null;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\ui\web\WebuiURLs.java | 1 |
请完成以下Java代码 | static DocumentArchiveEntry of(final DocumentId id, final I_AD_Archive archive)
{
return new DocumentArchiveEntry(id, archive);
}
private final DocumentId id;
private final I_AD_Archive archive;
private DocumentArchiveEntry(final DocumentId id, final I_AD_Archive archive)
{
this.id = id;
this.archive = ar... | }
@Override
public String getContentType()
{
return archiveBL.getContentType(archive);
}
@Override
public URI getUrl()
{
return null;
}
@Override
public Instant getCreated()
{
return archive.getCreated().toInstant();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\attachments\DocumentArchiveEntry.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setEmail(String email) {
this.email = email;
}
public Pharmacy website(String website) {
this.website = website;
return this;
}
/**
* Get website
* @return website
**/
@Schema(example = "http://www.vitalapotheke.de", description = "")
public String getWebsite() {
retur... | @Override
public int hashCode() {
return Objects.hash(_id, name, address, postalCode, city, phone, fax, email, website, timestamp);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Pharmacy {\n");
sb.append(" _id: ").append(toIndentedStrin... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\Pharmacy.java | 2 |
请完成以下Java代码 | protected final void checkAllowIfAllAbstainDecisions() {
if (!this.isAllowIfAllAbstainDecisions()) {
throw new AccessDeniedException(
this.messages.getMessage("AbstractAccessDecisionManager.accessDenied", "Access is denied"));
}
}
public List<AccessDecisionVoter<?>> getDecisionVoters() {
return this.de... | * <p>
* If one or more voters cannot support the presented class, <code>false</code> is
* returned.
* @param clazz the type of secured object being presented
* @return true if this type is supported
*/
@Override
public boolean supports(Class<?> clazz) {
for (AccessDecisionVoter<?> voter : this.decisionVot... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\AbstractAccessDecisionManager.java | 1 |
请完成以下Java代码 | public HUPPOrderIssueProducer processCandidates(@NonNull final ProcessIssueCandidatesPolicy processCandidatesPolicy)
{
this.processCandidatesPolicy = processCandidatesPolicy;
return this;
}
private boolean isProcessCandidates()
{
final ProcessIssueCandidatesPolicy processCandidatesPolicy = this.processCandid... | }
}
public HUPPOrderIssueProducer changeHUStatusToIssued(final boolean changeHUStatusToIssued)
{
this.changeHUStatusToIssued = changeHUStatusToIssued;
return this;
}
public HUPPOrderIssueProducer generatedBy(final IssueCandidateGeneratedBy generatedBy)
{
this.generatedBy = generatedBy;
return this;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\HUPPOrderIssueProducer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setAuthenticationEventPublisher(AuthenticationEventPublisher authenticationEventPublisher) {
this.authenticationEventPublisher = authenticationEventPublisher;
}
public void setObservationRegistry(ObservationRegistry observationRegistry) {
this.observationRegistry = observationRegistry;
}
}
... | return new ObservationFilterChainDecorator(this.observationRegistry);
}
@Override
public Class<?> getObjectType() {
return FilterChainProxy.FilterChainDecorator.class;
}
public void setObservationRegistry(ObservationRegistry registry) {
this.observationRegistry = registry;
}
}
} | repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\HttpSecurityBeanDefinitionParser.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.