instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void addToDesadv(final I_M_InOut inOut)
{
if (Services.get(IHUInOutBL.class).isCustomerReturn(inOut))
{
// no EDI for customer return (for the time being)
return;
}
final IEDIDocumentBL ediDocumentBL = Services.get(IEDIDocumentBL.class);
if (!ediDocumentBL.updateEdiEnabled(inOut))
{
return... | * Calls {@link IDesadvBL#removeInOutFromDesadv(I_M_InOut)} to detach the given inout from it's desadv (if any) when it is reversed, reactivated etc. Also see
* {@link de.metas.handlingunits.model.validator.M_InOut#assertReActivationAllowed(org.compiere.model.I_M_InOut)}. Note that this method will also be fired if th... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\model\validator\M_InOut.java | 1 |
请完成以下Java代码 | public class RelationImpl extends ExpressionImpl implements Relation {
protected static ChildElementCollection<Column> columnCollection;
protected static ChildElementCollection<Row> rowCollection;
public RelationImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public Collectio... | return new RelationImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
columnCollection = sequenceBuilder.elementCollection(Column.class)
.build();
rowCollection = sequenceBuilder.elementCollection(Row.class)
.build();
typeBuilder.build();... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\RelationImpl.java | 1 |
请完成以下Java代码 | public String getCaseInstanceId() {
return caseInstanceId;
}
public Set<String> getCaseInstanceIds() {
return caseInstanceIds;
}
public String getStartedBy() {
return createdBy;
}
public String getSuperCaseInstanceId() {
return superCaseInstanceId;
}
public void setSuperCaseInstanceI... | return closedAfter;
}
public Date getClosedBefore() {
return closedBefore;
}
public String getSubCaseInstanceId() {
return subCaseInstanceId;
}
public String getSuperProcessInstanceId() {
return superProcessInstanceId;
}
public String getSubProcessInstanceId() {
return subProcessInst... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricCaseInstanceQueryImpl.java | 1 |
请完成以下Java代码 | private HUAttributeQueryFilterVO getOrCreateAttributeFilterVO(
@NonNull final Map<AttributeId, HUAttributeQueryFilterVO> targetMap,
@NonNull final I_M_Attribute attribute,
@Nullable final String attributeValueType)
{
final HUAttributeQueryFilterVO attributeFilterVO = targetMap.computeIfAbsent(
Attribute... | final HashMap<AttributeId, HUAttributeQueryFilterVO> filterVOs = new HashMap<>();
for (final I_M_Attribute attribute : getBarcodeAttributes())
{
final HUAttributeQueryFilterVO barcodeAttributeFilterVO = getOrCreateAttributeFilterVO(
filterVOs,
attribute,
HUAttributeQueryFilterVO.ATTRIBUTEVALUETYPE... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQueryBuilder_Attributes.java | 1 |
请完成以下Java代码 | protected DmnParse createDmnParseFromResource(EngineResource resource) {
String resourceName = resource.getName();
ByteArrayInputStream inputStream = new ByteArrayInputStream(resource.getBytes());
DmnParse dmnParse = dmnParseFactory.createParse()
.sourceInputStream(inputStream)
... | }
for (DecisionService decisionService : dmnDefinition.getDecisionServices()) {
DecisionEntity decision = getDecision(decisionService.getId(), decisions);
if (decision != null) {
decision.setHasGraphicalNotation(true);
}
}
... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\deployer\ParsedDeploymentBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ILHandlerModelInterceptor extends AbstractModelInterceptor
{
IInvoiceCandidateHandler handler;
String tableName;
boolean isDocument;
DocTimingType createInvoiceCandidatesTiming;
CandidatesAutoCreateMode initialCandidatesAutoCreateMode;
CreateCandidatesOnCommitCollector collector = new CreateCandidat... | {
//
// Create missing invoice candidates for given pseudo-document
if (!isDocument && changeType.isNewOrChange() && changeType.isAfter())
{
createMissingInvoiceCandidates(model);
}
}
/**
* Creates missing invoice candidates for given model, if this is enabled.
*/
private void createMissingInvoiceC... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\modelvalidator\ilhandler\ILHandlerModelInterceptor.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getExecutionId() {
return executionId;
}
public void setExecutionId(String executionId) {
this.executionId = executionId;
}
@ApiModelProperty(example = "http://localhost:8182/runtime/executions/7")
public String getExecutionUrl() {
return executionUrl;
}
... | }
@ApiModelProperty(example = "2023-06-04T22:05:05.474+0000")
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
@ApiModelProperty(example = "2023-06-03T22:05:05.474+0000")
public Date getCreateTime() {
ret... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\management\JobResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class ApplicationConfiguration {
/**
* Register the {@link BeforeConvertCallback} used to update an {@link ImmutablePerson} before handing over the newly
* created instance to the actual mapping layer performing the conversion into the store native
* {@link org.bson.Document} representation.
*
* @return a {... | /**
* Register the {@link BeforeConvertCallback} used to update an {@link ImmutableRecord} before handing over the newly
* created instance to the actual mapping layer performing the conversion into the store native
* {@link org.bson.Document} representation.
*
* @return a {@link BeforeConvertCallback} for {@... | repos\spring-data-examples-main\mongodb\example\src\main\java\example\springdata\mongodb\immutable\ApplicationConfiguration.java | 2 |
请完成以下Java代码 | public void setClassname (String Classname)
{
set_Value (COLUMNNAME_Classname, Classname);
}
/** Get Classname.
@return Java Classname
*/
public String getClassname ()
{
return (String)get_Value(COLUMNNAME_Classname);
}
/** Set Beschreibung.
@param Description
Optional short description of the r... | Integer ii = (Integer)get_Value(COLUMNNAME_ImpEx_ConnectorType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_ImpEx_ConnectorType.java | 1 |
请完成以下Java代码 | public int getAD_PInstance_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (CO... | return ii.intValue();
}
/** Set Temporal MRP & CRP.
@param T_MRP_CRP_ID Temporal MRP & CRP */
public void setT_MRP_CRP_ID (int T_MRP_CRP_ID)
{
if (T_MRP_CRP_ID < 1)
set_ValueNoCheck (COLUMNNAME_T_MRP_CRP_ID, null);
else
set_ValueNoCheck (COLUMNNAME_T_MRP_CRP_ID, Integer.valueOf(T_MRP_CRP_ID));
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_T_MRP_CRP.java | 1 |
请完成以下Java代码 | private static boolean isQRR(@NonNull final I_ESR_ImportLine importLine)
{
return ESRType.TYPE_QRR.getCode().equals(importLine.getType());
}
private boolean existsPostFinanceUserNumberFitsPostAcctNo(final List<I_ESR_PostFinanceUserNumber> postFinanceUserNumbers, @NonNull final String postAcctNo)
{
if (Check.is... | if (postAcctNo.equals(unrenderedESRAcctNo))
{
return true;
}
}
}
return false;
}
private String unrenderPostAccountNo(final String renderedPostAccountNo)
{
final String[] renderenNoComponents = renderedPostAccountNo.split("-");
Check.assume(renderenNoComponents.length == 3, renderedPostAcc... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\dataimporter\ESRDataLoaderUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CommonErrorHandler errorHandler(KafkaOperations<Object, Object> template) {
return new DefaultErrorHandler(
new DeadLetterPublishingRecoverer(template), new FixedBackOff(1000L, 2));
}
@Bean
public RecordMessageConverter converter() {
return new JsonMessageConverter();
}
@KafkaListener(id = "fooGro... | }
@Bean
public NewTopic topic() {
return new NewTopic("topic1", 1, (short) 1);
}
@Bean
public NewTopic dlt() {
return new NewTopic("topic1-dlt", 1, (short) 1);
}
@Bean
@Profile("default") // Don't run from test(s)
public ApplicationRunner runner() {
return args -> {
System.out.println("Hit Enter to... | repos\spring-kafka-main\samples\sample-01\src\main\java\com\example\Application.java | 2 |
请完成以下Java代码 | private void updateFlatrateTermPartner(final I_C_Flatrate_Term term)
{
final ImmutableList<I_C_Flatrate_Term> nextTerms = flatrateBL.retrieveNextFlatrateTerms(term);
updateFlatrateTermBillBPartner(term);
nextTerms.forEach(this::updateFlatrateTermBillBPartner);
}
private void updateFlatrateTermBillBPartner(f... | final boolean termHasInvoices = C_Flatrate_Term_Change_ProcessHelper.termHasInvoices(term);
final FlatrateTermBillPartnerRequest request = FlatrateTermBillPartnerRequest.builder()
.flatrateTermId(FlatrateTermId.ofRepoId(term.getC_Flatrate_Term_ID()))
.billBPartnerId(bPartnerId)
.billLocationId(bPartnerLo... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\process\C_Flatrate_Term_Change_BillPartner_Base.java | 1 |
请完成以下Java代码 | void shutDownGracefully(GracefulShutdownCallback callback) {
this.webServer.shutDownGracefully(callback);
}
void stop() {
this.webServer.stop();
}
WebServer getWebServer() {
return this.webServer;
}
HttpHandler getHandler() {
return this.handler;
}
/**
* A delayed {@link HttpHandler} that doesn't ... | }
}
/**
* {@link HttpHandler} that initializes its delegate on first request.
*/
private static final class LazyHttpHandler implements HttpHandler {
private final Mono<HttpHandler> delegate;
private LazyHttpHandler(Supplier<HttpHandler> handlerSupplier) {
this.delegate = Mono.fromSupplier(handlerSuppl... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\reactive\context\WebServerManager.java | 1 |
请完成以下Java代码 | public String getEventKey() {
return eventKey;
}
public void setEventKey(String eventKey) {
this.eventKey = eventKey;
}
@Override
public Collection<EventPayloadInstance> getPayloadInstances() {
return payloadInstances;
}
public void setPayloadInstances(Collection<E... | @Override
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("EventInstance[eventKey=").append(eventKey);
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\runtime\EventInstanceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private AttributesKey getAttributesKey(@NonNull final HUItemToGroup hu)
{
final IAttributeStorage attributeStorage = attributeStorageFactory.getAttributeStorage(hu.getHu());
final Set<AttributeId> attributeIds = hu.getAttributesAssumingGroupingIsEnabled();
final Predicate<I_M_Attribute> qrMatchingRelevantAttri... | @Nullable QRCodeConfiguration productQrCodeConfiguration;
@NonNull
public HuId getHuId()
{
return HuId.ofRepoId(hu.getM_HU_ID());
}
@NonNull
public Set<AttributeId> getAttributesAssumingGroupingIsEnabled()
{
Check.assume(isGroupingByMatchingAttributesEnabled(), "Assuming grouping by attributes is ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\HUQRCodeGenerateForExistingHUsCommand.java | 2 |
请完成以下Java代码 | public static Integer getSumUsingCollect(List<Integer> integers) {
return integers.stream()
.collect(Collectors.summingInt(Integer::intValue));
}
public static Integer getSumUsingSum(List<Integer> integers) {
return integers.stream()
.mapToInt(Integer::intValue)
... | .stream()
.mapToInt(Integer::valueOf)
.sum();
}
public static Integer getSumIntegersFromString(String str) {
Integer sum = Arrays.stream(str.split(" "))
.filter((s) -> s.matches("\\d+"))
.mapToInt(Integer::valueOf)
.sum();
return sum... | repos\tutorials-master\core-java-modules\core-java-streams\src\main\java\com\baeldung\stream\sum\StreamSumCalculator.java | 1 |
请完成以下Java代码 | public String getProductValue ()
{
return (String)get_Value(COLUMNNAME_ProductValue);
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
/** Get Valid from.
@return V... | }
/** Set UOM Code.
@param X12DE355
UOM EDI X12 Code
*/
public void setX12DE355 (String X12DE355)
{
set_Value (COLUMNNAME_X12DE355, X12DE355);
}
/** Get UOM Code.
@return UOM EDI X12 Code
*/
public String getX12DE355 ()
{
return (String)get_Value(COLUMNNAME_X12DE355);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_PriceList.java | 1 |
请完成以下Java代码 | public RouterFunctions.Builder before(Function<ServerRequest, ServerRequest> requestProcessor) {
builder.before(requestProcessor);
return this;
}
@Override
public <T extends ServerResponse, R extends ServerResponse> RouterFunctions.Builder after(
BiFunction<ServerRequest, T, R> responseProcessor) {
builder... | }
@Override
public RouterFunctions.Builder withAttribute(String name, Object value) {
builder.withAttribute(name, value);
return this;
}
@Override
public RouterFunctions.Builder withAttributes(Consumer<Map<String, Object>> attributesConsumer) {
builder.withAttributes(attributesConsumer);
return this;
}
... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\GatewayRouterFunctionsBuilder.java | 1 |
请完成以下Java代码 | public void setLabelHeight (int LabelHeight)
{
set_Value (COLUMNNAME_LabelHeight, Integer.valueOf(LabelHeight));
}
/** Get Label Height.
@return Height of the label
*/
public int getLabelHeight ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_LabelHeight);
if (ii == null)
return 0;
return ii.intV... | }
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintLabel.java | 1 |
请完成以下Java代码 | public String getDocumentInfo()
{
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
return dt.getName() + " " + getDocumentNo();
} // getDocumentInfo
/**
* Create PDF
*
* @return File or null
*/
@Override
public File createPDF()
{
return null;
}
/**
* Get Process Message
*
* @ret... | @Override
public BigDecimal getApprovalAmt()
{
return getTotalDr();
} // getApprovalAmt
/**
* Document Status is Complete or Closed
*
* @return true if CO, CL or RE
*/
@Deprecated
public boolean isComplete()
{
return Services.get(IGLJournalBL.class).isComplete(this);
} // isComplete
// meta... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\model\MJournal.java | 1 |
请完成以下Java代码 | public void setM_Locator_ID(int M_Locator_ID)
{
if (M_Locator_ID < 0)
throw new IllegalArgumentException("M_Locator_ID is mandatory.");
// set to 0 explicitly to reset
set_Value(COLUMNNAME_M_Locator_ID, M_Locator_ID);
} // setM_Locator_ID
/**
* Set M_LocatorTo_ID
*
* @param M_LocatorTo_ID id
... | // set to 0 explicitly to reset
set_Value(COLUMNNAME_M_LocatorTo_ID, M_LocatorTo_ID);
} // M_LocatorTo_ID
@Override
public String toString()
{
return Table_Name + "[" + get_ID()
+ ", M_Product_ID=" + getM_Product_ID()
+ ", M_ASI_ID=" + getM_AttributeSetInstance_ID()
+ ", M_ASITo_ID=" + getM_A... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MMovementLine.java | 1 |
请完成以下Java代码 | public ImmutableSet<HuId> getHuIds()
{
return InventoryLineHU.extractHuIds(streamLineHUs());
}
public Inventory assigningTo(@NonNull final UserId newResponsibleId)
{
return assigningTo(newResponsibleId, false);
}
public Inventory reassigningTo(@NonNull final UserId newResponsibleId)
{
return assigningTo(... | }
}
public Stream<InventoryLine> streamLines(@Nullable final InventoryLineId onlyLineId)
{
return onlyLineId != null
? Stream.of(getLineById(onlyLineId))
: lines.stream();
}
public Set<LocatorId> getLocatorIdsEligibleForCounting(@Nullable final InventoryLineId onlyLineId)
{
return streamLines(onlyLi... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\Inventory.java | 1 |
请完成以下Java代码 | public static Passenger from(String firstName, String lastName) {
return new Passenger(firstName, lastName);
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public voi... | }
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Passenger passenger = (Passenger) o;
return Objects.equals(firstName, passenger.firstName) && Objects.equals(lastName, pas... | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-2\src\main\java\com\baeldung\jpa\domain\Passenger.java | 1 |
请完成以下Java代码 | /* package */ class ReplenishImportHelper
{
final public boolean isValidRecordForImport(@NonNull final I_I_Replenish importRecord)
{
return (importRecord.getM_Product_ID() > 0)
&& (importRecord.getM_Warehouse_ID() > 0)
&& (importRecord.getLevel_Max() != null)
&& (importRecord.getLevel_Min() != null)
... | if (importRecord.getM_Locator_ID() > 0)
{
replenish.setM_Locator_ID(importRecord.getM_Locator_ID());
}
if (importRecord.getC_Period_ID() > 0)
{
replenish.setC_Period_ID(importRecord.getC_Period_ID());
replenish.setC_Calendar_ID(getCalendar(importRecord.getC_Period()));
}
}
private int getCalendar(... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\replenishment\impexp\ReplenishImportHelper.java | 1 |
请完成以下Java代码 | public int getC_Order_MFGWarehouse_ReportLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_MFGWarehouse_ReportLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return get_ValueAsPO(COLUMNN... | set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Produkt.
@return Produkt, Leistung, Artikel
*/
@Override
public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_C_Order_MFGWarehouse_ReportLine.java | 1 |
请完成以下Java代码 | public void save(DataOutputStream out) throws IOException
{
out.writeInt(size);
for (int i = 0; i < size; i++)
{
out.writeInt(data[i]);
}
out.writeInt(linearExpandFactor);
out.writeBoolean(exponentialExpanding);
out.writeDouble(exponentialExpandFac... | private void writeObject(ObjectOutputStream out) throws IOException
{
loseWeight();
out.writeInt(size);
out.writeObject(data);
out.writeInt(linearExpandFactor);
out.writeBoolean(exponentialExpanding);
out.writeDouble(exponentialExpandFactor);
}
private void r... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\IntArrayList.java | 1 |
请完成以下Java代码 | private static int getC_DocType_ID(final PO po)
{
int index = po.get_ColumnIndex("C_DocType_ID");
if (index != -1)
{
Integer ii = (Integer)po.get_Value(index);
// DocType does not exist - get DocTypeTarget
if (ii != null && ii <= 0)
{
index = po.get_ColumnIndex("C_DocTypeTarget_ID");
if (inde... | replacement = MADBoilerPlate.getPlainText(var.evaluate(attributes));
}
else
{
replacement = m.group();
}
if (replacement == null)
{
continue;
}
m.appendReplacement(sb, replacement);
}
m.appendTail(sb);
final String textParsed = sb.toString();
po.set_ValueOfColumn(columnName, te... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\model\LettersValidator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class OAuth2ErrorEncoder implements HttpMessageEncoder<OAuth2Error> {
private final HttpMessageConverter<Object> messageConverter = HttpMessageConverters.getJsonMessageConverter();
@NonNull
@Override
public List<MediaType> getStreamingMediaTypes() {
return List.of();
}
@Override
public boolean canEncode(Res... | private final ByteArrayOutputStream body = new ByteArrayOutputStream();
@NonNull
@Override
public ByteArrayOutputStream getBody() {
return this.body;
}
@NonNull
@Override
public HttpHeaders getHeaders() {
return new HttpHeaders();
}
}
} | repos\spring-security-main\config\src\main\java\org\springframework\security\config\web\server\OAuth2ErrorEncoder.java | 2 |
请完成以下Java代码 | public CashAccount16CHIdAndCurrency getChrgsAcct() {
return chrgsAcct;
}
/**
* Sets the value of the chrgsAcct property.
*
* @param value
* allowed object is
* {@link CashAccount16CHIdAndCurrency }
*
*/
public void setChrgsAcct(CashAccount16CHIdAndCu... | * </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CreditTransferTransactionInformation10CH }
*
*
*/
public List<CreditTransferTransactionInformation10CH> getCdtTrfTxInf() {
if (cdtTrfTxInf == null) {
cdtTrfTxInf = n... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\PaymentInstructionInformation3CH.java | 1 |
请完成以下Java代码 | public class MUserMail extends X_AD_UserMail
{
/**
*
*/
private static final long serialVersionUID = -1019980049099249013L;
/**
* Standard Constructor
* @param ctx context
* @param AD_UserMail_ID id
* @param trxName trx
*/
public MUserMail (Properties ctx, int AD_UserMail_ID, String trxName)
{
s... | //
if (mailSentStatus.isSentOK())
setMessageID(mailSentStatus.getMessageId());
else
{
setMessageID(mailSentStatus.getSentMsg());
setIsDelivered(ISDELIVERED_No);
}
} // MUserMail
/**
* New User Mail (no trx)
* @param po persistent object
* @param AD_User_ID recipient user
* @param mail email... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MUserMail.java | 1 |
请完成以下Java代码 | public final class SqlParamsCollector
{
public static SqlParamsCollector newInstance()
{
return new SqlParamsCollector(new ArrayList<>());
}
/**
* Wraps the given list if not {@code null}. All changes will be directed the list.
* If the list is null, the new instance is in "not-collecting" mode.
*
* @pa... | * Directly append the given {@code sqlParams}. Please prefer using {@link #placeholder(Object)} instead.<br>
* "Package" scope because currently this method is needed only by {@link SqlDefaultDocumentFilterConverter}.
*
* Please avoid using it. It's used mainly to adapt with old code
*
* @param sqlParams
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlParamsCollector.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws IOException {
FastAutoGenerator.create(dataSourceGenerate())
// 全局配置
.globalConfig((scanner, builder) -> {
builder.author(scanner.apply("请输入作者")).fileOverride();
builder.outputDir(OUT_DIR);
... | .enableTableFieldAnnotation()
.versionColumnName("version")
.logicDeleteColumnName("is_delete")
.columnNaming(NamingStrategy.underline_to_camel)
// .idType(IdType.AUTO)
.formatFileN... | repos\spring-boot-quick-master\quick-sample-server\sample-server\src\main\java\com\quick\utils\MyBatisPlusGenerator.java | 1 |
请完成以下Java代码 | private Optional<VATCode> computeVATCode()
{
if (taxId == null)
{
return Optional.empty();
}
final boolean isSOTrx = m_docLine != null ? m_docLine.isSOTrx() : m_doc.isSOTrx();
return services.findVATCode(VATCodeMatchingRequest.builder()
.setC_AcctSchema_ID(getAcctSchemaId().getRepoId())
.setC_Tax... | void setOpenItemTrxInfo(@Nullable final FAOpenItemTrxInfo openItemTrxInfo)
{
this.openItemTrxInfo = openItemTrxInfo;
}
public void updateFrom(@NonNull FactAcctChanges changes)
{
setAmtSource(changes.getAmtSourceDr(), changes.getAmtSourceCr());
setAmtAcct(changes.getAmtAcctDr(), changes.getAmtAcctCr());
upd... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\FactLine.java | 1 |
请完成以下Java代码 | public class EmployeeDTO {
private int employeeId;
private String employeeName;
private DivisionDTO division;
private String employeeStartDt;
public int getEmployeeId() {
return employeeId;
}
public void setEmployeeId(int employeeId) {
this.employeeId = employeeId;
}
... | public DivisionDTO getDivision() {
return division;
}
public void setDivision(DivisionDTO division) {
this.division = division;
}
public String getEmployeeStartDt() {
return employeeStartDt;
}
public void setEmployeeStartDt(String employeeStartDt) {
this.employ... | repos\tutorials-master\mapstruct\src\main\java\com\baeldung\dto\EmployeeDTO.java | 1 |
请完成以下Java代码 | protected HistoryEvent createHistoryEvent(DmnDecisionEvaluationEvent evaluationEvent) {
if (historyLevel == null) {
historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
}
DmnDecision decisionTable = evaluationEvent.getDecisionResult().getDecision();
if(isDeployedDecisionTable(... | return eventProducer.createDecisionEvaluatedEvt(evaluationEvent);
} else {
return null;
}
}
protected boolean isDeployedDecisionTable(DmnDecision decision) {
if(decision instanceof DecisionDefinition) {
return ((DecisionDefinition) decision).getId() != null;
} else {
return false... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\parser\HistoryDecisionEvaluationListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonRfq
{
@NonNull
String rfqId;
@NonNull
String productName;
@NonNull
String packingInfo;
@NonNull LocalDate dateStart;
@NonNull LocalDate dateEnd;
@NonNull LocalDate dateClose;
@NonNull
String qtyRequested;
@NonNull | String qtyPromised;
@NonNull
BigDecimal price;
@NonNull
String priceRendered;
@NonNull
@Singular
List<JsonRfqQty> quantities;
boolean confirmedByUser;
@JsonInclude(JsonInclude.Include.NON_NULL)
@Nullable
@With
Long countUnconfirmed;
} | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\rest\rfq\JsonRfq.java | 2 |
请完成以下Java代码 | public int calculateUsingSwitch(int a, int b, Operator operator) {
int result = 0;
switch (operator) {
case ADD:
result = a + b;
break;
case MULTIPLY:
result = a * b;
break;
case DIVIDE:
result = a / b;
break... | return result;
}
public int calculate(int a, int b, Operator operator) {
return operator.apply(a, b);
}
public int calculateUsingFactory(int a, int b, String operation) {
Operation targetOperation = OperatorFactory.getOperation(operation)
.orElseThrow(() -> new IllegalArgum... | repos\tutorials-master\patterns-modules\design-patterns-creational\src\main\java\com\baeldung\reducingIfElse\Calculator.java | 1 |
请完成以下Java代码 | public String getRemark() {
return remark;
}
/**
* Sets the value of the remark property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemark(String value) {
this.remark = value;
}
/**
* Gets the va... | */
public long getServiceAttributes() {
if (serviceAttributes == null) {
return 0L;
} else {
return serviceAttributes;
}
}
/**
* Sets the value of the serviceAttributes property.
*
* @param value
* allowed object is
* {@link... | 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\RecordServiceType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Todo {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String title;
private boolean completed;
public Todo() {
}
public Todo(String title) {
this.title = title;
}
public Long getId() {
return id;
}
public voi... | return title;
}
public void setTitle(String title) {
this.title = title;
}
public boolean isCompleted() {
return completed;
}
public void setCompleted(boolean completed) {
this.completed = completed;
}
} | repos\tutorials-master\persistence-modules\spring-data-jdbc\src\main\java\com\baeldung\springmultipledatasources\todos\Todo.java | 2 |
请完成以下Java代码 | public int getC_Country_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Country_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Region.
@param C_Region_ID
Identifies a geographical Region
*/
@Override
public void setC_Region_ID (int C_Region_ID)
{
if (C_Region_ID < 1)
... | }
/** Get Standard.
@return Default value
*/
@Override
public boolean isDefault ()
{
Object oo = get_Value(COLUMNNAME_IsDefault);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Region.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Qty Requiered.
@param QtyRequiered Qty Requiered */
@Override
public void setQtyRequiered (java.math.BigDecimal QtyRequiered)
{
set_Value (COLUMNNA... | public static final String TYPEMRP_Demand = "D";
/** Supply = S */
public static final String TYPEMRP_Supply = "S";
/** Set TypeMRP.
@param TypeMRP TypeMRP */
@Override
public void setTypeMRP (java.lang.String TypeMRP)
{
set_Value (COLUMNNAME_TypeMRP, TypeMRP);
}
/** Get TypeMRP.
@return TypeMRP */
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getMpsExpectedSendingDate() {
return mpsExpectedSendingDate;
}
/**
* Sets the value of the mpsExpectedSendingDate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMpsExpectedSendingDate(String value) ... | * Sets the value of the sender property.
*
* @param value
* allowed object is
* {@link Address }
*
*/
public void setSender(Address value) {
this.sender = value;
}
/**
* Gets the value of the recipient property.
*
* @return
* poss... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\GeneralShipmentData.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setForecastExtension(ForecastExtensionType value) {
this.forecastExtension = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType... | /**
* Sets the value of the controlTotalQualifier property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setControlTotalQualifier(String value) {
this.controlTotalQualifier = value;
}
... | 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\DocumentExtensionType.java | 2 |
请完成以下Java代码 | public Class<?> getCommonPropertyType(ELContext context, Object base) {
ELResolver delegate = getElResolverDelegate();
if(delegate == null) {
return null;
} else {
return delegate.getCommonPropertyType(context, base);
}
}
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContex... | return null;
} else {
return delegate.getValue(context, base, property);
}
}
public boolean isReadOnly(ELContext context, Object base, Object property) {
context.setPropertyResolved(false);
ELResolver delegate = getElResolverDelegate();
if(delegate == null) {
return true;
} else... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\el\AbstractElResolverDelegate.java | 1 |
请完成以下Java代码 | public static HousekeeperTask deleteTelemetry(TenantId tenantId, EntityId entityId) {
return new HousekeeperTask(tenantId, entityId, HousekeeperTaskType.DELETE_TELEMETRY);
}
public static HousekeeperTask deleteEvents(TenantId tenantId, EntityId entityId) {
return new HousekeeperTask(tenantId, e... | }
public static HousekeeperTask deleteCalculatedFields(TenantId tenantId, EntityId entityId) {
return new HousekeeperTask(tenantId, entityId, HousekeeperTaskType.DELETE_CALCULATED_FIELDS);
}
public static HousekeeperTask deleteJobs(TenantId tenantId, EntityId entityId) {
return new Houseke... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\housekeeper\HousekeeperTask.java | 1 |
请完成以下Java代码 | public int getRevisionNext() {
return revision + 1;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public String getDeploy... | @Override
public Integer getHistoryTimeToLive() {
throw new UnsupportedOperationException("history time to live not supported for Camunda Forms");
}
@Override
public void setHistoryTimeToLive(Integer historyTimeToLive) {
throw new UnsupportedOperationException("history time to live not supported for Ca... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CamundaFormDefinitionEntity.java | 1 |
请完成以下Java代码 | public void setModule (String Module)
{
set_Value (COLUMNNAME_Module, Module);
}
/** Get Module.
@return Module */
public String getModule ()
{
return (String)get_Value(COLUMNNAME_Module);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
... | @param Sequence Sequence */
public void setSequence (BigDecimal Sequence)
{
set_Value (COLUMNNAME_Sequence, Sequence);
}
/** Get Sequence.
@return Sequence */
public BigDecimal getSequence ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Sequence);
if (bd == null)
return Env.ZERO;
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_U_WebMenu.java | 1 |
请完成以下Java代码 | public class PostItem {
private String title;
private String body;
private int userId;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getBody() {
return body;
}
public void setBody(St... | }
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
@Override
public String toString() {
return "PostItem{"
+ "title='" + title + '\''
+ ", body='" + body + '\''
+ ", userId=" + userId +
... | repos\tutorials-master\aws-modules\aws-lambda-modules\todo-reminder-lambda\ToDoFunction\src\main\java\com\baeldung\lambda\todo\api\PostItem.java | 1 |
请完成以下Java代码 | private boolean isDoInvocation(final ICalloutField calloutField)
{
if (!I_C_OrderLine.COLUMNNAME_QtyEntered.equals(calloutField.getColumnName()))
{
// execute the callout
return true;
}
final I_C_OrderLine ol = calloutField.getModel(I_C_OrderLine.class);
// don't execute the callout
if(subscriptio... | + " WHERE C_BPartner_ID = ? "
+ " ORDER BY IsSubscriptionToDefault DESC";
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, C_BPartner_ID);
rs = pstmt.executeQuery();
if (rs.next())
{
final int bpartnerLocationId = rs.getInt(1);
order.setC_BPartner_Location_ID(bpartn... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\callout\OrderLine.java | 1 |
请完成以下Java代码 | private Optional<TsKvEntry> processMinOrMaxResult(AggregationResult aggResult) {
if (aggResult.dataType == DataType.DOUBLE || aggResult.dataType == DataType.LONG) {
if (aggResult.hasDouble) {
double currentD = aggregation == Aggregation.MIN ? Optional.ofNullable(aggResult.dValue).orE... | }
}
private class AggregationResult {
DataType dataType = null;
Boolean bValue = null;
String sValue = null;
String jValue = null;
Double dValue = null;
Long lValue = null;
long count = 0;
boolean hasDouble = false;
long aggValuesLastTs = ... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\timeseries\AggregatePartitionsFunction.java | 1 |
请完成以下Java代码 | public class CodeTemplateInitListener implements ApplicationListener<ApplicationReadyEvent> {
@Override
public void onApplicationEvent(ApplicationReadyEvent event) {
try {
long startTime = System.currentTimeMillis(); // 记录开始时间
log.info(" Init Code Generate Template [ 检测如果是JAR启动,... | //2.在config下,创建jeecg/code-template-online/*模板
String createFilePath = configPath + filepath.substring(filepath.indexOf("jeecg/code-template-online"));
// 非jar模式不生成模板
// 不生成目录,只生成具体模板文件
if ((!filepath.contains(".jar!/BOOT-INF/lib/") && !filepath.contains(".jar/!BOOT-INF/l... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\config\init\CodeTemplateInitListener.java | 1 |
请完成以下Java代码 | public int getC_UOM_ID()
{
calculatePrice(false);
return UomId.toRepoId(result.getPriceUomId());
}
/**
* Get Price List
*
* @return list
*/
public BigDecimal getPriceList()
{
calculatePrice(false);
return round(result.getPriceList());
}
/**
* Get Price Std
*
* @return std
*/
public Big... | public BigDecimal mkPriceStdMinusDiscount()
{
calculatePrice(false);
return result.getDiscount().subtractFromBase(result.getPriceStd(), result.getPrecision().toInt());
}
@Override
public String toString()
{
return "MProductPricing ["
+ pricingCtx
+ ", " + result
+ "]";
}
public void setConver... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MProductPricing.java | 1 |
请完成以下Java代码 | public static HuPackingInstructionsItemId ofRepoId(final int repoId)
{
if (repoId == TEMPLATE_MATERIAL_ITEM.repoId)
{
return TEMPLATE_MATERIAL_ITEM;
}
if (repoId == TEMPLATE_PACKING_ITEM.repoId)
{
return TEMPLATE_PACKING_ITEM;
}
else if (repoId == VIRTUAL.repoId)
{
return VIRTUAL;
}
else
... | public int getRepoId()
{
return repoId;
}
public static boolean equals(final HuPackingInstructionsItemId o1, final HuPackingInstructionsItemId o2)
{
return Objects.equals(o1, o2);
}
public boolean isTemplate()
{
return isTemplateRepoId(repoId);
}
public static boolean isTemplateRepoId(final int repoId... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HuPackingInstructionsItemId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setLastName(String lastName) {
super.setLastName(lastName);
lastNameChanged = true;
}
@Override
public void setDisplayName(String displayName) {
super.setDisplayName(displayName);
displayNameChanged = true;
}
@Override
public void setPassword(String ... | return firstNameChanged;
}
@JsonIgnore
public boolean isLastNameChanged() {
return lastNameChanged;
}
@JsonIgnore
public boolean isDisplayNameChanged() {
return displayNameChanged;
}
@JsonIgnore
public boolean isPasswordChanged() {
return passwordChanged;
... | repos\flowable-engine-main\modules\flowable-idm-rest\src\main\java\org\flowable\idm\rest\service\api\user\UserRequest.java | 2 |
请完成以下Java代码 | public final class GroovyFieldDeclaration implements Annotatable {
private final AnnotationContainer annotations = new AnnotationContainer();
private final int modifiers;
private final String name;
private final String returnType;
private final Object value;
private final boolean initialized;
private Groo... | public boolean isInitialized() {
return this.initialized;
}
/**
* Builder for {@link GroovyFieldDeclaration}.
*/
public static final class Builder {
private final String name;
private String returnType;
private int modifiers;
private Object value;
private boolean initialized;
private Builder... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovyFieldDeclaration.java | 1 |
请完成以下Java代码 | public class title extends MultiPartElement implements Printable
{
/**
*
*/
private static final long serialVersionUID = 6917790537056196697L;
/**
Private initialization routine.
*/
{
setElementType("title");
setCase(LOWERCASE);
setAttributeQuote(true);
}... | Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
*/
public title addElement(String hashcode,String element)
{
addElementToRegistry(hashcode,element);
return(this);
}
/**
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\title.java | 1 |
请完成以下Java代码 | public Stream<HUEditorRow> stream()
{
return rows.stream();
}
public Stream<HUEditorRow> streamRecursive()
{
return stream()
.flatMap(HUEditorRow::streamRecursive)
.map(HUEditorRow::cast);
}
public long size()
{
return rows.size();
}
private static ImmutableMap<DocumentId, HUEdit... | {
collector.put(row.getId(), row);
row.getIncludedRows()
.forEach(includedRow -> indexByIdRecursively(collector, includedRow));
}
private static ImmutableMap<HUEditorRowId, HUEditorRowId> buildRowId2ParentIdMap(final List<HUEditorRow> rows)
{
if (rows.isEmpty())
{
return ImmutableMap.of();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuffer_FullyCached.java | 1 |
请在Spring Boot框架中完成以下Java代码 | StringHttpMessageConvertersCustomizer stringHttpMessageConvertersCustomizer(
HttpMessageConvertersProperties properties) {
return new StringHttpMessageConvertersCustomizer(properties);
}
}
static class StringHttpMessageConvertersCustomizer
implements ClientHttpMessageConvertersCustomizer, ServerHttpMess... | @Override
public void customize(ServerBuilder builder) {
builder.withStringConverter(this.converter);
}
}
static class NotReactiveWebApplicationCondition extends NoneNestedConditions {
NotReactiveWebApplicationCondition() {
super(ConfigurationPhase.PARSE_CONFIGURATION);
}
@ConditionalOnWebApplicat... | repos\spring-boot-4.0.1\module\spring-boot-http-converter\src\main\java\org\springframework\boot\http\converter\autoconfigure\HttpMessageConvertersAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DataEntryLayout
{
public static DataEntryLayout empty(@NonNull final AdWindowId windowId, @NonNull final AdTableId mainTableId)
{
return builder().windowId(windowId).mainTableId(mainTableId).build();
}
AdWindowId windowId;
AdTableId mainTableId;
ImmutableList<DataEntryTab> tabs;
@Builder
privat... | public Set<DataEntrySubTabId> getSubTabIds()
{
return tabs.stream()
.flatMap(DataEntryTab::streamSubTabIds)
.collect(ImmutableSet.toImmutableSet());
}
public DataEntrySubTab getSubTabById(@NonNull final DataEntrySubTabId subTabId)
{
return tabs.stream()
.map(tab -> tab.getSubTabByIdIfPresent(subTab... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\layout\DataEntryLayout.java | 2 |
请完成以下Java代码 | public void setVariables(Map<String, VariableValueDto> variables) {
this.variables = variables;
}
public String getBusinessKey() {
return businessKey;
}
public void setBusinessKey(String businessKey) {
this.businessKey = businessKey;
}
public String getCaseInstanceId() {
return caseInstan... | public boolean isSkipIoMappings() {
return skipIoMappings;
}
public void setSkipIoMappings(boolean skipIoMappings) {
this.skipIoMappings = skipIoMappings;
}
public boolean isWithVariablesInReturn() {
return withVariablesInReturn;
}
public void setWithVariablesInReturn(boolean withVariablesInR... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\StartProcessInstanceDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Double getValue(Meter.Type meterType) {
return this.value.getValue(meterType);
}
/**
* Return a new {@link ServiceLevelObjectiveBoundary} instance for the given double
* value.
* @param value the source value
* @return a {@link ServiceLevelObjectiveBoundary} instance
*/
public static Se... | * @return a {@link ServiceLevelObjectiveBoundary} instance
*/
public static ServiceLevelObjectiveBoundary valueOf(String value) {
return new ServiceLevelObjectiveBoundary(MeterValue.valueOf(value));
}
static class ServiceLevelObjectiveBoundaryHints implements RuntimeHintsRegistrar {
@Override
public void r... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\ServiceLevelObjectiveBoundary.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public SecurityManager securityManager(SessionManager sessionManager,ModularRealmAuthenticator authenticator) {
DefaultWebSecurityManager defaultSecurityManager = new DefaultWebSecurityManager();
defaultSecurityManager.setAuthenticator(authenticator);
defaultSecurityManager.setSessionManager(ses... | * {@link DefaultFilter}
*/
map.put("/doLogin", "anon");
map.put("/getLogin/**", "anon");
map.put("/anno/hello1", "anon");
map.put("/vip", "roles[admin]");
map.put("/common", "roles[user]");
// 登陆鉴权
map.put("/**", "hf,authc");
// header 鉴权
... | repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\config\ShiroConfig.java | 2 |
请完成以下Java代码 | public void add(int value, char[]... keyArray)
{
add(convert(keyArray), value);
}
public void add(int value, Collection<char[]> keyArray)
{
add(convert(keyArray), value);
}
private String convert(Collection<char[]> keyArray)
{
StringBuilder sbKey = new StringBuilder... | @Override
public void save(DataOutputStream out) throws Exception
{
out.writeInt(total);
Integer[] valueArray = d.getValueArray(new Integer[0]);
out.writeInt(valueArray.length);
for (Integer v : valueArray)
{
out.writeInt(v);
}
d.save(out);
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\trigram\frequency\Probability.java | 1 |
请完成以下Java代码 | public LocalDate getBegin() {
return begin;
}
public void setBegin(LocalDate begin) {
this.begin = begin;
}
public LocalDate getEnd() {
return end;
}
public void setEnd(LocalDate end) {
this.end = end;
}
public Customer getCustomer() { | return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public int getRoom() {
return room;
}
public void setRoom(int room) {
this.room = room;
}
} | repos\tutorials-master\javaxval\src\main\java\com\baeldung\javaxval\methodvalidation\model\Reservation.java | 1 |
请完成以下Java代码 | public List<InstructionForCreditorAgent1> getInstrForCdtrAgt() {
if (instrForCdtrAgt == null) {
instrForCdtrAgt = new ArrayList<InstructionForCreditorAgent1>();
}
return this.instrForCdtrAgt;
}
/**
* Gets the value of the instrForDbtrAgt property.
*
* @return... | *
*/
public List<RegulatoryReporting3> getRgltryRptg() {
if (rgltryRptg == null) {
rgltryRptg = new ArrayList<RegulatoryReporting3>();
}
return this.rgltryRptg;
}
/**
* Gets the value of the rmtInf property.
*
* @return
* possible object is... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\CreditTransferTransactionInformation10CH.java | 1 |
请完成以下Java代码 | public void addPrinterHW(final PrinterHWList printerHWList)
{
log.info("Found printer HWs: " + printerHWList);
}
@Override
public PrintPackage getNextPrintPackage()
{
pollNewFiles();
return buffer.getNextPrintPackage();
}
@Override
public InputStream getPrintPackageData(final PrintPackage printPackage)
... | file.delete();
dataFile.delete();
}
catch (final Exception e)
{
log.log(Level.WARNING, e.getLocalizedMessage(), e);
return false;
}
finally
{
Util.close(printPackageStream);
Util.close(printDataStream);
}
log.info("Adding package to buffer: " + printPackage);
buffer.addPrintPackage(pri... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\endpoint\DirectoryPrintConnectionEndpoint.java | 1 |
请完成以下Java代码 | public Long getNewsId() {
return newsId;
}
public void setNewsId(Long newsId) {
this.newsId = newsId;
}
public String getNewsTitle() {
return newsTitle;
}
public void setNewsTitle(String newsTitle) {
this.newsTitle = newsTitle == null ? null : newsTitle.trim();... | public void setIsDeleted(Byte isDeleted) {
this.isDeleted = isDeleted;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\entity\News.java | 1 |
请完成以下Java代码 | public List<String> execute(CommandContext commandContext) {
if (executionId == null) {
throw new ActivitiIllegalArgumentException("executionId is null");
}
ExecutionEntityManager executionEntityManager = commandContext.getExecutionEntityManager();
ExecutionEntity execution ... | public List<String> findActiveActivityIds(ExecutionEntity executionEntity) {
List<String> activeActivityIds = new ArrayList<String>();
collectActiveActivityIds(executionEntity, activeActivityIds);
return activeActivityIds;
}
protected void collectActiveActivityIds(ExecutionEntity execut... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\FindActiveActivityIdsCmd.java | 1 |
请完成以下Java代码 | public double apply(double n) {
return subtract1(add3(divideBy2(multiplyBy2(multiplyBy2(2)))));
}
}
class MonadSample2 extends MonadBaseExample {
public double apply(double n) {
double n1 = multiplyBy2(n);
double n2 = multiplyBy2(n1);
double n3 = divideBy2(n2);
double n4... | public boolean associativity() {
Function<Integer, Optional<Integer>> mapping = value -> Optional.of(value + 1);
Optional<Integer> leftSide = Optional.of(3).flatMap(mapping).flatMap(Optional::of);
Optional<Integer> rightSide = Optional.of(3).flatMap(v -> mapping.apply(v).flatMap(Optional::of)... | repos\tutorials-master\core-java-modules\core-java-8\src\main\java\com\baeldung\monad\MonadSamples.java | 1 |
请完成以下Java代码 | public TaxRecord1 createTaxRecord1() {
return new TaxRecord1();
}
/**
* Create an instance of {@link TaxRecordDetails1 }
*
*/
public TaxRecordDetails1 createTaxRecordDetails1() {
return new TaxRecordDetails1();
}
/**
* Create an instance of {@link TechnicalInpu... | }
/**
* Create an instance of {@link TransactionQuantities1Choice }
*
*/
public TransactionQuantities1Choice createTransactionQuantities1Choice() {
return new TransactionQuantities1Choice();
}
/**
* Create an instance of {@link TransactionReferences2 }
*
*/
... | 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\ObjectFactory.java | 1 |
请完成以下Java代码 | default boolean isPublicField() { return getDescriptor().hasCharacteristic(Characteristic.PublicField); }
default boolean isAdvancedField() { return getDescriptor().hasCharacteristic(Characteristic.AdvancedField); }
//@formatter:on
//@formatter:off
default Class<?> getValueClass() { return getDescriptor().getValue... | /** @return initial value / last saved value */
@Nullable
Object getInitialValue();
/** @return old value (i.e. the value as it was when the document was checked out from repository/documents collection) */
@Nullable
Object getOldValue();
//@formatter:on
/**
* @return field's valid state; never return null
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\IDocumentFieldView.java | 1 |
请完成以下Java代码 | public BigDecimal retrieveQtyOrdered(final int productId,
final int warehouseId)
{
ResultSet rs = null;
final PreparedStatement pstmt = DB.prepareStatement(
SQL_SELECT_QTY_ORDERED, null);
try
{
pstmt.setInt(1, productId);
pstmt.setInt(2, warehouseId);
rs = pstmt.executeQuery();
if (rs.ne... | throw new RuntimeException(
"Unable to retrive qtyOrdererd for M_Product_ID '"
+ productId + "'");
}
catch (SQLException e)
{
throw new RuntimeException(e);
}
finally
{
DB.close(rs, pstmt);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\impl\StoragePA.java | 1 |
请完成以下Java代码 | public void setM_HU_ID (final int M_HU_ID)
{
if (M_HU_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_HU_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_HU_ID, M_HU_ID);
}
@Override
public int getM_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_ID);
}
@Override
public org.eevolution.model.I_PP_Order get... | set_ValueNoCheck (COLUMNNAME_PP_Order_ID, PP_Order_ID);
}
@Override
public int getPP_Order_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Order_ID);
}
@Override
public void setPP_Order_SourceHU_ID (final int PP_Order_SourceHU_ID)
{
if (PP_Order_SourceHU_ID < 1)
set_ValueNoCheck (COLUMNNAME_PP_Order_Sourc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_SourceHU.java | 1 |
请完成以下Java代码 | public class DefaultCockpitRuntimeDelegate extends AbstractAppRuntimeDelegate<CockpitPlugin> implements CockpitRuntimeDelegate {
private Map<String, CommandExecutor> commandExecutors;
public DefaultCockpitRuntimeDelegate() {
super(CockpitPlugin.class);
this.commandExecutors = new HashMap<String, CommandE... | * Returns the list of mapping files that should be used to create the
* session factory for this runtime.
*
* @return
*/
protected List<String> getMappingFiles() {
List<CockpitPlugin> cockpitPlugins = pluginRegistry.getPlugins();
List<String> mappingFiles = new ArrayList<String>();
for (Cockp... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\DefaultCockpitRuntimeDelegate.java | 1 |
请完成以下Java代码 | public IDatabase getDatabase()
{
return database;
}
public ScriptExecutionException setDatabase(final IDatabase database)
{
addParameter("database", database);
this.database = database;
return this;
}
public IScript getScript()
{
return script;
}
public ScriptExecutionException setScript(final ISc... | return executor;
}
public ScriptExecutionException setExecutor(final IScriptExecutor executor)
{
addParameter("executor", executor);
this.executor = executor;
return this;
}
public ScriptExecutionException setLog(final List<String> log)
{
addParameter("log", log);
this.log = log;
return this;
}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\exception\ScriptExecutionException.java | 1 |
请完成以下Java代码 | public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionStrategy) {
this.sessionStrategy = sessionStrategy;
}
/**
* Sets the strategy used to handle a successful authentication. By default a
* {@link SavedRequestAwareAuthenticationSuccessHandler} is used.
*/
public void setAuthenti... | */
public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) {
Assert.notNull(securityContextHolderStrategy, "securityContextHolderStrategy cannot be null");
this.securityContextHolderStrategy = securityContextHolderStrategy;
}
protected AuthenticationSuccessHandl... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\AbstractAuthenticationProcessingFilter.java | 1 |
请完成以下Java代码 | public ProcessInstance correlateStartMessage() {
startMessageOnly();
MessageCorrelationResult result = correlateWithResult();
return result.getProcessInstance();
}
protected void ensureProcessDefinitionIdNotSet() {
if(processDefinitionId != null) {
throw LOG.exceptionCorrelateMessageWithProce... | return processInstanceId;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public Map<String, Object> getCorrelationProcessInstanceVariables() {
return correlationProcessInstanceVariables;
}
public Map<String, Object> getCorrelationLocalVariables() {
return correlation... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\MessageCorrelationBuilderImpl.java | 1 |
请完成以下Java代码 | public java.lang.String getDescription ()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
/** Set Null Value.
@param IsNullFieldValue Null Value */
@Override
public void setIsNullFieldValue (boolean IsNullFieldValue)
{
set_Value (COLUMNNAME_IsNullFieldValue, Boolean.valueOf(IsNullFieldVa... | {
if (M_AttributeValue_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_AttributeValue_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_AttributeValue_ID, Integer.valueOf(M_AttributeValue_ID));
}
/** Get Merkmals-Wert.
@return Product Attribute Value
*/
@Override
public int getM_AttributeValue_ID ()
{
Int... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeValue.java | 1 |
请完成以下Java代码 | public class CustomAuthorizationRequestResolver implements OAuth2AuthorizationRequestResolver {
private OAuth2AuthorizationRequestResolver defaultResolver;
public CustomAuthorizationRequestResolver(ClientRegistrationRepository repo, String authorizationRequestBaseUri){
defaultResolver = new Defaul... | private OAuth2AuthorizationRequest customizeAuthorizationRequest(OAuth2AuthorizationRequest req) {
Map<String,Object> extraParams = new HashMap<String,Object>();
extraParams.putAll(req.getAdditionalParameters()); //VIP note
extraParams.put("test", "extra");
System.out.println("here =====... | repos\tutorials-master\spring-security-modules\spring-security-oauth2\src\main\java\com\baeldung\oauth2request\CustomAuthorizationRequestResolver.java | 1 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<CustomProperty> getCustomProperties() {
return customProperties;
}
public void setCustomProperties(List<CustomProperty> customProperties) {
this.customPr... | public boolean hasBoundaryErrorEvents() {
if (this.boundaryEvents != null && !this.boundaryEvents.isEmpty()) {
return this.boundaryEvents.stream().anyMatch(boundaryEvent -> boundaryEvent.hasErrorEventDefinition());
}
return false;
}
public ServiceTask clone() {
Servi... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ServiceTask.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSimpleValue() {
return simpleValue;
}
public void setSimpleValue(String simpleValue) {
this.simpleValue = simpleValue;
}
public ComplexData... | this.complexValue = complexValue;
}
public CustomProperty clone() {
CustomProperty clone = new CustomProperty();
clone.setValues(this);
return clone;
}
public void setValues(CustomProperty otherProperty) {
setName(otherProperty.getName());
setSimpleValue(otherPr... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\CustomProperty.java | 1 |
请完成以下Java代码 | public class MutableAmount implements IMutable<Amount>
{
private Amount value;
public MutableAmount(@Nullable final Amount value)
{
this.value = value;
}
public static MutableAmount zero(@NonNull final CurrencyCode currencyCode) {return new MutableAmount(Amount.zero(currencyCode));}
@Override
public String ... | @Nullable
@Override
public Amount getValue() {return value;}
@Override
public void setValue(@Nullable final Amount value) {this.value = value;}
public void add(@NonNull final Amount other)
{
this.value = value != null
? value.add(other)
: other;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\MutableAmount.java | 1 |
请完成以下Java代码 | public class TreeNode {
int value;
TreeNode left;
TreeNode right;
public TreeNode(int value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TreeNode t... | if (target.equals(current) || current == null) {
throw new NoSuchElementException(format("No parent node found for 'target.value=%s' " +
"The target is not in the tree or the target is the topmost root node.",
target.value));
}
if (target.equa... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-8\src\main\java\com\baeldung\algorithms\parentnodebinarytree\TreeNode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | SecurityFilterChain customJwtSecurityChain(HttpSecurity http, JwtAuthorizationProperties props) throws Exception {
// @formatter:off
return http
.authorizeHttpRequests( r -> r.anyRequest().authenticated())
.oauth2Login(oauth2 -> oauth2.userInfoEndpoint(ep ->
ep.oidcUserSe... | props.getGroupToAuthorities());
return userRequest -> {
OidcUser oidcUser = delegate.loadUser(userRequest);
// Enrich standard authorities with groups
Set<GrantedAuthority> mappedAuthorities = new HashSet<>();
mappedAuthorities.addAll(oidcUser.getAuthori... | repos\tutorials-master\spring-security-modules\spring-security-azuread\src\main\java\com\baeldung\security\azuread\config\JwtAuthorizationConfiguration.java | 2 |
请完成以下Java代码 | public Builder type(ClassName type) {
return type(type.getName());
}
/**
* Specify the {@link Class type} of the parameter.
* @param type the type
* @return this for method chaining
*/
public Builder type(Class<?> type) {
return type(type.getCanonicalName());
}
/**
* Specify the type of... | }
/**
* Annotate the parameter with the specified single annotation, customized by the
* specified consumer.
* @param className the class of the annotation
* @param annotation a consumer of the builder
* @return this for method chaining
*/
public Builder singleAnnotate(ClassName className, Consum... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\Parameter.java | 1 |
请完成以下Java代码 | public String getValue() {
return this.value;
}
static ClientAuthenticationMethod[] methods() {
return new ClientAuthenticationMethod[] { CLIENT_SECRET_BASIC, CLIENT_SECRET_POST, CLIENT_SECRET_JWT,
PRIVATE_KEY_JWT, NONE, TLS_CLIENT_AUTH, SELF_SIGNED_TLS_CLIENT_AUTH };
}
/**
* A factory to construct a {@... | @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || this.getClass() != obj.getClass()) {
return false;
}
ClientAuthenticationMethod that = (ClientAuthenticationMethod) obj;
return getValue().equals(that.getValue());
}
@Override
public int hashCode() ... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\ClientAuthenticationMethod.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class UserConfigurationAdapter{
@Bean
SecurityFilterChain userFilterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(requests -> requests
.antMatchers("/login", "/register", "/newuserregister" ,"/test", "/test2").permitAll()
.antMa... | }
@Bean
UserDetailsService userDetailsService() {
return username -> {
User user = UserService.getUserByUsername(username);
if(user == null) {
throw new UsernameNotFoundException("User with username " + username + " not found.");
}
String role = user.getRole().equals("ROLE_ADMIN") ? "ADM... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\configuration\SecurityConfiguration.java | 2 |
请完成以下Java代码 | class FindPanelContainer_Collapsible extends FindPanelContainer
{
private CollapsiblePanel _findPanelCollapsible;
FindPanelContainer_Collapsible(final FindPanelBuilder builder)
{
super(builder);
}
@Override
protected void init(final FindPanelBuilder builder)
{
final CollapsiblePanel findPanelCollapsible =... | return findPanel.requestFocusInWindow();
}
/**
* @return true if it's expanded and the underlying {@link FindPanel} allows focus.
*/
@Override
public boolean isFocusable()
{
if (!isExpanded())
{
return false;
}
return findPanel.isFocusable();
}
/**
* Adds a runnable to be executed when the th... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelContainer_Collapsible.java | 1 |
请完成以下Java代码 | private static String extractRawValue(final ImpFormatColumn column, final List<String> cellRawValues)
{
if (column.isConstant())
{
return column.getConstantValue();
}
// NOTE: startNo is ONE based, so we have to convert it to 0-based index.
final int cellIndex = column.getStartNo() - 1;
if (cellIndex <... | doubleQuotesInColumn = true;
}
}
else
{
currentValue.append(ch);
}
}
}
else
{
if (ch == cellQuote)
{
inQuotes = true;
// double quotes in column will hit this!
if (startCollectChar)
{
currentValue.append('"');
}
}
else if (c... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\FlexImpDataLineParser.java | 1 |
请完成以下Java代码 | public void destroy() throws Exception {
xxlJobScheduler.destroy();
}
// ---------------------- XxlJobScheduler ----------------------
// conf
@Value("${xxl.job.i18n}")
private String i18n;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${spring.mail.fr... | public String getEmailFrom() {
return emailFrom;
}
public int getTriggerPoolFastMax() {
if (triggerPoolFastMax < 200) {
return 200;
}
return triggerPoolFastMax;
}
public int getTriggerPoolSlowMax() {
if (triggerPoolSlowMax < 100) {
return... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\conf\XxlJobAdminConfig.java | 1 |
请完成以下Java代码 | public static final InputStream getOSS2InputStream(OSSClient client, String bucketName, String diskName, String key){
OSSObject ossObj = client.getObject(bucketName, diskName + key);
return ossObj.getObjectContent();
}
/**
* 根据key删除OSS服务器上的文件
* @param client OSS客户端... | * 通过文件名判断并获取OSS服务文件上传时文件的contentType
* @param fileName 文件名
* @return 文件的contentType
*/
public static final String getContentType(String fileName){
String fileExtension = fileName.substring(fileName.lastIndexOf("."));
if("bmp".equalsIgnoreCase(fileExtension)) return "... | repos\spring-boot-quick-master\quick-oss\src\main\java\com\quick\oss\OSSUnit.java | 1 |
请完成以下Java代码 | private Document getDocument()
{
final Document document = _documentRef.get();
if (document == null)
{
throw new IllegalStateException("Document reference already expired");
}
return document;
}
@Override
public String getTableName()
{
final Document document = getDocument();
return document.getE... | public String setValue(final String columnName, final Object value)
{
final Document document = getDocument();
document.setValue(columnName, value, REASON_Value_DirectSetOnCalloutRecord);
return "";
}
@Override
public void dataRefresh()
{
final Document document = getDocument();
document.refreshFromRepo... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentAsCalloutRecord.java | 1 |
请完成以下Java代码 | public static boolean getDefaultEndElement()
{
return end_element;
}
/**
What codeset are we going to use the default is 8859_1
*/
public static String getDefaultCodeset()
{
return codeset;
}
/**
position of tag relative to start and end.
*/
public static int getDefaultPosition()
{
return positio... | public static int getDefaultCaseType()
{
return case_type;
}
public static char getDefaultStartTag()
{
return start_tag;
}
public static char getDefaultEndTag()
{
return end_tag;
}
/**
Should we print html in a more readable format?
*/
public static boolean getDefaultPrettyPrint()
{
return pret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\ECSDefaults.java | 1 |
请完成以下Java代码 | public ResponseEntity<?> getExternalSystemInfo(
@PathVariable @NonNull final String externalSystemConfigType,
@PathVariable @NonNull final String externalSystemChildConfigValue)
{
final ExternalSystemType externalSystemType = externalSystemService.getExternalSystemTypeByCodeOrNameOrNull(externalSystemConfigTyp... | .pInstanceID(String.valueOf(processExecutionResult.getPinstanceId().getRepoId()));
if (processExecutionResult.getThrowable() != null)
{
final JsonError error = JsonError.ofSingleItem(JsonErrors.ofThrowable(processExecutionResult.getThrowable(), Env.getADLanguageOrBaseLanguage()));
responseEntity = ResponseEn... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\externlasystem\ExternalSystemRestController.java | 1 |
请完成以下Java代码 | public void setAD_Zebra_Config_ID (final int AD_Zebra_Config_ID)
{
if (AD_Zebra_Config_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Zebra_Config_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Zebra_Config_ID, AD_Zebra_Config_ID);
}
@Override
public int getAD_Zebra_Config_ID()
{
return get_ValueAsInt(CO... | }
@Override
public void setIsDefault (final boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, IsDefault);
}
@Override
public boolean isDefault()
{
return get_ValueAsBoolean(COLUMNNAME_IsDefault);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Zebra_Config.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int create(UmsMenu umsMenu) {
umsMenu.setCreateTime(new Date());
updateLevel(umsMenu);
return menuMapper.insert(umsMenu);
}
/**
* 修改菜单层级
*/
private void updateLevel(UmsMenu umsMenu) {
if (umsMenu.getParentId() == 0) {
//没有父菜单时为一级菜单
um... | List<UmsMenuNode> result = menuList.stream()
.filter(menu -> menu.getParentId().equals(0L))
.map(menu -> covertMenuNode(menu, menuList))
.collect(Collectors.toList());
return result;
}
@Override
public int updateHidden(Long id, Integer hidden) {
... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\UmsMenuServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class TasksService {
@Autowired
private TasksRepository tasksRepository;
@Cacheable("tasks")
public TaskRecord getTaskById(String id) {
return tasksRepository.findById(id)
.orElseThrow(() -> new UnknownTaskException(id));
}
@Transactional
public void deleteTaskBy... | .orElseThrow(() -> new UnknownTaskException(id));
newStatus.ifPresent(task::setStatus);
newAssignedTo.ifPresent(task::setAssignedTo);
return task;
}
public TaskRecord createTask(String title, String createdBy) {
var task = new TaskRecord(UUID.randomUUID()
.toString... | repos\tutorials-master\lightrun\lightrun-tasks-service\src\main\java\com\baeldung\tasksservice\service\TasksService.java | 2 |
请完成以下Java代码 | protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) {
List<EventListener> eventListeners = process.getEventListeners();
if (eventListeners != null) {
for (EventListener eventListener : eventListeners) {
if (eventListener.getIm... | && !ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION.equals(eventListener.getImplementationType())
&& !ImplementationType.IMPLEMENTATION_TYPE_THROW_SIGNAL_EVENT.equals(eventListener.getImplementationType())
&& !ImplementationType.IMPLEMENTATION_TYPE_THROW... | repos\flowable-engine-main\modules\flowable-process-validation\src\main\java\org\flowable\validation\validator\impl\FlowableEventListenerValidator.java | 1 |
请完成以下Java代码 | private boolean isSameQty(final I_M_HU_PI_Item_Product piip1, final I_M_HU_PI_Item_Product piip2)
{
if (piip1.isInfiniteCapacity() != piip2.isInfiniteCapacity())
{
return false;
}
final boolean isInfiniteCapacity = piip1.isInfiniteCapacity();
if (isInfiniteCapacity)
{
return true;
}
final BigDe... | @Override
public Optional<HUPIItemProductId> retrieveDefaultIdForProduct(
@NonNull final ProductId productId,
@Nullable final BPartnerId bpartnerId,
@NonNull final ZonedDateTime date)
{
return retrieveDefaultForProduct(productId, bpartnerId, date)
.map(huPiItemProduct -> HUPIItemProductId.ofRepoIdOrNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDAO.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.