instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void addEmit(Collection<String> emits)
{
for (String emit : emits)
{
addEmit(emit);
}
}
/**
* 获取这个节点代表的模式串(们)
* @return
*/
public Collection<String> emit()
{
return this.emits == null ? Collections.<String>emptyList() : this.emits;
... | {
State nextState = nextStateIgnoreRootState(character);
if (nextState == null)
{
nextState = new State(this.depth + 1);
this.success.put(character, nextState);
}
return nextState;
}
public Collection<State> getStates()
{
return this.s... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\algorithm\ahocorasick\trie\State.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Phone {
@Id
@GeneratedValue
private Long id;
private String name;
@Embedded
@JdbcTypeCode(SqlTypes.JSON)
private Specification specification;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
} | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Specification getSpecification() {
return specification;
}
public void setSpecification(Specification specification) {
this.specification = specification;
... | repos\tutorials-master\persistence-modules\hibernate6\src\main\java\com\baeldung\persistjson\Phone.java | 2 |
请完成以下Java代码 | public Optional<I_M_Shipper> getByName(@NonNull final String name)
{
return queryBL.createQueryBuilder(I_M_Shipper.class)
.addEqualsFilter(I_M_Shipper.COLUMNNAME_Name, name)
.create()
.firstOnlyOptional(I_M_Shipper.class);
}
@NonNull
public Map<ShipperId, I_M_Shipper> getByIds(@NonNull final Set<Ship... | .addOnlyActiveRecordsFilter()
.addInArrayFilter(I_M_Shipper.COLUMNNAME_InternalName, internalNameSet)
.create()
.list();
return Maps.uniqueIndex(shipperList, I_M_Shipper::getInternalName);
}
@Override
public ExplainedOptional<ShipperGatewayId> getShipperGatewayId(@NonNull final ShipperId shipperId)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\shipping\impl\ShipperDAO.java | 1 |
请完成以下Java代码 | private DestinationTopic.Properties createRetryProperties(int backOffIndex) {
long thisBackOffValue = this.backOffValues.get(backOffIndex);
return createProperties(thisBackOffValue, getTopicSuffix(backOffIndex, thisBackOffValue));
}
private String getTopicSuffix(int backOffIndex, long thisBackOffValue) {
if (t... | private String joinWithRetrySuffix(long parameter) {
return String.join("-", this.destinationTopicSuffixes.getRetrySuffix(), String.valueOf(parameter));
}
public static class DestinationTopicSuffixes {
private final String retryTopicSuffix;
private final String dltSuffix;
public DestinationTopicSuffixes(@... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopicPropertiesFactory.java | 1 |
请完成以下Java代码 | public static RemotePortForwarder remotePortForwarding(SSHClient ssh) throws IOException, InterruptedException {
RemotePortForwarder rpf;
ssh.getConnection()
.getKeepAlive()
.setKeepAliveInterval(5);
rpf = ssh.getRemotePortForwarder();
new Thread(() -> {
... | ssh.authPassword(userName, password);
Session session = ssh.startSession();
session.allocateDefaultPTY();
new CountDownLatch(1).await();
try {
session.allocateDefaultPTY();
} finally {
session.close();
}
} f... | repos\tutorials-master\libraries-security-2\src\main\java\com\baeldung\sshj\SSHJAppDemo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTypeName() {
return TYPE_NAME;
}
@Override
public boolean isCachable() {
return true;
}
@Override
public Object getValue(ValueFields valueFields) {
return valueFields.getTextValue();
}
@Override
public void setValue(Object value, ValueField... | valueFields.setTextValue(textValue);
}
}
@Override
public boolean isAbleToStore(Object value) {
if (value == null) {
return true;
}
if (String.class.isAssignableFrom(value.getClass())) {
String stringValue = (String) value;
return stringVa... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\StringType.java | 2 |
请完成以下Java代码 | private static CallOrderDetailData ofRecordData(@NonNull final I_C_CallOrderDetail record)
{
final CallOrderDetailData.CallOrderDetailDataBuilder builder = CallOrderDetailData.builder()
.summaryId(CallOrderSummaryId.ofRepoId(record.getC_CallOrderSummary_ID()));
final UomId uomId = UomId.ofRepoId(record.getC_U... | else if (record.getC_InvoiceLine_ID() > 0)
{
final Quantity qtyInvoicedInUOM = Quantitys.of(record.getQtyInvoicedInUOM(), uomId);
return builder
.invoiceId(InvoiceId.ofRepoIdOrNull(record.getC_Invoice_ID()))
.invoiceAndLineId(InvoiceAndLineId.ofRepoIdOrNull(record.getC_Invoice_ID(), record.getC_Invoi... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\detail\CallOrderDetailRepo.java | 1 |
请完成以下Java代码 | public class DistributionJobId
{
@NonNull private final DDOrderId ddOrderId;
private DistributionJobId(@NonNull final DDOrderId ddOrderId)
{
this.ddOrderId = ddOrderId;
}
public static DistributionJobId ofDDOrderId(final @NonNull DDOrderId ddOrderId)
{
return new DistributionJobId(ddOrderId);
}
@JsonCrea... | @JsonValue
public String toString()
{
return toJson();
}
@NonNull
private String toJson()
{
return String.valueOf(ddOrderId.getRepoId());
}
public DDOrderId toDDOrderId() {return ddOrderId;}
public WFProcessId toWFProcessId() {return WFProcessId.ofIdPart(DistributionMobileApplication.APPLICATION_ID, ddO... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\model\DistributionJobId.java | 1 |
请完成以下Java代码 | public class OrderCostDetail
{
@Setter(AccessLevel.PACKAGE)
@Getter @Nullable OrderCostDetailId id;
@Getter @NonNull private OrderCostDetailOrderLinePart orderLineInfo;
@Getter private Money costAmount;
@Getter @NonNull Quantity inoutQty;
@Getter @NonNull Money inoutCostAmount;
@Builder(toBuilder = true)
priv... | public CurrencyId getCurrencyId()
{
return orderLineInfo.getCurrencyId();
}
public UomId getUomId()
{
return orderLineInfo.getUomId();
}
public void setOrderLineInfo(@NonNull final OrderCostDetailOrderLinePart orderLineInfo)
{
this.costAmount.assertCurrencyId(orderLineInfo.getCurrencyId());
Quantity.as... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\OrderCostDetail.java | 1 |
请在Spring Boot框架中完成以下Java代码 | final class Trees extends ReflectionWrapper {
private Trees(Object instance) {
super("com.sun.source.util.Trees", instance);
}
Tree getTree(Element element) throws Exception {
Object tree = findMethod("getTree", Element.class).invoke(getInstance(), element);
return (tree != null) ? new Tree(tree) : null;
}
... | Method method = findMethod(type, "instance", ProcessingEnvironment.class);
return new Trees(method.invoke(null, env));
}
catch (Exception ex) {
return instance(unwrap(env));
}
}
private static ProcessingEnvironment unwrap(ProcessingEnvironment wrapper) throws Exception {
Field delegateField = wrapper.g... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\fieldvalues\javac\Trees.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ExceptionController {
// 捕捉shiro的异常
@ResponseStatus(HttpStatus.UNAUTHORIZED)
@ExceptionHandler(ShiroException.class)
public BaseResponse handle401(ShiroException e) {
return new BaseResponse<>(false, "shiro的异常", null);
}
// 捕捉UnauthorizedException
@ResponseStatus(HttpS... | @ExceptionHandler(Exception.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public BaseResponse globalException(HttpServletRequest request, Throwable ex) {
return new BaseResponse<>(false, "其他异常", null);
}
private HttpStatus getStatus(HttpServletRequest request) {
Integer statusCode = (I... | repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\api\ExceptionController.java | 2 |
请完成以下Java代码 | public int execute(int a, int b) {
return a + b;
}
});
}
public static int passFunctionUsingLambda(int a, int b) {
return performOperation(a, b, (i, k) -> i + k);
}
private static int add(int a, int b) { return a + b; }
public static int passFunctionUsi... | private static int executeFunction(BiFunction<Integer, Integer, Integer> function, int a, int b) { return function.apply(a, b); }
public static int passFunctionUsingFunction(int a, int b) {
return executeFunction((i, k) -> i + k, a, b);
}
private static int executeCallable(Callable<Integer> task)... | repos\tutorials-master\core-java-modules\core-java-function\src\main\java\com\baeldung\functionparameter\FunctionParameter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getErrType() {
return errType;
}
public void setErrType(String errType) {
this.errType = errType == null ? null : errType.trim();
}
public String getHandleStatus() {
return handleStatus;
}
public void setHandleStatus(String handleStatus) {
this.handleStatus = handleStatus == null ? null :... | public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName == null ? null : operatorName.trim();
}
public String getOperatorAccountNo() {
return operatorAccountNo;
}
public void setOperatorAccountNo(String operatorAccountNo... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistake.java | 2 |
请完成以下Java代码 | public <R> R forProcessInstanceReadonly(final DocumentId pinstanceId, final Function<IProcessInstanceController, R> processor)
{
try (final IAutoCloseable ignored = getOrLoad(pinstanceId).lockForReading())
{
final ADProcessInstanceController processInstance = getOrLoad(pinstanceId)
.copyReadonly()
.bi... | try (final IAutoCloseable ignored = getOrLoad(pinstanceId).lockForWriting())
{
final ADProcessInstanceController processInstance = getOrLoad(pinstanceId)
.copyReadWrite(changesCollector)
.bindContextSingleDocumentIfPossible(documentsCollection);
// Make sure the process was not already executed.
/... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\ADProcessInstancesRepository.java | 1 |
请完成以下Java代码 | public LocalDate retrieveContractEndDateForInvoiceIdOrNull(@NonNull final InvoiceId invoiceId)
{
final I_C_Invoice invoice = invoiceDAO.getByIdInTrx(invoiceId);
final ZoneId timeZone = orgDAO.getTimeZone(OrgId.ofRepoId(invoice.getAD_Org_ID()));
final List<I_C_InvoiceLine> invoiceLines = invoiceDAO.retrieveLines(... | return -1;
}
return 1;
})
.findFirst();
if (latestTerm == null)
{
return null;
}
return TimeUtil.asLocalDate(
CoalesceUtil.coalesce(latestTerm.get().getMasterEndDate(), latestTerm.get().getEndDate()),
timeZone);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\invoice\ContractInvoiceService.java | 1 |
请完成以下Java代码 | private void addImportClass(final String className)
{
if (className == null
|| (className.startsWith("java.lang.") && !className.startsWith("java.lang.reflect."))
|| className.startsWith(packageName + "."))
{
return;
}
for (final String name : s_importClasses)
{
if (className.equals(name))
{... | private void addImportClass(Class<?> cl)
{
if (cl.isArray())
{
cl = cl.getComponentType();
}
if (cl.isPrimitive())
{
return;
}
addImportClass(cl.getCanonicalName());
}
/**
* Generate java imports
*/
private void createImports(final StringBuilder sb)
{
for (final String name : s_importCla... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\ad\persistence\modelgen\ModelClassGenerator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Page<Article> getArticles(Pageable pageable) {
return articleRepository.findAll(pageable);
}
@Transactional(readOnly = true)
public Page<Article> getFeedByUserId(long userId, Pageable pageable) {
return userFindService.findById(userId)
.map(user -> articleRepository.f... | @Transactional
public Article updateArticle(long userId, String slug, ArticleUpdateRequest request) {
return mapIfAllPresent(userFindService.findById(userId), getArticleBySlug(slug),
(user, article) -> user.updateArticle(article, request))
.orElseThrow(NoSuchElementException:... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\article\ArticleService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void process(final Exchange exchange) throws Exception
{
final ExportBPartnerRouteContext routeContext = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_EXPORT_BPARTNER_CONTEXT, ExportBPartnerRouteContext.class);
createBPartnerExportDirectories(routeContext);
}
privat... | routeContext.setBPartnerBasePath(bpartnerCode);
}
private static void createDirectory(@NonNull final Path directoryPath)
{
final File directory = directoryPath.toFile();
if (directory.exists())
{
return;
}
if (!directory.mkdirs())
{
throw new RuntimeException("Could not create directory with path... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\to_grs\bpartner\processor\CreateExportDirectoriesProcessor.java | 2 |
请完成以下Java代码 | public boolean containsKey(Object key) {
for (Resolver scriptResolver : scriptResolvers) {
if (scriptResolver.containsKey(key)) {
return true;
}
}
return defaultBindings.containsKey(key);
}
@Override
public Object get(Object key) {
for... | }
return values;
}
@Override
public void putAll(Map<? extends String, ? extends Object> toMerge) {
throw new UnsupportedOperationException();
}
@Override
public Object remove(Object key) {
if (UNSTORED_KEYS.contains(key)) {
return null;
}
ret... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\scripting\ScriptBindings.java | 1 |
请完成以下Java代码 | public void setFirstName(String firstName) {
this.firstName = firstName;
}
@Column(name = "last_name", nullable = false)
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@Column(name = "email_ad... | }
public void setEmailId(String emailId) {
this.emailId = emailId;
}
@Override
public String toString() {
return "Employee{" +
"id=" + id +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", emailId... | repos\SpringBoot-Projects-FullStack-master\Part-1 Spring Boot Basic Fund Projects\SpringBootSources\SpringRestAPI\src\main\java\spring\boot\model\Employee.java | 1 |
请完成以下Java代码 | private OrgId getToOrgId()
{
return Services.get(IWarehouseDAO.class).retrieveOrgIdByLocatorId(getM_LocatorTo_ID());
}
public final int getM_LocatorTo_ID()
{
final I_M_MovementLine movementLine = getModel(I_M_MovementLine.class);
return movementLine.getM_LocatorTo_ID();
}
@Value
@Builder
private static ... | .outboundCosts(outboundCosts)
.inboundCosts(inboundCosts)
.build();
}
else
{
return services.moveCosts(MoveCostsRequest.builder()
.acctSchemaId(as.getId())
.clientId(getClientId())
.date(getDateAcctAsInstant())
// .costElement(null) // all cost elements
.productId(getProductI... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_Movement.java | 1 |
请完成以下Java代码 | public class UserProfileDto {
private String username;
private String email;
private Role role;
public UserProfileDto() {
}
public UserProfileDto(String username, String email, Role role) {
this.username = username;
this.email = email;
this.role = role;
}
publi... | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
} | repos\tutorials-master\spring-security-modules\spring-security-authorization\spring-security-url-http-method-auth\src\main\java\com\baeldung\springsecurity\dto\UserProfileDto.java | 1 |
请完成以下Java代码 | public boolean isTrue()
{
return this == TRUE;
}
public boolean isFalse()
{
return this == FALSE;
}
public boolean isPresent()
{
return this == TRUE || this == FALSE;
}
public boolean isUnknown()
{
return this == UNKNOWN;
}
public boolean orElseTrue() {return orElse(true);}
public boolean orEl... | @JsonValue
@Nullable
public Boolean toBooleanOrNull()
{
switch (this)
{
case TRUE:
return Boolean.TRUE;
case FALSE:
return Boolean.FALSE;
case UNKNOWN:
return null;
default:
throw new IllegalStateException("Type not handled: " + this);
}
}
@Nullable
public String toBooleanString... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\OptionalBoolean.java | 1 |
请完成以下Java代码 | public void setM_Warehouse_ID (int M_Warehouse_ID)
{
if (M_Warehouse_ID < 1)
set_Value (COLUMNNAME_M_Warehouse_ID, null);
else
set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
}
/** Get Warehouse.
@return Storage Warehouse and Service Point
*/
public int getM_Warehouse_ID ()... | /** Get Number of Product counts.
@return Frequency of product counts per year
*/
public int getNoProductCount ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NoProductCount);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Number of runs.
@param NumberOfRuns
Frequency of processing ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PerpetualInv.java | 1 |
请完成以下Java代码 | protected FilterQuery getQueryFromQueryParameters(MultivaluedMap<String, String> queryParameters) {
ProcessEngine engine = getProcessEngine();
FilterQueryDto queryDto = new FilterQueryDto(getObjectMapper(), queryParameters);
return queryDto.toQuery(engine);
}
@Override
public ResourceOptionsDto avail... | // GET /count
URI countUri = baseUriBuilder.clone().path("/count").build();
resourceOptionsDto.addReflexiveLink(countUri, HttpMethod.GET, "count");
// POST /create
if (isAuthorized(CREATE)) {
URI createUri = baseUriBuilder.clone().path("/create").build();
resourceOptionsDto.addReflexiveLink... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\FilterRestServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void configureClientInboundChannel(ChannelRegistration registration) {
if (this.executor != null) {
registration.executor(this.executor);
}
}
@Override
public void configureClientOutboundChannel(ChannelRegistration registration) {
if (this.executor != null) {
registration.executor(this.ex... | private final ObjectMapper objectMapper;
Jackson2WebSocketMessageConverterConfiguration(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
@Override
public boolean configureMessageConverters(List<MessageConverter> messageConverters) {
org.springframework.messaging.converter.MappingJackson2... | repos\spring-boot-4.0.1\module\spring-boot-websocket\src\main\java\org\springframework\boot\websocket\autoconfigure\servlet\WebSocketMessagingAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class WarehouseId implements RepoIdAware
{
public static final WarehouseId MAIN = new WarehouseId(540008);
@JsonCreator
public static WarehouseId ofRepoId(final int repoId)
{
if (repoId == MAIN.repoId)
{
return MAIN;
}
else
{
return new WarehouseId(repoId);
}
}
@Nullable
public static ... | return warehouseId != null ? warehouseId.getRepoId() : -1;
}
public static Set<Integer> toRepoIds(final Collection<WarehouseId> warehouseIds)
{
return warehouseIds.stream()
.map(WarehouseId::toRepoId)
.filter(id -> id > 0)
.collect(ImmutableSet.toImmutableSet());
}
int repoId;
private WarehouseId... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\WarehouseId.java | 2 |
请完成以下Java代码 | public class Employee {
long id;
String name;
public Employee() {
}
public Employee(long id, String name) {
super();
this.id = id;
this.name = name;
}
public long getId() { | return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-3\src\main\java\com\baeldung\algorithms\checksortedlist\Employee.java | 1 |
请完成以下Java代码 | public void setQtyDelivered (final @Nullable BigDecimal QtyDelivered)
{
set_ValueNoCheck (COLUMNNAME_QtyDelivered, QtyDelivered);
}
@Override
public BigDecimal getQtyDelivered()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDelivered);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
... | set_ValueNoCheck (COLUMNNAME_QtyDeliveredInUOM_Override, QtyDeliveredInUOM_Override);
}
@Override
public BigDecimal getQtyDeliveredInUOM_Override()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInUOM_Override);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQty... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_C_InvoiceCandidate_InOutLine.java | 1 |
请完成以下Java代码 | public ProviderResult computeValueInfo(@NonNull final Object modelRecord)
{
if (!isInstanceOf(modelRecord, I_M_Product.class))
{
return ProviderResult.EMPTY;
}
final I_M_Product product = create(modelRecord, I_M_Product.class);
final ProductCategoryId productCategoryId = ProductCategoryId.ofRepoId(produc... | {
final I_M_Product_Category productCategory = loadOutOfTrx(productCategoryId, I_M_Product_Category.class);
final int adSequenceId = productCategory.getAD_Sequence_ProductValue_ID();
if (adSequenceId > 0)
{
// return our result
return adSequenceId;
}
if (productCategory.getM_Product_Category_Parent_... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\sequence\ProductValueSequenceProvider.java | 1 |
请完成以下Java代码 | public boolean isInitialVariables() {
return initialVariables;
}
public void setInitialVariables(boolean initialVariables) {
this.initialVariables = initialVariables;
}
public boolean isSkipCustomListeners() {
return skipCustomListeners;
}
public void setSkipCustomListeners(boolean skipCustom... | return skipIoMappings;
}
public void setSkipIoMappings(boolean skipIoMappings) {
this.skipIoMappings = skipIoMappings;
}
public boolean isWithoutBusinessKey() {
return withoutBusinessKey;
}
public void setWithoutBusinessKey(boolean withoutBusinessKey) {
this.withoutBusinessKey = withoutBusine... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\RestartProcessInstancesBatchConfiguration.java | 1 |
请完成以下Java代码 | public class Calculator {
// 为一个命令指定多个名称
//@ShellMethod(value = "Add numbers.", key = {"sum", "addition"})
@ShellMethod(value = "Add numbers.", key = {"sum", "addition"}, prefix = "-", group = "Cal")
public void add(int a, int b) {
int sum = a + b;
System.out.println(String.format("%d +... | public void addByList(@ShellOption(arity = 3) List<Integer> numbers) {
int s = 0;
for(int number : numbers) {
s += number;
}
System.out.println(String.format("s=%d", s));
}
@ShellMethod("Echo.")
public void echo(String what) {
System.out.println(what);
... | repos\springboot-demo-master\Spring-Shell\src\main\java\com\et\spring\shell\command\Calculator.java | 1 |
请完成以下Java代码 | public class PlainReferenceNoDAO extends AbstractReferenceNoDAO
{
private final POJOLookupMap lookupMap = POJOLookupMap.get();
@Override
public List<I_C_ReferenceNo_Type_Table> retrieveTableAssignments(I_C_ReferenceNo_Type type)
{
throw new UnsupportedOperationException();
}
@Override
public List<I_C_Refere... | // add the C_ReferenceNos into a set to avoid duplicates
final Set<I_C_ReferenceNo> refNos = new HashSet<>();
for (final I_C_ReferenceNo_Doc doc : docs)
{
final I_C_ReferenceNo referenceNo = doc.getC_ReferenceNo();
if (referenceNo.getC_ReferenceNo_Type_ID() == type.getC_ReferenceNo_Type_ID())
{
refN... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.refid\src\main\java\de\metas\document\refid\api\impl\PlainReferenceNoDAO.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8443
servlet:
context-path: /
ssl:
protocol: TLS
key-store-type: JKS
key-store: classpath:.keystore
key-store-password: javastack
spring:
messages:
basename: i18n/common, i18n/index
fallback-to-system-locale: false
security:
user:
name: root
password:... | h-pattern: "/**" # 默认 /**
# 可添加到全局配置文件中
# devtools:
# restart:
# log-condition-evaluation-delta: false
# trigger-file: ".reloadtrigger" | repos\spring-boot-best-practice-master\spring-boot-web\src\main\resources\application.yml | 2 |
请完成以下Java代码 | private ListenableFuture<TbMsg> publishMessageAsync(TbContext ctx, TbMsg msg) {
return ctx.getExternalCallExecutor().executeAsync(() -> publishMessage(msg));
}
private TbMsg publishMessage(TbMsg msg) {
String queueUrl = TbNodeUtils.processPattern(this.config.getQueueUrlPattern(), msg);
... | }
private TbMsg processException(TbMsg origMsg, Throwable t) {
TbMsgMetaData metaData = origMsg.getMetaData().copy();
metaData.putValue(ERROR, t.getClass() + ": " + t.getMessage());
return origMsg.transform()
.metaData(metaData)
.build();
}
@Override... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\aws\sqs\TbSqsNode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int getMaxResultSize() {
return maxResultSize;
}
public void setMaxResultSize(int maxResultSize) {
this.maxResultSize = maxResultSize;
}
public Map getHeaders() {
return headers;
}
public void addHeader(String key, String value){
this.headers.put(key, value);
}
public void addHeaders(String key, ... | return postData;
}
public void setPostData(String postData) {
this.postData = postData;
}
public ClientKeyStore getClientKeyStore() {
return clientKeyStore;
}
public void setClientKeyStore(ClientKeyStore clientKeyStore) {
this.clientKeyStore = clientKeyStore;
}
public com.roncoo.pay.trade.utils.httpclie... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpParam.java | 2 |
请完成以下Java代码 | public class MRequestCategory extends X_R_Category
{
/**
*
*/
private static final long serialVersionUID = 9174605980194362716L;
/**
* Get MCategory from Cache
* @param ctx context
* @param R_Category_ID id
* @return MCategory
*/
public static MRequestCategory get (Properties ctx, int R_Category_I... | /**************************************************************************
* Standard Constructor
* @param ctx context
* @param R_Category_ID id
* @param trxName trx
*/
public MRequestCategory (Properties ctx, int R_Category_ID, String trxName)
{
super (ctx, R_Category_ID, trxName);
} // MCategory
/*... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MRequestCategory.java | 1 |
请完成以下Java代码 | public void setText(String text)
{
if (!isHtml(text))
{
setHtmlText(convertToHtml(text));
}
else
{
setHtmlText(text);
}
}
/**
* Compatible with CTextArea
*
* @return html text
* @see #getHtmlText()
*/
public String getText()
{
return getHtmlText();
}
/**
* Compatible with CText... | parent = (Dialog)e;
break;
}
e = e.getParent();
}
return parent;
}
public boolean print()
{
throw new UnsupportedOperationException();
}
public static boolean isHtml(String s)
{
if (s == null)
return false;
String s2 = s.trim().toUpperCase();
return s2.startsWith("<HTML>");
}
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\RichTextEditor.java | 1 |
请完成以下Java代码 | public class FeatureFunction implements ICacheAble
{
/**
* 环境参数
*/
char[] o;
/**
* 标签参数
*/
// String s;
/**
* 权值,按照index对应于tag的id
*/
double[] w;
public FeatureFunction(char[] o, int tagSize)
{
this.o = o;
w = new double[tagSize];
}
... | {
out.writeChar(c);
}
out.writeInt(w.length);
for (double v : w)
{
out.writeDouble(v);
}
}
@Override
public boolean load(ByteArray byteArray)
{
int size = byteArray.nextInt();
o = new char[size];
for (int i = 0; i <... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\FeatureFunction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<ProductEntity, Integer> getProdEntityCountMap() {
return prodEntityCountMap;
}
public void setProdEntityCountMap(Map<ProductEntity, Integer> prodEntityCountMap) {
this.prodEntityCountMap = prodEntityCountMap;
}
public String getProdIdCountJson() {
return prodIdCountJ... | @Override
public String toString() {
return "OrderInsertReq{" +
"userId='" + userId + '\'' +
", prodIdCountJson='" + prodIdCountJson + '\'' +
", prodIdCountMap=" + prodIdCountMap +
", prodEntityCountMap=" + prodEntityCountMap +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\order\OrderInsertReq.java | 2 |
请完成以下Java代码 | public Pagination getMsgPgntn() {
return msgPgntn;
}
/**
* Sets the value of the msgPgntn property.
*
* @param value
* allowed object is
* {@link Pagination }
*
*/
public void setMsgPgntn(Pagination value) {
this.msgPgntn = value;
}
... | */
public String getAddtlInf() {
return addtlInf;
}
/**
* Sets the value of the addtlInf property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAddtlInf(String value) {
this.addtlInf = value;
}
} | 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\GroupHeader42.java | 1 |
请完成以下Java代码 | private static PickingSlotQuery createPickingSlotQuery(@NonNull final DocumentFilterList filters)
{
final PickingSlotQueryBuilder queryBuilder = PickingSlotQuery.builder();
final BPartnerId bpartnerId = PickingSlotsClearingViewFilters.getBPartnerId(filters);
if (bpartnerId != null)
{
queryBuilder.assignedT... | createProcessDescriptor(WEBUI_PickingSlotsClearingView_TakeOutCUsAndAddToTU.class),
createProcessDescriptor(WEBUI_PickingSlotsClearingView_TakeOutTUAndAddToLU.class),
createProcessDescriptor(WEBUI_PickingSlotsClearingView_TakeOutHUAndAddToNewHU.class),
createProcessDescriptor(WEBUI_PickingSlotsClearingView_... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PickingSlotsClearingViewFactory.java | 1 |
请完成以下Java代码 | public String toString ()
{
StringBuffer sb = new StringBuffer ("MJournalBatch[");
sb.append(get_ID()).append(",").append(getDescription())
.append(",DR=").append(getTotalDr())
.append(",CR=").append(getTotalCr())
.append ("]");
return sb.toString ();
} // toString
/**
* Get Document Info
* @ret... | * @param file output file
* @return file if success
*/
public File createPDF (File file)
{
// ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID());
// if (re == null)
return null;
// return re.getPDF(file);
} // createPDF
/**
* Get Process Message
* @return clear t... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\model\MJournalBatch.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyDeliveredInStockingUOM()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInStockingUOM);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyDeliveredInUOM (final @Nullable BigDecimal QtyDeliveredInUOM)
{
set_Value (COLUMNNAME_QtyDeliveredInU... | return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyOrdered (final BigDecimal QtyOrdered)
{
set_Value (COLUMNNAME_QtyOrdered, QtyOrdered);
}
@Override
public BigDecimal getQtyOrdered()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyOrdered);
return bd != null ? bd : Big... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_DesadvLine.java | 1 |
请完成以下Java代码 | public class CategoryImpl extends RootElementImpl implements Category {
protected static Attribute<String> nameAttribute;
protected static ChildElementCollection<CategoryValue> categoryValuesCollection;
public CategoryImpl(ModelTypeInstanceContext context) {
super(context);
}
public static void registe... | final SequenceBuilder sequenceBuilder = typeBuilder.sequence();
categoryValuesCollection = sequenceBuilder.elementCollection(CategoryValue.class).build();
typeBuilder.build();
}
@Override
public String getName() {
return nameAttribute.getValue(this);
}
@Override
public void setName(String na... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CategoryImpl.java | 1 |
请完成以下Java代码 | public void setEventTopicName (final @Nullable java.lang.String EventTopicName)
{
set_Value (COLUMNNAME_EventTopicName, EventTopicName);
}
@Override
public java.lang.String getEventTopicName()
{
return get_ValueAsString(COLUMNNAME_EventTopicName);
}
/**
* EventTypeName AD_Reference_ID=540802
* Referenc... | {
return get_ValueAsBoolean(COLUMNNAME_IsError);
}
@Override
public void setIsErrorAcknowledged (final boolean IsErrorAcknowledged)
{
set_Value (COLUMNNAME_IsErrorAcknowledged, IsErrorAcknowledged);
}
@Override
public boolean isErrorAcknowledged()
{
return get_ValueAsBoolean(COLUMNNAME_IsErrorAcknowledg... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\event\model\X_AD_EventLog.java | 1 |
请完成以下Java代码 | public class OrderLineMainLocationAdapter implements IDocumentLocationAdapter
{
private final I_C_OrderLine delegate;
private final IBPartnerBL partnerBL = Services.get(IBPartnerBL.class);
OrderLineMainLocationAdapter(@NonNull final I_C_OrderLine delegate)
{
this.delegate = delegate;
}
@Override
public int g... | public int getAD_User_ID()
{
return delegate.getAD_User_ID();
}
@Override
public void setAD_User_ID(final int AD_User_ID)
{
delegate.setAD_User_ID(AD_User_ID);
}
@Override
public String getBPartnerAddress()
{
return delegate.getBPartnerAddress();
}
@Override
public void setBPartnerAddress(final Str... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\location\adapter\OrderLineMainLocationAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | void configure(HttpSecurity httpSecurity) {
OidcProviderConfigurationEndpointFilter oidcProviderConfigurationEndpointFilter = new OidcProviderConfigurationEndpointFilter();
Consumer<OidcProviderConfiguration.Builder> providerConfigurationCustomizer = getProviderConfigurationCustomizer();
if (providerConfiguration... | if (this.providerConfigurationCustomizer != null) {
providerConfigurationCustomizer = (providerConfigurationCustomizer != null)
? providerConfigurationCustomizer.andThen(this.providerConfigurationCustomizer)
: this.providerConfigurationCustomizer;
}
}
return providerConfigurationCustomizer;
}
... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\server\authorization\OidcProviderConfigurationEndpointConfigurer.java | 2 |
请完成以下Java代码 | public void setGroupBy (final boolean GroupBy)
{
set_Value (COLUMNNAME_GroupBy, GroupBy);
}
@Override
public boolean isGroupBy()
{
return get_ValueAsBoolean(COLUMNNAME_GroupBy);
}
@Override
public void setOrderBySeqNo (final int OrderBySeqNo)
{
set_Value (COLUMNNAME_OrderBySeqNo, OrderBySeqNo);
}
@... | public int getOrderBySeqNo()
{
return get_ValueAsInt(COLUMNNAME_OrderBySeqNo);
}
@Override
public void setSplitOrder (final boolean SplitOrder)
{
set_Value (COLUMNNAME_SplitOrder, SplitOrder);
}
@Override
public boolean isSplitOrder()
{
return get_ValueAsBoolean(COLUMNNAME_SplitOrder);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java-gen\de\metas\ordercandidate\model\X_C_OLCandAggAndOrder.java | 1 |
请完成以下Java代码 | public void insert(int value) {
Node[] update = new Node[maxLevel + 1];
Node current = this.head;
for (int i = level; i >= 0; i--) {
while (current.forward[i] != null && current.forward[i].value < value) {
current = current.forward[i];
}
updat... | for (int i = level; i >= 0; i--) {
while (current.forward[i] != null && current.forward[i].value < value) {
current = current.forward[i];
}
update[i] = current;
}
current = current.forward[0];
if (current != null && current.value == value) {
... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-8\src\main\java\com\baeldung\algorithms\skiplist\SkipList.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
public I_S_Resource getS_Resource() throw... | if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getS_Resource_ID()));
}
/** Set Resource Unavailability.
@param S_Resource... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_ResourceUnAvailable.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Encoding getEncoding() {
return this.encoding;
}
public Jsp getJsp() {
return this.jsp;
}
public Session getSession() {
return this.session;
}
}
/**
* Reactive server properties.
*/
public static class Reactive {
private final Session session = new Session();
public Session ge... | public Cookie getCookie() {
return this.cookie;
}
}
}
/**
* Strategies for supporting forward headers.
*/
public enum ForwardHeadersStrategy {
/**
* Use the underlying container's native support for forwarded headers.
*/
NATIVE,
/**
* Use Spring's support for handling forwarded heade... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\ServerProperties.java | 2 |
请完成以下Java代码 | static class SqlServerJdbcDockerComposeConnectionDetails extends DockerComposeConnectionDetails
implements JdbcConnectionDetails {
private static final JdbcUrlBuilder jdbcUrlBuilder = new SqlServerJdbcUrlBuilder("sqlserver", 1433);
private final SqlServerEnvironment environment;
private final String jdbcUrl... | @Override
public String getJdbcUrl() {
return this.jdbcUrl;
}
private static final class SqlServerJdbcUrlBuilder extends JdbcUrlBuilder {
private SqlServerJdbcUrlBuilder(String driverProtocol, int containerPort) {
super(driverProtocol, containerPort);
}
@Override
protected void appendParamet... | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\docker\compose\SqlServerJdbcDockerComposeConnectionDetailsFactory.java | 1 |
请完成以下Java代码 | protected void prepare()
{
final ProcessInfoParameter[] params = getParametersAsArray();
for (final ProcessInfoParameter p : params)
{
final String parameterName = p.getParameterName();
if ("Reset".equals(parameterName))
{
p_Reset = p.getParameterAsBoolean();
}
else if ("PA_ReportCube_ID".equ... | .update()
.getResultSummary();
addLog(updateResultSummary);
}
return MSG_OK;
}
private List<I_PA_ReportCube> retriveReportCubes()
{
final IContextAware context = this;
final IQueryBuilder<I_PA_ReportCube> queryBuilder = queryBL
.createQueryBuilder(I_PA_ReportCube.class, context)
.addOnlyAct... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\process\FactAcctSummary.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class OpenSaml5MetadataResolver implements Saml2MetadataResolver {
static {
OpenSamlInitializationService.initialize();
}
private final BaseOpenSamlMetadataResolver delegate;
public OpenSaml5MetadataResolver() {
this.delegate = new BaseOpenSamlMetadataResolver(new OpenSaml5Template());
}
@Ove... | /**
* A tuple containing an OpenSAML {@link EntityDescriptor} and its associated
* {@link RelyingPartyRegistration}
*
* @since 5.7
*/
public static final class EntityDescriptorParameters {
private final EntityDescriptor entityDescriptor;
private final RelyingPartyRegistration registration;
public En... | repos\spring-security-main\saml2\saml2-service-provider\src\opensaml5Main\java\org\springframework\security\saml2\provider\service\metadata\OpenSaml5MetadataResolver.java | 2 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final I_M_InOut inOut = InterfaceWrapperHelper.create(getCtx(), p_M_InOut_ID, I_M_InOut.class, getTrxName());
final IInOutInvoiceCandidateBL inOutBL = Services.get(IInOutInvoiceCandidateBL.class);
final boolean isApprovedForInvoicing = inOutBL.isApproveInOutForInvoici... | @Override
public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context)
{
// Make this process only available for inout entries that are active and have the status Completed or Closed
if (I_M_InOut.Table_Name.equals(context.getTableName()))
{
final I_M_InOut i... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\process\M_InOut_ApproveForInvoicing.java | 1 |
请完成以下Java代码 | public void setC_User_Role_ID (final int C_User_Role_ID)
{
if (C_User_Role_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_User_Role_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_User_Role_ID, C_User_Role_ID);
}
@Override
public int getC_User_Role_ID()
{
return get_ValueAsInt(COLUMNNAME_C_User_Role_ID);
}... | @Override
public boolean isUniqueForBPartner()
{
return get_ValueAsBoolean(COLUMNNAME_IsUniqueForBPartner);
}
@Override
public void setName (final @Nullable java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_User_Role.java | 1 |
请完成以下Java代码 | public boolean isEmpty() {
throw new UnsupportedOperationException(getClass().getName()+".isEmpty() is not supported.");
}
@Override
public boolean containsKey(Object key) {
throw new UnsupportedOperationException(getClass().getName()+".containsKey() is not supported.");
}
@Override
public boolean... | }
@Override
public Set<String> keySet() {
throw new UnsupportedOperationException(getClass().getName()+".keySet() is not supported.");
}
@Override
public Collection<Object> values() {
throw new UnsupportedOperationException(getClass().getName()+".values() is not supported.");
}
@Override
publ... | repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\AbstractVariableMap.java | 1 |
请完成以下Java代码 | public void setServiceDate (Timestamp ServiceDate)
{
set_ValueNoCheck (COLUMNNAME_ServiceDate, ServiceDate);
}
/** Get Service date.
@return Date service was provided
*/
public Timestamp getServiceDate ()
{
return (Timestamp)get_Value(COLUMNNAME_ServiceDate);
}
/** Get Record ID/ColumnName
... | Quantity of service or product provided
*/
public void setServiceLevelProvided (BigDecimal ServiceLevelProvided)
{
set_ValueNoCheck (COLUMNNAME_ServiceLevelProvided, ServiceLevelProvided);
}
/** Get Quantity Provided.
@return Quantity of service or product provided
*/
public BigDecimal getServiceLevelPr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ServiceLevelLine.java | 1 |
请完成以下Java代码 | public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getPhone() {
return phone;
}
public void ... | int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
... | repos\tutorials-master\libraries-apache-commons-collections\src\main\java\com\baeldung\commons\collections\collectionutils\Customer.java | 1 |
请完成以下Java代码 | public List<IQualityInspectionOrder> getProductionOrdersForPLV(final I_M_PriceList_Version plv)
{
return getPricingInfo().getQualityInspectionOrdersForPLV(plv);
}
@Override
public IVendorReceipt<I_M_InOutLine> getVendorReceiptForPLV(final I_M_PriceList_Version plv)
{
return getPricingInfo().getVendorReceiptFo... | }
@Override
public void linkModelToMaterialTracking(final Object model)
{
final I_M_Material_Tracking materialTracking = getM_Material_Tracking();
materialTrackingBL.linkModelToMaterialTracking(
MTLinkRequest.builder()
.model(model)
.materialTrackingRecord(materialTracking)
.build());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\MaterialTrackingDocuments.java | 1 |
请完成以下Java代码 | public void mousePressed(MouseEvent me)
{
@SuppressWarnings("unchecked")
final JList<ListItem> list = (JList<ListItem>)me.getComponent();
Point p = me.getPoint();
int index = list.locationToIndex(p);
if (index > -1 && list.getCellBounds(index, index).contains(p))
{
startList = list;
startMod... | DefaultListModel<ListItem> endModel = yesModel;
if (me.getComponent() == yesList)
{
if (!yesList.contains (p))
{
endList = noList;
endModel = noModel;
}
}
else
{
if (noList.contains (p))
{
setCursor(Cursor.getDefaultCursor());
moved = false;
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\VSortTab.java | 1 |
请完成以下Java代码 | public void logAccessExternalSchemaNotSupported(Exception e) {
logDebug(
"031",
"Could not restrict external schema access. "
+ "This indicates that this is not supported by your JAXP implementation: {}",
e.getMessage());
}
public void logMissingPropertiesFile(String file) {
... | public void debugCouldNotResolveCallableElement(
String callingProcessDefinitionId,
String activityId,
Throwable cause) {
logDebug("046", "Could not resolve a callable element for activity {} in process {}. Reason: {}",
activityId,
callingProcessDefinitionId,
cause.getMessa... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\EngineUtilLogger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SignalEventReceivedRequest {
private String signalName;
private List<RestVariable> variables;
private String tenantId;
private boolean async;
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@ApiModelProperty(value = "ID of the tenant that the si... | public String getSignalName() {
return signalName;
}
public void setSignalName(String signalName) {
this.signalName = signalName;
}
public void setAsync(boolean async) {
this.async = async;
}
@ApiModelProperty(value = "If true, handling of the signal will happen asynch... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\SignalEventReceivedRequest.java | 2 |
请完成以下Java代码 | public class TodoResource {
/*
Use eiher @Template or @Repo
*/
@Inject
@Template
//@Repo
private TodoManager todoManager;
@GET
@Path("")
@Produces(MediaType.APPLICATION_JSON)
public Response all() {
return Response.ok(todoManager.getAll()).build();
}
@GET
... | public Response get(@PathParam("id") String id) {
Todo todo = todoManager.get(id);
return Response.ok(todo).build();
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public Response add(Todo todo) {
Todo savedTodo = todoManager.add(todo);
System.out.println(savedTodo.id);
... | repos\tutorials-master\persistence-modules\jnosql\jnosql-artemis\src\main\java\com\baeldung\jnosql\artemis\TodoResource.java | 1 |
请完成以下Java代码 | private String toStringX(final I_AD_WF_Activity activity)
{
final StringBuilder sb = new StringBuilder();
sb.append(WFState.ofCode(activity.getWFState())).append(": ").append(getActivityName(activity).getDefaultValue());
final UserId userId = UserId.ofRepoIdOrNullIfSystem(activity.getAD_User_ID());
if (userId... | private ImmutableList<I_AD_WF_Activity> getActiveActivities(final int AD_Table_ID, final int Record_ID)
{
return queryBL.createQueryBuilderOutOfTrx(I_AD_WF_Activity.class)
.addEqualsFilter(I_AD_WF_Activity.COLUMNNAME_AD_Table_ID, AD_Table_ID)
.addEqualsFilter(I_AD_WF_Activity.COLUMNNAME_AD_Table_ID, Record_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\execution\WFProcessRepository.java | 1 |
请完成以下Java代码 | public void addElementToList(RpNotifyRecord notifyRecord) {
if (notifyRecord == null) {
return;
}
Integer notifyTimes = notifyRecord.getNotifyTimes(); // 通知次数
Integer maxNotifyTime = 0;
try {
maxNotifyTime = notifyParam.getMaxNotifyTime();
} catch ... | AppNotifyApplication.tasks.put(new NotifyTask(notifyRecord, this, notifyParam));
}
} else {
try {
// 持久化到数据库中
notifyPersist.updateNotifyRord(notifyRecord.getId(),
notifyRecord.getNotifyTimes(), NotifyStatusEnum.FAILED.name());
... | repos\roncoo-pay-master\roncoo-pay-app-notify\src\main\java\com\roncoo\pay\app\notify\core\NotifyQueue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void insertTimeBookingExternalRef(@NonNull final TimeBookingId timeBookingId,
@NonNull final ExternalId externalId,
@NonNull final OrgId orgId)
{
final ExternalReference externalReference = ExternalReference.builder()
.orgId(orgId)
.externalReference(... | final LocalDate processedIssueDate = TimeUtil.asLocalDate(targetIssue.getProcessedTimestamp());
final boolean effortWasBookedOnAProcessedIssue = effortBookedDate.isAfter(processedIssueDate);
if (effortWasBookedOnAProcessedIssue)
{
final I_AD_User performingUser = userDAO.getById(importTimeBookingInfo.getPerf... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\timebooking\importer\TimeBookingsImporterService.java | 2 |
请完成以下Java代码 | public String toString() {
StringBuilder buffer = new StringBuilder();
buffer.append("(");
buffer.append("Body:'").append(this.getBodyContentAsString()).append("'");
buffer.append(" ").append(this.messageProperties.toString());
buffer.append(")");
return buffer.toString();
}
private String getBodyContent... | @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Arrays.hashCode(this.body);
result = prime * result + ((this.messageProperties == null) ? 0 : this.messageProperties.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == ... | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\Message.java | 1 |
请完成以下Java代码 | public class DhlAddressMapper
{
private static final BiConsumer<String, String> ON_TRUNC = (origStr, truncatedStr) -> Loggables.addLog("Truncated {} to {} because it was too long", origStr, truncatedStr);
@NonNull
public static JsonDhlAddress getShipperAddress(@NonNull final Address address)
{
final JsonDh... | final Locale locale = new Locale("", iso);
if (locale.getISO3Country().equalsIgnoreCase(code))
{
return true;
}
}
return false;
}
private static void mapCommonAddressFields(@NonNull final JsonDhlAddress.JsonDhlAddressBuilder addressBuilder, @NonNull final Address address)
{
final String... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\DhlAddressMapper.java | 1 |
请完成以下Java代码 | private synchronized void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException
{
// Write out any hidden serialization magic
s.defaultWriteObject();
// Write out size
s.writeInt(map.size());
// Write out all elements in the proper order.
for (Iterator<E> i = map.keySet().iterator(); i.... | // Read in size (number of Mappings)
int size = s.readInt();
// Read in IdentityHashMap capacity and load factor and create backing IdentityHashMap
map = new IdentityHashMap<E, Object>((size * 4) / 3);
// Allow for 33% growth (i.e., capacity is >= 2* size()).
// Read in all elements in the proper order.
f... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\IdentityHashSet.java | 1 |
请完成以下Java代码 | public void setIsArchived (final boolean IsArchived)
{
set_Value (COLUMNNAME_IsArchived, IsArchived);
}
@Override
public boolean isArchived()
{
return get_ValueAsBoolean(COLUMNNAME_IsArchived);
}
@Override
public void setIsInitialCare (final boolean IsInitialCare)
{
set_Value (COLUMNNAME_IsInitialCare... | public java.lang.String getSalesLineId()
{
return get_ValueAsString(COLUMNNAME_SalesLineId);
}
@Override
public void setStartDate (final @Nullable java.sql.Timestamp StartDate)
{
set_Value (COLUMNNAME_StartDate, StartDate);
}
@Override
public java.sql.Timestamp getStartDate()
{
return get_ValueAsTime... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_C_OLCand_AlbertaOrder.java | 1 |
请完成以下Java代码 | public class DLMConnectionCustomizer
extends AbstractDLMCustomizer
implements ITemporaryConnectionCustomizer
{
private final int dlmLevel;
private final int dlmCoalesceLevel;
public static DLMConnectionCustomizer withLevels(final int dlmLevel, final int dlmCoalesceLevel)
{
return new DLMConnectionCustomizer(... | this.dlmLevel = dlmLevel;
this.dlmCoalesceLevel = dlmCoalesceLevel;
};
@Override
public int getDlmLevel()
{
return dlmLevel;
}
@Override
public int getDlmCoalesceLevel()
{
return dlmCoalesceLevel;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\connection\DLMConnectionCustomizer.java | 1 |
请完成以下Java代码 | public class RetrieveAvailableHUsToPickFilters
{
/**
* Excludes HU that are already picked or already selected as fine picking source HUs.
*/
public List<I_M_HU> retrieveFullTreeAndExcludePickingHUs(@NonNull final List<I_M_HU> vhus)
{
final List<I_M_HU> husTopLevel = retrieveTopLevelUs(vhus);
return filterF... | /**
* We still need to iterate the HUs trees from the top level HUs.
* Even if we had called handlingUnitsBL.getTopLevelHUs with includeAll(true),
* There might be a VHU with a picked TU. Because the TU is picked, also its un-picked VHU may not be in the result we return
*/
private List<I_M_HU> filterForValidP... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\impl\HUPickingSlotBLs\RetrieveAvailableHUsToPickFilters.java | 1 |
请完成以下Java代码 | public LogicExpressionResult getAllowDeleteDocument()
{
return RESULT_TabSingleRowDetail;
}
@Override
public Document createNewDocument()
{
throw new InvalidDocumentStateException(parentDocument, RESULT_TabSingleRowDetail.getName());
}
@Override
public void deleteDocuments(DocumentIdsSelection documentIds... | }
@Override
public void markStaleAll()
{
staled = true;
parentDocument.getChangesCollector().collectStaleDetailId(parentDocumentPath, getDetailId());
}
@Override
public void markStale(final DocumentIdsSelection rowIds)
{
markStaleAll();
}
@Override
public boolean isStale()
{
return staled;
}
@O... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\SingleRowDetailIncludedDocumentsCollection.java | 1 |
请完成以下Java代码 | public void setGlobalId(final String globalId)
{
this.globalId = globalId;
this.globalIdset = true;
}
public void setSyncAdvise(final SyncAdvise syncAdvise)
{
this.syncAdvise = syncAdvise;
this.syncAdviseSet = true;
}
public void setVatId(final String vatId)
{
this.vatId = vatId;
this.vatIdSet = tr... | public void setMemo(final String memo)
{
this.memo = memo;
this.memoIsSet = true;
}
public void setPriceListId(@Nullable final JsonMetasfreshId priceListId)
{
if (JsonMetasfreshId.toValue(priceListId) != null)
{
this.priceListId = priceListId;
this.priceListIdSet = true;
}
}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\JsonRequestBPartner.java | 1 |
请完成以下Java代码 | public boolean getIsDefaultContactOr(final boolean defaultValue)
{
return defaultContact.orElse(defaultValue);
}
public boolean getIsBillToDefaultOr(final boolean defaultValue)
{
return billToDefault.orElse(defaultValue);
}
public boolean getIsShipToDefaultOr(final boolean defaultValue)
{
return shipToDe... | {
this.defaultContact = Optional.of(defaultContact);
}
public void setBillToDefault(final boolean billToDefault)
{
this.billToDefault = Optional.of(billToDefault);
}
public void setShipToDefault(final boolean shipToDefault)
{
this.shipToDefault = Optional.of(shipToDefault);
}
public void setPurchaseDef... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerContactType.java | 1 |
请完成以下Java代码 | public List<ProcessInfoParameter> createProcessInfoParameters()
{
validate();
final List<ProcessInfoParameter> params = new ArrayList<>();
final int fieldCount = getFieldCount();
for (int fieldIndex = 0; fieldIndex < fieldCount; fieldIndex++)
{
final ProcessInfoParameter param = createProcessInfoParamete... | valueTo = null;
displayValueTo = null;
}
if (value == null && valueTo == null)
{
return null;
}
//
// FIXME: legacy: convert Boolean to String because some of the JavaProcess implementations are checking boolean parametes as:
// boolean value = "Y".equals(ProcessInfoParameter.getParameter());
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ui\ProcessParameterPanelModel.java | 1 |
请完成以下Java代码 | public void setDefault()
{
/** Blue 51,51,102 */
primary0 = new ColorUIResource(103, 152, 203);
/** Blue 102, 102, 153 */
// protected static ColorUIResource primary1;
primary1 = new ColorUIResource(101, 138, 187);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(103, 152, 203);
/** Blue 204, 2... | /** Foreground Text Error */
txt_error = new ColorUIResource(255, 0, 51); // red ;
/** Black */
// secondary0 = new ColorUIResource(0, 0, 0);
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\plaf\AdempiereThemeInnova.java | 1 |
请完成以下Java代码 | public ScriptFailedResolution onScriptFailed(final IScript script, final ScriptExecutionException e) throws RuntimeException
{
final File file = script.getLocalFile();
final String exceptionMessage = e.toStringX(false); // printStackTrace=false
final PrintStream out = System.out;
final BufferedReader in = new... | e.addSuppressed(ioex);
throw e;
}
if ("F".equalsIgnoreCase(answer))
{
return ScriptFailedResolution.Fail;
}
else if ("I".equalsIgnoreCase(answer))
{
return ScriptFailedResolution.Ignore;
}
else if ("R".equalsIgnoreCase(answer))
{
return ScriptFailedResolution.Retry;
}
e... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\applier\impl\ConsoleScriptsApplierListener.java | 1 |
请完成以下Java代码 | public static WFProcess mapJob(@NonNull final WFProcess wfProcess, @NonNull final UnaryOperator<HUConsolidationJob> mapper)
{
final HUConsolidationJob job = getHUConsolidationJob(wfProcess);
final HUConsolidationJob jobChanged = mapper.apply(job);
return !Objects.equals(job, jobChanged)
? toWFProcess(jobChan... | final HUConsolidationJob job = jobService.closeTarget(HUConsolidationJobId.ofWFProcessId(wfProcessId), callerId);
return toWFProcess(job);
}
public void printTargetLabel(
@NonNull final WFProcessId wfProcessId,
@NotNull final UserId callerId)
{
jobService.printTargetLabel(HUConsolidationJobId.ofWFProcessI... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\HUConsolidationApplication.java | 1 |
请完成以下Java代码 | public @Nullable ClassLoader getClassLoader() {
return this.resourceLoader.getClassLoader();
}
@Override
public Resource getResource(String location) {
if (StringUtils.hasLength(location)) {
for (ProtocolResolver protocolResolver : this.protocolResolvers) {
Resource resource = protocolResolver.res... | }
private @Nullable String getFilePath(String location, Resource resource) {
for (FilePathResolver filePathResolver : this.filePathResolvers) {
String filePath = filePathResolver.resolveFilePath(location, resource);
if (filePath != null) {
return filePath;
}
}
return null;
}
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\io\ApplicationResourceLoader.java | 1 |
请完成以下Java代码 | public Locale getLocale() {
List<Locale> locales = this.savedRequest.getLocales();
return locales.isEmpty() ? Locale.getDefault() : locales.get(0);
}
@Override
public Enumeration<Locale> getLocales() {
List<Locale> locales = this.savedRequest.getLocales();
if (locales.isEmpty()) {
// Fall back to default... | Map<String, String[]> parameterMap = new HashMap<>(names.size());
for (String name : names) {
parameterMap.put(name, getParameterValues(name));
}
return parameterMap;
}
private Set<String> getCombinedParameterNames() {
Set<String> names = new HashSet<>();
names.addAll(super.getParameterMap().keySet());
... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\SavedRequestAwareWrapper.java | 1 |
请完成以下Java代码 | private final IQueryBuilder<I_Fact_Acct_ActivityChangeRequest_Source_v> retrieveFactAccts()
{
final IQueryBuilder<I_Fact_Acct_ActivityChangeRequest_Source_v> queryBuilder = queryBL.createQueryBuilder(I_Fact_Acct_ActivityChangeRequest_Source_v.class, getCtx(),
ITrx.TRXNAME_ThreadInherited);
if (p_C_Period_ID > ... | queryBuilder.addEqualsFilter(I_Fact_Acct_ActivityChangeRequest_Source_v.COLUMN_IsMandatoryActivity, p_IsMandatoryActivity);
}
if (p_IsActivityNull != null)
{
if (p_IsActivityNull)
{
queryBuilder.addEqualsFilter(I_Fact_Acct_ActivityChangeRequest_Source_v.COLUMN_C_Activity_ID, null);
}
else
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\Fact_Acct_ActivityChangeRequest_Populate.java | 1 |
请完成以下Java代码 | public void setInitParameters(Map<String, String> initParameters) {
Assert.notNull(initParameters, "'initParameters' must not be null");
this.initParameters = new LinkedHashMap<>(initParameters);
}
/**
* Returns a mutable Map of the registration init-parameters.
* @return the init parameters
*/
public Map... | protected void configure(D registration) {
registration.setAsyncSupported(this.asyncSupported);
if (!this.initParameters.isEmpty()) {
registration.setInitParameters(this.initParameters);
}
}
/**
* Deduces the name for this registration. Will return user specified name or fallback
* to the bean name. If ... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\DynamicRegistrationBean.java | 1 |
请完成以下Java代码 | public List<HistoricProcessInstance> findHistoricProcessInstancesByNativeQuery(Map<String, Object> parameterMap) {
return getDbSqlSession().selectListWithRawParameter("selectHistoricProcessInstanceByNativeQuery", parameterMap);
}
@Override
public long findHistoricProcessInstanceCountByNativeQuery(M... | }
protected void setSafeInValueLists(HistoricProcessInstanceQueryImpl processInstanceQuery) {
if (processInstanceQuery.getProcessInstanceIds() != null) {
processInstanceQuery.setSafeProcessInstanceIds(createSafeInValuesList(processInstanceQuery.getProcessInstanceIds()));
}
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\data\impl\MybatisHistoricProcessInstanceDataManager.java | 1 |
请完成以下Java代码 | public static boolean isAvailableForAnyBPartner(@NonNull final I_M_PickingSlot pickingSlot)
{
final BPartnerId pickingSlotBPartnerId = extractBPartnerId(pickingSlot);
return pickingSlotBPartnerId == null
&& pickingSlot.getM_Picking_Job_ID() <= 0;
}
public static boolean isAvailableForBPartnerId(@NonNull fin... | }
else
{
// not same BP, don't accept it
return false;
}
}
// If we reach this point, we passed all validation rules
return true;
}
@Nullable
private static BPartnerId extractBPartnerId(final @NonNull I_M_PickingSlot pickingSlot)
{
return BPartnerId.ofRepoIdOrNull(pickingSlot.getC_BPartne... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\api\impl\PickingSlotUtils.java | 1 |
请完成以下Java代码 | private static Object convertToPOValue(@Nullable final Object value, @NonNull final Class<?> targetClass, final int displayType, @NonNull final ZoneId zoneId)
{
if (value == null)
{
return null;
}
if (String.class.equals(value.getClass()))
{
final String valueStr = (String)value;
if (String.class.... | return null;
}
}
return POValueConverters.convertToPOValue(value, targetClass, displayType, zoneId);
}
@Nullable
public static Object convertFromPOValue(@NonNull final PO po, @NonNull final POInfoColumn poInfoColumn, @NonNull final ZoneId zoneId)
{
final Object poValue = po.get_Value(poInfoColumn.getColu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\custom_columns\CustomColumnsConverters.java | 1 |
请完成以下Java代码 | public int getMSV3_VerfuegbarkeitsanfrageEinzelneAntwort_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelneAntwort_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/**
* MSV3_VerfuegbarkeitTyp AD_Reference_ID=540817
* Reference name: MSV3_VerfuegbarkeitTyp
... | /** Set VerfuegbarkeitTyp.
@param MSV3_VerfuegbarkeitTyp VerfuegbarkeitTyp */
@Override
public void setMSV3_VerfuegbarkeitTyp (java.lang.String MSV3_VerfuegbarkeitTyp)
{
set_Value (COLUMNNAME_MSV3_VerfuegbarkeitTyp, MSV3_VerfuegbarkeitTyp);
}
/** Get VerfuegbarkeitTyp.
@return VerfuegbarkeitTyp */
@Ov... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_VerfuegbarkeitsanfrageEinzelneAntwort.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Optional<Instant> getNextImportStartingTimestamp()
{
if (nextImportStartingTimestamp == null)
{
return Optional.empty();
}
return Optional.of(nextImportStartingTimestamp.getTimestamp());
}
/**
* Update next import timestamp to the most current one.
*/
public void setNextImportStartingTimest... | }
if (!dateAndImportStatus.isOkToImport())
{
this.nextImportStartingTimestamp = dateAndImportStatus;
return;
}
}
if (!this.nextImportStartingTimestamp.isOkToImport()
&& !dateAndImportStatus.isOkToImport()
&& dateAndImportStatus.getTimestamp().isBefore(this.nextImportStartingTimestamp.getT... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\de-metas-camel-ebay-camelroutes\src\main\java\de\metas\camel\externalsystems\ebay\EbayImportOrdersRouteContext.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class WebSocketConfiguration implements WebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
registry.enableSimpleBroker("/topic");
registry.setApplicationDestinationPrefixes("/app");
}
@Override
public void regist... | // @Override
// public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
// registry.addHandler(this.webSocketHandler(), "/") // 配置处理器
// .addInterceptors(new DemoWebSocketShakeInterceptor()) // 配置拦截器
// .setAllowedOrigins("*"); // 解决跨域问题
// }
// @Bean... | repos\SpringBoot-Labs-master\lab-25\lab-websocket-25-03\src\main\java\cn\iocoder\springboot\lab25\springwebsocket\config\WebSocketConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void removeDateFromPool(List<RpAccountCheckMistakeScratchPool> list, List<RpAccountCheckMistake> mistakeList) {
LOG.info("========> 清理缓冲池中没有对账的数据,记录差错=========>");
LOG.info("===> step1:保存差错记录====总共[" + mistakeList.size() + "]条");
rpAccountCheckMistakeService.saveListDate(mistakeList);
LOG.info("===> s... | // 支付记录减款
rpTradeReconciliationService.handleAmountMistake(mistake, false);
}
break;
case "PLATFORM_OVER_STATUS_MISMATCH":// 平台支付成功,银行支付不成功(和银行漏单一致)
// 以银行为准
if (bank) {
// 把订单改为失败,减款
String trxNo = mistake.getTrxNo();
rpTradeReconciliationService.bankMissOrBankFailBaseBank(trxNo);
}
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\service\impl\RpAccountCheckTransactionServiceImpl.java | 2 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaScript.class, CAMUNDA_ELEMENT_SCRIPT)
.namespaceUri(CAMUNDA_NS)
.instanceProvider(new ModelTypeInstanceProvider<CamundaScript>() {
public CamundaScript newInstance(Mo... | }
public String getCamundaScriptFormat() {
return camundaScriptFormatAttribute.getValue(this);
}
public void setCamundaScriptFormat(String camundaScriptFormat) {
camundaScriptFormatAttribute.setValue(this, camundaScriptFormat);
}
public String getCamundaResource() {
return camundaResourceAttrib... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaScriptImpl.java | 1 |
请完成以下Java代码 | public class GenericAccountIdentification1 {
@XmlElement(name = "Id", required = true)
protected String id;
@XmlElement(name = "SchmeNm")
protected AccountSchemeName1Choice schmeNm;
@XmlElement(name = "Issr")
protected String issr;
/**
* Gets the value of the id property.
*
... | return schmeNm;
}
/**
* Sets the value of the schmeNm property.
*
* @param value
* allowed object is
* {@link AccountSchemeName1Choice }
*
*/
public void setSchmeNm(AccountSchemeName1Choice value) {
this.schmeNm = value;
}
/**
* Gets th... | 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\GenericAccountIdentification1.java | 1 |
请完成以下Java代码 | private static MinimalColumnInfo retrieveMinimalColumnInfo(final ResultSet rs) throws SQLException
{
return MinimalColumnInfo.builder()
.columnName(rs.getString(I_AD_Column.COLUMNNAME_ColumnName))
.columnSql(StringUtils.trimBlankToNull(rs.getString(I_AD_Column.COLUMNNAME_ColumnSQL)))
.adColumnId(AdColumn... | }
@Override
public void updateColumnNameByAdElementId(
@NonNull final AdElementId adElementId,
@Nullable final String newColumnName)
{
// NOTE: accept newColumnName to be null and expect to fail in case there is an AD_Column which is using given AD_Element_ID
DB.executeUpdateAndThrowExceptionOnFail(
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\impl\ADTableDAO.java | 1 |
请完成以下Java代码 | public class ExceptionDto {
protected String type;
protected String message;
protected Integer code;
public ExceptionDto() {
}
public String getType() {
return type;
}
public String getMessage() {
return message;
}
public static ExceptionDto fromException(Exception e) {
ExceptionD... | ExceptionDto dto = new ExceptionDto();
dto.type = e.getClass().getSimpleName();
dto.message = e.getMessage();
return dto;
}
public void setType(String type) {
this.type = type;
}
public void setMessage(String message) {
this.message = message;
}
public Integer getCode() {
return... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ExceptionDto.java | 1 |
请完成以下Spring Boot application配置 | spring:
jta:
enabled: true
atomikos:
datasource:
primary:
xa-properties.url: jdbc:mysql://localhost:3306/test1?useSSL=false&pinGlobalTxToPhysicalConnection=true
xa-properties.user: root
xa-properties.password: root
xa-data-source-class-name: com.mysql.jdbc... | unique-resource-name: jpa-test2
max-pool-size: 30
min-pool-size: 6
max-lifetime: 6000
borrow-connection-timeout: 10000
jpa:
database: mysql
generate-ddl: true
show-sql: true
open-in-view: true
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
... | repos\spring-boot-leaning-master\2.x_data\1-5 Spring Boot 下的(分布式)事务解决方案\spring-boot-atomikos\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public CachePurgeReport purgeCache() {
CachePurgeReport result = new CachePurgeReport();
Cache<String, ProcessDefinitionEntity> processDefinitionCache = getProcessDefinitionCache();
if (!processDefinitionCache.isEmpty()) {
result.addPurgeInformation(CachePurgeReport.PROCESS_DEF_CACHE, processDefiniti... | }
Cache<String, DmnModelInstance> dmnModelInstanceCache = getDmnDefinitionCache();
if (!dmnModelInstanceCache.isEmpty()) {
result.addPurgeInformation(CachePurgeReport.DMN_MODEL_INST_CACHE, dmnModelInstanceCache.keySet());
dmnModelInstanceCache.clear();
}
Cache<String, DecisionRequirementsD... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\DeploymentCache.java | 1 |
请完成以下Java代码 | public Boolean getDisableAutoFetching() {
return disableAutoFetching;
}
public void setDisableAutoFetching(Boolean disableAutoFetching) {
this.disableAutoFetching = disableAutoFetching;
}
public Boolean getDisableBackoffStrategy() {
return disableBackoffStrategy;
}
public void setDisableBacko... | String serializationFormat = annotation.defaultSerializationFormat();
setDefaultSerializationFormat(isNull(serializationFormat) ? null : serializationFormat);
}
protected void configureOrderByCreateTime(EnableExternalTaskClient annotation) {
if (EnableExternalTaskClient.STRING_NULL_VALUE.equals(annotation.... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\client\ClientConfiguration.java | 1 |
请完成以下Java代码 | private void collectPackingMaterials(final IHUContext huContext, final int inventoryId, final I_M_HU hu)
{
final HUPackingMaterialsCollector collector = getCreatePackingMaterialsCollectorForInventory(huContext, inventoryId);
final IHUPackingMaterialCollectorSource source = null;
collector.releasePackingMaterialF... | @NonNull ProductId productId;
@Nullable
InOutLineId receiptLineId;
}
@Value
@Builder
private static class InventoryLineCandidate
{
@NonNull ZonedDateTime movementDate;
@NonNull HuId topLevelHUId;
@NonNull ProductId productId;
@NonNull Quantity qty;
@Nullable
I_M_InOutLine receiptLine;
@Nullable
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\internaluse\InventoryAllocationDestination.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.