instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public GolfTournament register(Golfer... players) {
return register(Arrays.asList(ArrayUtils.nullSafeArray(players, Golfer.class)));
}
public GolfTournament register(Iterable<Golfer> players) {
StreamSupport.stream(CollectionUtils.nullSafeIterable(players).spliterator(), false)
.filter(Objects::nonNull)
.... | this.playerTwo.setHole(hole);
}
public synchronized int getHole() {
return getPlayerOne().getHole();
}
public boolean in(@NonNull Golfer golfer) {
return this.playerOne.equals(golfer) || this.playerTwo.equals(golfer);
}
public synchronized int nextHole() {
return getHole() + 1;
}
public syn... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\model\GolfTournament.java | 1 |
请完成以下Java代码 | public boolean thereIsAnOpenPickingForOrderId(@NonNull final OrderId orderId)
{
final HuId huId = getHuId();
if (huId == null)
{
throw new AdempiereException("Not a PickedHURow!")
.appendParametersToMessage()
.setParameter("PickingSlotRow", this);
}
final boolean hasOpenPickingForOrderId = get... | if (isLU())
{
return findRowMatching(row -> !row.isLU() && row.thereIsAnOpenPickingForOrderId(orderId))
.isPresent();
}
return false;
}
@NonNull
private ImmutableSet<OrderId> getPickingOrderIdsForHUId(@NonNull final HuId huId)
{
return Optional.ofNullable(huId2OpenPickingOrderIds.get(huId))
.o... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotRow.java | 1 |
请完成以下Java代码 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); }
public byte color() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 3; }
public boolean mutateColor(byte color) { int o = __offset(8); if (o != 0) { bb.put(o + bb_pos, color); return true; } else { return fa... | public static void startEffectsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static int endTerrain(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}
public static void finishTerrainBuffer(FlatBufferBuilder builder, int offset) { builder.... | repos\tutorials-master\libraries-data-io-2\src\main\java\com\baeldung\flatbuffers\MyGame\terrains\Terrain.java | 1 |
请完成以下Java代码 | private static PaymentDirection extractPaymentDirection(final I_C_Payment payment)
{
return PaymentDirection.ofReceiptFlag(payment.isReceipt());
}
private static Money extractPayAmt(@NonNull final I_C_Payment payment)
{
final CurrencyId currencyId = CurrencyId.ofRepoId(payment.getC_Currency_ID());
return Mon... | {
final InvoiceToAllocateQuery query = InvoiceToAllocateQuery.builder()
.currencyId(paymentCurrencyId)
.evaluationDate(evaluationDate)
.onlyInvoiceId(invoiceId)
.build();
return paymentAllocationService.retrieveInvoicesToAllocate(query)
.stream()
.filter(invoiceToAllocate -> {
// just ... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\BankStatementPaymentBL.java | 1 |
请完成以下Java代码 | public void traverseInOrder(Node node) {
if (node != null) {
traverseInOrder(node.left);
visit(node.value);
traverseInOrder(node.right);
}
}
public void traversePreOrder(Node node) {
if (node != null) {
visit(node.value);
trave... | public void traversePostOrderWithoutRecursion() {
Stack<Node> stack = new Stack<>();
Node prev = root;
Node current;
stack.push(root);
while (!stack.isEmpty()) {
current = stack.peek();
boolean hasChild = (current.left != null || current.right != null);
... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\dfs\BinaryTree.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserRpcServiceTest implements CommandLineRunner {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private UserRpcService userRpcService;
@Override
public void run(String... args) throws Exception {
UserDTO user = userRpcSer... | }
}
}
@Component
public class UserRpcServiceTest03 implements CommandLineRunner {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private UserRpcService userRpcService;
@Override
public void run(String... args) {
/... | repos\SpringBoot-Labs-master\lab-30\lab-30-dubbo-xml-demo\user-rpc-service-consumer\src\main\java\cn\iocoder\springboot\lab30\rpc\ConsumerApplication.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class SimpleRabbitListenerEndpoint extends AbstractRabbitListenerEndpoint {
private @Nullable MessageListener messageListener;
/**
* Set the {@link MessageListener} to invoke when a message matching
* the endpoint is received.
* @param messageListener the {@link MessageListener} instance.
*/
public... | */
public @Nullable MessageListener getMessageListener() {
return this.messageListener;
}
@Override
protected @Nullable MessageListener createMessageListener(MessageListenerContainer container) {
return getMessageListener();
}
@Override
protected StringBuilder getEndpointDescription() {
return super.get... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\SimpleRabbitListenerEndpoint.java | 2 |
请完成以下Java代码 | public Flux<String> accepted(ServerHttpResponse response) {
response.setStatusCode(HttpStatus.ACCEPTED);
return Flux.just("accepted");
}
@GetMapping(value = "/bad-request")
public Mono<String> badRequest() {
return Mono.error(new IllegalArgumentException());
}
@ResponseStat... | public ResponseEntity<Mono<String>> unathorized() {
return ResponseEntity
.status(HttpStatus.UNAUTHORIZED)
.header("X-Reason", "user-invalid")
.body(Mono.just("unauthorized"));
}
@Bean
public RouterFunction<ServerResponse> notFound() {
return RouterFunctions.ro... | repos\tutorials-master\spring-reactive-modules\spring-webflux-2\src\main\java\com\baeldung\webflux\responsestatus\ResponseStatusController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DataSourceConfiguration {
private static HikariDataSource createHikariDataSource(DataSourceProperties properties) {
// 创建 HikariDataSource 对象
HikariDataSource dataSource = properties.initializeDataSourceBuilder().type(HikariDataSource.class).build();
// 设置线程池名
if (Strin... | return new DataSourceProperties();
}
/**
* 创建 quartz 数据源
*/
@Bean(name = "quartzDataSource")
@ConfigurationProperties(prefix = "spring.datasource.quartz.hikari")
@QuartzDataSource
public DataSource quartzDataSource() {
// 获得 DataSourceProperties 对象
DataSourceProperties... | repos\springboot-demo-master\quartz\src\main\java\com\et\quartz\config\DataSourceConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CostDetailQuery
{
@Nullable AcctSchemaId acctSchemaId;
@Nullable CostElementId costElementId;
@Nullable CostingDocumentRef documentRef;
@Nullable CostAmountType amtType;
@Nullable ProductId productId;
@Nullable AttributeSetInstanceId attributeSetInstanceId;
@Nullable ClientId clientId;
@Nullable ... | return builderFrom(costSegmentAndElement.toCostSegment())
.costElementId(costSegmentAndElement.getCostElementId());
}
public static CostDetailQueryBuilder builderFrom(@NonNull final CostSegment costSegment)
{
return builder()
.acctSchemaId(costSegment.getAcctSchemaId())
.productId(costSegment.getProdu... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostDetailQuery.java | 2 |
请完成以下Java代码 | public abstract class _Article extends CayenneDataObject {
private static final long serialVersionUID = 1L;
public static final String ID_PK_COLUMN = "id";
public static final Property<String> CONTENT = Property.create("content", String.class);
public static final Property<String> TITLE = Property.c... | public void setTitle(String title) {
writeProperty("title", title);
}
public String getTitle() {
return (String)readProperty("title");
}
public void setAuthor(Author author) {
setToOneTarget("author", author, true);
}
public Author getAuthor() {
return (Author)r... | repos\tutorials-master\persistence-modules\apache-cayenne\src\main\java\com\baeldung\apachecayenne\persistent\auto\_Article.java | 1 |
请完成以下Java代码 | private HUEditorRowAttributes createRowAttributes(final ViewRowAttributesKey key)
{
final I_M_HU hu = extractHU(key);
final IAttributeStorage attributesStorage = getAttributeStorageFactory().getAttributeStorage(hu);
attributesStorage.setSaveOnChange(true);
final boolean rowAttributesReadonly = readonly // rea... | }
private static DocumentPath toDocumentPath(final ViewRowAttributesKey key)
{
final DocumentId documentTypeId = key.getHuId();
final DocumentId huEditorRowId = key.getHuEditorRowId();
return DocumentPath.rootDocumentPath(DocumentType.ViewRecordAttributes, documentTypeId, huEditorRowId);
}
private IAttribut... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowAttributesProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonRequestProductUpsertItem
{
@ApiModelProperty(position = 10, value = PRODUCT_IDENTIFIER_DOC)
@NonNull
String productIdentifier;
@ApiModelProperty(position = 20, //
value = "The version of the product." + EXTERNAL_VERSION_DOC)
String externalVersion;
@ApiModelProperty(position = 25, //
valu... | @JsonCreator
public JsonRequestProductUpsertItem(
@NonNull @JsonProperty("productIdentifier") final String productIdentifier,
@Nullable @JsonProperty("externalVersion") final String externalVersion,
@Nullable @JsonProperty("externalReferenceUrl") final String externalReferenceUrl,
@Nullable @JsonProperty("... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestProductUpsertItem.java | 2 |
请完成以下Java代码 | public void updateExecutionTenantIdForDeployment(String deploymentId, String newTenantId) {
HashMap<String, Object> params = new HashMap<>();
params.put("deploymentId", deploymentId);
params.put("tenantId", newTenantId);
getDbSqlSession().update("updateExecutionTenantIdForDeployment", pa... | params.put("lockTime", lockCal.getTime());
params.put("expirationTime", expirationTime);
int result = getDbSqlSession().update("updateProcessInstanceLockTime", params);
if (result == 0) {
throw new ActivitiOptimisticLockingException("Could not lock process instance");
}
... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ExecutionEntityManager.java | 1 |
请完成以下Java代码 | public class X_EDI_C_BPartner_Lookup_BPL_GLN_v extends org.compiere.model.PO implements I_EDI_C_BPartner_Lookup_BPL_GLN_v, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 948019275L;
/** Standard Constructor */
public X_EDI_C_BPartner_Lookup_BPL_GLN_v (final Properties ctx, fi... | set_Value (COLUMNNAME_GLN, GLN);
}
@Override
public java.lang.String getGLN()
{
return get_ValueAsString(COLUMNNAME_GLN);
}
@Override
public void setLookup_Label (final @Nullable java.lang.String Lookup_Label)
{
set_ValueNoCheck (COLUMNNAME_Lookup_Label, Lookup_Label);
}
@Override
public java.lang.St... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_C_BPartner_Lookup_BPL_GLN_v.java | 1 |
请完成以下Java代码 | public BigDecimal getAmt()
{
if (list.isEmpty())
{
throw new AdempiereException("No lines found");
}
return list.stream()
.map(I_C_PaySelectionLine::getPayAmt)
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
@NonNull
public ImmutableSet<InvoiceId> getInvoiceIds()
{
if (list.isEmpty())
{
re... | .filter(Check::isNotBlank)
.distinct()
.collect(Collectors.joining(","));
return StringUtils.trunc(aggregatedDescription, MAX_DESCRIPTION_LENGTH);
}
@NonNull
public String getAggregatedRemittanceInfo()
{
if (list.isEmpty())
{
return "";
}
final String aggregatedRemittanceInfo = list.stream()... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\AggregatedInvoicePaySelectionLines.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityFilter implements Filter {
private static final Logger LOG = LoggerFactory.getLogger(SecurityFilter.class);
private final UserAccessService userAccessService;
public SecurityFilter(UserAccessService userAccessService) {
this.userAccessService = userAccessService;
}
@... | List<String> rolesFromJWT = (List<String>) verifiedClaims.get().getBody().get("roles");
Set<RoleId> setOfRoles = rolesFromJWT.stream().map(RoleId::new).collect(Collectors.toSet());
securityContext.setAuthentication(new AuthenticationImpl(userIdFromJWT, setOfRoles));
chain... | repos\spring-examples-java-17\spring-security-jwt\src\main\java\itx\examples\springboot\security\springsecurity\jwt\config\SecurityFilter.java | 2 |
请完成以下Java代码 | public String getGraphType ()
{
return (String)get_Value(COLUMNNAME_GraphType);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name. | @return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintGraph.java | 1 |
请完成以下Java代码 | public IDunningCandidateSource createDunningCandidateSource()
{
try
{
final IDunningCandidateSource source = dunningCandidateSourceClass.newInstance();
return source;
}
catch (Exception e)
{
throw new DunningException("Cannot create " + IDunningCandidateSource.class + " for " + dunningCandidateSourc... | {
Check.assume(dunningCandidateSourceClass != null, "dunningCandidateSourceClass is not null");
this.dunningCandidateSourceClass = dunningCandidateSourceClass;
}
@Override
public String toString()
{
return "DunningConfig ["
+ "dunnableSourceFactory=" + dunnableSourceFactory
+ ", dunningCandidateProdu... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunningConfig.java | 1 |
请完成以下Java代码 | public void setActorTokenResolver(Function<OAuth2AuthorizationContext, Mono<OAuth2Token>> actorTokenResolver) {
Assert.notNull(actorTokenResolver, "actorTokenResolver cannot be null");
this.actorTokenResolver = actorTokenResolver;
}
/**
* Sets the maximum acceptable clock skew, which is used when checking the
... | Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0");
this.clockSkew = clockSkew;
}
/**
* Sets the {@link Clock} used in {@link Instant#now(Clock)} when checking the access
* token expiry.
* @param clock the clock
*/
public void setClock(Clock clock) {
Assert.notNull(clock, "clock cannot... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\TokenExchangeReactiveOAuth2AuthorizedClientProvider.java | 1 |
请完成以下Java代码 | public void setDLM_Referencing_Column(final org.compiere.model.I_AD_Column DLM_Referencing_Column)
{
set_ValueFromPO(COLUMNNAME_DLM_Referencing_Column_ID, org.compiere.model.I_AD_Column.class, DLM_Referencing_Column);
}
/**
* Set Referenzierende Spalte.
*
* @param DLM_Referencing_Column_ID Referenzierende ... | *
* @param IsPartitionBoundary
* Falls ja, dann gehören Datensatze, die über die jeweilige Referenz verknüpft sind nicht zur selben Partition.
*/
@Override
public void setIsPartitionBoundary(final boolean IsPartitionBoundary)
{
set_Value(COLUMNNAME_IsPartitionBoundary, Boolean.valueOf(IsPartition... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config_Reference.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getFREETEXTQUAL() {
return freetextqual;
}
/**
* Sets the value of the freetextqual property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFREETEXTQUAL(String value) {
this.freetextqual = value;
... | * @param value
* allowed object is
* {@link String }
*
*/
public void setFREETEXTLANGUAGE(String value) {
this.freetextlanguage = value;
}
/**
* Gets the value of the freetextfunction property.
*
* @return
* possible object is
* {@l... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DTEXT1.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void validateParent(@NonNull final I_S_Issue record)
{
if (isParentAlreadyInHierarchy(record))
{
throw new AdempiereException("The parentIssueID is already present in the hierarchy!")
.appendParametersToMessage()
.setParameter("ParentIssueId", record.getS_Parent_Issue_ID())
.setParameter("... | final IssueId parentIssueID = IssueId.ofRepoIdOrNull(record.getS_Parent_Issue_ID());
if (parentIssueID != null)
{
final IssueHierarchy issueHierarchy = issueRepository.buildUpStreamIssueHierarchy(parentIssueID);
return issueHierarchy.hasNodeForId(currentIssueID);
}
return false;
}
private boolean pa... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\issue\interceptor\S_Issue.java | 2 |
请完成以下Java代码 | public String getWebContext(boolean full)
{
if (!full)
return super.getURL();
String url = super.getURL();
if (url == null || url.length() == 0)
url = "http://localhost";
if (url.endsWith("/"))
url += url.substring(0, url.length() - 1);
return url + getWebContext(); // starts with /
} // getWebCont... | {
// Context to start with /
if (!getWebContext().startsWith("/"))
setWebContext("/" + getWebContext());
// Org to Warehouse
if (newRecord || is_ValueChanged("M_Warehouse_ID") || getAD_Org_ID() <= 0)
{
final I_M_Warehouse wh = Services.get(IWarehouseDAO.class).getById(WarehouseId.ofRepoId(getM_Warehous... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MStore.java | 1 |
请完成以下Java代码 | public class BearerTokenAuthenticationEncoder extends AbstractEncoder<BearerTokenMetadata> {
private static final MimeType AUTHENTICATION_MIME_TYPE = MimeTypeUtils
.parseMimeType("message/x.rsocket.authentication.v0");
private NettyDataBufferFactory defaultBufferFactory = new NettyDataBufferFactory(ByteBufAllocat... | ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) {
String token = credentials.getToken();
NettyDataBufferFactory factory = nettyFactory(bufferFactory);
ByteBufAllocator allocator = factory.getByteBufAllocator();
ByteBuf simpleAuthentication = AuthMetadataCodec.encodeBe... | repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\metadata\BearerTokenAuthenticationEncoder.java | 1 |
请完成以下Java代码 | public class ExternalWorkerJobBpmnErrorCmd extends AbstractExternalWorkerJobCmd implements Command<Void> {
protected Map<String, Object> variables;
protected String errorCode;
public ExternalWorkerJobBpmnErrorCmd(String externalJobId, String workerId, Map<String, Object> variables,
String err... | VariableServiceConfiguration variableServiceConfiguration = processEngineConfiguration.getVariableServiceConfiguration();
VariableService variableService = variableServiceConfiguration.getVariableService();
for (Map.Entry<String, Object> variableEntry : variables.entrySet()) {
St... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\ExternalWorkerJobBpmnErrorCmd.java | 1 |
请完成以下Java代码 | public class DeptrackFrontendDeploymentResource extends CRUDKubernetesDependentResource<Deployment, DeptrackResource> {
public static final String COMPONENT = "frontend";
private Deployment template;
public DeptrackFrontendDeploymentResource() {
super(Deployment.class);
this.template = Buil... | .getFrontendVersion()
.trim() : "";
// Check for image override
String imageName = StringUtils.hasText(primary.getSpec()
.getFrontendImage()) ? primary.getSpec()
.getFrontendImage()
.trim() : Constants.DEFAULT_FRONTEND_IMAGE;
return new PodSpecBuilder(te... | repos\tutorials-master\kubernetes-modules\k8s-operator\src\main\java\com\baeldung\operators\deptrack\resources\deptrack\DeptrackFrontendDeploymentResource.java | 1 |
请完成以下Java代码 | private IConnector getConnector()
{
final String className = getImpEx_ConnectorType().getClassname();
final IConnector connector = Util.getInstance(IConnector.class, className);
return connector;
}
public IConnector useConnector()
{
final IConnector connector = getConnector();
final List<MImpexConnect... | mParam.setDescription(param.description);
mParam.setAD_Reference_ID(param.displayType);
mParam.setName(param.name);
mParam.setSeqNo(param.seqNo);
mParam.setImpEx_Connector_ID(this.get_ID());
mParam.saveEx();
}
}
private void deleteParameters()
{
for (final MImpexConnectorParam mParam : MImpexC... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\impex\model\MImpExConnector.java | 1 |
请完成以下Java代码 | public class CashBalanceAvailabilityDate1 {
@XmlElement(name = "NbOfDays")
protected String nbOfDays;
@XmlElement(name = "ActlDt")
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar actlDt;
/**
* Gets the value of the nbOfDays property.
*
* @return
* possible... | *
*/
public XMLGregorianCalendar getActlDt() {
return actlDt;
}
/**
* Sets the value of the actlDt property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setActlDt(XMLGregorianCalendar 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\CashBalanceAvailabilityDate1.java | 1 |
请完成以下Java代码 | public class SetCaseDefinitionCategoryCmd implements Command<Void> {
protected String caseDefinitionId;
protected String category;
public SetCaseDefinitionCategoryCmd(String caseDefinitionId, String category) {
this.caseDefinitionId = caseDefinitionId;
this.category = category;
}
... | return null;
}
public String getCaseDefinitionId() {
return caseDefinitionId;
}
public void setCaseDefinitionId(String caseDefinitionId) {
this.caseDefinitionId = caseDefinitionId;
}
public String getCategory() {
return category;
}
public void setCategory(Stri... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\SetCaseDefinitionCategoryCmd.java | 1 |
请完成以下Java代码 | public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public String getCustomerName() {
... | }
return orderLines;
}
public void setOrderLines(List<OrderLine> orderLines) {
if (orderLines == null) {
orderLines = new ArrayList<>();
}
this.orderLines = orderLines;
}
@Override
public String toString() {
return "Order [orderNo=" + orderNo + "... | repos\tutorials-master\jackson-modules\jackson-conversions\src\main\java\com\baeldung\jackson\yaml\Order.java | 1 |
请完成以下Java代码 | public class OrderDO {
/**
* 订单编号
*/
private Integer id;
/**
* 用户编号
*/
private Integer userId;
public Integer getId() {
return id;
}
public OrderDO setId(Integer id) {
this.id = id;
return this;
} | public Integer getUserId() {
return userId;
}
public OrderDO setUserId(Integer userId) {
this.userId = userId;
return this;
}
@Override
public String toString() {
return "OrderDO{" +
"id=" + id +
", userId=" + userId +
... | repos\SpringBoot-Labs-master\lab-17\lab-17-dynamic-datasource-baomidou-01\src\main\java\cn\iocoder\springboot\lab17\dynamicdatasource\dataobject\OrderDO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RedisCacheConfig {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private Environment env;
@Bean
public LettuceConnectionFactory redisConnectionFactory() {
RedisStandaloneConfiguration redisConf = new RedisStandaloneConfiguration();
redisC... | .cacheDefaults(cacheConfiguration())
.transactionAware()
.build();
return rcm;
}
/**
* 自定义缓存key的生成类实现
*/
@Bean(name = "myKeyGenerator")
public KeyGenerator myKeyGenerator() {
return new KeyGenerator() {
@Override
public O... | repos\SpringBootBucket-master\springboot-cache\src\main\java\com\xncoding\trans\config\RedisCacheConfig.java | 2 |
请完成以下Java代码 | public class MRequestAction extends X_R_RequestAction
{
/**
*
*/
private static final long serialVersionUID = 2902231219773596011L;
/**
* Persistency Constructor
* @param ctx context
* @param R_RequestAction_ID id
*/
public MRequestAction (Properties ctx, int R_RequestAction_ID, String trxName)
{
... | {
setNullColumns(columnName);
}
else
{
setNullColumns(nc + ";" + columnName);
}
} // addNullColumn
/**
* Get Name of creator
* @return name
*/
public String getCreatedByName()
{
I_AD_User user = Services.get(IUserDAO.class).retrieveUserOrNull(getCtx(), getCreatedBy());
return user.getNam... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRequestAction.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: demo-consumer # Spring 应用名
cloud:
nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
server:
port: 28080 # 服务器端口。默认为 8080
ribbon:
# okhttp:
# enabled: true # 设置使用 OkHttp,对应 OkHttpRibbonConfigur... | tpclient:
# enabled: true # 设置使用 Apache HttpClient,对应 HttpClientRibbonConfiguration 配置类
# ConnectTimeout: 1 # 请求的连接超时时间,单位:毫秒。默认为 1000
# ReadTimeout: 1 # 请求的读取超时时间,单位:毫秒。默认为 1000 | repos\SpringBoot-Labs-master\labx-02-spring-cloud-netflix-ribbon\labx-02-scn-ribbon-demo05-consumer\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
// .anyRequest().permitAll() if you fix all permission values, then remove all conditions.
.antMatchers("/index").permitAll()
.antMatchers("/profile/**").aut... | @Bean
DaoAuthenticationProvider authenticationProvider(){
DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
daoAuthenticationProvider.setPasswordEncoder(passwordEncoder());
daoAuthenticationProvider.setUserDetailsService(this.userPrincipalDetialService);
... | repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\8. SpringAuthenticateDB\src\main\java\spring\authenticate\security\SpringSecurity.java | 1 |
请完成以下Java代码 | public void init() {
// o_name and O_NAME, same
jdbcTemplate.setResultsMapCaseInsensitive(true);
// Convert o_c_book SYS_REFCURSOR to List<Book>
simpleJdbcCallRefCursor = new SimpleJdbcCall(jdbcTemplate)
.withProcedureName("get_book_by_name")
.returningRe... | List<Book> findBookByName(String name) {
SqlParameterSource paramaters = new MapSqlParameterSource()
.addValue("p_name", name);
Map out = simpleJdbcCallRefCursor.execute(paramaters);
if (out == null) {
return Collections.emptyList();
} else {
re... | repos\spring-boot-master\spring-jdbc\src\main\java\com\mkyong\sp\StoredProcedure2.java | 1 |
请完成以下Java代码 | public void setQtyEntered (BigDecimal QtyEntered)
{
set_Value (COLUMNNAME_QtyEntered, QtyEntered);
}
/** Get Quantity.
@return The Quantity Entered is based on the selected UoM
*/
public BigDecimal getQtyEntered ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyEntered);
if (bd == null)
ret... | return ii.intValue();
}
public I_C_ElementValue getUser2() throws RuntimeException
{
return (I_C_ElementValue)MTable.get(getCtx(), I_C_ElementValue.Table_Name)
.getPO(getUser2_ID(), get_TrxName()); }
/** Set User List 2.
@param User2_ID
User defined list element #2
*/
public void setUser2_ID (int... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceBatchLine.java | 1 |
请完成以下Java代码 | public abstract class ServiceListenerFuture<S, V> implements LifecycleListener, Future<V> {
protected final S serviceInstance;
public ServiceListenerFuture(S serviceInstance) {
this.serviceInstance = serviceInstance;
}
protected V value;
boolean cancelled;
boolean failed;
@Override
public void h... | if (!failed && !cancelled && value == null) {
this.wait();
}
}
}
return value;
}
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
if (!failed && !cancelled && value == null) {
synchronized (this) {
if (!f... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\util\ServiceListenerFuture.java | 1 |
请完成以下Java代码 | public class CustomsInvoice
{
@NonFinal
CustomsInvoiceId id;
@NonFinal
UserId createdBy;
@NonFinal
UserId lastUpdatedBy;
@NonNull
String documentNo;
@NonNull
OrgId orgId;
@NonNull
BPartnerLocationId bpartnerAndLocationId;
@NonNull
String bpartnerAddress;
@Nullable
UserId userId;
@NonNull
Currenc... | @NonNull
DocStatus docStatus;
@NonNull
ImmutableList<CustomsInvoiceLine> lines;
public void updateLineNos()
{
int nextLineNo = 10;
for (CustomsInvoiceLine line : lines)
{
line.setLineNo(nextLineNo);
nextLineNo += 10;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\customs\CustomsInvoice.java | 1 |
请完成以下Java代码 | public void setEndDate (Timestamp EndDate)
{
set_Value (COLUMNNAME_EndDate, EndDate);
}
/** Get End Date.
@return Last effective date (inclusive)
*/
public Timestamp getEndDate ()
{
return (Timestamp)get_Value(COLUMNNAME_EndDate);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity... | {
return (String)get_Value(COLUMNNAME_PeriodType);
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Period.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final void preTimerJobDelete(JobEntity jobEntity, VariableScope variableScope) {
InternalJobManager internalJobManager = findInternalJobManager(jobEntity);
if (internalJobManager == null) {
preTimerJobDeleteInternal(jobEntity, variableScope);
} else {
internalJobMa... | }
protected abstract void preRepeatedTimerScheduleInternal(TimerJobEntity timerJobEntity, VariableScope variableScope);
protected InternalJobManager findInternalJobManager(Job job) {
if (internalJobManagerByScopeType == null || internalJobManagerByScopeType.isEmpty()) {
return null;
... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\ScopeAwareInternalJobManager.java | 2 |
请在Spring Boot框架中完成以下Java代码 | ReactiveGridFsTemplate reactiveGridFsTemplate(DataMongoProperties dataProperties,
ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, MappingMongoConverter mappingMongoConverter,
DataBufferFactory dataBufferFactory) {
return new ReactiveGridFsTemplate(dataBufferFactory,
new GridFsReactiveMongoDatabas... | }
@Override
public <T> Optional<Codec<T>> getCodecFor(Class<T> type) {
return this.delegate.getCodecFor(type);
}
@Override
public PersistenceExceptionTranslator getExceptionTranslator() {
return this.delegate.getExceptionTranslator();
}
@Override
public CodecRegistry getCodecRegistry() {
ret... | repos\spring-boot-4.0.1\module\spring-boot-data-mongodb\src\main\java\org\springframework\boot\data\mongodb\autoconfigure\DataMongoReactiveAutoConfiguration.java | 2 |
请完成以下Java代码 | public void addTaxBaseAmt(@NonNull final Money taxBaseAmtToAdd)
{
if (taxBaseAmtToAdd.isZero())
{
return;
}
this.taxBaseAmt = this.taxBaseAmt.add(taxBaseAmtToAdd);
this.isTaxCalculated = false;
}
public Money getTaxAmt()
{
updateTaxAmtsIfNeeded();
return _taxAmt;
}
public Money g... | this.isTaxCalculated = true;
}
}
public void updateDocTax(@NonNull final DocTax docTax)
{
if (!TaxId.equals(tax.getTaxId(), docTax.getTaxId()))
{
throw new AdempiereException("TaxId not matching: " + this + ", " + docTax);
}
docTax.setTaxBaseAmt(getTaxBaseAmt().toBigDecimal());
docTax.setT... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocTaxUpdater.java | 1 |
请完成以下Java代码 | public class DiscoveredOperationMethod extends OperationMethod {
private final List<String> producesMediaTypes;
public DiscoveredOperationMethod(Method method, OperationType operationType,
AnnotationAttributes annotationAttributes) {
super(method, operationType);
Assert.notNull(annotationAttributes, "'annota... | produces.add(((Producible<?>) value).getProducedMimeType().toString());
}
return produces;
}
private Class<?> getProducesFrom(AnnotationAttributes annotationAttributes) {
try {
return annotationAttributes.getClass("producesFrom");
}
catch (IllegalArgumentException ex) {
return Producible.class;
}
... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\annotation\DiscoveredOperationMethod.java | 1 |
请完成以下Java代码 | public class Queue extends BaseDataWithAdditionalInfo<QueueId> implements HasName, HasTenantId, QueueConfig {
private TenantId tenantId;
@NoXss
@Length(fieldName = "name")
private String name;
@NoXss
@Length(fieldName = "topic")
private String topic;
private int pollInterval;
private... | @JsonIgnore
public String getCustomProperties() {
return Optional.ofNullable(getAdditionalInfo())
.map(info -> info.get("customProperties"))
.filter(JsonNode::isTextual).map(JsonNode::asText).orElse(null);
}
@JsonIgnore
public boolean isDuplicateMsgToAllPartition... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\queue\Queue.java | 1 |
请完成以下Java代码 | protected void initializeResultVariable(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
DecisionTask decisionTask = getDefinition(element);
DmnDecisionTaskActivityBehavior behavior = getActivityBehavior(activity);
String resultVariable = decisionTask.getCamundaResultVariable();
... | }
return decision;
}
protected String getBinding(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
DecisionTask definition = getDefinition(element);
return definition.getCamundaDecisionBinding();
}
protected String getVersion(CmmnElement element, CmmnActivity activity, Cmm... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\handler\DecisionTaskItemHandler.java | 1 |
请完成以下Java代码 | private BPartnerLocationId computeAddressToUse(
@Nullable final BPartnerId bpartnerId,
@Nullable final DefaultAddressType defaultAddressType)
{
if (bpartnerId == null)
{
// no address found
return null;
}
// Keep as before, and consider Billing address as default
return DefaultAddressType.ShipTo... | contactPersonRepository.revokeConsent(savedContactPerson);
campaignRepository.removeContactPersonFromCampaign(savedContactPerson, campaign);
}
public void saveSyncResults(@NonNull final List<? extends SyncResult> syncResults)
{
for (final SyncResult syncResult : syncResults)
{
campaignRepository.saveCampai... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\CampaignService.java | 1 |
请完成以下Java代码 | protected Map<String, byte[]> getDeploymentResources(ProcessArchiveXml processArchive, DeploymentUnit deploymentUnit, VirtualFile processesXmlFile) {
final Module module = deploymentUnit.getAttachment(MODULE);
Map<String, byte[]> resources = new HashMap<>();
// first, add all resources listed in the proc... | resources.putAll(scanner.findResources(classLoader, resourceRootPath, processesXmlUrl, additionalResourceSuffixes));
}
return resources;
}
protected URL vfsFileAsUrl(VirtualFile processesXmlFile) {
try {
return processesXmlFile.toURL();
} catch (MalformedURLException e) {
throw new Ru... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\deployment\processor\ProcessApplicationDeploymentProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ResourceController {
private static Logger logger = LoggerFactory.getLogger(ResourceController.class);
@Autowired
private SentinelApiClient httpFetcher;
/**
* Fetch real time statistics info of the machine.
*
* @param ip ip to fetch
* @param port port of t... | ResourceTreeNode treeNode = ResourceTreeNode.fromNodeVoList(nodeVos);
treeNode.searchIgnoreCase(searchKey);
return Result.ofSuccess(ResourceVo.fromResourceTreeNode(treeNode));
} else {
// Normal (cluster node).
List<NodeVo> nodeVos = httpFetcher.fetchClusterNodeOf... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\controller\ResourceController.java | 2 |
请完成以下Java代码 | public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DmnEvaluatedOutputImpl that = (DmnEvaluatedOutputImpl) o;
if (id != null ? !id.equals(that.id) : that.id != null) return false;
if (name != null ? !name.equals(that.name) : that... | result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (outputName != null ? outputName.hashCode() : 0);
result = 31 * result + (value != null ? value.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "DmnEvaluatedOutputImpl{" +
"id='... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\delegate\DmnEvaluatedOutputImpl.java | 1 |
请完成以下Java代码 | public class InSubQueryFilterClause<ModelType, ParentType> implements IInSubQueryFilterClause<ModelType, ParentType>
{
private final ParentType parent;
private final Consumer<InSubQueryFilter<ModelType>> finisher;
private final InSubQueryFilter.Builder<ModelType> inSubQueryBuilder;
private boolean destroyed = false... | asserNotDestroyed();
inSubQueryBuilder.subQuery(subQuery);
return this;
}
@Override
public IInSubQueryFilterClause<ModelType, ParentType> matchingColumnNames(final String columnName, final String subQueryColumnName, final IQueryFilterModifier modifier)
{
asserNotDestroyed();
inSubQueryBuilder.matchingCol... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\InSubQueryFilterClause.java | 1 |
请完成以下Java代码 | private List<Resource> doGetResources(String location, ScriptLocationResolver locationResolver) {
try {
return locationResolver.resolve(location);
}
catch (Exception ex) {
throw new IllegalStateException("Unable to load resources from " + location, ex);
}
}
private void runScripts(List<Resource> resour... | private boolean continueOnError;
private String separator = ";";
private @Nullable Charset encoding;
public Scripts(List<Resource> resources) {
this.resources = resources;
}
@Override
public Iterator<Resource> iterator() {
return this.resources.iterator();
}
public Scripts continueOnError(boo... | repos\spring-boot-4.0.1\module\spring-boot-sql\src\main\java\org\springframework\boot\sql\init\AbstractScriptDatabaseInitializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class QiNiuServiceImpl implements IQiNiuService, InitializingBean {
private final UploadManager uploadManager;
private final Auth auth;
@Value("${qiniu.bucket}")
private String bucket;
private StringMap putPolicy;
@Autowired
public QiNiuServiceImpl(UploadManager uploadManager, Aut... | retry++;
}
return response;
}
@Override
public void afterPropertiesSet() {
this.putPolicy = new StringMap();
putPolicy.put("returnBody", "{\"key\":\"$(key)\",\"hash\":\"$(etag)\",\"bucket\":\"$(bucket)\",\"width\":$(imageInfo.width), \"height\":${imageInfo.height}}");
}
... | repos\spring-boot-demo-master\demo-upload\src\main\java\com\xkcoding\upload\service\impl\QiNiuServiceImpl.java | 2 |
请完成以下Java代码 | public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public boolean isClosed() {
return isClosedAttribute.getValue(this);
}
public void setClosed(boolean isClosed) {
isClosedAttribute.setValue(this, isClo... | return conversationNodeCollection.get(this);
}
public Collection<ConversationAssociation> getConversationAssociations() {
return conversationAssociationCollection.get(this);
}
public Collection<ParticipantAssociation> getParticipantAssociations() {
return participantAssociationCollection.get(this);
... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CollaborationImpl.java | 1 |
请完成以下Java代码 | public class StartJobAcquisitionStep extends DeploymentOperationStep {
protected final static ContainerIntegrationLogger LOG = ProcessEngineLogger.CONTAINER_INTEGRATION_LOGGER;
protected final JobAcquisitionXml jobAcquisitionXml;
public StartJobAcquisitionStep(JobAcquisitionXml jobAcquisitionXml) {
this.jo... | // deploy the job executor service into the container
serviceContainer.startService(ServiceTypes.JOB_EXECUTOR, jobAcquisitionXml.getName(), jmxManagedJobExecutor);
}
protected JobExecutor instantiateJobExecutor(Class<? extends JobExecutor> configurationClass) {
try {
return configurationClass.newIns... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\jobexecutor\StartJobAcquisitionStep.java | 1 |
请完成以下Java代码 | public void setA_State (String A_State)
{
set_Value (COLUMNNAME_A_State, A_State);
}
/** Get Account State.
@return State of the Credit Card or Account holder
*/
public String getA_State ()
{
return (String)get_Value(COLUMNNAME_A_State);
}
/** Set Tax Entity.
@param A_Tax_Entity Tax Entity */
pu... | /** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
/** Get Text Message.
@return Text Message
*/
public String getTextMsg ()
{
return (String)get_Value(COLUMNNAME_TextMsg);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Tax.java | 1 |
请完成以下Java代码 | private void handleIfBindException(String dn, String username, org.springframework.ldap.NamingException naming) {
if ((naming instanceof org.springframework.ldap.AuthenticationException)
|| (naming instanceof org.springframework.ldap.OperationNotSupportedException)) {
handleBindException(dn, username, naming);... | /**
* Set whether javax-based bind exceptions should also be delegated to
* {@code #handleBindException} (only Spring-based bind exceptions are handled by
* default)
*
* <p>
* For passivity reasons, defaults to {@code false}, though may change to {@code true}
* in future releases.
* @param alsoHandleJav... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\authentication\BindAuthenticator.java | 1 |
请完成以下Java代码 | public String getKey() {
return this.key;
}
public void setTokenValiditySeconds(int tokenValiditySeconds) {
this.tokenValiditySeconds = tokenValiditySeconds;
}
protected int getTokenValiditySeconds() {
return this.tokenValiditySeconds;
}
/**
* Whether the cookie should be flagged as secure or not. Secu... | * instance.
*
*/
public void setUserDetailsChecker(UserDetailsChecker userDetailsChecker) {
this.userDetailsChecker = userDetailsChecker;
}
public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) {
this.authoritiesMapper = authoritiesMapper;
}
/**
* @since 5.5
*/
@Override
publ... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\AbstractRememberMeServices.java | 1 |
请完成以下Java代码 | private I_M_HU getOrCreateCurrentTU()
{
if (_currentTU == null)
{
_currentTU = newHUBuilder().create(tuPI);
}
return _currentTU;
}
private void closeCurrentTUIfCapacityExceeded()
{
if (_currentTU != null && getCurrentTURemainingQty().signum() <= 0)
{
closeCurrentTU();
}
}
void closeCurrentTU... | huBuilder.setHUStatus(huStatus);
}
if (bpartnerId != null)
{
huBuilder.setBPartnerId(bpartnerId);
}
if (bpartnerLocationRepoId > 0)
{
huBuilder.setC_BPartner_Location_ID(bpartnerLocationRepoId);
}
huBuilder.setHUPlanningReceiptOwnerPM(true);
huBuilder.setHUClearanceStatusInfo(clearanceStatusIn... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\TULoaderInstance.java | 1 |
请完成以下Java代码 | public void setM_HU_Storage_ID (final int M_HU_Storage_ID)
{
if (M_HU_Storage_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_HU_Storage_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_HU_Storage_ID, M_HU_Storage_ID);
}
@Override
public int getM_HU_Storage_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_Storage... | @Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setQty (final @Nullable BigDecimal Qty)
{
set_ValueNoCheck (COLUMNNAME_Qty, Qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Stock_Detail_V.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Singlesignon {
/**
* Remote endpoint to send authentication requests to.
*/
private @Nullable String url;
/**
* Whether to redirect or post authentication requests.
*/
private @Nullable Saml2MessageBinding binding;
/**
* Whether to sign authentication requests.
... | }
}
/**
* Single logout details.
*/
public static class Singlelogout {
/**
* Location where SAML2 LogoutRequest gets sent to.
*/
private @Nullable String url;
/**
* Location where SAML2 LogoutResponse gets sent to.
*/
private @Nullable String responseUrl;
/**
* Whether to redirect o... | repos\spring-boot-4.0.1\module\spring-boot-security-saml2\src\main\java\org\springframework\boot\security\saml2\autoconfigure\Saml2RelyingPartyProperties.java | 2 |
请完成以下Java代码 | public int getGeodb_loc_id()
{
return geodb_loc_id;
}
public String getCity()
{
return city;
}
public String getZip()
{
return zip;
}
public double getLon()
{
return lon;
}
public double getLat()
{
return lat;
}
public int getC_Country_ID() {
return C_Country_ID;
}
public void setC_C... | public void setCity_7bitlc(String city_7bitlc) {
this.city_7bitlc = city_7bitlc;
}
public String getStringRepresentation() {
return stringRepresentation;
}
public void setStringRepresentation(String stringRepresentation) {
this.stringRepresentation = stringRepresentation;
}
@Override
public boolean equ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\adempiere\gui\search\GeodbObject.java | 1 |
请完成以下Java代码 | public String getScopeDefinitionId() {
return scopeDefinitionId;
}
public void setScopeDefinitionId(String scopeDefinitionId) {
this.scopeDefinitionId = scopeDefinitionId;
}
public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
... | public void setHasExistingInstancesForUniqueCorrelation(boolean hasExistingInstancesForUniqueCorrelation) {
this.hasExistingInstancesForUniqueCorrelation = hasExistingInstancesForUniqueCorrelation;
}
@Override
public String toString() {
return new StringJoiner(", ", getClass().getSimpleName... | repos\flowable-engine-main\modules\flowable-event-registry-api\src\main\java\org\flowable\eventregistry\api\EventConsumerInfo.java | 1 |
请完成以下Java代码 | public void setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID)
{
orderLine.setM_AttributeSetInstance_ID(M_AttributeSetInstance_ID);
values.setM_AttributeSetInstance_ID(M_AttributeSetInstance_ID);
}
@Override
public int getC_UOM_ID()
{
return orderLine.getC_UOM_ID();
}
@Override
public vo... | @Override
public void setLuId(@Nullable final HuPackingInstructionsId luId)
{
orderLine.setM_LU_HU_PI_ID(HuPackingInstructionsId.toRepoId(luId));
}
@Override
public HuPackingInstructionsId getLuId()
{
return HuPackingInstructionsId.ofRepoIdOrNull(orderLine.getM_LU_HU_PI_ID());
}
@Override
public boolean ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\OrderLineHUPackingAware.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) {
ShiroFilterFactoryBean factoryBean = new ShiroFilterFactoryBean();
/**
* 添加jwt过滤器,并在下面注册
* 也就是将jwtFilter注册到shiro的Filter中
* 指定除了login和logout之外的请求都先经过jwtFilter
*/
Map<String... | * @return
*/
@Bean
public static LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
return new LifecycleBeanPostProcessor();
}
@Bean
public static DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new Defa... | repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\config\ShiroConfig.java | 2 |
请完成以下Java代码 | public Object getValue(ELContext context, Object base, Object property) {
if (base == null) {
// according to javadoc, can only be a String
String key = (String) property;
for (String componentId : (Set<String>) blueprintContainer.getComponentIds()) {
if (comp... | return true;
}
@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object arg) {
return Object.class;
}
@Override
public Class<?> getType(ELContext context, Obj... | repos\flowable-engine-main\modules\flowable-osgi\src\main\java\org\flowable\osgi\blueprint\BlueprintContextELResolver.java | 1 |
请完成以下Java代码 | public RefreshTokenGrantBuilder eventPublisher(ApplicationEventPublisher eventPublisher) {
this.eventPublisher = eventPublisher;
return this;
}
/**
* Sets the maximum acceptable clock skew, which is used when checking the access
* token expiry. An access token is considered expired if
* {@code OAuth... | }
/**
* Builds an instance of {@link RefreshTokenOAuth2AuthorizedClientProvider}.
* @return the {@link RefreshTokenOAuth2AuthorizedClientProvider}
*/
@Override
public OAuth2AuthorizedClientProvider build() {
RefreshTokenOAuth2AuthorizedClientProvider authorizedClientProvider = new RefreshTokenOAuth2A... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\OAuth2AuthorizedClientProviderBuilder.java | 1 |
请完成以下Java代码 | public final void loginSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication successfulAuthentication) {
if (!this.alwaysRemember && !rememberMeRequested(request, this.rememberMeParameterName)) {
logger.debug("Remember-me login not requested.");
return;
}
request.setAttribute(R... | Assert.hasText(rememberMeParameterName, "rememberMeParameterName cannot be empty or null");
this.rememberMeParameterName = rememberMeParameterName;
}
public void setAlwaysRemember(boolean alwaysRemember) {
this.alwaysRemember = alwaysRemember;
}
public void setValiditySeconds(int validitySeconds) {
this.val... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\security\web\authentication\SpringSessionRememberMeServices.java | 1 |
请完成以下Java代码 | public void setAsynchronousLeaveExclusive(boolean exclusive) {
this.asynchronousLeaveNotExclusive = !exclusive;
}
public boolean isAsynchronousLeaveNotExclusive() {
return asynchronousLeaveNotExclusive;
}
public void setAsynchronousLeaveNotExclusive(boolean asynchronousLeaveNotExclusive) {
this.... | setAsynchronousLeave(otherNode.isAsynchronousLeave());
setAsynchronousLeaveNotExclusive(otherNode.isAsynchronousLeaveNotExclusive());
if (otherNode.getIncomingFlows() != null) {
setIncomingFlows(otherNode.getIncomingFlows()
.stream()
.map(SequenceFlow... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\FlowNode.java | 1 |
请完成以下Java代码 | public void packagePickup(Instant pickupTime) {
Workflow.await(() -> shipping != null);
shipping = shipping.toStatus(ShippingStatus.SHIPPED, pickupTime, "Package picked up");
}
@Override
public void packageDelivered(Instant pickupTime) {
Workflow.await(() -> shipping != null);
... | }
@Override
public Shipping getShipping() {
return shipping;
}
@Override
public PaymentAuthorization getPayment() {
return payment;
}
@Override
public RefundRequest getRefund() {
return refund;
}
} | repos\tutorials-master\saas-modules\temporal\src\main\java\com\baeldung\temporal\workflows\sboot\order\workflow\OrderWorkflowImpl.java | 1 |
请完成以下Java代码 | public void setFrom(final I_C_Invoice from)
{
final DocumentLocation fromDocumentLocationAdapter = new InvoiceDocumentLocationAdapter(from).toDocumentLocation();
final BPartnerContactId fromContactId = fromDocumentLocationAdapter.getContactId();
final BPartnerContactId invoiceContactId = getBPartnerContactId().... | }
@Override
public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL)
{
return documentLocationBL.toPlainDocumentLocation(this);
}
@Override
public InvoiceDocumentLocationAdapter toOldValues()
{
InterfaceWrapperHelper.assertNotOldValues(delegate);
return new ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\location\adapter\InvoiceDocumentLocationAdapter.java | 1 |
请完成以下Java代码 | public String toString() {return getAsString();}
public String getAsString() {return type + "-" + last4Digits;}
}
//
//
//
//
//
//
@RequiredArgsConstructor
@Getter
public enum LastSyncStatus implements ReferenceListAwareEnum
{
OK(X_SUMUP_Transaction.SUMUP_LASTSYNC_STATUS_OK),
Error(X_SUMUP_Transact... | @Value
@Builder
@Jacksonized
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
public static class LastSync
{
@NonNull LastSyncStatus status;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\SumUpTransaction.java | 1 |
请完成以下Java代码 | public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
@Override
public void setT_Amount (final @Nullable BigDecimal T_Amount)
{
set_Value (COLUMNNAME_T_Amount, T_Amount);
}
@Override
public BigDecimal getT_Amount()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME... | final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_T_Number);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setT_Qty (final @Nullable BigDecimal T_Qty)
{
set_Value (COLUMNNAME_T_Qty, T_Qty);
}
@Override
public BigDecimal getT_Qty()
{
final BigDecimal bd = get_ValueAsBigDecimal(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Test.java | 1 |
请完成以下Java代码 | public final class DevToolsEnablementDeducer {
private static final Set<String> SKIPPED_STACK_ELEMENTS;
static {
Set<String> skipped = new LinkedHashSet<>();
skipped.add("org.junit.runners.");
skipped.add("org.junit.platform.");
skipped.add("org.springframework.boot.test.");
skipped.add(SpringApplicationA... | for (StackTraceElement element : thread.getStackTrace()) {
if (isSkippedStackElement(element)) {
return false;
}
}
return true;
}
private static boolean isSkippedStackElement(StackTraceElement element) {
for (String skipped : SKIPPED_STACK_ELEMENTS) {
if (element.getClassName().startsWith(skipped)... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\system\DevToolsEnablementDeducer.java | 1 |
请完成以下Java代码 | public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
public I_GL_Category getGL_Category() throws RuntimeException
{
return (I_GL_Category)MTable.get(getCtx(), I_GL_Category.Table_Name)
.getPO(getGL_Category_ID(), get_TrxName()); }
/** Set GL Category.
@param GL_Catego... | */
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boole... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Reval_Entry.java | 1 |
请完成以下Java代码 | public static CoNLLSentence compute(String sentence)
{
return new MaxEntDependencyParser().parse(sentence);
}
@Override
protected Edge makeEdge(Node[] nodeArray, int from, int to)
{
LinkedList<String> context = new LinkedList<String>();
int index = from;
for (int i =... | context.add(nodeArray[from].compiledWord + '→' + wordBeforeJ.compiledWord + '@' + nodeArray[to].compiledWord);
context.add(wordBeforeI.label + '@' + nodeArray[from].label + '→' + nodeArray[to].label);
context.add(nodeArray[from].label + '→' + wordBeforeJ.label + '@' + nodeArray[to].label);
List<... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\MaxEntDependencyParser.java | 1 |
请完成以下Java代码 | public iframe setAlign(String align)
{
addAttribute("align",align);
return(this);
}
/**
Sets the lang="" and xml:lang="" attributes
@param lang the lang="" and xml:lang="" attributes
*/
public Element setLang(String lang)
{
addAttribute("la... | addElementToRegistry(element);
return(this);
}
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public iframe addElement(String element)
{
addElementToRegistry(element);
return(this);
}
/**
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\iframe.java | 1 |
请完成以下Java代码 | public class MeteredCalculatorDecorator implements Calculator {
private final Calculator wrappedCalculator;
private final Map<String, Integer> methodCalls;
public MeteredCalculatorDecorator(Calculator calculator) {
this.wrappedCalculator = calculator;
this.methodCalls = new HashMap<>();
... | return wrappedCalculator.add(a, b); // Delegation
}
@Override
public int subtract(int a, int b) {
// Track the call count
methodCalls.merge("subtract", 1, Integer::sum);
return wrappedCalculator.subtract(a, b); // Delegation
}
// Public method to expose the call counts for ... | repos\tutorials-master\core-java-modules\core-java-lang-oop-patterns-2\src\main\java\com\baeldung\overridemethod\decorator\MeteredCalculatorDecorator.java | 1 |
请完成以下Java代码 | public String getValidateFormFields() {
return validateFormFields;
}
public void setValidateFormFields(String validateFormFields) {
this.validateFormFields = validateFormFields;
}
@Override
public StartEvent clone() {
StartEvent clone = new StartEvent();
clone.setVa... | super.setValues(otherEvent);
setInitiator(otherEvent.getInitiator());
setFormKey(otherEvent.getFormKey());
setSameDeployment(otherEvent.isInterrupting);
setInterrupting(otherEvent.isInterrupting);
setValidateFormFields(otherEvent.validateFormFields);
formProperties = new... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\StartEvent.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
data:
mongodb:
uri: mongodb://admin:123456@127.0.0.1:27017/test
# 需要用户名和密码认证
#uri: mongodb://username:password@ip:port/admin
#不需要用户名和密码认证
#uri: mongodb://ip:port/admin
kafka:
bootstrap-servers: localhost:9092
consumer:
group-id: your-... | common.serialization.StringDeserializer
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.apache.kafka.common.serialization.StringSerializer | repos\springboot-demo-master\mongodb\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public class MyDtoIgnoreNull {
private String stringValue;
private int intValue;
private boolean booleanValue;
public MyDtoIgnoreNull() {
super();
}
public MyDtoIgnoreNull(final String stringValue, final int intValue, final boolean booleanValue) {
super();
this.string... | }
public void setIntValue(final int intValue) {
this.intValue = intValue;
}
public boolean isBooleanValue() {
return booleanValue;
}
public void setBooleanValue(final boolean booleanValue) {
this.booleanValue = booleanValue;
}
} | repos\tutorials-master\jackson-modules\jackson-core-2\src\main\java\com\baeldung\jackson\ignorenullfields\MyDtoIgnoreNull.java | 1 |
请完成以下Java代码 | public void setShipper_City (final @Nullable java.lang.String Shipper_City)
{
set_Value (COLUMNNAME_Shipper_City, Shipper_City);
}
@Override
public java.lang.String getShipper_City()
{
return get_ValueAsString(COLUMNNAME_Shipper_City);
}
@Override
public void setShipper_CountryISO2Code (final @Nullable j... | {
return get_ValueAsString(COLUMNNAME_Shipper_Name2);
}
@Override
public void setShipper_StreetName1 (final @Nullable java.lang.String Shipper_StreetName1)
{
set_Value (COLUMNNAME_Shipper_StreetName1, Shipper_StreetName1);
}
@Override
public java.lang.String getShipper_StreetName1()
{
return get_ValueA... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder.java | 1 |
请完成以下Java代码 | public int getLogo_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Logo_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_AD_Image getLogoReport() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_LogoReport_ID, org.compiere.model.I_AD_Image.class... | public void setLogoWeb_ID (int LogoWeb_ID)
{
if (LogoWeb_ID < 1)
set_Value (COLUMNNAME_LogoWeb_ID, null);
else
set_Value (COLUMNNAME_LogoWeb_ID, Integer.valueOf(LogoWeb_ID));
}
/** Get Logo Web.
@return Logo Web */
@Override
public int getLogoWeb_ID ()
{
Integer ii = (Integer)get_Value(COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ClientInfo.java | 1 |
请完成以下Java代码 | private IHUDocumentFactory getHUDocumentFactoryOrNull(final String tableName)
{
return factories.get(tableName);
}
@Override
public void registerHUDocumentFactory(final String tableName, final IHUDocumentFactory factory)
{
Check.assumeNotEmpty(tableName, "tableName not empty");
Check.assumeNotNull(factory, ... | public <T> List<IHUDocument> createHUDocuments(final Properties ctx, final Class<T> modelClass, final Iterator<T> records)
{
final String tableName = InterfaceWrapperHelper.getTableName(modelClass);
final IHUDocumentFactory factory = getHUDocumentFactory(tableName);
return factory.createHUDocuments(ctx, modelCla... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\HUDocumentFactoryService.java | 1 |
请完成以下Java代码 | public void removeTransientVariables() {
removeTransientVariablesLocal();
VariableScopeImpl parentVariableScope = getParentVariableScope();
if (parentVariableScope != null) {
parentVariableScope.removeTransientVariablesLocal();
}
}
// getters and setters ////////////... | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Override
public <T> T getVariable(String variableName, Class<T> variableClass) {
return variableClass.cast(getVariable(variableName));
}
@Override
public <T> T getVariableLocal... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\VariableScopeImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}
... | return author;
}
public void setAuthor(String author) {
this.author = author;
}
public Integer getPages() {
return pages;
}
public void setPages(Integer pages) {
this.pages = pages;
}
} | repos\tutorials-master\microservices-modules\helidon\helidon-mp\src\main\java\com\baeldung\microprofile\model\Book.java | 2 |
请完成以下Java代码 | public void setByteArrayId(String id) {
byteArrayField.setByteArrayId(id);
}
@Override
public String getSerializerName() {
return typedValueField.getSerializerName();
}
@Override
public void setSerializerName(String serializerName) {
typedValueField.setSerializerName(serializerName);
}
pub... | public String getTypeName() {
return typedValueField.getTypeName();
}
public String getVariableTypeName() {
return getTypeName();
}
public Date getTime() {
return timestamp;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[variableName=" + var... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricDetailVariableInstanceUpdateEntity.java | 1 |
请完成以下Java代码 | public void setMinQty (BigDecimal MinQty)
{
set_Value (COLUMNNAME_MinQty, MinQty);
}
/** Get Minimum Quantity.
@return Minimum quantity for the business partner
*/
public BigDecimal getMinQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MinQty);
if (bd == null)
return Env.ZERO;
return b... | Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Total Quantity.
@param TotalQty
Total Quantity
*/
public void setTotalQty (BigDecimal TotalQty)
{
set_Value (COLUMNNAME_TotalQty, TotalQty);
}
/** Get Total Quantity.
@return T... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DistributionRunLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private BigDecimal getQtyInProductPriceUOM(@NonNull final I_M_ProductPrice productPrice, @NonNull final Quantity quantity)
{
final ProductId productId = ProductId.ofRepoId(productPrice.getM_Product_ID());
final UomId productPriceUomId = UomId.ofRepoId(productPrice.getC_UOM_ID());
return uomConversionBL.convertQ... | BigDecimal priceLimit;
@NonNull
BigDecimal priceList;
public static ProductPriceSettings of(@NonNull final I_M_ProductPrice productPrice)
{
return new ProductPriceSettings(productPrice.getPriceStd(), productPrice.getPriceLimit(), productPrice.getPriceList());
}
public static ProductPriceSettings of(@N... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\ProductScalePriceService.java | 2 |
请完成以下Java代码 | public void addAsync(final Properties ctx,
final int M_Warehouse_ID,
final int M_Locator_ID,
final int M_Product_ID,
final int M_AttributeSetInstance_ID,
final int reservationAttributeSetInstance_ID,
final BigDecimal diffQtyOnHand,
final BigDecimal diffQtyReserved,
final BigDecimal diffQtyOrdere... | final int reservationAttributeSetInstance_ID,
final BigDecimal diffQtyOnHand,
final BigDecimal diffQtyReserved,
final BigDecimal diffQtyOrdered,
final String trxName)
{
if (isMStorageDisabled())
{
return;
}
MStorage.add(ctx,
M_Warehouse_ID,
M_Locator_ID,
M_Product_ID,
M_Attribut... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\impl\StorageBL.java | 1 |
请完成以下Java代码 | public void setDLM_Partition_Workqueue_ID(final int DLM_Partition_Workqueue_ID)
{
if (DLM_Partition_Workqueue_ID < 1)
{
set_ValueNoCheck(COLUMNNAME_DLM_Partition_Workqueue_ID, null);
}
else
{
set_ValueNoCheck(COLUMNNAME_DLM_Partition_Workqueue_ID, Integer.valueOf(DLM_Partition_Workqueue_ID));
}
}
... | * Get Datensatz-ID.
*
* @return Direct internal record ID
*/
@Override
public int getRecord_ID()
{
final Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID);
if (ii == null)
{
return 0;
}
return ii.intValue();
}
/**
* Set Name der DB-Tabelle.
*
* @param TableName Name der DB-Tabelle
... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Workqueue.java | 1 |
请完成以下Java代码 | private List<JsonPurchaseOrder> retrievePurchaseOrderInfo(final PurchaseCandidateId candidate)
{
final Collection<OrderId> orderIds = purchaseCandidateRepo.getOrderIdsForPurchaseCandidates(candidate);
return Services.get(IOrderDAO.class).getByIds(orderIds)
.stream()
.map(this::toJsonOrder)
.collect(Imm... | .dateOrdered(TimeUtil.asZonedDateTime(order.getDateOrdered(), timeZone))
.datePromised(TimeUtil.asZonedDateTime(order.getDatePromised(), timeZone))
.docStatus(order.getDocStatus())
.documentNo(order.getDocumentNo())
.metasfreshId(JsonMetasfreshId.of(order.getC_Order_ID()))
.pdfAvailable(hasArchive)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\order\PurchaseCandidatesStatusService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Strin... | }
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
@Override
public String toString() {
return "AdminCreateReq{" +
"username='" + username + '\'' +
", password='" + password + '\... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\user\AdminCreateReq.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
return new LifecycleBeanPostProcessor();
}
public ShiroFormAuthenticationFilter formAuthenticationFilter() {
ShiroFormAuthenticationFilter filter = new ShiroFormAuthenticationFilter();
filter.setUsernameParam("username");
... | DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
advisorAutoProxyCreator.setProxyTargetClass(true);
return advisorAutoProxyCreator;
}
/**
* 开启shiro aop注解支持.
* 使用代理方式;所以需要开启代码支持;
* 需要aspectj支持
*
* @param securityManager
... | repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroConfig.java | 2 |
请完成以下Java代码 | private static int getBPartnerLocationId(@NonNull final IViewRow row)
{
return row.getFieldValueAsInt(I_M_Packageable_V.COLUMNNAME_C_BPartner_Location_ID, -1);
}
private long getSelectionSize(final DocumentIdsSelection rowIds)
{
if (rowIds.isAll())
{
return getView().size();
}
else
{
return rowId... | {
return selectedRowIds.stream().filter(DocumentId::isInt).collect(DocumentIdsSelection.toDocumentIdsSelection());
}
}
private Optional<ProductBarcodeFilterData> getProductBarcodeFilterData()
{
return PackageableFilterDescriptorProvider.extractProductBarcodeFilterData(getView());
}
private List<ShipmentSc... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\process\WEBUI_Picking_Launcher.java | 1 |
请完成以下Java代码 | public class JSONProcessLayout
{
public static JSONProcessLayout of(final ProcessLayout layout, final JSONDocumentLayoutOptions jsonOpts)
{
return new JSONProcessLayout(layout, jsonOpts);
}
@JsonProperty("layoutType")
private final PanelLayoutType layoutType;
@JsonProperty("barcodeScannerType")
@JsonInclude(... | @JsonProperty("elements")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private final List<JSONDocumentLayoutElement> elements;
private JSONProcessLayout(final ProcessLayout layout, final JSONDocumentLayoutOptions jsonOpts)
{
layoutType = layout.getLayoutType();
barcodeScannerType = layout.getBarcodeScannerType(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\json\JSONProcessLayout.java | 1 |
请完成以下Java代码 | private void checkProductCount(Collection<Integer> counts) {
for (Integer count : counts) {
if (count <= 0) {
throw new CommonBizException(ExpCodeEnum.PRODUCTIDCOUNT_ERROR);
}
}
}
/**
* 检查产品ID列表对应的卖家是否是同一个
* @param prodIdCountMap 产品ID-数量 的map
... | }
return prodQueryReqList;
}
/**
* 根据产品ID查询产品列表
* @param prodQueryReqList 产品查询请求
* @return 产品所属公司的ID
*/
private Set<String> query(List<ProdQueryReq> prodQueryReqList) {
Set<String> companyIdSet = Sets.newHashSet();
for (ProdQueryReq prodQueryReq : prodQueryReqL... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\component\checkparam\PlaceOrderCheckParamComponent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CallOrderDetailQuery
{
@NonNull
CallOrderSummaryId summaryId;
@Nullable
OrderLineId orderLineId;
@Nullable
InOutLineId inOutLineId;
@Nullable
InvoiceAndLineId invoiceAndLineId;
@Builder
public CallOrderDetailQuery(
@NonNull final CallOrderSummaryId summaryId,
@Nullable final OrderLineId... | final long nonNullSources = Stream.of(orderLineId, inOutLineId, invoiceAndLineId)
.filter(Objects::nonNull)
.count();
if (nonNullSources == 0)
{
throw new AdempiereException("One of orderLineId, inOutLineId, invoiceLineId must be provided!");
}
if (nonNullSources > 1)
{
throw new AdempiereExce... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\detail\CallOrderDetailQuery.java | 2 |
请完成以下Java代码 | public class ReadWriteBlockingQueue {
public static void main(String[] args) throws InterruptedException {
BlockingQueue<String> queue = new LinkedBlockingQueue<>();
String readFileName = "src/main/resources/read_file.txt";
String writeFileName = "src/main/resources/write_file.txt";
... | System.out.println("Queue size: " + queue.size());
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
class FileConsumer implements Runnable {
private final BlockingQueue<String> queue;
private final String outputFileName;
public FileConsumer(BlockingQueue ... | repos\tutorials-master\core-java-modules\core-java-io-5\src\main\java\com\baeldung\readwritethread\ReadWriteBlockingQueue.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.