instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | abstract class OracleR2dbcDockerComposeConnectionDetailsFactory
extends DockerComposeConnectionDetailsFactory<R2dbcConnectionDetails> {
private final String defaultDatabase;
OracleR2dbcDockerComposeConnectionDetailsFactory(OracleContainer container) {
super(container.getImageName(), "io.r2dbc.spi.ConnectionFact... | OracleDbR2dbcDockerComposeConnectionDetails(RunningService service, String defaultDatabase) {
super(service);
OracleEnvironment environment = new OracleEnvironment(service.env(), defaultDatabase);
this.connectionFactoryOptions = connectionFactoryOptionsBuilder.build(service, environment.getDatabase(),
env... | repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\docker\compose\OracleR2dbcDockerComposeConnectionDetailsFactory.java | 1 |
请完成以下Java代码 | public void setValue(String value) {
this.value = value;
}
// persistent object methods ////////////////////////////////////////////////
@Override
public String getId() {
return name;
}
@Override
public Object getPersistentState() {
return value;
}
@Overri... | public void setId(String id) {
throw new ActivitiException("only provided id generation allowed for properties");
}
@Override
public int getRevisionNext() {
return revision + 1;
}
// common methods //////////////////////////////////////////////////////////
@Override
public... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\PropertyEntity.java | 1 |
请完成以下Java代码 | public Object get(final String name)
{
return context.get(name);
}
public static final class Builder
{
private final ImmutableMap.Builder<String, Object> context = ImmutableMap.builder();
private Builder()
{
super();
}
public ExpressionContext build()
{
final ImmutableMap<String, Object> cont... | return EMPTY;
}
return new ExpressionContext(context);
}
public Builder putContext(final String name, final Object value)
{
if (value == null)
{
return this;
}
context.put(name, value);
return this;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\ExpressionContext.java | 1 |
请完成以下Java代码 | public void setBackground()
{
} // setBackground
/**
* Action Listener - data binding
* @param e
*/
@Override
public void actionPerformed(ActionEvent e)
{
try
{
fireVetoableChange(m_columnName, null, getValue());
}
catch (PropertyVetoException pve)
{
}
} // actionPerformed
/**
* Set F... | {
return m_savedMnemonic;
} // getSavedMnemonic
/**
* @param savedMnemonic The savedMnemonic to set.
*/
public void setSavedMnemonic (char savedMnemonic)
{
m_savedMnemonic = savedMnemonic;
} // getSavedMnemonic
@Override
public boolean isAutoCommit()
{
return true;
}
} // VCheckBox | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VCheckBox.java | 1 |
请完成以下Java代码 | class NumberCruncherThread implements Runnable {
@Override
public void run() {
String thisThreadName = Thread.currentThread().getName();
List<Integer> partialResult = new ArrayList<>();
for (int i = 0; i < NUM_PARTIAL_RESULTS; i++) {
Integer num = ran... | System.out.println(thisThreadName + ": Computing final sum of " + NUM_WORKERS + " workers, having " + NUM_PARTIAL_RESULTS + " results each.");
int sum = 0;
for (List<Integer> threadResult : partialResults) {
System.out.print("Adding ");
for (Integer partialResult ... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-7\src\main\java\com\baeldung\cyclicbarrier\CyclicBarrierDemo.java | 1 |
请完成以下Java代码 | public Component getDefaultComponent (Container aContainer)
{
// info ("Root: ", aContainer);
m_default = true;
Component c = super.getDefaultComponent (aContainer);
// info (" Default: ", c);
m_default = false;
return c;
} // getDefaultComponent
/**
* Determines whether the specified <code>Component</... | if (m_default // get Default Focus
&& ("AD_Client_ID".equals(aComponent.getName()) || "AD_Org_ID".equals(aComponent.getName()) ))
return false;
}
// Toolbar Buttons
if (aComponent.getParent() instanceof JToolBar)
return false;
//
return true;
} // accept
/***********************************... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AFocusTraversalPolicy.java | 1 |
请完成以下Java代码 | public void setPermissionServiceFactory(@NonNull final PermissionServiceFactory permissionServiceFactory)
{
this.permissionServiceFactory = permissionServiceFactory;
}
@PostMapping
public ResponseEntity<JsonOLCandCreateBulkResponse> createOrderLineCandidate(@RequestBody @NonNull final JsonOLCandCreateRequest req... | return Check.isEmpty(response.getErrors())
? new ResponseEntity<>(response, HttpStatus.CREATED)
: new ResponseEntity<>(response, HttpStatus.MULTI_STATUS);
}
catch (final Exception ex)
{
logger.warn("Got exception while processing {}", bulkRequest, ex);
final String adLanguage = Env.getADLanguageO... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\OrderCandidatesRestController.java | 1 |
请完成以下Java代码 | public List<int[]> generate(int n, int r) {
List<int[]> combinations = new ArrayList<>();
helper(combinations, new int[r], 0, n - 1, 0);
return combinations;
}
/**
* Choose elements from set by recursing over elements selected
* @param combinations - List to store generated c... | data[index] = i;
helper(combinations, data, i + 1, end, index + 1);
}
}
}
public static void main(String[] args) {
SelectionRecursiveCombinationGenerator generator = new SelectionRecursiveCombinationGenerator();
List<int[]> combinations = generator.generate(N... | repos\tutorials-master\core-java-modules\core-java-lang-math-2\src\main\java\com\baeldung\algorithms\combination\SelectionRecursiveCombinationGenerator.java | 1 |
请完成以下Java代码 | public class TenantAwareDataSource implements DataSource {
protected TenantInfoHolder tenantInfoHolder;
protected Map<Object, DataSource> dataSources = new HashMap<Object, DataSource>();
public TenantAwareDataSource(TenantInfoHolder tenantInfoHolder) {
this.tenantInfoHolder = tenantInfoHolder;
... | }
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (iface.isInstance(this)) {
return (T) this;
}
throw new SQLException("Cannot unwrap " + getClass().getName() + " as an instance of " + iface.getName());
}
public boolean is... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cfg\multitenant\TenantAwareDataSource.java | 1 |
请完成以下Java代码 | /* private */default Map<DocumentId, T> getDocumentId2AllRows()
{
return RowsDataTool.extractAllRows(getDocumentId2TopLevelRows().values());
}
/** @return all rows (top level and included ones) */
default Collection<T> getAllRows()
{
return getDocumentId2AllRows().values();
}
default Collection<T> getTopLe... | {
throw new EntityNotFoundException("Row not found")
.appendParametersToMessage()
.setParameter("rowId", rowId);
}
return row;
}
@Nullable
default T getByIdOrNull(final DocumentId rowId)
{
return getDocumentId2AllRows().get(rowId);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\template\IRowsData.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HUQRCode getQRCodeByHuId(@NonNull final HuId huId) {return huQRCodesService.getQRCodeByHuId(huId);}
@NonNull
public HUQRCode resolveHUQRCode(@NonNull final ScannedCode scannedCode)
{
final IHUQRCode parsedHUQRCode = huQRCodesService.parse(scannedCode);
if (parsedHUQRCode instanceof HUQRCode)
{
retur... | public ProductId getSingleProductId(@NonNull final HUQRCode huQRCode)
{
final HuId huId = huQRCodesService.getHuIdByQRCode(huQRCode);
return getSingleHUProductStorage(huId).getProductId();
}
public IHUProductStorage getSingleHUProductStorage(@NonNull final HuId huId)
{
return handlingUnitsBL.getSingleHUProdu... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\external_services\hu\DistributionHUService.java | 2 |
请完成以下Java代码 | private CustomerId getCustomerIdFromMsg(TbMsg msg) {
return msg != null ? msg.getCustomerId() : null;
}
private EntityId getOriginatorId(TbContext ctx) throws TbNodeException {
if (EntityType.RULE_NODE.equals(config.getOriginatorType())) {
return ctx.getSelfId();
}
i... | public TbPair<Boolean, JsonNode> upgrade(int fromVersion, JsonNode oldConfiguration) throws TbNodeException {
boolean hasChanges = false;
switch (fromVersion) {
case 0:
if (oldConfiguration.has(QUEUE_NAME)) {
hasChanges = true;
((Object... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\debug\TbMsgGeneratorNode.java | 1 |
请完成以下Java代码 | public T orElseGet(@NonNull final Supplier<? extends T> other)
{
return value != null ? value : other.get();
}
public T orElseThrow()
{
return orElseThrow(AdempiereException::new);
}
public T orElseThrow(@NonNull final AdMessageKey adMessageKey)
{
return orElseThrow(message -> new AdempiereException(adMe... | public ExplainedOptional<T> ifAbsent(@NonNull final Consumer<ITranslatableString> consumer)
{
if (!isPresent())
{
consumer.accept(explanation);
}
return this;
}
/**
* @see #resolve(Function, Function)
*/
public <R> Optional<R> mapIfAbsent(@NonNull final Function<ITranslatableString, R> mapper)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\ExplainedOptional.java | 1 |
请完成以下Java代码 | class ClassPathFileChangeListener implements FileChangeListener {
private final ApplicationEventPublisher eventPublisher;
private final ClassPathRestartStrategy restartStrategy;
private final @Nullable FileSystemWatcher fileSystemWatcherToStop;
/**
* Create a new {@link ClassPathFileChangeListener} instance.
... | this.fileSystemWatcherToStop.stop();
}
}
private boolean isRestartRequired(Set<ChangedFiles> changeSet) {
if (AgentReloader.isActive()) {
return false;
}
for (ChangedFiles changedFiles : changeSet) {
for (ChangedFile changedFile : changedFiles) {
if (this.restartStrategy.isRestartRequired(changedFi... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\classpath\ClassPathFileChangeListener.java | 1 |
请完成以下Java代码 | public Iterator<I_C_Order> retrieveAllModelsWithMissingCandidates(final QueryLimit limit_IGNORED)
{
return Collections.emptyIterator();
}
@Override
public void invalidateCandidatesFor(final Object model)
{
final I_C_Order order = create(model, I_C_Order.class);
// services
final IInvoiceCandidateHandlerB... | public void setOrderedData(final I_C_Invoice_Candidate ic)
{
throw new IllegalStateException("Not supported");
}
@Override
public void setDeliveredData(final I_C_Invoice_Candidate ic)
{
throw new IllegalStateException("Not supported");
}
@Override
public PriceAndTax calculatePriceAndTax(final I_C_Invoice_... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\invoicecandidate\C_Order_Handler.java | 1 |
请完成以下Java代码 | public class FormDto {
private String key;
private CamundaFormRef camundaFormRef;
private String contextPath;
public void setKey(String form) {
this.key = form;
}
public String getKey() {
return key;
}
public CamundaFormRef getCamundaFormRef() {
return camundaFormRef;
}
public void ... | }
public void setContextPath(String contextPath) {
this.contextPath = contextPath;
}
public String getContextPath() {
return contextPath;
}
public static FormDto fromFormData(FormData formData) {
FormDto dto = new FormDto();
if (formData != null) {
dto.key = formData.getFormKey();
... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\task\FormDto.java | 1 |
请完成以下Java代码 | public DhlClientConfig getByShipperId(@NonNull final ShipperId shipperId)
{
final int repoId = shipperId.getRepoId();
return cache.getOrLoad(repoId, () -> retrieveConfig(repoId));
}
private static DhlClientConfig retrieveConfig(final int shipperId)
{
final I_DHL_Shipper_Config configPO = Services.get(IQueryB... | return DhlClientConfig.builder()
.applicationID(configPO.getapplicationID())
.applicationToken(configPO.getApplicationToken())
.baseUrl(configPO.getdhl_api_url())
.accountNumber(configPO.getAccountNumber())
.username(configPO.getUserName())
.signature(configPO.getSignature())
.lengthUomId(Uo... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\model\DhlClientConfigRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Quantity allocate(@NonNull final PPOrderCandidateToAllocate ppOrderCandidateToAllocate)
{
if (!headerAggKey.equals(ppOrderCandidateToAllocate.getHeaderAggregationKey()))
{
return capacityPerProductionCycle.toZero();
}
if (isFullCapacityReached())
{
return capacityPerProductionCycle.toZero();
... | }
private void allocateQuantity(@NonNull final PPOrderCandidateToAllocate ppOrderCandidateToAllocate, @NonNull final Quantity quantityToAllocate)
{
allocatedQty = allocatedQty.add(quantityToAllocate);
final PPOrderCandidateId ppOrderCandidateId = PPOrderCandidateId.ofRepoId(ppOrderCandidateToAllocate.getPpOrder... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\service\produce\PPOrderAllocator.java | 2 |
请完成以下Java代码 | public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
// 获得 token
ServerHttpRequest request = exchange.getRequest();
HttpHeaders headers = request.getHeaders();
String token = headers.getFirst(config.getTokenHeaderName());
... | }
public String getUserIdHeaderName() {
return userIdHeaderName;
}
public Config setTokenHeaderName(String tokenHeaderName) {
this.tokenHeaderName = tokenHeaderName;
return this;
}
public Config setUserIdHeaderName(String userIdHeaderName) {... | repos\SpringBoot-Labs-master\labx-08-spring-cloud-gateway\labx-08-sc-gateway-demo05-custom-gateway-filter\src\main\java\cn\iocoder\springcloud\labx08\gatewaydemo\filter\AuthGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public class ExecutionTreeBfsIterator implements Iterator<ExecutionTreeNode> {
protected ExecutionTreeNode rootNode;
protected boolean reverseOrder;
protected LinkedList<ExecutionTreeNode> flattenedList;
protected Iterator<ExecutionTreeNode> flattenedListIterator;
public ExecutionTreeBfsIterator(... | flattenedListIterator = flattenedList.iterator();
}
@Override
public boolean hasNext() {
if (flattenedList == null) {
flattenTree();
}
return flattenedListIterator.hasNext();
}
@Override
public ExecutionTreeNode next() {
if (flattenedList == null) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\debug\ExecutionTreeBfsIterator.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 9000
spring:
security:
oauth2:
authorizationserver:
client:
public-client:
registration:
client-id: "public-client"
client-authentication-methods:
- "none"
authorization-grant-types:
- "... | scopes:
- "openid"
- "profile"
- "email"
require-authorization-consent: true
require-proof-key: true | repos\tutorials-master\spring-security-modules\spring-security-pkce-spa\pkce-spa-auth-server\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<UserRole> getUserRoles(@NonNull final UserId userId)
{
final List<UserAssignedRoleId> assignedRoleIds = assignedUserRoleCache.getOrLoad(userId, this::getAssignedRoleIds);
final Set<UserRoleId> roleIds = assignedRoleIds.stream()
.map(UserAssignedRoleId::getUserRoleId)
.collect(ImmutableSet.toIm... | .addOnlyActiveRecordsFilter()
.addEqualsFilter(I_C_User_Assigned_Role.COLUMNNAME_AD_User_ID, userId)
.create()
.stream()
.map(record -> {
final UserRoleId roleId = UserRoleId.ofRepoId(record.getC_User_Role_ID());
return UserAssignedRoleId.ofRepoId(roleId, record.getC_User_Assigned_Role_ID());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\user\role\repository\UserRoleRepository.java | 2 |
请完成以下Java代码 | public void setArticleUnit (final String ArticleUnit)
{
set_Value (COLUMNNAME_ArticleUnit, ArticleUnit);
}
@Override
public String getArticleUnit()
{
return get_ValueAsString(COLUMNNAME_ArticleUnit);
}
@Override
public void setM_Product_AlbertaPackagingUnit_ID (final int M_Product_AlbertaPackagingUnit_ID)... | @Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setQty (final @Nullable BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return b... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_M_Product_AlbertaPackagingUnit.java | 1 |
请完成以下Java代码 | public class ModelImporter extends JavaProcess {
/** Client Parameter */
protected int p_AD_Client_ID = 0;
/** Document Type Parameter */
protected int p_C_DocType_ID = 0;
/** Record ID */
protected int p_Record_ID = 0;
/** EXP_Format_ID */
protected int p_EXP_Format_ID = 0;
/** File Name **/
protected St... | if(p_FileName == null)
{
// Load XML file and parse it
String fileNameOr = org.compiere.util.Ini.getMetasfreshHome()
+ System.getProperty("file.separator")
+ "data"
+ System.getProperty("file.separator")
+ "ExportFile.xml";
p_FileName = fileNameOr;
}
log.info(sb.toString());
}
/**
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\process\rpl\imp\ModelImporter.java | 1 |
请完成以下Java代码 | public CaseInstanceMigrationDocumentBuilder addChangePlanItemDefinitionWithNewTargetIdsMappings(List<ChangePlanItemDefinitionWithNewTargetIdsMapping> mappings) {
this.changePlanItemDefinitionWithNewTargetIdsMappings.addAll(mappings);
return this;
}
@Override
public CaseInstanceMigrationDocu... | public CaseInstanceMigrationDocumentBuilder postUpgradeExpression(String postUpgradeExpression) {
this.postUpgradeExpression = postUpgradeExpression;
return this;
}
@Override
public CaseInstanceMigrationDocument build() {
CaseInstanceMigrationDocumentImpl caseInstanceMigrationDocume... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\CaseInstanceMigrationDocumentBuilderImpl.java | 1 |
请完成以下Java代码 | public I_PP_Product_BOM verifyProductBOMAndReturnIt(
@NonNull final ProductId ppOrderProductId,
@NonNull final Date ppOrderStartSchedule,
@NonNull final I_PP_Product_BOM ppOrderProductBOM)
{
// Product BOM should be completed
if (!DocStatus.ofCode(ppOrderProductBOM.getDocStatus()).isCompleted())
{
th... | * @return {@code true} if the respective ppOrder's matching product planning exists and has {@code PP_Product_Planning.IsPickDirectlyIfFeasible='Y'}
*/
public boolean pickIfFeasible(@NonNull final PPOrderData ppOrderData)
{
final IProductPlanningDAO productPlanningDAO = Services.get(IProductPlanningDAO.class);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\PPOrderUtil.java | 1 |
请完成以下Java代码 | protected JobEntity createJob(int[] minuteChunk, int maxRetries) {
HistoryCleanupContext context = createCleanupContext(minuteChunk, maxRetries);
return HISTORY_CLEANUP_JOB_DECLARATION.createJobInstance(context);
}
protected HistoryCleanupContext createCleanupContext(int[] minuteChunk, int maxRetries) {
... | null,
null,
null,
null,
null,
propertyChange);
}
protected void acquireExclusiveLock(CommandContext commandContext) {
PropertyManager propertyManager = commandContext.getPropertyManager();
//exclusive lock
propertyManager.acquireExclusiveLockForHistoryCleanupJob(... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\HistoryCleanupCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CmmnDeploymentBuilder category(String category) {
deployment.setCategory(category);
return this;
}
@Override
public CmmnDeploymentBuilder key(String key) {
deployment.setKey(key);
return this;
}
@Override
public CmmnDeploymentBuilder disableSchemaVali... | }
@Override
public CmmnDeployment deploy() {
return repositoryService.deploy(this);
}
public CmmnDeploymentEntity getDeployment() {
return deployment;
}
public boolean isCmmnXsdValidationEnabled() {
return isCmmn20XsdValidationEnabled;
}
public boolean isD... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\repository\CmmnDeploymentBuilderImpl.java | 2 |
请完成以下Java代码 | private static String buildSqlInsert()
{
final StringBuilder sqlColumns = new StringBuilder(
I_T_ES_FTS_Search_Result.COLUMNNAME_Search_UUID // 1
+ "," + I_T_ES_FTS_Search_Result.COLUMNNAME_Line // 2
+ "," + I_T_ES_FTS_Search_Result.COLUMNNAME_JSON // 3
);
final StringBuilder sqlValues = new Str... | final Object value = item.getKey().getValueBySelectionTableColumnName(keyColumnName);
sqlParams.add(value);
}
DB.setParameters(pstmt, sqlParams);
pstmt.addBatch();
}
pstmt.executeBatch();
}
catch (final SQLException ex)
{
throw new DBException(ex, SQL_INSERT);
}
finally
{
DB.c... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\query\FTSSearchResultRepository.java | 1 |
请完成以下Java代码 | public void setM_Label(org.compiere.model.I_M_Label M_Label)
{
set_ValueFromPO(COLUMNNAME_M_Label_ID, org.compiere.model.I_M_Label.class, M_Label);
}
/** Set Label List.
@param M_Label_ID Label List */
@Override
public void setM_Label_ID (int M_Label_ID)
{
if (M_Label_ID < 1)
set_Value (COLUMNNAME_M_... | }
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Product_ID, org.compiere.model.I_M_Product.class);
}
@Override
public void setM_Product(org.compiere.model.I_M_Product M_Product)
{
set_ValueFromPO(COLUMNNAME_M_Product_ID, org.compi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Certificate.java | 1 |
请完成以下Java代码 | public String getRepeat() {
return repeat;
}
public void setRepeat(String repeat) {
this.repeat = repeat;
}
public long getRepeatOffset() {
return repeatOffset;
}
public void setRepeatOffset(long repeatOffset) {
this.repeatOffset = repeatOffset;
}
@Override
public String getType() ... | return persistentState;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[repeat=" + repeat
+ ", id=" + id
+ ", revision=" + revision
+ ", duedate=" + duedate
+ ", repeatOffset=" + repeatOffset
+ ", lockOwner=" ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TimerEntity.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city; | }
public String getPostalCode() {
return postalCode;
}
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
@Override
public String toString() {
return "Address [id=" + id + ", name=" + name + ", city=" + city + ", postalCode=" + postalCode + ... | repos\tutorials-master\spring-web-modules\spring-rest-http-2\src\main\java\com\baeldung\putvspost\Address.java | 1 |
请完成以下Java代码 | private InputStreamReader newInputStreamReaderForSource(String encoding) throws UnsupportedEncodingException {
if (encoding != null) {
return new InputStreamReader(streamSource.getInputStream(), encoding);
} else {
return new InputStreamReader(streamSource.getInputStream());
... | if (name == null) {
name(resource);
}
setStreamSource(new ResourceStreamSource(resource));
return this;
}
public EventDefinitionParse sourceString(String string) {
if (name == null) {
name("string");
}
setStreamSource(new StringStreamSourc... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\parser\EventDefinitionParse.java | 1 |
请完成以下Java代码 | public static HUConsolidationJob getHUConsolidationJob(final @NonNull WFProcess wfProcess)
{
return wfProcess.getDocumentAs(HUConsolidationJob.class);
}
public static WFProcess mapJob(@NonNull final WFProcess wfProcess, @NonNull final UnaryOperator<HUConsolidationJob> mapper)
{
final HUConsolidationJob job = g... | }
public void printTargetLabel(
@NonNull final WFProcessId wfProcessId,
@NotNull final UserId callerId)
{
jobService.printTargetLabel(HUConsolidationJobId.ofWFProcessId(wfProcessId), callerId);
}
public WFProcess consolidate(@NonNull final JsonConsolidateRequest request, @NonNull final UserId callerId)
{... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\HUConsolidationApplication.java | 1 |
请完成以下Java代码 | public String getUsername() {
return this.environment.getUsername();
}
@Override
public String getPassword() {
return this.environment.getPassword();
}
@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 appendParameters(StringBuilder url, String parameters) {
url.append(";").append(parameters);
}
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\docker\compose\SqlServerJdbcDockerComposeConnectionDetailsFactory.java | 1 |
请完成以下Java代码 | public class FileReaderExample {
public static String readAllCharactersOneByOne(Reader reader) throws IOException {
StringBuilder content = new StringBuilder();
int nextChar;
while ((nextChar = reader.read()) != -1) {
content.append((char) nextChar);
}
return Str... | }
}
return null;
}
public static String readFileUsingTryWithResources(String path) {
try (FileReader fileReader = new FileReader(path)) {
return readAllCharactersOneByOne(fileReader);
} catch (IOException e) {
e.printStackTrace();
}
return... | repos\tutorials-master\core-java-modules\core-java-io-apis-3\src\main\java\com\baeldung\filereader\FileReaderExample.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Set<LocatorId> getDeviceLocatorIds(final String deviceName)
{
final String sysconfigPrefix = CFG_DEVICE_PREFIX + "." + deviceName + "." + DEVICE_PARAM_M_Locator_ID;
final Set<Integer> locatorIds = sysConfigBL.getValuesForPrefix(sysconfigPrefix, clientAndOrgId)
.values()
.stream()
.map(locatorId... | }
//
// Try by host's IP
final String deviceKeyWithIP = prefix + "." + clientHost.getIP() + "." + suffix;
{
final String value = sysConfigBL.getValue(deviceKeyWithIP, clientAndOrgId);
if (value != null)
{
return value;
}
}
//
// Try by any host (i.e. 0.0.0.0)
final String deviceKeyWith... | repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\config\SysConfigDeviceConfigPool.java | 2 |
请完成以下Java代码 | public class Documents_FactAcct_Creation_For_Posted extends JavaProcess
{
private final IPostingService postingService = Services.get(IPostingService.class);
@Param(parameterName = "DateStart")
private Date p_Date;
@Override
protected String doIt() throws Exception
{
// this process is posting documents that ... | // do nothing
return "All documents are posted";
}
final ILoggable loggable = Loggables.get();
for (final IDocument document : documentsPostedNoFacts)
{
final ClientId clientId = ClientId.ofRepoId(document.getAD_Client_ID());
final TableRecordReference documentRef = document.toTableRecordReference();... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\Documents_FactAcct_Creation_For_Posted.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setProtocols(final String protocols) {
this.protocols = protocols.split("[ :,]");
}
}
/**
* Gets the port the server should listen on. Defaults to {@code 9090}. If set to {@code 0} a random available port
* will be selected and used.
*
* @return The server ... | /**
* Sets the maximum metadata size allowed to be received by the server. If not set ({@code null}) then it will
* default to {@link GrpcUtil#DEFAULT_MAX_HEADER_LIST_SIZE gRPC's default}. If set to {@code -1} then it will use
* the highest possible limit (not recommended).
*
* @param maxInboun... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\config\GrpcServerProperties.java | 2 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final Timestamp startTime = SystemTime.asTimestamp();
addLog("Creating/updating C_Subscription_Progress records");
final int countProcessedTerms = createOrUpdateSubscriptionProgress();
addLog("Creating/updating shipment schedules");
final ITrxManager trxManager = ... | X_C_Flatrate_Term.CONTRACTSTATUS_EndingContract)
.addInArrayFilter(I_C_Flatrate_Term.COLUMNNAME_DocStatus, IDocument.STATUS_Closed, IDocument.STATUS_Completed)
.orderBy()
.addColumn(I_C_Flatrate_Term.COLUMNNAME_StartDate).addColumn(I_C_Flatrate_Term.COLUMNNAME_C_Flatrate_Term_ID).endOrderBy()
.create()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\process\C_SubscriptionProgress_Evaluate.java | 1 |
请完成以下Java代码 | public Expression getFormKeyExpression() {
return formKeyExpression;
}
public void setFormKeyExpression(Expression formKeyExpression) {
this.formKeyExpression = formKeyExpression;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.ke... | }
public void setTaskListeners(Map<String, List<TaskListener>> taskListeners) {
this.taskListeners = taskListeners;
}
public List<TaskListener> getTaskListener(String eventName) {
return taskListeners.get(eventName);
}
public void addTaskListener(String eventName, TaskListener tas... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\task\TaskDefinition.java | 1 |
请完成以下Spring Boot application配置 | server.port=8081
keycloak.enabled=true
spring.security.oauth2.client.registration.keycloak.client-id=login-app
spring.security.oauth2.client.registration.keycloak.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.keycloak.scope=openid
spring.security.oauth2.client.provider.keycloak... | auth2.client.provider.keycloak.user-name-attribute=preferred_username
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8080/realms/SpringBootKeycloak | repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-2\src\main\resources\application-disabling-keycloak.properties | 2 |
请完成以下Java代码 | void build()
{
_ranks = new int[_units.size()];
_numOnes = 0;
for (int i = 0; i < _units.size(); ++i)
{
_ranks[i] = _numOnes;
_numOnes += popCount(_units.get(i));
}
}
/**
* 清空
*/
void clear()
{
_units.clear();
... | /**
* 储存空间
*/
private AutoIntPool _units = new AutoIntPool();
/**
* 是每个元素的1的个数的累加
*/
private int[] _ranks;
/**
* 1的数量
*/
private int _numOnes;
/**
* 大小
*/
private int _size;
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\BitVector.java | 1 |
请完成以下Java代码 | public String getNewAssigneeId() {
return newAssigneeId;
}
public void setNewAssigneeId(String newAssigneeId) {
this.newAssigneeId = newAssigneeId;
}
public Map<String, PlanItemInstanceEntity> getContinueParentPlanItemInstanceMap() {
return continueParentPlanItemInstanceMap;
... | public List<PlanItemMoveEntry> getMoveToPlanItems() {
return new ArrayList<>(moveToPlanItemMap.values());
}
public static class PlanItemMoveEntry {
protected PlanItem originalPlanItem;
protected PlanItem newPlanItem;
public PlanItemMoveEntry(PlanItem originalPlanItem, PlanItem... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\MovePlanItemInstanceEntityContainer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DocumentFieldDefaultFilterDescriptor
{
boolean defaultFilter;
int defaultFilterSeqNo;
FilterOperator operator;
boolean showFilterIncrementButtons;
Object autoFilterInitialValue;
boolean showFilterInline;
@Nullable AdValRuleId adValRuleId;
boolean facetFilter;
int facetFilterSeqNo;
OptionalInt ma... | this.facetFilter = false;
this.facetFilterSeqNo = Integer.MAX_VALUE;
this.maxFacetsToFetch = OptionalInt.empty();
}
}
public enum FilterOperator implements ReferenceListAwareEnum
{
EQUALS_OR_ILIKE(X_AD_Column.FILTEROPERATOR_EqualsOrLike),
BETWEEN(X_AD_Column.FILTEROPERATOR_Between),
IS_NOT_NULL(X_AD_C... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentFieldDefaultFilterDescriptor.java | 2 |
请完成以下Java代码 | public void setM_Promotion_ID (int M_Promotion_ID)
{
if (M_Promotion_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Promotion_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Promotion_ID, Integer.valueOf(M_Promotion_ID));
}
/** Get Promotion.
@return Promotion */
public int getM_Promotion_ID ()
{
Intege... | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Relative Priority.
@param PromotionPriority
Which promotion should be apply to a product
*/
public void setPromotionPriori... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Promotion.java | 1 |
请完成以下Java代码 | public <T> T getDynAttribute(final String attributeName)
{
if (recordId2dynAttributes == null)
{
return null;
}
final int recordId = getGridTab().getRecord_ID();
final Map<String, Object> dynAttributes = recordId2dynAttributes.get(recordId);
// Cleanup old entries to avoid weird cases
// e.g. dynatt... | if (dynAttribute_recordId != null && dynAttribute_recordId == recordIdToKeep)
{
continue;
}
recordIds.remove();
}
}
public final IModelInternalAccessor getModelInternalAccessor()
{
return modelInternalAccessorSupplier.get();
}
public final boolean isOldValues()
{
return useOldValues;
}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\model\GridTabWrapper.java | 1 |
请完成以下Java代码 | public void setProcessed (boolean Processed)
{
set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Verarbeitet.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof ... | /** Set Quantity Invoiced.
@param QtyInvoiced
Invoiced Quantity
*/
public void setQtyInvoiced (BigDecimal QtyInvoiced)
{
set_ValueNoCheck (COLUMNNAME_QtyInvoiced, QtyInvoiced);
}
/** Get Quantity Invoiced.
@return Invoiced Quantity
*/
public BigDecimal getQtyInvoiced ()
{
BigDecimal bd = (BigDe... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_C_InvoiceLine_Overview.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
spring.datasource.password=12345678
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.database | -platform=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto=create | repos\SpringBoot-Learning-master\2.x\chapter3-10\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public void setIsDueFixed (final boolean IsDueFixed)
{
set_Value (COLUMNNAME_IsDueFixed, IsDueFixed);
}
@Override
public boolean isDueFixed()
{
return get_ValueAsBoolean(COLUMNNAME_IsDueFixed);
}
@Override
public void setIsNextBusinessDay (final boolean IsNextBusinessDay)
{
set_Value (COLUMNNAME_IsNex... | /** Wednesday = 3 */
public static final String NETDAY_Wednesday = "3";
/** Thursday = 4 */
public static final String NETDAY_Thursday = "4";
/** Friday = 5 */
public static final String NETDAY_Friday = "5";
/** Saturday = 6 */
public static final String NETDAY_Saturday = "6";
@Override
public void setNetDay (... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentTerm.java | 1 |
请完成以下Java代码 | private String getLookupColumnName(final Method method)
{
if (method == null)
{
return null;
}
final ColumnInfo info = method.getAnnotation(ColumnInfo.class);
if (info == null)
{
return null;
}
final String lookupColumnName = info.lookupColumnName();
if (Check.isEmpty(lookupColumnNa... | {
return DisplayType.Date;
}
else
{
return -1;
}
}
private int getDisplayType(final Method method)
{
if (method == null)
{
return -1;
}
final ColumnInfo info = method.getAnnotation(ColumnInfo.class);
if (info == null)
{
return -1;
}
final int displayType = info... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\swing\table\TableModelMetaInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AppDefinitionQuery orderByAppDefinitionId() {
return orderBy(AppDefinitionQueryProperty.APP_DEFINITION_ID);
}
@Override
public AppDefinitionQuery orderByAppDefinitionVersion() {
return orderBy(AppDefinitionQueryProperty.APP_DEFINITION_VERSION);
}
@Override
public AppDefi... | return versionLt;
}
public Integer getVersionLte() {
return versionLte;
}
public boolean isLatest() {
return latest;
}
public String getCategory() {
return category;
}
public String getCategoryLike() {
return categoryLike;
}
public String getR... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\repository\AppDefinitionQueryImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String login(HttpServletRequest request, Map<String, Object> map) {
_logger.info("登录方法start.........");
// 登录失败从request中获取shiro处理的异常信息。shiroLoginFailure:就是shiro异常类的全类名.
Object exception = request.getAttribute("shiroLoginFailure");
String msg;
if (exception != null) {
... | // 做一些其他事情,比如把项目的数量放到session中
if (ShiroKit.hasRole("admin") && session.getAttribute("projectNum") == null) {
session.setAttribute("projectNum", 2);
}
if (session.getAttribute("picsUrlPrefix") == null) {
// 图片访问URL前缀
session.setAttribute("picsUrlPrefix", myProp... | repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\controller\LoginController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected Customer prepare(EntitiesImportCtx ctx, Customer customer, Customer old, EntityExportData<Customer> exportData, IdProvider idProvider) {
if (customer.isPublic()) {
Customer publicCustomer = customerService.findOrCreatePublicCustomer(ctx.getTenantId());
publicCustomer.setExterna... | return customerDao.save(ctx.getTenantId(), customer);
}
}
@Override
protected Customer deepCopy(Customer customer) {
return new Customer(customer);
}
@Override
public EntityType getEntityType() {
return EntityType.CUSTOMER;
}
} | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\CustomerImportService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Object getCredentials() {
return getSaml2Response();
}
/**
* Always returns null.
* @return null
*/
@Override
public Object getPrincipal() {
return null;
}
/**
* Get the resolved {@link RelyingPartyRegistration} associated with the request
* @return the resolved {@link RelyingPartyRegistrat... | @Override
public boolean isAuthenticated() {
return false;
}
/**
* The state of this object cannot be changed. Will always throw an exception
* @param authenticated ignored
*/
@Override
public void setAuthenticated(boolean authenticated) {
throw new IllegalArgumentException();
}
/**
* Returns the a... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\Saml2AuthenticationToken.java | 2 |
请完成以下Java代码 | public void toStop(){
// 1、stop schedule
scheduleThreadToStop = true;
try {
TimeUnit.SECONDS.sleep(1); // wait
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
if (scheduleThread.getState() != Thread.State.TERMINATED){
... | }
// stop ring (wait job-in-memory stop)
ringThreadToStop = true;
try {
TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
if (ringThread.getState() != Thread.State.TERMINATED){
// interrup... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\thread\JobScheduleHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MTLinkRequest
{
/** What to do if the model is already linked to a different material tracking */
public enum IfModelAlreadyLinked
{
/** If the model is already linked an exception is thrown. */
FAIL,
/**
* If the model is already linked, it unassigns the model from old material tracking.
*... | @Default
IParams params = IParams.NULL;
@NonNull
I_M_Material_Tracking materialTrackingRecord;
/** Can be set if this request is about linking a PP_Order. Note that unfortunately there is no UOM-field; The UOM is implicitly the product's stocking-UOM. */
BigDecimal qtyIssued;
/**
* Convenience method that us... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\MTLinkRequest.java | 2 |
请完成以下Java代码 | public Collection<DocumentFilterDescriptor> getAll()
{
return providers
.stream()
.map(DocumentFilterDescriptorsProvider::getAll)
.flatMap(Collection::stream)
.sorted(Comparator.comparing(DocumentFilterDescriptor::getSortNo))
.collect(GuavaCollectors.toImmutableMapByKey(DocumentFilterDescriptor::... | @Override
public DocumentFilter unwrap(@NonNull final JSONDocumentFilter jsonFilter)
{
return getProviderByFilterId(jsonFilter.getFilterId())
.map(provider -> provider.unwrap(jsonFilter))
.orElseGet(() -> JSONDocumentFilter.unwrapAsGenericFilter(jsonFilter));
}
private Optional<DocumentFilterDescriptorsP... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\CompositeDocumentFilterDescriptorsProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JavaReflectionsScannerService implements SampleAnnotationScanner {
@Override
public List<String> scanAnnotatedMethods() {
try {
Class<?> clazz = ClassLoader.getSystemClassLoader()
.loadClass("com.baeldung.annotation.scanner.SampleAnnotatedClass");
Met... | List<String> annotatedClasses = new ArrayList<>();
Annotation[] classAnnotations = clazz.getAnnotations();
for (Annotation annotation : classAnnotations) {
if (annotation.annotationType()
.equals(SampleAnnotation.class)) {
annotatedClasses.... | repos\tutorials-master\spring-boot-modules\spring-boot-libraries-2\src\main\java\com\baeldung\annotation\scanner\javareflectionlib\JavaReflectionsScannerService.java | 2 |
请完成以下Java代码 | public Printable getPrintable()
{
return printable;
}
public void setPrintable(final Printable printable)
{
this.printable = printable;
}
public int getNumPages()
{
return numPages;
}
public void setNumPages(final int numPages)
{
this.numPages = numPages; | }
@Override
public String toString()
{
return "PrintPackageRequest ["
+ "printPackage=" + printPackage
+ ", printPackageInfo=" + printPackageInfo
+ ", attributes=" + attributes
+ ", printService=" + printService
+ ", printJobName=" + printJobName
+ ", printable=" + printable
+ "]";
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\engine\PrintPackageRequest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class HeadersExchangeDemoConfiguration {
// 创建 Queue
@Bean
public Queue demo04Queue() {
return new Queue(Demo04Message.QUEUE, // Queue 名字
true, // durable: 是否持久化
false, // exclusive: 是否排它
false); // autoDelete... | false); // exclusive: 是否排它
}
// 创建 Binding
// Exchange:Demo04Message.EXCHANGE
// Queue:Demo04Message.QUEUE
// Headers: Demo04Message.HEADER_KEY + Demo04Message.HEADER_VALUE
@Bean
public Binding demo4Binding() {
return BindingBuilder.bind(demo04Queue(... | repos\SpringBoot-Labs-master\lab-04-rabbitmq\lab-04-rabbitmq-demo\src\main\java\cn\iocoder\springboot\lab04\rabbitmqdemo\config\RabbitConfig.java | 2 |
请完成以下Java代码 | public void configurePolymorphicTypeValidator(BasicPolymorphicTypeValidator.Builder builder) {
}
@Override
public void setupModule(SetupContext context) {
context.setMixIn(Bytes.class, BytesMixin.class);
context.setMixIn(AttestationConveyancePreference.class, AttestationConveyancePreferenceMixin.class);
conte... | context.setMixIn(COSEAlgorithmIdentifier.class, COSEAlgorithmIdentifierMixin.class);
context.setMixIn(CredentialPropertiesOutput.class, CredentialPropertiesOutputMixin.class);
context.setMixIn(CredProtectAuthenticationExtensionsClientInput.class,
CredProtectAuthenticationExtensionsClientInputMixin.class);
con... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\jackson\WebauthnJacksonModule.java | 1 |
请完成以下Java代码 | public LocalDateTime increment(final LocalDateTime date)
{
if (date.getDayOfWeek().getValue() >= dayOfWeek.getValue())
{
return date.with(TemporalAdjusters.previousOrSame(dayOfWeek)).plusWeeks(weeksToAdd);
}
else
{
return date.with(TemporalAdjusters.next(dayOfWeek));
}
}
@Override
public LocalDat... | if (weeksToAdd > 1)
{
throw new UnsupportedOperationException("Decrementing using a step greater than one is not supported");
}
if (date.getDayOfWeek().getValue() <= dayOfWeek.getValue())
{
return date.with(TemporalAdjusters.nextOrSame(dayOfWeek)).minusWeeks(weeksToAdd);
}
else
{
return date.w... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\generator\WeekDayCalendarIncrementor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class S3ClientConfiguration {
@Bean
public S3AsyncClient s3client(S3ClientConfigurarionProperties s3props, AwsCredentialsProvider credentialsProvider) {
SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder()
.writeTimeout(Duration.ZERO)
.maxConcurrency(64)
... | @Bean
public AwsCredentialsProvider awsCredentialsProvider(S3ClientConfigurarionProperties s3props) {
if (StringUtils.isBlank(s3props.getAccessKeyId())) {
// Return default provider
return DefaultCredentialsProvider.create();
}
else {
// Return custom cr... | repos\tutorials-master\aws-modules\aws-reactive\src\main\java\com\baeldung\aws\reactive\s3\S3ClientConfiguration.java | 2 |
请完成以下Java代码 | public class MigratingTimerJobInstance extends MigratingJobInstance {
protected ScopeImpl timerTriggerTargetScope;
protected TimerDeclarationImpl targetJobDeclaration;
protected boolean updateEvent;
public MigratingTimerJobInstance(JobEntity jobEntity) {
super(jobEntity);
}
public MigratingTimerJobIn... | if (TimerStartEventSubprocessJobHandler.TYPE.equals(jobEntity.getJobHandlerType())) {
// for event subprocess start jobs, the job handler configuration references the subprocess while
// the job references the start event
return targetScope.getFlowScope();
}
else {
return targetScope;
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingTimerJobInstance.java | 1 |
请完成以下Java代码 | /* package */final class InvocationContext implements IInvocationContext
{
private final Method method;
private final Object[] methodArgs;
private final Object target;
public InvocationContext(final Method method, final Object[] methodArgs, final Object target)
{
super();
this.method = method;
this.methodAr... | }
}
@Override
public Object call() throws Exception
{
try
{
final Object result = proceed();
return result == null ? NullResult : result;
}
catch (Exception e)
{
throw e;
}
catch (Throwable e)
{
Throwables.propagateIfPossible(e);
throw Throwables.propagate(e);
}
}
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\proxy\impl\InvocationContext.java | 1 |
请完成以下Java代码 | public void setStatusLine(final String text)
{
if (text == null)
{
setStatusLine("", false);
}
else
{
setStatusLine(text, false);
}
} // setStatusLine
/**
* Set Status Line
*
* @param text text
* @param error error
*/
@Override
public void setStatusLine(final String text, final boolean... | public void setStatusDB(final int no)
{
setStatusDB(String.valueOf(no), null);
} // setStatusDB
/**
* Set Info Line
*
* @param text text
*/
@Override
public void setInfo(final String text)
{
infoLine.setVisible(true);
infoLine.setText(text);
} // setInfo
/**
* Show {@link RecordInfo} dialog
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\StatusBar.java | 1 |
请完成以下Java代码 | public Element setLang(String lang)
{
addAttribute("lang",lang);
addAttribute("xml:lang",lang);
return this;
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
... | {
addElementToRegistry(element);
return(this);
}
/**
Adds an Element to the Element.
@param element adds and Element to the Element.
*/
public font 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\font.java | 1 |
请完成以下Java代码 | public Builder singleRowDetailLayout(final boolean singleRowDetailLayout)
{
this.singleRowDetailLayout = singleRowDetailLayout;
return this;
}
/* package */ boolean isEmpty()
{
return (gridLayout == null || !gridLayout.hasElements())
&& (singleRowLayout == null || singleRowLayout.isEmpty());
}
... | }
public Builder description(@NonNull final ITranslatableString description)
{
this.description = description;
return this;
}
public Builder addSubTabLayout(@NonNull final DocumentLayoutDetailDescriptor subTabLayout)
{
this.subTabLayouts.add(subTabLayout);
return this;
}
public Builder addA... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutDetailDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AppDeploymentResourceResponse {
private String id;
private String url;
private String contentUrl;
private String mediaType;
private String type;
public AppDeploymentResourceResponse(String resourceId, String url, String contentUrl, String mediaType, String type) {
setI... | }
public void setMediaType(String mimeType) {
this.mediaType = mimeType;
}
@ApiModelProperty(example = "text/xml", value = "Contains the media-type the resource has. This is resolved using a (pluggable) MediaTypeResolver and contains, by default, a limited number of mime-type mappings.")
publi... | repos\flowable-engine-main\modules\flowable-app-engine-rest\src\main\java\org\flowable\app\rest\service\api\repository\AppDeploymentResourceResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getClientIp() {
return clientIp;
}
/**
* @param clientIp The clientIp to set.
*/
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
public NameValuePair[] getParameters() {
return parameters;
}
public void setParameters(N... | public void setConnectionTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
}
public int getTimeout() {
return timeout;
}
public void setTimeout(int timeout) {
this.timeout = timeout;
}
/**
* @return Returns the charset.
*/
publi... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\httpClient\HttpRequest.java | 2 |
请完成以下Java代码 | public class User {
private String firstName;
private String lastName;
private String email;
private String username;
private Long id;
public String name() {
return firstName + " " + lastName;
}
public User(String firstName, String lastName, String email, String username, Long id) {
this.firstName = first... | }
public Builder firstName(String firstName) {
this.firstName = firstName;
return this;
}
public Builder lastName(String lastName) {
this.lastName = lastName;
return this;
}
public Builder email(String email) {
this.email = email;
return this;
}
public Builder username(String usernam... | repos\tutorials-master\patterns-modules\design-patterns-behavioral-2\src\main\java\com\baeldung\fluentinterface\User.java | 1 |
请完成以下Java代码 | public static EventRegistryEngineConfiguration getEventRegistryConfiguration(CommandContext commandContext) {
if (commandContext != null) {
return (EventRegistryEngineConfiguration) commandContext.getEngineConfigurations().get(EngineConfigurationConstants.KEY_EVENT_REGISTRY_CONFIG);
}
... | return getEventRegistryConfiguration(commandContext).getEventDefinitionEntityManager();
}
public static ChannelDefinitionEntityManager getChannelDefinitionEntityManager() {
return getChannelDefinitionEntityManager(getCommandContext());
}
public static ChannelDefinitionEntityManager get... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\util\CommandContextUtil.java | 1 |
请完成以下Java代码 | public String getProfileInfo ()
{
return (String)get_Value(COLUMNNAME_ProfileInfo);
}
/** Set Issue System.
@param R_IssueSystem_ID
System creating the issue
*/
public void setR_IssueSystem_ID (int R_IssueSystem_ID)
{
if (R_IssueSystem_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_IssueSystem_ID, null);... | /** Get Statistics.
@return Information to help profiling the system for solving support issues
*/
public String getStatisticsInfo ()
{
return (String)get_Value(COLUMNNAME_StatisticsInfo);
}
/** SystemStatus AD_Reference_ID=374 */
public static final int SYSTEMSTATUS_AD_Reference_ID=374;
/** Evaluation =... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueSystem.java | 1 |
请完成以下Java代码 | boolean isEndOfLine() {
return this.character == -1 || (!this.escaped && this.character == '\n');
}
boolean isListDelimiter() {
return !this.escaped && this.character == ',';
}
boolean isPropertyDelimiter() {
return !this.escaped && (this.character == '=' || this.character == ':');
}
char getCha... | void put(String key, OriginTrackedValue value) {
if (!key.isEmpty()) {
this.values.put(key, value);
}
}
boolean isEmpty() {
return this.values.isEmpty();
}
Map<String, OriginTrackedValue> asMap() {
return this.values;
}
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\OriginTrackedPropertiesLoader.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getOverrideDefinitionTenantId() {
return overrideDefinitionTenantId;
}
public void setOverrideDefinitionTenantId(String overrideDefinitionTenantId) {
this.overrideDefinitionTenantId = overrideDefinitionTenantId;
}
@JsonTypeInfo(use = Id.CLASS, defaultImpl = RestVariable.c... | public void setStartFormVariables(List<RestVariable> startFormVariables) {
this.startFormVariables = startFormVariables;
}
public String getOutcome() {
return outcome;
}
public void setOutcome(String outcome) {
this.outcome = outcome;
}
@JsonIgnore
public boolean i... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\CaseInstanceCreateRequest.java | 2 |
请完成以下Java代码 | private static void updateRecord(final I_C_Order_Cost_Detail record, final OrderCostDetail from)
{
record.setIsActive(true);
updateRecord(record, from.getOrderLineInfo());
record.setCostAmount(from.getCostAmount().toBigDecimal());
record.setQtyReceived(from.getInoutQty().toBigDecimal());
record.setCostAmou... | }
public void changeByOrderLineId(
@NonNull final OrderLineId orderLineId,
@NonNull Consumer<OrderCost> consumer)
{
final List<OrderCost> orderCosts = getByOrderLineIds(ImmutableSet.of(orderLineId));
orderCosts.forEach(orderCost -> {
consumer.accept(orderCost);
saveUsingCache(orderCost);
});
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\OrderCostRepositorySession.java | 1 |
请完成以下Java代码 | public String getSourceProcessDefinitionId() {
return sourceProcessDefinitionId;
}
public void setSourceProcessDefinitionId(String sourceProcessDefinitionId) {
this.sourceProcessDefinitionId = sourceProcessDefinitionId;
}
public String getTargetProcessDefinitionId() {
return targetProcessDefinitio... | public List<MigrationInstruction> getInstructions() {
return instructions;
}
public void setInstructions(List<MigrationInstruction> instructions) {
this.instructions = instructions;
}
public String toString() {
return "MigrationPlan[" +
"sourceProcessDefinitionId='" + sourceProcessDefinition... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\MigrationPlanImpl.java | 1 |
请完成以下Java代码 | public void keyPressed(KeyEvent e)
{
// sequence: pressed - typed(no KeyCode) - released
char input = e.getKeyChar();
int code = e.getKeyCode();
e.consume(); // does not work on JTextField
if (code == KeyEvent.VK_DELETE)
{
input = 'A';
}
else if (code == KeyEvent.VK_BACK_SPACE)
{
input = '... | dispose();
return;
}
handleInput(input);
}
/**
* KeyTyped Listener (nop)
* @param e event
*/
@Override
public void keyTyped(KeyEvent e) {}
/**
* KeyReleased Listener (nop)
* @param e event
*/
@Override
public void keyReleased(KeyEvent e) {}
} // Calculator | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\Calculator.java | 1 |
请完成以下Java代码 | public final class CurrentDirectoryFetcher {
public static void main(String[] args) {
System.out.printf("Current Directory Using Java System API: %s%n", currentDirectoryUsingSystemProperties());
System.out.printf("Current Directory Using Java IO File API: %s%n", currentDirectoryUsingFile());
... | return Paths.get("")
.toAbsolutePath()
.toString();
}
public static String currentDirectoryUsingFileSystems() {
return FileSystems.getDefault()
.getPath("")
.toAbsolutePath()
.toString();
}
public static String currentDirectoryUsingFi... | repos\tutorials-master\core-java-modules\core-java-os\src\main\java\com\baeldung\core\pwd\CurrentDirectoryFetcher.java | 1 |
请完成以下Java代码 | public class Message {
private Long id;
@ApiModelProperty(value = "消息体")
private String text;
@ApiModelProperty(value = "消息总结")
private String summary;
private Date createDate;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Date getCreateDate() {
return c... | }
public void setSummary(String summary) {
this.summary = summary;
}
@Override
public String toString() {
return "Message{" +
"id=" + id +
", text='" + text + '\'' +
", summary='" + summary + '\'' +
", createDate=" + createDate +
'}';
}
} | repos\spring-boot-leaning-master\2.x_42_courses\第 2-9 课:Spring Boot 中使用 Swagger2 构建 RESTful APIs\spring-boot-swagger\src\main\java\com\neo\model\Message.java | 1 |
请完成以下Java代码 | public static String byteArrayToHexString(byte[] b) {
StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++){
resultSb.append(byteToHexString(b[i]));
}
return resultSb.toString();
}
private static String byteToHexString(byte b) {
int n = b;
if (n < 0) {
n += 256;
}
int d... | public static String md5Encode(String origin, String charsetname) {
String resultString = null;
try {
resultString = new String(origin);
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname)) {
resultString = byteArrayToHexString(md.digest(resultString.g... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\Md5Util.java | 1 |
请完成以下Java代码 | public BPartnerLocationId retrieveOrgBPartnerLocationId(@NonNull final OrgId orgId)
{
final IBPartnerOrgBL bpartnerOrgBL = Services.get(IBPartnerOrgBL.class);
return bpartnerOrgBL.retrieveOrgBPLocationId(orgId);
}
/**
* @param productPlanningData may be {@code null} as of gh #1635
* @param networkLine ... | final int transferTime;
if (transferTimeFromNetworkLine > 0)
{
transferTime = transferTimeFromNetworkLine;
}
else if (productPlanningData != null)
{
transferTime = productPlanningData.getTransferTimeDays();
Check.assume(transferTime >= 0, "transferTime >= 0");
}
else
{
transferTime = 0;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\ddorder\DDOrderUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public FilterRegistrationBean<OAuth2ClientContextFilter> oauth2ClientFilterRegistration(OAuth2ClientContextFilter filter) {
FilterRegistrationBean<OAuth2ClientContextFilter> registration = new FilterRegistrationBean<>();
registration.setFilter(filter);
registration.setOrder(Ordered.HIGHEST_PRECE... | OAuth2ClientAuthenticationProcessingFilter oauth2ClientFilter = new OAuth2ClientAuthenticationProcessingFilter("/login/github");
OAuth2RestTemplate restTemplate = restTemplate();
oauth2ClientFilter.setRestTemplate(restTemplate);
UserInfoTokenServices tokenServices = new UserInfoTokenServices(git... | repos\tutorials-master\spring-security-modules\spring-security-oauth2\src\main\java\com\baeldung\oauth2resttemplate\SecurityConfig.java | 2 |
请完成以下Java代码 | public col setVAlign(String valign)
{
addAttribute("valign",valign);
return(this);
}
/**
Sets the char="" attribute.
@param character the character to use for alignment.
*/
public col setChar(String character)
{
addAttribute("char",characte... | Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
*/
public col addElement(String hashcode,Element element)
{
addElementToRegistry(hashcode,element);
return(this);
}
/**
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\col.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType, String processDefinitionKey) {
Map<String, String> params = new HashMap<>(2);
params.put("handlerType", jobHandlerType);
params.put("processDefinitionKey", processDefinitionKey);
return get... | @Override
public void bulkUpdateJobLockWithoutRevisionCheck(List<TimerJobEntity> timerJobEntities, String lockOwner, Date lockExpirationTime) {
Map<String, Object> params = new HashMap<>(3);
params.put("lockOwner", lockOwner);
params.put("lockExpirationTime", lockExpirationTime);
bu... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisTimerJobDataManager.java | 2 |
请完成以下Java代码 | public boolean isEmpty()
{
return rates.isEmpty();
}
public ImmutableSet<UomId> getCatchUomIds()
{
if (rates.isEmpty())
{
return ImmutableSet.of();
}
return rates.values()
.stream()
.filter(UOMConversionRate::isCatchUOMForProduct)
.map(UOMConversionRate::getToUomId)
.collect(Immutab... | return FromAndToUomIds.builder()
.fromUomId(conversion.getFromUomId())
.toUomId(conversion.getToUomId())
.build();
}
@Value
@Builder
public static class FromAndToUomIds
{
@NonNull
UomId fromUomId;
@NonNull
UomId toUomId;
public FromAndToUomIds invert()
{
return builder().fromUomId(toUo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\UOMConversionsMap.java | 1 |
请完成以下Java代码 | public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public Process getProcess() {
return processRefAttribute.getReferenceTargetElement(this);
}
public void setProcess(Process process) {
processRefAttribu... | public Collection<Interface> getInterfaces() {
return interfaceRefCollection.getReferenceTargetElements(this);
}
public Collection<EndPoint> getEndPoints() {
return endPointRefCollection.getReferenceTargetElements(this);
}
public ParticipantMultiplicity getParticipantMultiplicity() {
return partic... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ParticipantImpl.java | 1 |
请完成以下Java代码 | public String getUserAgent ()
{
return (String)get_Value(COLUMNNAME_UserAgent);
}
public I_W_CounterCount getW_CounterCount() throws RuntimeException
{
return (I_W_CounterCount)MTable.get(getCtx(), I_W_CounterCount.Table_Name)
.getPO(getW_CounterCount_ID(), get_TrxName()); }
/** Set Counter Count.
@... | /** Set Web Counter.
@param W_Counter_ID
Individual Count hit
*/
public void setW_Counter_ID (int W_Counter_ID)
{
if (W_Counter_ID < 1)
set_ValueNoCheck (COLUMNNAME_W_Counter_ID, null);
else
set_ValueNoCheck (COLUMNNAME_W_Counter_ID, Integer.valueOf(W_Counter_ID));
}
/** Get Web Counter.
@ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Counter.java | 1 |
请完成以下Java代码 | public IMigrationExecutor newMigrationExecutor(final IMigrationExecutorContext migrationCtx, final int migrationId)
{
return new MigrationExecutor(migrationCtx, migrationId);
}
@Override
public void registerMigrationStepExecutor(final String stepType, final Class<? extends IMigrationStepExecutor> executorClass)
... | if (executorClass == null)
{
throw new AdempiereException("Step type not supported: " + stepType);
}
try
{
return executorClass
.getConstructor(IMigrationExecutorContext.class, I_AD_MigrationStep.class)
.newInstance(migrationCtx, step);
}
catch (Exception e)
{
throw new AdempiereExcept... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutorProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static void addEnclosingClassesForClass(Set<Class<?>> enclosingClasses, @Nullable Class<?> clazz) {
if (clazz == null) {
return;
}
Class<?> enclosing = clazz.getEnclosingClass();
if (enclosing != null) {
enclosingClasses.add(enclosing);
addEnclosingClassesForClass(enclosingClasses, enclosing);
... | if (!ResolvableType.NONE.equals(superType)) {
addGenericsForClass(genericsToAdd, superType);
supertypesToAdd.add(superType.toClass());
addSuperTypesForClass(superType, supertypesToAdd, genericsToAdd);
}
}
private static boolean shouldRegisterClass(Class<?> clazz) {
Set<String> conditionClasses = beansCo... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\GatewayMvcRuntimeHintsProcessor.java | 2 |
请完成以下Java代码 | public class LanguageBL implements ILanguageBL
{
@Override
public ADLanguageList getAvailableLanguages()
{
return Services.get(ILanguageDAO.class).retrieveAvailableLanguages();
}
@Override
public String getOrgAD_Language(final Properties ctx) throws OrgHasNoBPartnerLinkException
{
final int orgId = Env.getA... | public Language getOrgLanguage(final Properties ctx, final int AD_Org_ID) throws OrgHasNoBPartnerLinkException
{
final String adLanguage = getOrgAD_Language(ctx, AD_Org_ID);
if (!Check.isEmpty(adLanguage, true))
{
return Language.getLanguage(adLanguage);
}
return null;
}
public String getClientAD_Langu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\impl\LanguageBL.java | 1 |
请完成以下Java代码 | public PRTCPrintJobInstructionsConfirmType createPRTADPrintPackageResponse(final PrintJobInstructionsConfirm response, final int sessionId)
{
final PRTCPrintJobInstructionsConfirmType convertedResponse = new PRTCPrintJobInstructionsConfirmType();
convertedResponse.setADSessionIDAttr(BigInteger.valueOf(sessionId));... | break;
default:
throw new IllegalArgumentException("Invalid original response status: " + response.getStatus());
}
// ADempiere Specific Data
convertedResponse.setReplicationEventAttr(ReplicationEventEnum.AfterChange);
convertedResponse.setReplicationModeAttr(ReplicationModeEnum.Table);
convertedRespo... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.esb.base\src\main\java\de\metas\printing\esb\base\inout\bean\PRTCPrintJobInstructionsConfirmTypeConverter.java | 1 |
请完成以下Java代码 | public DmnTransformException decisionTableOutputIdIsMissing(DmnDecision dmnDecision, DmnDecisionTableOutputImpl dmnDecisionTableOutput) {
return new DmnTransformException(exceptionMessage(
"012",
"The decision table output '{}' of decision '{}' must have a 'id' attribute set.", dmnDecisionTableOutput, d... | );
}
public DmnTransformException errorWhileTransformingDefinitions(Throwable cause) {
return new DmnTransformException(exceptionMessage(
"016",
"Error while transforming decision requirements graph: " + cause.getMessage()),
cause
);
}
public DmnTransformException drdIdIsMissing(DmnD... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\transform\DmnTransformLogger.java | 1 |
请完成以下Java代码 | public class Book {
@DatabaseField(generatedId = true)
private long bookId;
@DatabaseField
private String title;
@DatabaseField(foreign = true, foreignAutoRefresh = true, foreignAutoCreate = true)
private Library library;
public Book() {
}
public Book(String title) {
thi... | public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Library getLibrary() {
return library;
}
public void setLibrary(Library library) {
this.library = library;
}
} | repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\ormlite\Book.java | 1 |
请完成以下Java代码 | public void delete(VariableInstanceEntity entity, boolean fireDeleteEvent) {
super.delete(entity, false);
ByteArrayRef byteArrayRef = entity.getByteArrayRef();
if (byteArrayRef != null) {
byteArrayRef.delete();
}
entity.setDeleted(true);
if (entity.getExecuti... | variableValue,
variableInstance.getType(),
variableInstance.getTaskId(),
variableInstance.getExecutionId(),
variableInstance.getProcessInstanceId(),
processDefinitionId
);
}
@Override
public void deleteVariableInstanceByTask(TaskEntity tas... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\VariableInstanceEntityManagerImpl.java | 1 |
请完成以下Java代码 | public class JPAEntityVariableType implements VariableType, CacheableVariable {
public static final String TYPE_NAME = "jpa-entity";
private JPAEntityMappings mappings;
private boolean forceCacheable;
public JPAEntityVariableType() {
mappings = new JPAEntityMappings();
}
public Stri... | // Before we set the value we must flush all pending changes from
// the entitymanager
// If we don't do this, in some cases the primary key will not yet
// be set in the object
// which will cause exceptions down the road.
entityManagerSession.flush();
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\variable\JPAEntityVariableType.java | 1 |
请完成以下Java代码 | public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID)
{
if (PP_Cost_Collector_ID < 1)
set_Value (COLUMNNAME_PP_Cost_Collector_ID, null);
else
set_Value (COLUMNNAME_PP_Cost_Collector_ID, Integer.valueOf(PP_Cost_Collector_ID));
}
/** Get Manufacturing Cost Collector.
@return Manufacturing Cost ... | }
/** Get PP_Order_ProductAttribute.
@return PP_Order_ProductAttribute */
@Override
public int getPP_Order_ProductAttribute_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ProductAttribute_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Suchschlüssel.
@param Value
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_ProductAttribute.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrderPayScheduleRepository
{
@NonNull private final IQueryBL queryBL = Services.get(IQueryBL.class);
@NonNull private final ITrxManager trxManager = Services.get(ITrxManager.class);
private OrderPayScheduleLoaderAndSaver newLoaderAndSaver()
{
return OrderPayScheduleLoaderAndSaver.builder()
.quer... | @NonNull
public Optional<OrderPaySchedule> getByOrderId(@NonNull final OrderId orderId)
{
return newLoaderAndSaver().loadByOrderId(orderId);
}
public void deleteByOrderId(@NonNull final OrderId orderId)
{
queryBL.createQueryBuilder(I_C_OrderPaySchedule.class)
.addEqualsFilter(I_C_OrderPaySchedule.COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\paymentschedule\repository\OrderPayScheduleRepository.java | 2 |
请完成以下Java代码 | public class MAchievement extends X_PA_Achievement
{
/**
*
*/
private static final long serialVersionUID = -1438593600498523664L;
/**
* Get achieved Achievements Of Measure
* @param measure Measure
* @return array of Achievements
*/
public static MAchievement[] get (MMeasure measure)
{
return getO... | /**
* Before Save
* @param newRecord new
* @return true
*/
@Override
protected boolean beforeSave (boolean newRecord)
{
if (isAchieved())
{
if (getManualActual().signum() == 0)
setManualActual(Env.ONE);
if (getDateDoc() == null)
setDateDoc(new Timestamp(System.currentTimeMillis()));
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MAchievement.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.