instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class WebExceptionResolver implements HandlerExceptionResolver {
private static transient Logger logger = LoggerFactory.getLogger(WebExceptionResolver.class);
@Override
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
if (!(e... | ReturnT<String> errorResult = new ReturnT<String>(ReturnT.FAIL_CODE, ex.toString().replaceAll("\n", "<br/>"));
// response
ModelAndView mv = new ModelAndView();
if (isJson) {
try {
response.setContentType("application/json;charset=utf-8");
response.getWriter().print(JacksonUtil.writeValueAsString(erro... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\controller\resolver\WebExceptionResolver.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected Duration getMaxInactiveInterval() {
return this.maxInactiveInterval;
}
public void setRedisNamespace(String namespace) {
Assert.hasText(namespace, "namespace must not be empty");
this.redisNamespace = namespace;
}
protected String getRedisNamespace() {
return this.redisNamespace;
}
public voi... | }
@Autowired(required = false)
public void setSessionRepositoryCustomizer(
ObjectProvider<SessionRepositoryCustomizer<T>> sessionRepositoryCustomizers) {
this.sessionRepositoryCustomizers = sessionRepositoryCustomizers.orderedStream().collect(Collectors.toList());
}
protected List<SessionRepositoryCustomizer... | repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\http\AbstractRedisHttpSessionConfiguration.java | 2 |
请完成以下Java代码 | private final JTable getTable()
{
final JTable table = tableRef.get();
Check.assumeNotNull(table, "table not null");
return table;
}
private final List<AnnotatedTableAction> getTableActions()
{
final List<AnnotatedTableAction> tableActions = new ArrayList<>();
for (final MenuElement me : getSubElements(... | final AnnotatedTableAction tableAction = (AnnotatedTableAction)action;
tableActions.add(tableAction);
}
}
return tableActions;
}
private final void popupMenuWillBecomeVisible(final PopupMenuEvent e)
{
for (final AnnotatedTableAction tableAction : getTableActions())
{
tableAction.setTable(getTable... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTablePopupMenu.java | 1 |
请完成以下Java代码 | public void setC_Project_Label_ID (final int C_Project_Label_ID)
{
if (C_Project_Label_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Project_Label_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Project_Label_ID, C_Project_Label_ID);
}
@Override
public int getC_Project_Label_ID()
{
return get_ValueAsInt(CO... | public void setName (final @Nullable java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setNote (final @Nullable java.lang.String Note)
{
set_Value (COLUMNNAME_Note, Note);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_Label.java | 1 |
请完成以下Java代码 | public boolean isUpdateable ()
{
Object oo = get_Value(COLUMNNAME_IsUpdateable);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public voi... | /** Set Max. Value.
@param ValueMax
Maximum Value for a field
*/
public void setValueMax (String ValueMax)
{
set_Value (COLUMNNAME_ValueMax, ValueMax);
}
/** Get Max. Value.
@return Maximum Value for a field
*/
public String getValueMax ()
{
return (String)get_Value(COLUMNNAME_ValueMax);
}
/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attribute.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<HistoryJob> findHistoryJobsByQueryCriteria(HistoryJobQueryImpl jobQuery) {
final String query = "selectHistoryJobByQueryCriteria";
return getDbSqlSession().selectList(query, jobQuery);
}
@Override
public long findHistoryJobCountByQueryCriteria(HistoryJobQueryImpl jobQuery) {
... | bulkUpdateEntities("updateHistoryJobLocks", params, "historyJobs", historyJobs);
}
@Override
public void resetExpiredJob(String jobId) {
Map<String, Object> params = new HashMap<>(2);
params.put("id", jobId);
getDbSqlSession().directUpdate("resetExpiredHistoryJob", params);
}
... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisHistoryJobDataManager.java | 2 |
请完成以下Java代码 | public void setPointsBase_Invoiceable (final BigDecimal PointsBase_Invoiceable)
{
set_Value (COLUMNNAME_PointsBase_Invoiceable, PointsBase_Invoiceable);
}
@Override
public BigDecimal getPointsBase_Invoiceable()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PointsBase_Invoiceable);
return bd != n... | public void setPOReference (final @Nullable java.lang.String POReference)
{
set_Value (COLUMNNAME_POReference, POReference);
}
@Override
public java.lang.String getPOReference()
{
return get_ValueAsString(COLUMNNAME_POReference);
}
@Override
public void setQty (final BigDecimal Qty)
{
set_Value (COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_Commission_Instance.java | 1 |
请完成以下Java代码 | public void destroy() throws Exception {
System.out.println("接口-执行InitBeanAndDestroyBeanTest:destroy方法");
}
/**
* Bean所有属性设置完(初始化完)之后调用
*
* @throws Exception Exception
*/
@Override
public void afterPropertiesSet() throws Exception {
System.out.println("接口-执行InitBeanA... | System.out.println("注解--执行InitBeanAndDestroyBeanTest:preDestroy方法");
}
/**
* 真正的Bean初始化方法
*/
public void initMethod() {
System.out.println("XML配置-执行InitBeanAndDestroyBeanTest:init-method方法");
}
/**
* 真正的Bean销毁方法
*/
public void destroyMethod() {
System.out.pr... | repos\spring-boot-student-master\spring-boot-student-spring\src\main\java\com\xiaolyuh\init\destory\InitBeanAndDestroyBean.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public StaticResourceRequestMatcher excluding(StaticResourceLocation first, StaticResourceLocation... rest) {
return excluding(EnumSet.of(first, rest));
}
/**
* Return a new {@link StaticResourceRequestMatcher} based on this one but
* excluding the specified locations.
* @param locations the locations ... | @Override
protected boolean ignoreApplicationContext(WebApplicationContext applicationContext) {
return hasServerNamespace(applicationContext, "management");
}
@Override
protected boolean matches(HttpServletRequest request, Supplier<DispatcherServletPath> context) {
RequestMatcher delegate = this.delegat... | repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\web\servlet\StaticResourceRequest.java | 2 |
请完成以下Java代码 | public CompanyType getCompany() {
return company;
}
/**
* Sets the value of the company property.
*
* @param value
* allowed object is
* {@link CompanyType }
*
*/
public void setCompany(CompanyType value) {
this.company = value;
}
/*... | }
/**
* Sets the value of the zsr property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setZsr(String value) {
this.zsr = value;
}
/**
* Gets the value of the specialty property.
*
* @return
* ... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\BillerAddressType.java | 1 |
请完成以下Java代码 | public void setDataEntry_ListValue_ID (int DataEntry_ListValue_ID)
{
if (DataEntry_ListValue_ID < 1)
set_ValueNoCheck (COLUMNNAME_DataEntry_ListValue_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DataEntry_ListValue_ID, Integer.valueOf(DataEntry_ListValue_ID));
}
/** Get Eingabefeldwert.
@return Eingab... | }
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Einträge; die kleins... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_ListValue.java | 1 |
请完成以下Java代码 | public int getAD_Table_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Sales Transaction.
@param IsSOTrx
This is a Sales Transaction
*/
public void setIsSOTrx (boolean IsSOTrx)
{
set_Value (COLUMNNAME_IsSOTrx, Boolean.... | {
return (I_M_AttributeSet)MTable.get(getCtx(), I_M_AttributeSet.Table_Name)
.getPO(getM_AttributeSet_ID(), get_TrxName()); }
/** Set Attribute Set.
@param M_AttributeSet_ID
Product Attribute Set
*/
public void setM_AttributeSet_ID (int M_AttributeSet_ID)
{
if (M_AttributeSet_ID < 0)
set_ValueNoC... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeSetExclude.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer del() {
// redisTemplate.
return null;
}
@Override
public void set(String key, String value) {
stringRedisTemplate.opsForValue().set(key, value);
}
@Override
public String get(String key) {
return stringRedisTemplate.opsForValue().get(key);
}... | length=girl.length();
name_sex = "女";
}else {
name_sex="男";
}
index=getNum(0,length-1);
String second=str.substring(index, index+1);
int hasThird=getNum(0,1);
String third="";
if(hasThird==1){
index=getNum(0,length-1);
... | repos\spring-boot-quick-master\quick-redies\src\main\java\com\quick\redis\service\impl\CompanyServiceImpl.java | 2 |
请完成以下Java代码 | final InvoiceCandRecomputeTag getRecomputeTag()
{
Check.assumeNotNull(_recomputeTag, "_recomputeTag not null");
return _recomputeTag;
}
@Override
public InvoiceCandRecomputeTagger setLockedBy(final ILock lockedBy)
{
this._lockedBy = lockedBy;
return this;
}
/* package */ILock getLockedBy()
{
return ... | return _taggedWith;
}
@Override
public InvoiceCandRecomputeTagger setLimit(final int limit)
{
this._limit = limit;
return this;
}
/* package */int getLimit()
{
return _limit;
}
@Override
public void setOnlyInvoiceCandidateIds(@NonNull final InvoiceCandidateIdsSelection onlyInvoiceCandidateIds)
{
t... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandRecomputeTagger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UITraceRepository
{
@NonNull private static final Logger logger = LogManager.getLogger(UITraceRepository.class);
@NonNull private final ObjectMapper jsonObjectMapper = JsonObjectMapperHolder.sharedJsonObjectMapper();
public void create(@NonNull final Collection<UITraceEventCreateRequest> requests)
{
... | if (properties == null)
{
return "";
}
try
{
return jsonObjectMapper.writeValueAsString(properties);
}
catch (JsonProcessingException e)
{
logger.warn("Failed converting request's properties to string: {}", request, e);
return properties.toString();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\ui_trace\UITraceRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Order {
@Id
private String orderId;
private String productId;
@Max(5)
private Long amount;
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
} | public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public Long getAmount() {
return amount;
}
public void setAmount(Long amount) {
this.amount = amount;
}
} | repos\tutorials-master\persistence-modules\atomikos\src\main\java\com\baeldung\atomikos\spring\jpa\order\Order.java | 2 |
请完成以下Java代码 | private PO getParentPO()
{
final PO parentPO = parentPORef.get();
if (parentPO == null)
{
// cleanup
this.poRef = null;
// throw exception
throw new AdempiereException("Parent PO reference expired");
}
return parentPO;
}
@Override
protected Properties getParentCtx()
{
return getParentPO(... | protected int getId()
{
final PO parentPO = getParentPO();
final String parentColumnName = getParentColumnName();
return parentPO.get_ValueAsInt(parentColumnName);
}
@Override
protected boolean setId(final int id)
{
final PO parentPO = getParentPO();
final Integer value = id < 0 ? null : id;
final Str... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\POCacheLocal.java | 1 |
请完成以下Java代码 | private void printHULabelsIfNeeded(final List<I_M_HU> createdHUs)
{
final InventoryDocSubType inventoryDocSubType = InventoryDocSubType.of(inventory.getDocBaseAndSubType());
if (!inventoryDocSubType.isActualPhysicalInventory()) {return;}
huLabelService.print(
HULabelPrintRequest.builder()
.sourceDoc... | if (packingInstructions.getLuPIId() != null)
{
lutuProducer.setLUPI(packingInstructions.getLuPIId());
lutuProducer.setMaxLUsInfinite();
}
else
{
lutuProducer.setNoLU();
}
return lutuProducer;
}
}
}
else
{
final I_M_HU hu = handlingUnitsBL.getById(inventor... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\impl\SyncInventoryQtyToHUsCommand.java | 1 |
请在Spring Boot框架中完成以下Java代码 | ReactiveJwtAuthenticationConverter reactiveJwtAuthenticationConverter() {
JwtGrantedAuthoritiesConverter grantedAuthoritiesConverter = new JwtGrantedAuthoritiesConverter();
PropertyMapper map = PropertyMapper.get();
map.from(this.properties.getAuthorityPrefix()).to(grantedAuthoritiesConverter::setAuthorityPref... | JwtConverterPropertiesCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.authority-prefix")
static class OnAuthorityPrefix {
}
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.principal-claim-name")
static class O... | repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-resource-server\src\main\java\org\springframework\boot\security\oauth2\server\resource\autoconfigure\reactive\ReactiveOAuth2ResourceServerJwkConfiguration.java | 2 |
请完成以下Java代码 | private VendorReturnsInOutProducer createVendorReturnInOutProducer(final BPartnerId bpartnerId, final WarehouseId warehouseId, final I_C_Order originOrder)
{
final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class);
final Properties ctx = Env.getCtx();
final I_C_BPartner partner = Services.get(IBPartner... | private Timestamp getMovementDate()
{
if (_movementDate == null)
{
_movementDate = Env.getDate(); // use login date by default
}
return _movementDate;
}
private final List<I_M_HU> getHUsToReturn()
{
return _husToReturn;
}
public MultiVendorHUReturnsInOutProducer addHUsToReturn(final List<I_M_HU> hu... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\vendor\MultiVendorHUReturnsInOutProducer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void toString(final MoreObjects.ToStringHelper toStringHelper)
{
toStringHelper
.add("email", email)
.add("language", language)
// WARNING: never ever output the password
;
}
public Long getBpartnerId()
{
return getBpartner().getId();
}
public BPartner getBpartner()
{
return bpartne... | this.password = password;
}
@Nullable
public String getPasswordResetKey()
{
return passwordResetKey;
}
public void setPasswordResetKey(@Nullable final String passwordResetKey)
{
this.passwordResetKey = passwordResetKey;
}
public void markDeleted()
{
setDeleted(true);
deleted_id = getId(); // FRESH-... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\User.java | 2 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
@Override
public int hashCode() {
f... | }
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Account other = (Account) obj;
if (id != other.id)
return false;
... | repos\tutorials-master\persistence-modules\spring-hibernate-6\src\main\java\com\baeldung\hibernate\dynamicupdate\model\Account.java | 1 |
请完成以下Java代码 | public class UserDTO {
@NotBlank(message = "{user.name.notblank}")
private String name;
@Email(message = "{user.email.invalid}")
private String email;
@Min(value = 18, message = "{user.age.min}")
private int age;
// Getters and setters
public String getName() {
return name;
... | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-custom-validation\src\main\java\com\baeldung\validation\custommessage\UserDTO.java | 1 |
请完成以下Java代码 | default String getValueAsString(@NonNull final String attributeKey)
{
return getValueAsString(AttributeCode.ofString(attributeKey));
}
@Nullable
default String getValueAsString(@NonNull final I_M_Attribute attribute)
{
return getValueAsString(AttributeCode.ofString(attribute.getValue()));
}
@Nullable
defa... | setValue(AttributeCode.ofString(attribute), value);
}
void setValue(AttributeId attributeId, Object value);
default void setValue(final @NonNull I_M_Attribute attribute, final Object value)
{
setValue(attribute.getValue(), value);
}
/**
* @return {@link IAttributeValueCallout} instance; never return null
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\IAttributeSet.java | 1 |
请完成以下Java代码 | public Void execute(CommandContext context) {
checkAuthorization(context);
ensureNotNull(BadUserRequestException.class, "decisionDefinitionId", decisionDefinitionId);
if (historyTimeToLive != null) {
ensureGreaterThanOrEqual(BadUserRequestException.class, "", "historyTimeToLive", historyTimeToLive, ... | protected void logUserOperation(CommandContext commandContext, DecisionDefinitionEntity decisionDefinitionEntity) {
List<PropertyChange> propertyChanges = new ArrayList<>();
propertyChanges.add(new PropertyChange("historyTimeToLive", decisionDefinitionEntity.getHistoryTimeToLive(), historyTimeToLive));
prop... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\UpdateDecisionDefinitionHistoryTimeToLiveCmd.java | 1 |
请完成以下Java代码 | public BranchAndFinancialInstitutionIdentification4 getIssgAgt() {
return issgAgt;
}
/**
* Sets the value of the issgAgt property.
*
* @param value
* allowed object is
* {@link BranchAndFinancialInstitutionIdentification4 }
*
*/
public void setIssgAg... | public void setSttlmPlc(BranchAndFinancialInstitutionIdentification4 value) {
this.sttlmPlc = value;
}
/**
* Gets the value of the prtry property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TransactionAgents2.java | 1 |
请完成以下Java代码 | public static <K, V, K2> Function<Map.Entry<K, V>, ImmutableMapEntry<K2, V>> mapKey(@NonNull final Function<K, K2> keyMapper)
{
return entry -> entry(keyMapper.apply(entry.getKey()), entry.getValue());
}
public static <K, V, V2> Function<Map.Entry<K, V>, ImmutableMapEntry<K, V2>> mapValue(@NonNull final Function<... | return Collector.of(supplier, accumulator, combiner, finisher);
}
public static <T, R, K, V> Collector<T, ?, R> collectUsingMapAccumulator(
@NonNull final Function<T, K> keyMapper,
@NonNull final Function<T, V> valueMapper,
@NonNull final Function<Map<K, V>, R> finisher)
{
final Supplier<Map<K, V>> suppl... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\GuavaCollectors.java | 1 |
请完成以下Java代码 | public abstract class HUIteratorListenerAdapter implements IHUIteratorListener
{
private Result _defaultResult = Result.CONTINUE;
private IHUIterator iterator = null;
// we don't allow direct instantiation
protected HUIteratorListenerAdapter()
{
init();
}
/**
* Method called when this object is constructed... | @Override
public Result beforeHU(final IMutable<I_M_HU> hu)
{
return getDefaultResult();
}
@Override
public Result afterHU(final I_M_HU hu)
{
return getDefaultResult();
}
@Override
public Result beforeHUItem(final IMutable<I_M_HU_Item> item)
{
return getDefaultResult();
}
@Override
public Result a... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HUIteratorListenerAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isUseAlternativeNames() {
return this.useAlternativeNames;
}
public void setUseAlternativeNames(boolean useAlternativeNames) {
this.useAlternativeNames = useAlternativeNames;
}
public boolean isAllowTrailingComma() {
return this.allowTrailingComma;
}
public void setAllowTrailingComma(boole... | }
/**
* Enum representing strategies for JSON property naming. The values correspond to
* {@link kotlinx.serialization.json.JsonNamingStrategy} implementations that cannot
* be directly referenced.
*/
public enum JsonNamingStrategy {
/**
* Snake case strategy.
*/
SNAKE_CASE,
/**
* Kebab case... | repos\spring-boot-4.0.1\module\spring-boot-kotlinx-serialization-json\src\main\java\org\springframework\boot\kotlinx\serialization\json\autoconfigure\KotlinxSerializationJsonProperties.java | 2 |
请完成以下Java代码 | public String getExternalSystemValue()
{
return get_ValueAsString(COLUMNNAME_ExternalSystemValue);
}
@Override
public void setIsPluFileExportAuditEnabled (final boolean IsPluFileExportAuditEnabled)
{
set_Value (COLUMNNAME_IsPluFileExportAuditEnabled, IsPluFileExportAuditEnabled);
}
@Override
public boole... | @Override
public String getProduct_BaseFolderName()
{
return get_ValueAsString(COLUMNNAME_Product_BaseFolderName);
}
@Override
public void setTCP_Host (final String TCP_Host)
{
set_Value (COLUMNNAME_TCP_Host, TCP_Host);
}
@Override
public String getTCP_Host()
{
return get_ValueAsString(COLUMNNAME_TC... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl.java | 1 |
请完成以下Java代码 | public I_M_HU_PI getTuPI()
{
return tuPIItem.getM_HU_PI_Version().getM_HU_PI();
}
@Override
public I_M_HU_PI_Item getLuPIItem()
{
return luPIItem;
}
@Override
public I_M_HU_PI getLuPI()
{
return luPIItem.getM_HU_PI_Version().getM_HU_PI();
}
@Override
public ProductId getCuProductId()
{
return cu... | return cuPerTU;
}
@Override
public BigDecimal getTuPerLU()
{
return tuPerLU;
}
@Override
public BigDecimal getMaxLUToAllocate()
{
return maxLUToAllocate;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\HUSplitDefinition.java | 1 |
请完成以下Spring Boot application配置 | ms.db.driverClassName=com.mysql.jdbc.Driver
ms.db.url=jdbc:mysql://localhost:3306/cache?prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
ms.db.username=root
ms.db.password=admin
ms.db.maxActive=500
#最多缓存 500 条 ,缓存在 30 | 分钟后失效
#spring.cache.guava.spec= maximumSize=500,expireAfterWrite=30m
#redis.hostname=xxxxxx
redis.hostname=xxxxxx
redis.port=6379 | repos\springBoot-master\springboot-Cache\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private MailTextBuilder createMailTextBuilder(final I_C_RfQResponse rfqResponse, final RfQReportType rfqReportType)
{
final I_C_RfQ_Topic rfqTopic = rfqResponse.getC_RfQ().getC_RfQ_Topic();
final MailTextBuilder mailTextBuilder;
if (rfqReportType == RfQReportType.Invitation)
{
mailTextBuilder = mailService... | }
else if (rfqReportType == RfQReportType.Lost)
{
mailTextBuilder = mailService.newMailTextBuilder(MailTemplateId.ofRepoId(rfqTopic.getRfQ_Lost_MailText_ID()));
}
else
{
throw new AdempiereException("@Invalid@ @Type@: " + rfqReportType);
}
mailTextBuilder.bpartner(rfqResponse.getC_BPartner());
ma... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\MailRfqResponsePublisherInstance.java | 1 |
请完成以下Java代码 | public void associateConnection(Object connection) throws ResourceException {
if (connection == null) {
throw new ResourceException("Null connection handle");
}
if (!(connection instanceof JcaExecutorServiceConnectionImpl)) {
throw new ResourceException("Wrong connection handle");
}
this... | public LocalTransaction getLocalTransaction() throws ResourceException {
throw new NotSupportedException("LocalTransaction not supported");
}
public XAResource getXAResource() throws ResourceException {
throw new NotSupportedException("GetXAResource not supported not supported");
}
public ManagedConne... | repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\outbound\JcaExecutorServiceManagedConnection.java | 1 |
请完成以下Java代码 | public String getHostname() {
return hostname;
}
public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public String getBatchId() {
return batchId;
}
public boolean isCreationLog() {
return creationLog;
}
public boolean isFailureLog() {
return failureLog;
}... | result.jobDefinitionConfiguration = historicJobLog.getJobDefinitionConfiguration();
result.activityId = historicJobLog.getActivityId();
result.failedActivityId = historicJobLog.getFailedActivityId();
result.executionId = historicJobLog.getExecutionId();
result.processInstanceId = historicJobLog.getProc... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricJobLogDto.java | 1 |
请完成以下Java代码 | public class X_M_Product_Category_MaxNetAmount extends org.compiere.model.PO implements I_M_Product_Category_MaxNetAmount, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 1209190109L;
/** Standard Constructor */
public X_M_Product_Category_MaxNetAmount (final Properties ctx, f... | set_Value (COLUMNNAME_M_Product_Category_ID, null);
else
set_Value (COLUMNNAME_M_Product_Category_ID, M_Product_Category_ID);
}
@Override
public int getM_Product_Category_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_Category_ID);
}
@Override
public void setM_Product_Category_MaxNetAmount_ID (fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Category_MaxNetAmount.java | 1 |
请完成以下Java代码 | public static void set(HttpServletResponse response, String key, String value, boolean ifRemember) {
int age = ifRemember?COOKIE_MAX_AGE:-1;
set(response, key, value, null, COOKIE_PATH, age, true);
}
/**
* 保存
*
* @param response
* @param key
* @param value
* @param maxAge
*/
private static void se... | * 查询Cookie
*
* @param request
* @param key
*/
private static Cookie get(HttpServletRequest request, String key) {
Cookie[] arr_cookie = request.getCookies();
if (arr_cookie != null && arr_cookie.length > 0) {
for (Cookie cookie : arr_cookie) {
if (cookie.getName().equals(key)) {
return cookie;
... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\util\CookieUtil.java | 1 |
请完成以下Java代码 | public String toString() {
return filterToStringCreator(SetStatusGatewayFilterFactory.this).append("status", config.getStatus())
.toString();
}
};
}
public @Nullable String getOriginalStatusHeaderName() {
return originalStatusHeaderName;
}
public void setOriginalStatusHeaderName(String originalSta... | public static class Config {
// TODO: relaxed HttpStatus converter
private @Nullable String status;
public @Nullable String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SetStatusGatewayFilterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setCategory(String category) {
this.category = category;
categorySet = true;
}
public String getCategory() {
return category;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenan... | return duedateSet;
}
public boolean isPrioritySet() {
return prioritySet;
}
public boolean isParentTaskIdSet() {
return parentTaskIdSet;
}
public boolean isCategorySet() {
return categorySet;
}
public boolean isTenantIdSet() {
return tenantIdSet;
}... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskRequest.java | 2 |
请完成以下Java代码 | public Stream<ShipmentScheduleAndJobScheduleId> stream() {return ids.stream();}
public Set<ShipmentScheduleAndJobScheduleId> toSet() {return ids;}
public Set<ShipmentScheduleId> getShipmentScheduleIds()
{
return streamShipmentScheduleIds().collect(ImmutableSet.toImmutableSet());
}
public Stream<ShipmentSchedu... | public void forEachShipmentScheduleId(@NonNull final BiConsumer<ShipmentScheduleId, Set<PickingJobScheduleId>> consumer)
{
final LinkedHashMap<ShipmentScheduleId, HashSet<PickingJobScheduleId>> map = new LinkedHashMap<>();
ids.forEach(id -> {
final HashSet<PickingJobScheduleId> jobScheduleIds = map.computeIfAb... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\picking\api\ShipmentScheduleAndJobScheduleIdSet.java | 1 |
请完成以下Java代码 | public HUMoveToDirectWarehouseService setMovementDate(final Instant movementDate)
{
_movementDate = movementDate;
return this;
}
private Instant getMovementDate()
{
return _movementDate;
}
public HUMoveToDirectWarehouseService setDescription(final String description)
{
_description = description;
ret... | public HUMoveToDirectWarehouseService setHUView(final HUEditorView huView)
{
this.huView = huView;
return this;
}
private void notifyHUMoved(final I_M_HU hu)
{
final HuId huId = HuId.ofRepoId(hu.getM_HU_ID());
//
// Invalidate all documents which are about this HU.
if (documentsCollection != null)
{... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\HUMoveToDirectWarehouseService.java | 1 |
请完成以下Java代码 | public int hashCode() {
return Objects.hash(this.factoryFromRetryTopicConfiguration, this.listenerContainerFactoryName);
}
}
static class Cache {
private final Map<Key, ConcurrentKafkaListenerContainerFactory<?, ?>> cacheMap;
Cache() {
this.cacheMap = new HashMap<>();
}
ConcurrentKafkaListenerCon... | }
static class Key {
private final @Nullable KafkaListenerContainerFactory<?> factoryFromKafkaListenerAnnotation;
private final Configuration config;
Key(@Nullable KafkaListenerContainerFactory<?> factoryFromKafkaListenerAnnotation, Configuration config) {
this.factoryFromKafkaListenerAnnotation = fa... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\ListenerContainerFactoryResolver.java | 1 |
请完成以下Java代码 | private Set<String> determinePropertyImports(KotlinPropertyDeclaration propertyDeclaration) {
return (propertyDeclaration.getReturnType() != null) ? Set.of(propertyDeclaration.getReturnType())
: Collections.emptySet();
}
private Set<String> determineFunctionImports(KotlinFunctionDeclaration functionDeclaration... | @Override
public String statementSeparator() {
return "";
}
@Override
public CodeBlock arrayOf(CodeBlock... values) {
return CodeBlock.of("[$L]", CodeBlock.join(Arrays.asList(values), ", "));
}
@Override
public CodeBlock classReference(ClassName className) {
return CodeBlock.of("$T::class", cla... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\kotlin\KotlinSourceCodeWriter.java | 1 |
请完成以下Java代码 | public Filter removeAttribute(String name)
{
try
{
this.remove(name);
}
catch ( Exception e )
{
}
return this;
}
/**
Check to see if something is going to be filtered.
*/
public boolean hasAttribute(String key)
{
... | StringCharacterIterator sci = new StringCharacterIterator(to_process);
String tmp = null;
for (char c = sci.first(); c != CharacterIterator.DONE; c = sci.next())
{
tmp = String.valueOf(c);
if (hasAttribute(tmp))
tmp = (String) this.get(tmp);
int i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\filter\CharacterFilter.java | 1 |
请完成以下Java代码 | public Integer getMaxPriority() {
return maxPriority;
}
public String getAssigneeLike() {
return assigneeLike;
}
public List<String> getAssigneeIds() {
return assigneeIds;
}
public String getInvolvedUser() {
return involvedUser;
}
public String getOwne... | }
public boolean isIncludeProcessVariables() {
return includeProcessVariables;
}
public boolean isBothCandidateAndAssigned() {
return bothCandidateAndAssigned;
}
public String getNameLikeIgnoreCase() {
return nameLikeIgnoreCase;
}
public String getDescriptionLikeI... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\TaskQueryImpl.java | 1 |
请完成以下Java代码 | public File getSchemaFile()
{
// final String schemaPackageDir = getSchemaPackageDirectory();
final String schemaDir = p_Target_Directory + "/src/main/xsd";
final File dir = new File(schemaDir);
dir.mkdirs();
return new File(dir, "schema.xsd");
}
public String getTestModelFileName(final I_EXP_Format form... | }
final String entityType = System.getProperty(PARAM_EntityType);
if (Check.isEmpty(entityType, true))
{
throw new AdempiereException("Please set the EntityType");
}
LogManager.initialize(true); // just to make sure we are using the client side settings
AdempiereToolsHelper.getInstance().startupMinima... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\esb\process\GenerateCanonicalXSD.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class GlobalActionEvent
{
@NonNull
GlobalActionType type;
String payload;
private static final String SEPARATOR = "#";
public static GlobalActionEvent parseQRCode(@NonNull final String eventStr)
{
final int idx = eventStr.indexOf(SEPARATOR);
if (idx > 0)
{
final String typeStr = eventStr.substr... | {
if (payload == null || payload.isEmpty())
{
return type.getCode();
}
else
{
return type.getCode() + SEPARATOR + payload;
}
}
public ProcessExecutionResult.DisplayQRCode toDisplayQRCodeProcessResult()
{
return ProcessExecutionResult.DisplayQRCode.builder()
.code(toQRCodeString())
.build... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\globalaction\GlobalActionEvent.java | 2 |
请完成以下Java代码 | private List<Object> readLine(ResultSet rs, List<String> sqlFields) throws SQLException
{
final List<Object> values = new ArrayList<Object>();
for (final String columnName : sqlFields)
{
final Object value = rs.getObject(columnName);
values.add(value);
}
return values;
}
private Integer rowsCount =... | }
return rowsCount;
}
public String getSqlSelect()
{
return sqlSelect;
}
public List<Object> getSqlParams()
{
if (sqlParams == null)
{
return Collections.emptyList();
}
return sqlParams;
}
public String getSqlWhereClause()
{
return sqlWhereClause;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\JdbcExportDataSource.java | 1 |
请完成以下Java代码 | public class AuthorizationEvent extends ApplicationEvent {
@Serial
private static final long serialVersionUID = -9053927371500241295L;
private final Supplier<Authentication> authentication;
private final AuthorizationResult result;
/**
* Construct an {@link AuthorizationEvent}
* @param authentication the p... | * Get the principal requiring access
* @return the principal requiring access
*/
public Supplier<Authentication> getAuthentication() {
return this.authentication;
}
/**
* Get the object to which access was requested
* @return the object to which access was requested
*/
public Object getObject() {
ret... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\event\AuthorizationEvent.java | 1 |
请完成以下Java代码 | public class C_BankStatement
{
private final IBankStatementBL bankStatementBL;
public C_BankStatement(
@NonNull final IBankStatementBL bankStatementBL)
{
this.bankStatementBL = bankStatementBL;
}
@CalloutMethod(columnNames = {
I_C_BankStatement.COLUMNNAME_BeginningBalance,
I_C_BankStatement.COLUMNNAME... | {
return;
}
final IDocTypeDAO docTypeDAO = Services.get(IDocTypeDAO.class);
final I_C_DocType docType = docTypeDAO.getById(docTypeId);
final IDocumentNoInfo documentNoInfo = Services.get(IDocumentNoBuilderFactory.class)
.createPreliminaryDocumentNoBuilder()
.setNewDocType(docType)
.setOldDocumen... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\callout\C_BankStatement.java | 1 |
请完成以下Java代码 | private void buildSql()
{
if (sqlBuilt)
{
return;
}
final Operator operator = getOperator();
final String operand1ColumnName = operand1.getColumnName();
final String operand1ColumnSql = operand1Modifier.getColumnSql(operand1ColumnName);
final String operatorSql = operator.getSql();
sqlParams = ne... | }
// Corner case: we are asked for Operand1 <> SomeValue
// => we need to create an SQL which is also taking care about the NULL value
// i.e. (Operand1 <> SomeValue OR Operand1 IS NULL)
if (operand2 != null && Operator.NOT_EQUAL == operator)
{
sqlWhereClause = "(" + sqlWhereClause
+ " OR " + operand... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CompareQueryFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BulkController {
private final CustomerService customerService;
private final EnumMap<BulkActionType, Function<Customer, Optional<Customer>>> bulkActionFuncMap = new EnumMap<>(BulkActionType.class);
public BulkController(CustomerService customerService) {
this.customerService = custom... | .collect(toList());
BulkStatus bulkStatus = getBulkStatus(customerBulkRequest.getCustomers(), customers);
customerBulkResponseList.add(new CustomerBulkResponse(customers, customerBulkRequest.getBulkActionType(), bulkStatus));
});
return new ResponseEntity<>(customerBulkResponse... | repos\tutorials-master\spring-web-modules\spring-rest-http-3\src\main\java\com\baeldung\bulkandbatchapi\controller\BulkController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Double getDoubleValue() {
return null;
}
@Override
public void setDoubleValue(Double doubleValue) {
}
@Override
public byte[] getBytes() {
return null;
}
@Override | public void setBytes(byte[] bytes) {
}
@Override
public Object getCachedValue() {
return null;
}
@Override
public void setCachedValue(Object cachedValue) {
}
} | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\TransientVariableInstance.java | 2 |
请完成以下Java代码 | public String toCSVRow(@NonNull final ICountryDAO countryDAO)
{
final String recipientBankCountryName = row.getRecipientBankCountryId() != null
? countryDAO.getById(row.getRecipientBankCountryId()).getName()
: null;
final String recipientCountryName = row.getRecipientCountryId() != null
? countryDAO.g... | row.getCity(),
row.getPostalCode())
.map(this::escapeCSV)
.collect(Collectors.joining(","));
}
@NonNull
private String escapeCSV(@Nullable final String valueToEscape)
{
final String escapedQuote = "\"";
return escapedQuote
+ StringUtils.nullToEmpty(valueToEscape).replace(escapedQuote, escape... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.revolut\src\main\java\de\metas\payment\revolut\model\RevolutExportCsvRow.java | 1 |
请完成以下Java代码 | private QtyToDeliverMap getShipmentScheduleId2QtyToDeliver(
@NonNull final Set<OLCandId> olCandIds,
@NonNull final AsyncBatchId asyncBatchId)
{
final Map<OLCandId, OrderLineId> olCandId2OrderLineId = olCandDAO.retrieveOLCandIdToOrderLineId(olCandIds);
if (olCandId2OrderLineId == null || olCandId2OrderLineId... | }
/**
* @return qty to deliver or null if the caller wants *no* shipment
*/
@Nullable
private StockQtyAndUOMQty getQtyToDeliver(final de.metas.inoutcandidate.model.I_M_ShipmentSchedule shipmentSchedule, final I_C_OLCand olCand)
{
final StockQtyAndUOMQty qtyShipped = olCandEffectiveValuesBL.getQtyShipped(olCa... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\ShipmentService.java | 1 |
请完成以下Java代码 | public String getTextMsg() { return state.getTextMsg(); }
private void setTextMsg(@Nullable final String textMsg)
{
state.setTextMsg(textMsg);
}
void addTextMsg(@Nullable final String textMsg)
{
if (textMsg == null || textMsg.isEmpty())
{
return;
}
final String oldText = StringUtils.trimBlankToNull... | this.processingResultMessage = msg;
this.processingResultException = null;
addTextMsg(msg);
}
void setProcessingResultMessage(@NonNull final Throwable ex)
{
this.processingResultMessage = AdempiereException.extractMessage(ex);
this.processingResultException = ex;
addTextMsg(ex);
}
@Nullable
public Str... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\execution\WFProcess.java | 1 |
请完成以下Java代码 | private static ViewRowFieldNameAndJsonValuesHolder<InvoiceRow> buildViewRowFieldNameAndJsonValuesHolder(
@NonNull final SOTrx soTrx)
{
final ImmutableMap.Builder<String, ViewEditorRenderMode> viewEditorRenderModes = ImmutableMap.<String, ViewEditorRenderMode>builder()
.put(FIELD_DiscountAmt, ViewEditorRenderM... | @Override
public DocumentPath getDocumentPath()
{
return null;
}
@Override
public Set<String> getFieldNames()
{
return values.getFieldNames();
}
@Override
public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues()
{
return values.get(this);
}
@Override
public Map<String, ViewEditorRenderMode... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRow.java | 1 |
请完成以下Java代码 | private OrderResponsePackageItemPart fromJAXB(@NonNull final BestellungAnteil soap)
{
return OrderResponsePackageItemPart.builder()
.qty(Quantity.of(soap.getMenge()))
.type(Type.ofStringValueOrNull(soap.getTyp().value()))
.deliveryDate(JAXBDateUtils.toZonedDateTime(soap.getLieferzeitpunkt()))
.defect... | if (soap == null)
{
return null;
}
return OrderResponsePackageItemSubstitution.builder()
.substitutionReason(OrderSubstitutionReason.fromV2SoapCode(soap.getSubstitutionsgrund()))
.defectReason(OrderDefectReason.fromV2SoapCode(soap.getGrund()))
.pzn(PZN.of(soap.getLieferPzn()))
.build();
}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\v2\OrderJAXBConvertersV2.java | 1 |
请完成以下Java代码 | public SpinJsonDataFormatException unableToConstructJavaType(String fromString, Exception cause) {
return new SpinJsonDataFormatException(
exceptionMessage("007", "Cannot construct java type from string '{}'", fromString), cause);
}
public SpinJsonDataFormatException unableToDetectCanonicalType(Object ... | public SpinJsonPathException unableToCompileJsonPathExpression(String expression, Exception cause) {
return new SpinJsonPathException(
exceptionMessage("014", "Unable to compile '{}'!", expression), cause);
}
public SpinJsonPathException unableToCastJsonPathResultTo(Class<?> castClass, Exception cause) {... | repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\JacksonJsonLogger.java | 1 |
请完成以下Java代码 | private void clearCookie(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
String domain, String cookieName) {
Cookie cookie = new Cookie(cookieName, "");
setCookieProperties(cookie, httpServletRequest.isSecure(), domain);
cookie.setMaxA... | // strip off leading www.
if (domain.startsWith("www.")) {
domain = domain.substring(4);
}
// if it isn't an IP address
if (!isIPv4Address(domain) && !isIPv6Address(domain)) {
// strip off private subdomains, leaving public TLD only
String suffix = suf... | repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\security\oauth2\OAuth2CookieHelper.java | 1 |
请完成以下Java代码 | public class RfQPublishException extends RfQException
{
public static final RfQPublishException wrapIfNeeded(final Throwable e)
{
if (e instanceof RfQPublishException)
{
return (RfQPublishException)e;
}
final Throwable cause = extractCause(e);
return new RfQPublishException(cause.getMessage(), cause);
... | public RfQPublishException setRequest(final RfQResponsePublisherRequest request)
{
this.request = request;
resetMessageBuilt();
return this;
}
@Override
protected ITranslatableString buildMessage()
{
final TranslatableStringBuilder message = TranslatableStrings.builder();
message.appendADMessage("Error"... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\exceptions\RfQPublishException.java | 1 |
请完成以下Java代码 | public String toString() {
return "||";
}
};
public static final Operator SUB = new SimpleOperator() {
@Override
public Object apply(TypeConverter converter, Object o1, Object o2) {
return NumberOperations.sub(converter, o1, o2);
}
@Override
... | }
@Override
public String toString() {
return "'" + operator.toString() + "'";
}
@Override
public void appendStructure(StringBuilder b, Bindings bindings) {
left.appendStructure(b, bindings);
b.append(' ');
b.append(operator);
b.append(' ');
right.ap... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstBinary.java | 1 |
请完成以下Java代码 | public TenantId getId() {
return super.getId();
}
@Schema(description = "Timestamp of the tenant creation, in milliseconds", example = "1609459200000", accessMode = Schema.AccessMode.READ_ONLY)
@Override
public long getCreatedTime() {
return super.getCreatedTime();
}
@Schema(de... | }
@Schema(description = "Additional parameters of the device", implementation = com.fasterxml.jackson.databind.JsonNode.class)
@Override
public JsonNode getAdditionalInfo() {
return super.getAdditionalInfo();
}
@Override
public String toString() {
StringBuilder builder = new St... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Tenant.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AddressEntity {
@Id
@Column(name = "id")
private String id;
@Column(name = "street")
private String street;
@Column(name = "city")
private String city;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
p... | return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
} | repos\spring-examples-java-17\spring-data\src\main\java\itx\examples\springdata\entity\AddressEntity.java | 2 |
请完成以下Java代码 | public CmmnElement getTarget() {
return targetRefAttribute.getReferenceTargetElement(this);
}
public void setTarget(CmmnElement target) {
targetRefAttribute.setReferenceTargetElement(this, target);
}
public AssociationDirection getAssociationDirection() {
return associationDirectionAttribute.getVa... | .instanceProvider(new ModelTypeInstanceProvider<Association>() {
public Association newInstance(ModelTypeInstanceContext instanceContext) {
return new AssociationImpl(instanceContext);
}
});
sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF)
.idAttribu... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\AssociationImpl.java | 1 |
请完成以下Java代码 | public void invalidateCandidatesFor(final Object model)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(model);
final String tableName = InterfaceWrapperHelper.getModelTableName(model);
final List<IInvoiceCandidateHandler> handlersForTable = retrieveImplementationsForTable(ctx, tableName);
for (final I... | @Override
public void setInvoiceScheduleAndDateToInvoice(@NonNull final I_C_Invoice_Candidate icRecord)
{
final IInvoiceCandidateHandler handler = createInvoiceCandidateHandler(icRecord);
handler.setInvoiceScheduleAndDateToInvoice(icRecord);
}
@Override
public void setPickedData(final I_C_Invoice_Candidate ic... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidateHandlerBL.java | 1 |
请完成以下Java代码 | public String getID() {
return PASSWORD_MODIFY_OID;
}
@Override
public byte[] getEncodedValue() {
return this.value.toByteArray();
}
@Override
public ExtendedResponse createExtendedResponse(String id, byte[] berValue, int offset, int length) {
return null;
}
/**
* Only minimal support for... | dest.write((byte) 0x82);
dest.write((byte) ((length >> 8) & 0xFF));
dest.write((byte) (length & 0xFF));
}
else if ((length & 0x00FF_FFFF) == length) {
dest.write((byte) 0x83);
dest.write((byte) ((length >> 16) & 0xFF));
dest.write((byte) ((length >> 8) & 0xFF));
dest.write((byte) (length &... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\LdapUserDetailsManager.java | 1 |
请完成以下Java代码 | public void addHandler(final IPrintingQueueHandler handler)
{
if (handler == null)
{
return;
}
handlers.addIfAbsent(handler);
}
@Override
public void afterEnqueueBeforeSave(final I_C_Printing_Queue queueItem, final I_AD_Archive printOut)
{
for (final IPrintingQueueHandler handler : handlers)
{
... | afterEnqueueAfterSave(queueItem, printOut, lastHandler);
}
private void afterEnqueueAfterSave(final I_C_Printing_Queue queueItem, final I_AD_Archive printOut, final IPrintingQueueHandler handler)
{
if (handler.isApplyHandler(queueItem, printOut))
{
handler.afterEnqueueAfterSave(queueItem, printOut);
}
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\spi\impl\CompositePrintingQueueHandler.java | 1 |
请完成以下Java代码 | public boolean set(String key, V value)
{
int index = exactMatchSearch(key);
if (index >= 0)
{
v[index] = value;
return true;
}
return false;
}
/**
* 从值数组中提取下标为index的值<br>
* 注意为了效率,此处不进行参数校验
*
* @param index 下标
* @ret... | /**
* 打印统计信息
*/
// public void report()
// {
// System.out.println("size: " + size);
// int nonZeroIndex = 0;
// for (int i = 0; i < base.length; i++)
// {
// if (base[i] != 0) nonZeroIndex = i;
// }
// System.out.println("BaseUsed: " + nonZeroIndex);... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\DoubleArrayTrie.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Seller {
@Id
@GeneratedValue
@Column(name = "id")
private int id;
@Column(name = "name")
private String sellerName;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSellerName() {
return s... | }
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Seller seller = (Seller) o;
return Objects.equals(... | repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\persistmaps\mapkeyjoincolumn\Seller.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void createDynamicAttrConfig() {
log.info("init create dynamic box");
ConfigurableApplicationContext context = (ConfigurableApplicationContext) applicationContext;
DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) context.getBeanFactory();
for (int i = 1; i <= count; i++) {
BeanDef... | * 注册到spring容器中
*/
beanFactory.registerBeanDefinition("person_" + i, beanDefinitionBuilder.getBeanDefinition());
}
}
@Bean
@ConditionalOnProperty(prefix = "dynamic.", value = "annotate.switch")
public void createDynamicAnnotationConfig() {
for (int i = 0; i < values.length; i++) {
DynamicPropertySourc... | repos\spring-boot-quick-master\quick-dynamic-bean\src\main\java\com\dynamic\bean\config\BeanConfig.java | 2 |
请完成以下Java代码 | public byte[] getScript ()
{
return (byte[])get_Value(COLUMNNAME_Script);
}
/** Set Roll the Script.
@param ScriptRoll Roll the Script */
public void setScriptRoll (String ScriptRoll)
{
set_Value (COLUMNNAME_ScriptRoll, ScriptRoll);
}
/** Get Roll the Script.
@return Roll the Script */
public Str... | public void setStatus (String Status)
{
set_ValueNoCheck (COLUMNNAME_Status, Status);
}
/** Get Status.
@return Status of the currently running check
*/
public String getStatus ()
{
return (String)get_Value(COLUMNNAME_Status);
}
/** Set URL.
@param URL
Full URL address - e.g. http://www.adempie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\ad\migration\model\X_AD_MigrationScript.java | 1 |
请完成以下Java代码 | public class GuavaEventBusBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private final SpelExpressionParser expressionParser = new SpelExpressionParser();
@Override
public void postProcessBeanFactory(ConfigurableLi... | eventBus.register(proxy);
} catch (ExpressionException ex) {
this.logger.error("{}: unable to parse/evaluate expression {} for bean of type {}", this.getClass().getSimpleName(),
annotationValue, proxy.getClass().getName());
}
}
}
private Object ... | repos\tutorials-master\spring-core-4\src\main\java\com\baeldung\beanpostprocessor\GuavaEventBusBeanFactoryPostProcessor.java | 1 |
请完成以下Java代码 | public final Timestamp getMovementDate() {
return movementDate;
}
public final void setMovementDate(Timestamp dateShipped) {
this.movementDate = dateShipped;
}
public final boolean isPreferBPartner() {
return preferBPartner;
}
public final void setPreferBPartner(boolean preferBPartner) {
this.preferBPa... | return ignorePostageFreeamount;
}
public final void setIgnorePostageFreeamount(boolean ignorePostageFreeamount) {
this.ignorePostageFreeamount = ignorePostageFreeamount;
}
public Set<Integer> getSelectedOrderLineIds() {
return selectedOrderLineIds;
}
public void setSelectedOrderLineIds(Set<Integer> selecte... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\inout\shipment\ShipmentParams.java | 1 |
请完成以下Java代码 | protected String databaseInstallationId(CommandContext commandContext) {
try {
PropertyEntity installationIdProperty = commandContext.getPropertyManager().findPropertyById(INSTALLATION_PROPERTY_NAME);
return installationIdProperty != null ? installationIdProperty.getValue() : null;
} catch (Exceptio... | // set the persisted license key in the telemetry data and registry
ManagementServiceImpl managementService = (ManagementServiceImpl) processEngineConfiguration.getManagementService();
String licenseKey = managementService.getLicenseKey();
if (licenseKey != null) {
LicenseKeyDataImpl licenseKeyData = ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\BootstrapEngineCommand.java | 1 |
请完成以下Java代码 | private void addPropertySource(List<PropertySource<?>> propertySources, String fileName,
Function<File, String> propertySourceNamer) {
File home = getHomeDirectory();
File file = (home != null) ? new File(home, fileName) : null;
FileSystemResource resource = (file != null) ? new FileSystemResource(file) : null... | protected @Nullable File getHomeDirectory() {
return getHomeDirectory(() -> this.environmentVariables.get("SPRING_DEVTOOLS_HOME"),
() -> this.systemProperties.getProperty("spring.devtools.home"),
() -> this.systemProperties.getProperty("user.home"));
}
@SafeVarargs
private @Nullable File getHomeDirectory(... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\env\DevToolsHomePropertiesPostProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static List<AuthenticationProvider> createDefaultAuthenticationProviders(HttpSecurity httpSecurity) {
List<AuthenticationProvider> authenticationProviders = new ArrayList<>();
RegisteredClientRepository registeredClientRepository = OAuth2ConfigurerUtils
.getRegisteredClientRepository(httpSecurity);
OA... | ClientSecretAuthenticationProvider clientSecretAuthenticationProvider = new ClientSecretAuthenticationProvider(
registeredClientRepository, authorizationService);
PasswordEncoder passwordEncoder = OAuth2ConfigurerUtils.getOptionalBean(httpSecurity, PasswordEncoder.class);
if (passwordEncoder != null) {
clien... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\server\authorization\OAuth2ClientAuthenticationConfigurer.java | 2 |
请完成以下Java代码 | public void setM_Allergen_Trace(final org.compiere.model.I_M_Allergen_Trace M_Allergen_Trace)
{
set_ValueFromPO(COLUMNNAME_M_Allergen_Trace_ID, org.compiere.model.I_M_Allergen_Trace.class, M_Allergen_Trace);
}
@Override
public void setM_Allergen_Trace_ID (final int M_Allergen_Trace_ID)
{
if (M_Allergen_Trace_... | {
return get_ValueAsInt(COLUMNNAME_M_Allergen_Trace_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_M_Allergen_Trace_Trl.java | 1 |
请完成以下Java代码 | public class JsonRRequestUpsertRequest
{
@ApiModelProperty(value = SwaggerDocConstants.ORG_CODE_PARAMETER_DOC)
@NonNull String orgCode;
@NonNull String requestType;
@ApiModelProperty(value = SwaggerDocConstants.BPARTNER_VALUE_DOC)
@Nullable String bpartnerIdentifier;
@ApiModelProperty(value = SwaggerDocConstan... | @Nullable LocalDate dateTrx;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@Nullable LocalDate reminderDate;
@Nullable String projectValue;
@ApiModelProperty(value = SwaggerDocConstants.PRODUCT_IDENTIFIER_DOC)
@Nullable String productIdentifier;
@Nullable JsonMetasfreshId orderId;
@Null... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api\src\main\java\de\metas\rest_api\request\JsonRRequestUpsertRequest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class OpenSamlInitializationService {
private static final Log log = LogFactory.getLog(OpenSamlInitializationService.class);
private static final AtomicBoolean initialized = new AtomicBoolean(false);
private OpenSamlInitializationService() {
}
/**
* Ready OpenSAML for use and configure it with r... | public static void requireInitialize(Consumer<XMLObjectProviderRegistry> registryConsumer) {
if (!initialize(registryConsumer)) {
throw new Saml2Exception("OpenSAML was already initialized previously");
}
}
private static boolean initialize(Consumer<XMLObjectProviderRegistry> registryConsumer) {
if (initial... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\core\OpenSamlInitializationService.java | 2 |
请完成以下Java代码 | private File mkTmpPrintFile(final PrintPackageRequest printRequest)
{
final PrintPackage printPackage = printRequest.getPrintPackage();
final PrintPackageInfo printPackageInfo = printRequest.getPrintPackageInfo();
final File dir = new File(redirectDirName);
final String filename = "out"
+ "-" + printPack... | final String trayNumber = Integer.toString(mediaTray.getValue());
final PrinterHWMediaTray printerHWMediaTray = new PrinterHWMediaTray();
printerHWMediaTray.setName(name);
printerHWMediaTray.setTrayNumber(trayNumber);
// 04005: default media tray shall be first in the list
if (mediaTray.equal... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\engine\PrintingEngine.java | 1 |
请完成以下Java代码 | public @Nullable Object getCredentials() {
return this.credentials;
}
/**
* Get the principal
*/
@Override
public Object getPrincipal() {
return this.principal;
}
@Override
public Builder<?> toBuilder() {
return new Builder<>(this);
}
/**
* A builder of {@link PreAuthenticatedAuthenticationToken... | Assert.notNull(principal, "principal cannot be null");
this.principal = principal;
return (B) this;
}
@Override
public B credentials(@Nullable Object credentials) {
this.credentials = credentials;
return (B) this;
}
@Override
public PreAuthenticatedAuthenticationToken build() {
return new P... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\PreAuthenticatedAuthenticationToken.java | 1 |
请完成以下Java代码 | private ZonedDateTime toZonedDateTime(@NonNull final OrgId orgId, @Nullable final LocalDateTime dateTime)
{
if (dateTime == null)
{
return null;
}
final ZoneId timeZoneId = orgRepo.getTimeZone(orgId);
return TimeUtil.asZonedDateTime(dateTime, timeZoneId);
}
@Nullable
private I_M_InOutLine getShipment... | return ProductId.ofRepoId(product.getM_Product_ID());
}
@NonNull
private I_C_UOM getStockingUOM(@NonNull final String productSearchKey)
{
final I_M_Product product = getProductNotNull(productSearchKey);
return uomDAO.getById(UomId.ofRepoId(product.getC_UOM_ID()));
}
@NonNull
private I_M_Product ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\receipt\CustomerReturnRestService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AppDefinitionQuery orderByAppDefinitionKey() {
return orderBy(AppDefinitionQueryProperty.APP_DEFINITION_KEY);
}
@Override
public AppDefinitionQuery orderByAppDefinitionCategory() {
return orderBy(AppDefinitionQueryProperty.APP_DEFINITION_CATEGORY);
}
@Override
public App... | }
public Integer getVersionGt() {
return versionGt;
}
public Integer getVersionGte() {
return versionGte;
}
public Integer getVersionLt() {
return versionLt;
}
public Integer getVersionLte() {
return versionLte;
}
public boolean isLatest() {
... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\repository\AppDefinitionQueryImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getNumberOfTasks() {
return numberOfTasks;
}
public void setNumberOfTasks(int numberOfTasks) {
this.numberOfTasks = numberOfTasks;
}
public int getNumberOfRetries() {
return numberOfRetries;
}
public void setNumberOfRetries(int numberOfRetries) {
thi... | public String getWorkerId() {
return workerId;
}
public void setWorkerId(String workerId) {
this.workerId = workerId;
}
public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
} | repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\acquire\AcquireExternalWorkerJobRequest.java | 2 |
请完成以下Java代码 | public boolean isRunnable()
{
return true;
}
@Override
public void run()
{
throw new UnsupportedOperationException();
}
@Override
public boolean createUI(java.awt.Container parent)
{
final VEditor editor = getEditor();
final GridField gridField = editor.getField();
final Container textComponent = ... | final List<JMenuItem> items = BoilerPlateMenu.createMenuElements(textComponent, gridField);
if (items == null || items.isEmpty())
{
return false;
}
for (JMenuItem item : items)
{
parent.add(item);
}
return true;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\BoilerPlateMenuAction.java | 1 |
请完成以下Java代码 | public void setCaretPosition(int position)
{
this.editor.setCaretPosition(position);
}
public BoilerPlateContext getAttributes()
{
return boilerPlateMenu.getAttributes();
}
public void setAttributes(final BoilerPlateContext attributes)
{
boilerPlateMenu.setAttributes(attributes);
}
public File getPDF(... | return false;
String s2 = s.trim().toUpperCase();
return s2.startsWith("<HTML>");
}
public static String convertToHtml(String plainText)
{
if (plainText == null)
return null;
return plainText.replaceAll("[\r]*\n", "<br/>\n");
}
public boolean isResolveVariables()
{
return boilerPlateMenu.isResolveV... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\RichTextEditor.java | 1 |
请完成以下Java代码 | public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setRoutingNo (final java.lang.String RoutingNo)
{
set_Value (COLUMNNAME_RoutingNo, RoutingNo);
} | @Override
public java.lang.String getRoutingNo()
{
return get_ValueAsString(COLUMNNAME_RoutingNo);
}
@Override
public void setSwiftCode (final @Nullable java.lang.String SwiftCode)
{
set_Value (COLUMNNAME_SwiftCode, SwiftCode);
}
@Override
public java.lang.String getSwiftCode()
{
return get_ValueAsS... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Bank.java | 1 |
请完成以下Java代码 | String getReturnType() {
return this.returnType;
}
List<Parameter> getParameters() {
return this.parameters;
}
int getModifiers() {
return this.modifiers;
}
CodeBlock getCode() {
return this.code;
}
@Override
public AnnotationContainer annotations() {
return this.annotations;
}
/**
* Builder... | * @return this for method chaining
*/
public Builder modifiers(int modifiers) {
this.modifiers = modifiers;
return this;
}
/**
* Sets the return type.
* @param returnType the return type
* @return this for method chaining
*/
public Builder returning(String returnType) {
this.returnType ... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovyMethodDeclaration.java | 1 |
请完成以下Java代码 | public class ReactiveAuthenticationManagerAdapter implements ReactiveAuthenticationManager {
private final AuthenticationManager authenticationManager;
private Scheduler scheduler = Schedulers.boundedElastic();
public ReactiveAuthenticationManagerAdapter(AuthenticationManager authenticationManager) {
Assert.not... | catch (Throwable ex) {
return Mono.error(ex);
}
}
/**
* Set a scheduler that will be published on to perform the authentication logic.
* @param scheduler a scheduler to be published on
* @throws IllegalArgumentException if the scheduler is {@code null}
*/
public void setScheduler(Scheduler scheduler) {... | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\ReactiveAuthenticationManagerAdapter.java | 1 |
请完成以下Java代码 | public class TreatmentType {
@XmlAttribute(name = "apid")
protected String apid;
@XmlAttribute(name = "acid")
protected String acid;
/**
* Gets the value of the apid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String... | * {@link String }
*
*/
public String getAcid() {
return acid;
}
/**
* Sets the value of the acid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAcid(String value) {
this.acid = valu... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\TreatmentType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Boolean isReturnableContainer() {
return returnableContainer;
}
/**
* Sets the value of the returnableContainer property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setReturnableContainer(Boolean value) {
... | * {@link UnitType }
*
*/
public UnitType getQuantityInHigherLevelAssortmentUnit() {
return quantityInHigherLevelAssortmentUnit;
}
/**
* Sets the value of the quantityInHigherLevelAssortmentUnit property.
*
* @param value
* allowed object is
* {@l... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\DESADVListLineItemExtensionType.java | 2 |
请完成以下Java代码 | public <V> V get(Object key) {
return hasKey(key) ? (V) this.context.get(key) : null;
}
@Override
public boolean hasKey(Object key) {
Assert.notNull(key, "key cannot be null");
return this.context.containsKey(key);
}
/**
* Returns the {@link RegisteredClient registered client}.
* @return the {@link Reg... | */
public Builder registeredClient(RegisteredClient registeredClient) {
return put(RegisteredClient.class, registeredClient);
}
/**
* Builds a new {@link OAuth2ClientAuthenticationContext}.
* @return the {@link OAuth2ClientAuthenticationContext}
*/
@Override
public OAuth2ClientAuthenticationConte... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2ClientAuthenticationContext.java | 1 |
请完成以下Java代码 | private float computeEntropy(Map<Character, int[]> storage)
{
float sum = 0;
for (Map.Entry<Character, int[]> entry : storage.entrySet())
{
float p = entry.getValue()[0] / (float) frequency;
sum -= p * Math.log(p);
}
return sum;
}
void update(... | }
void computeAggregation(Map<String, WordInfo> word_cands)
{
if (text.length() == 1)
{
aggregation = (float) Math.sqrt(p);
return;
}
for (int i = 1; i < text.length(); ++i)
{
aggregation = Math.min(aggregation,
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word\WordInfo.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Set<Post> getPosts() {
return posts;
}
public void setPosts(Set<Post> posts) {
this.posts = posts;
}
public int getAge() { | return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Person{" +
"id=" + id +
", name='" + name + '\'' +
", age=" + age +
'}';
}
} | repos\tutorials-master\persistence-modules\blaze-persistence\src\main\java\com\baeldung\model\Person.java | 1 |
请完成以下Java代码 | public void run() {
try {
collectMetrics();
}
catch(Exception e) {
try {
LOG.couldNotCollectAndLogMetrics(e);
}
catch (Exception ex) {
// ignore if log can't be written
}
}
}
protected void collectMetrics() {
List<MeterLogEntity> logs = new ArrayLi... | public void setReporter(String reporterId) {
this.reporterId = reporterId;
}
protected class MetricsCollectionCmd implements Command<Void> {
protected List<MeterLogEntity> logs;
public MetricsCollectionCmd(List<MeterLogEntity> logs) {
this.logs = logs;
}
@Override
public Void execu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\reporter\MetricsCollectionTask.java | 1 |
请完成以下Java代码 | public Object getBaseObject()
{
return user;
}
@Override
public int getAD_Table_ID()
{
return InterfaceWrapperHelper.getModelTableId(user);
}
@Override
public int getRecord_ID()
{
return user.getAD_User_ID();
}
@Override
public EMail sendEMail(final I_AD_User from, fin... | // +", "+Msg.parseTranslation(getCtx(), "@AD_PInstance_ID@: "+getAD_PInstance_ID())
;
final MNote note = new MNote(getCtx(),
adMessageId.getRepoId(),
getFromUserId().getRepoId(),
InterfaceWrapperHelper.getModelTableId(user), user.getAD_User_ID(),
reference,
e.getLocalizedMessage(),
get_Trx... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilderPlate_SendToUsers.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Locale getCurrentLocale()
{
final HttpSession httpSession = getCurrentHttpSessionOrNull();
if (httpSession == null)
{
return Locale.getDefault();
}
final LanguageKey languageKey = (LanguageKey)httpSession.getAttribute(HTTP_SESSION_language);
return languageKey != null
? languageKey.toLocale... | private final ImmutableMap<String, String> frontendMessagesMap;
private LanguageData(final @NonNull LanguageKey language)
{
resourceBundle = ResourceBundle.getBundle("messages", language.toLocale());
frontendMessagesMap = computeMessagesMap(resourceBundle);
}
private static ImmutableMap<String, String> ... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\service\I18N.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class TestingGenericZoomIntoTableInfoRepository implements GenericZoomIntoTableInfoRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
@Override
public GenericZoomIntoTableInfo retrieveTableInfo(
@NonNull final String tableName,
final boolean ignoreExcludeFromZoomTargetsFlag)
{... | .create()
.firstOnlyOptional(I_AD_Table.class)
.map(I_AD_Table::getAD_Window_ID)
.map(AdWindowId::ofRepoIdOrNull)
.orElse(null);
if (windowId == null)
{
return ImmutableList.of();
}
return ImmutableList.of(
GenericZoomIntoTableWindow.builder()
.adWindowId(windowId)
.build()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\zoom_into\TestingGenericZoomIntoTableInfoRepository.java | 2 |
请完成以下Java代码 | public boolean hasAccess(final Access access)
{
return accesses.contains(access);
}
public boolean hasReadAccess()
{
return accesses.contains(Access.READ);
}
public boolean hasWriteAccess()
{
return accesses.contains(Access.WRITE);
}
@Nullable
public Boolean getReadWriteBoolean()
{
if (hasAccess(A... | return withAccesses(ImmutableSet.<Access>builder()
.addAll(this.accesses)
.addAll(elementPermissionFrom.accesses)
.build());
}
private ElementPermission withAccesses(@NonNull final ImmutableSet<Access> accesses)
{
return !Objects.equals(this.accesses, accesses)
? new ElementPermission(this.resourc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\ElementPermission.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.