instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class WEBUI_M_InOut_Shipment_SelectHUs extends JavaProcess implements IProcessPrecondition
{
@Override
public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context)
{
if (context.isNoSelection())
{
return ProcessPreconditionsResolution.rejectBecauseNoS... | if (shipmentHandlingUnits.isEmpty())
{
return ProcessPreconditionsResolution.reject("shipment has no handling units assigned");
}
return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt() throws Exception
{
final I_M_InOut shipment = getRecord(I_M_InOut.class);
final List<I... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_InOut_Shipment_SelectHUs.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PaginationFormatting {
private PaginationMultiTypeValuesHelper multiValue = new PaginationMultiTypeValuesHelper();
private Map<String, PaginationMultiTypeValuesHelper> results = new HashMap<>();
public Map<String, PaginationMultiTypeValuesHelper> filterQuery(String sex, String email, Pageabl... | }
this.multiValue.setCount(typeInstance.getCount());
this.multiValue.setPage(typeInstance.getPageNumber() + 1);
this.multiValue.setResults(typeInstance.getContent());
this.multiValue.setTotal(typeInstance.getTotal());
this.results.put("data", this.multiValue);
retur... | repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\controller\pagination\PaginationFormatting.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class EncryptionConfig {
@Value("${com.baeldung.csfle.master-key-path}")
private String masterKeyPath;
@Value("${com.baeldung.csfle.key-vault.namespace}")
private String keyVaultNamespace;
@Value("${com.baeldung.csfle.key-vault.alias}")
private String keyVaultAlias;
@Value("${com.... | return masterKeyPath;
}
public boolean isAutoDecryption() {
return autoDecryption;
}
public boolean isAutoEncryption() {
return autoEncryption;
}
public File getAutoEncryptionLib() {
return autoEncryptionLib;
}
public String dataKeyIdUuid() {
if (dataK... | repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-3\src\main\java\com\baeldung\boot\csfle\config\EncryptionConfig.java | 2 |
请完成以下Java代码 | public BigDecimal getSum() {
return sum;
}
/**
* Sets the value of the sum property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setSum(BigDecimal value) {
this.sum = value;
}
/**
* Gets the value... | public AmountAndDirection35 getTtlNetNtry() {
return ttlNetNtry;
}
/**
* Sets the value of the ttlNetNtry property.
*
* @param value
* allowed object is
* {@link AmountAndDirection35 }
*
*/
public void setTtlNetNtry(AmountAndDirection35 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_04\NumberAndSumOfTransactions4.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class InfluxPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<InfluxProperties>
implements InfluxConfig {
InfluxPropertiesConfigAdapter(InfluxProperties properties) {
super(properties);
}
@Override
public String prefix() {
return "management.influx.metrics.export";
}
@Override
public S... | }
@Override
public @Nullable String retentionShardDuration() {
return get(InfluxProperties::getRetentionShardDuration, InfluxConfig.super::retentionShardDuration);
}
@Override
public String uri() {
return obtain(InfluxProperties::getUri, InfluxConfig.super::uri);
}
@Override
public boolean compressed() {... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\influx\InfluxPropertiesConfigAdapter.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AssignableInvoiceCandidateRepository
{
private AssignableInvoiceCandidateFactory assignableInvoiceCandidateFactory;
public AssignableInvoiceCandidateRepository(
@NonNull final AssignableInvoiceCandidateFactory assignableInvoiceCandidateFactory)
{
this.assignableInvoiceCandidateFactory = assignable... | .stream()
.map(assignableInvoiceCandidateFactory::ofRecord)
.iterator();
}
/**
* In production, assignable invoice candidates are created elsewhere and are only loaded if they are relevant for refund contracts.
* That's why this method is intended only for (unit-)testing.
*/
@VisibleForTesting
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\AssignableInvoiceCandidateRepository.java | 2 |
请完成以下Java代码 | public static String getDataScopeType() {
List<Long> dataScopes = getCurrentUserDataScope();
if(CollUtil.isEmpty(dataScopes)){
return "";
}
return DataScopeEnum.ALL.getValue();
}
/**
* 获取用户ID
* @return 系统用户ID
*/
public static Long getCurrentUserId(... | * @return 系统用户名称
*/
public static String getCurrentUsername(String token) {
JWT jwt = JWTUtil.parseToken(token);
return jwt.getPayload("sub").toString();
}
/**
* 获取Token
* @return /
*/
public static String getToken() {
HttpServletRequest request = ((ServletRe... | repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\utils\SecurityUtils.java | 1 |
请完成以下Java代码 | public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
... | public void setPhone(String phone) {
this.phone = phone;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getZone() {
return zone;
}
public void setZone(String zone) {
this.zone = zone;
... | repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\entities\Persons.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getGLN() {
return gln;
}
/**
* Sets the value of the gln property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setGLN(String value) {
this.gln = value;
}
/**
* Gets the value of the stor... | this.storeGLN = value;
}
/**
* Gets the value of the lookupLabel property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLookupLabel() {
return lookupLabel;
}
/**
* Sets the value of the lookupLabel property.
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev2\de\metas\edi\esb\jaxb\metasfreshinhousev2\EDICBPartnerLookupBPLGLNVType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Order {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(" salesId: ").append(toIndentedString(salesId)).append("\n");
sb.append(" patientId: ").append(toIndentedString(pat... | sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" isSeriesOrder: ").append(toIndentedString(isSeriesOrder)).append("\n");
sb.append(" annotation: ").append(toIndentedString(annotation)).append("\n");
sb.append(" deliveryInformation: ").append(toIndentedString(deli... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\Order.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class QuarkusProcessEngineConfiguration extends CdiJtaProcessEngineConfiguration {
/**
* Default values.
*/
public QuarkusProcessEngineConfiguration() {
setJobExecutorActivate(true);
setJdbcUrl(null);
setJdbcUsername(null);
setJdbcPassword(null);
setJdbcDriver(null);
setDataba... | */
@Override
protected void initCommandExecutorDbSchemaOperations() {
if (commandExecutorSchemaOperations == null) {
List<CommandInterceptor> commandInterceptorsDbSchemaOperations = new ArrayList<>();
commandInterceptorsDbSchemaOperations.add(new LogInterceptor());
commandInterceptorsDbSchemaO... | repos\camunda-bpm-platform-master\quarkus-extension\engine\runtime\src\main\java\org\camunda\bpm\quarkus\engine\extension\QuarkusProcessEngineConfiguration.java | 2 |
请完成以下Java代码 | public GroupQuery createGroupQuery() {
return new DbGroupQueryImpl(Context.getProcessEngineConfiguration().getCommandExecutorTxRequired());
}
public GroupQuery createGroupQuery(CommandContext commandContext) {
return new DbGroupQueryImpl();
}
public long findGroupCountByQueryCriteria(DbGroupQueryImpl ... | key.put("tenantId", tenantId);
if (userId != null) {
key.put("userId", userId);
}
if (groupId != null) {
key.put("groupId", groupId);
}
return ((Long) getDbEntityManager().selectOne("selectTenantMembershipCount", key)) > 0;
}
//authorizations ////////////////////////////////////////... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\db\DbReadOnlyIdentityServiceProvider.java | 1 |
请完成以下Java代码 | public CmmnModelInstance getCmmnModelInstance() {
if(caseDefinitionId != null) {
return Context.getProcessEngineConfiguration()
.getDeploymentCache()
.findCmmnModelInstanceForCaseDefinition(caseDefinitionId);
} else {
return null;
}
}
public CmmnElement getCmmnModelElemen... | } else {
return null;
}
}
public ProcessEngineServices getProcessEngineServices() {
return Context
.getProcessEngineConfiguration()
.getProcessEngine();
}
public ProcessEngine getProcessEngine() {
return Context.getProcessEngineConfiguration().getProcessEngine();
}
publi... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseExecutionEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Instant now() {return SystemTime.asInstant();}
/**
* Return a cached access token or fetch one and assume that it's going to be valid for {@link #EXPIRING_DURATION}.
* We can later use the actual validity-duration from the API response when we come across a case where that info is actually provided.
*/
... | {
formData.put("client_id", request.getIdentity().getClientId());
}
if (Check.isNotBlank(request.getClientSecret()))
{
formData.put("client_secret", request.getClientSecret());
}
if (Check.isNotBlank(request.getIdentity().getUsername()))
{
formData.put("email", request.getIdentity().getUsername());... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-scriptedadapter\src\main\java\de\metas\camel\externalsystems\scriptedadapter\oauth\OAuthTokenManager.java | 2 |
请完成以下Java代码 | void heapifyFromLastLeafsParent() {
int lastLeafsParentIndex = getParentNodeIndex(heapNodes.length);
while (lastLeafsParentIndex >= 0) {
heapify(lastLeafsParentIndex);
lastLeafsParentIndex--;
}
}
void heapify(int index) {
int leftNodeIndex = getLeftNodeIn... | heapNodes[i] = heapNodes[j];
heapNodes[j] = temp;
}
static int[] merge(int[][] array) {
HeapNode[] heapNodes = new HeapNode[array.length];
int resultingArraySize = 0;
for (int i = 0; i < array.length; i++) {
HeapNode node = new HeapNode(array[i][0], i);
... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-6\src\main\java\com\baeldung\algorithms\minheapmerge\MinHeap.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() { | return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
} | repos\tutorials-master\persistence-modules\deltaspike\src\main\java\baeldung\model\Member.java | 1 |
请完成以下Java代码 | public class MigrationInstructionJsonConverter extends JsonObjectConverter<MigrationInstruction> {
public static final MigrationInstructionJsonConverter INSTANCE = new MigrationInstructionJsonConverter();
public static final String SOURCE_ACTIVITY_IDS = "sourceActivityIds";
public static final String TARGET_ACT... | readTargetActivityId(json),
JsonUtil.getBoolean(json, UPDATE_EVENT_TRIGGER)
);
}
protected String readSourceActivityId(JsonObject json) {
return JsonUtil.getString(JsonUtil.getArray(json, SOURCE_ACTIVITY_IDS));
}
protected String readTargetActivityId(JsonObject json) {
return JsonUtil.getStr... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\json\MigrationInstructionJsonConverter.java | 1 |
请完成以下Java代码 | public BigDecimal getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setValue(BigDecimal value) {
this.value = value;
}
/**
* Gets... | * {@link ActiveOrHistoricCurrencyCodeEUR }
*
*/
public ActiveOrHistoricCurrencyCodeEUR getCcy() {
return ccy;
}
/**
* Sets the value of the ccy property.
*
* @param value
* allowed object is
* {@link ActiveOrHistoricCurrencyCodeEUR }
*
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\ActiveOrHistoricCurrencyAndAmountSEPA.java | 1 |
请完成以下Java代码 | public void setRef_M_PackagingTreeItem_ID (int Ref_M_PackagingTreeItem_ID)
{
if (Ref_M_PackagingTreeItem_ID < 1)
set_Value (COLUMNNAME_Ref_M_PackagingTreeItem_ID, null);
else
set_Value (COLUMNNAME_Ref_M_PackagingTreeItem_ID, Integer.valueOf(Ref_M_PackagingTreeItem_ID));
}
/** Get Ref Packaging Tree Item... | public static final String TYPE_AvailableBox = "AB";
/** NonItem = NI */
public static final String TYPE_NonItem = "NI";
/** Set Art.
@param Type Art */
@Override
public void setType (String Type)
{
set_Value (COLUMNNAME_Type, Type);
}
/** Get Art.
@return Art */
@Override
public String getType ()... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItem.java | 1 |
请完成以下Java代码 | public class PaymentData {
private String paymentReference;
private String type;
private BigDecimal amount;
private Currency currency;
public String getPaymentReference() {
return paymentReference;
}
public void setPaymentReference(String paymentReference) {
this.paymentRef... | this.amount = amount;
}
public Currency getCurrency() {
return currency;
}
public void setCurrency(Currency currency) {
this.currency = currency;
}
@Override
public String toString() {
return new StringJoiner(", ", PaymentData.class.getSimpleName() + "[", "]")
... | repos\tutorials-master\spring-kafka-2\src\main\java\com\baeldung\spring\kafka\multipletopics\PaymentData.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<List<Map<String,Object>>> queryDiskInfo(HttpServletRequest request, HttpServletResponse response){
Result<List<Map<String,Object>>> res = new Result<>();
try {
// 当前文件系统类
FileSystemView fsv = FileSystemView.getFileSystemView();
// 列出所有windows 磁盘
File[] fs = Fi... | map.put("name", fsv.getSystemDisplayName(fs[i]));
map.put("max", fs[i].getTotalSpace());
map.put("rest", fs[i].getFreeSpace());
map.put("restPPT", (fs[i].getTotalSpace()-fs[i].getFreeSpace())*100/fs[i].getTotalSpace());
list.add(map);
log.info(map.toString());... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\monitor\controller\ActuatorRedisController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BankAccountAcct
{
@NonNull
BankAccountId bankAccountId;
@NonNull AcctSchemaId acctSchemaId;
@NonNull Account B_Asset_Acct;
@NonNull Account B_UnallocatedCash_Acct;
@NonNull Account B_InTransit_Acct;
@NonNull Account B_PaymentSelect_Acct;
@NonNull Account B_InterestRev_Acct;
@NonNull Account B_In... | case B_InTransit_Acct:
return Optional.of(B_InTransit_Acct);
case B_PaymentSelect_Acct:
return Optional.of(B_PaymentSelect_Acct);
case PayBankFee_Acct:
return Optional.of(PayBankFee_Acct);
//
// Account Type - Bank Statement
case B_Asset_Acct:
return Optional.of(B_Asset_Acct);
case B_... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\banking\accounting\BankAccountAcct.java | 2 |
请完成以下Java代码 | private UserNotificationRequest createUserNotification(@NonNull final I_M_InOut inout)
{
final I_C_BPartner bpartner = InterfaceWrapperHelper.load(inout.getC_BPartner_ID(), I_C_BPartner.class);
final String bpValue = bpartner.getValue();
final String bpName = bpartner.getName();
final AdMessageKey adMessage =... | // In case of reversal i think we shall notify the current user too
final DocStatus docStatus = DocStatus.ofCode(inout.getDocStatus());
if (docStatus.isReversedOrVoided())
{
final int currentUserId = Env.getAD_User_ID(Env.getCtx()); // current/triggering user
if (currentUserId > 0)
{
return UserId.of... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\event\ReturnInOutUserNotificationsProducer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
if (conflictedBeanNames.contains(beanName) && bean instanceof ServiceConfig) {
ServiceConfig serviceConfig = (ServiceConfig) bean;
if (isConflictedServiceConfig(serviceConfig)) {
... | * Keep the order being higher than {@link CommonAnnotationBeanPostProcessor#getOrder()} that is
* {@link Ordered#LOWEST_PRECEDENCE}
*
* @return {@link Ordered#LOWEST_PRECEDENCE} +1
*/
@Override
public int getOrder() {
return LOWEST_PRECEDENCE + 1;
}
@Override
public void... | repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\autoconfigure\src\main\java\org\apache\dubbo\spring\boot\beans\factory\config\ServiceBeanIdConflictProcessor.java | 2 |
请完成以下Java代码 | public style addElement(String hashcode,Element element)
{
addElementToRegistry(hashcode,element);
return(this);
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
*/
... | /**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public style addElement(String element)
{
addElementToRegistry(element);
return(this);
}
/**
Removes an Element from the element.
@param hashcode the nam... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\style.java | 1 |
请完成以下Java代码 | public Criteria andAttendTypeNotIn(List<String> values) {
addCriterion("attend_type not in", values, "attendType");
return (Criteria) this;
}
public Criteria andAttendTypeBetween(String value1, String value2) {
addCriterion("attend_type between", value1, value2, "att... | return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsTopicExample.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class NotificationService {
private final List<NotificationChannel> notificationChannels;
private final ExecutorService notificationExecutor = Executors.newSingleThreadExecutor();
@Value("${monitoring.notifications.message_prefix}")
private String messagePrefix;
public List<? extends Futur... | }
})
).toList();
}
@PreDestroy
public void shutdownExecutor() {
try {
notificationExecutor.shutdown();
if (!notificationExecutor.awaitTermination(10, TimeUnit.SECONDS)) {
var dropped = notificationExecutor.shutdownNow();
lo... | repos\thingsboard-master\monitoring\src\main\java\org\thingsboard\monitoring\notification\NotificationService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnableAutoRegionLookup() {
return this.enableAutoRegionLookup;
}
public void setEnableAutoRegionLookup(boolean enableAutoRegionLookup) {
this.enableAutoRegionLookup = enableAutoRegionLookup;
}
public float getEvictionHeapPercentage() {
return this.evictionHeapPercentage;
}
public void se... | return this.regionNames;
}
public void setRegionNames(String[] regionNames) {
this.regionNames = regionNames;
}
}
public static class OffHeapProperties {
private String memorySize;
private String[] regionNames = {};
public String getMemorySize() {
return this.memorySize;
}
public void setM... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\CacheProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class JsonOrderLineGroup
{
@ApiModelProperty(value = "All JsonOLCandCreateRequests with the same ExternalHeaderId and the same groupId shall belong to the same bundle (compensation-group)")
@JsonInclude(NON_NULL)
String groupKey;
@ApiModelProperty(value = "If true, marks the associated as the \"main\" produc... | @Builder
public JsonOrderLineGroup(@JsonProperty("groupKey") final @Nullable String groupKey,
@JsonProperty("groupMainItem") final boolean isGroupMainItem,
@JsonProperty("discount") final @Nullable BigDecimal discount,
@JsonProperty("ordering") final @Nullable JsonGroupCompensationOrderBy ordering)
{
if (... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-ordercandidates\src\main\java\de\metas\common\ordercandidates\v2\request\JsonOrderLineGroup.java | 2 |
请完成以下Java代码 | public int getAD_BusinessRule_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_BusinessRule_ID);
}
@Override
public void setAD_Record_Warning_ID (final int AD_Record_Warning_ID)
{
if (AD_Record_Warning_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Record_Warning_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_... | return get_ValueAsString(COLUMNNAME_MsgText);
}
@Override
public void setRecord_ID (final int Record_ID)
{
if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Record_ID);
}
@Override
public int getRecord_ID()
{
return get_ValueAsInt(COL... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Record_Warning.java | 1 |
请完成以下Java代码 | public void addMigratingDependentInstance(MigratingInstance migratingInstance) {
}
@Override
public ExecutionEntity resolveRepresentativeExecution() {
return null;
}
@Override
public void attachState(MigratingScopeInstance targetActivityInstance) {
setParent(targetActivityInstance);
Execution... | public void setParent(MigratingScopeInstance parentInstance) {
if (this.parentInstance != null) {
this.parentInstance.removeChild(this);
}
this.parentInstance = parentInstance;
if (parentInstance != null) {
parentInstance.addChild(this);
}
}
public void remove() {
eventSubscr... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingCompensationEventSubscriptionInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static <B extends HttpSecurityBuilder<B>> OAuth2AuthorizedClientRepository getAuthorizedClientRepositoryBean(
B builder) {
Map<String, OAuth2AuthorizedClientRepository> authorizedClientRepositoryMap = BeanFactoryUtils
.beansOfTypeIncludingAncestors(builder.getSharedObject(ApplicationContext.class),
... | + "' but found " + authorizedClientServiceMap.size() + ": "
+ StringUtils.collectionToCommaDelimitedString(authorizedClientServiceMap.keySet()));
}
return (!authorizedClientServiceMap.isEmpty() ? authorizedClientServiceMap.values().iterator().next() : null);
}
static <B extends HttpSecurityBuilder<B>> Oid... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\client\OAuth2ClientConfigurerUtils.java | 2 |
请完成以下Java代码 | public class BitMaskUtil {
// First 8 masks as constant to prevent having to math.pow() every time a
// bit needs flipping.
private static final int FLAG_BIT_1 = 1; // 000...00000001
private static final int FLAG_BIT_2 = 2; // 000...00000010
private static final int FLAG_BIT_3 = 4; // 000...000001... | *
* @param value
* integer to check bit
* @param number
* of bit to check (right first bit starting at 1)
*/
public static boolean isBitOn(int value, int bitNumber) {
if (bitNumber <= 0 || bitNumber > 8) {
throw new IllegalArgumentException("Only bits 1... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\BitMaskUtil.java | 1 |
请完成以下Java代码 | public void setAttributes2 (final java.lang.String Attributes2)
{
set_Value (COLUMNNAME_Attributes2, Attributes2);
}
@Override
public java.lang.String getAttributes2()
{
return get_ValueAsString(COLUMNNAME_Attributes2);
}
@Override
public void setC_BPartner_QuickInput_Attributes2_ID (final int C_BPartner... | @Override
public org.compiere.model.I_C_BPartner_QuickInput getC_BPartner_QuickInput()
{
return get_ValueAsPO(COLUMNNAME_C_BPartner_QuickInput_ID, org.compiere.model.I_C_BPartner_QuickInput.class);
}
@Override
public void setC_BPartner_QuickInput(final org.compiere.model.I_C_BPartner_QuickInput C_BPartner_Quick... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput_Attributes2.java | 1 |
请完成以下Java代码 | public CacheGetException setTargetObject(final Object targetObject)
{
this.targetObject = targetObject;
resetMessageBuilt();
return this;
}
public CacheGetException setMethodArguments(final Object[] methodArgs)
{
this.methodArgs = methodArgs;
resetMessageBuilt();
return this;
}
public CacheGetExcept... | resetMessageBuilt();
return this;
}
public CacheGetException setAnnotation(final Class<? extends Annotation> annotation)
{
this.annotationType = annotation;
return this;
}
public CacheGetException addSuppressIfNotNull(final Throwable exception)
{
if(exception != null)
{
addSuppressed(exception);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheGetException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JmxManagedThreadPool extends SeExecutorService implements JmxManagedThreadPoolMBean, PlatformService<JmxManagedThreadPool> {
private final static ContainerIntegrationLogger LOG = ProcessEngineLogger.CONTAINER_INTEGRATION_LOGGER;
protected final BlockingQueue<Runnable> threadPoolQueue;
public JmxMa... | public int getMaximumPoolSize() {
return threadPoolExecutor.getMaximumPoolSize();
}
public void setKeepAliveTime(long time, TimeUnit unit) {
threadPoolExecutor.setKeepAliveTime(time, unit);
}
public void purgeThreadPool() {
threadPoolExecutor.purge();
}
public int getPoolSize() {
return t... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\jmx\services\JmxManagedThreadPool.java | 2 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final HUEditorRow row = getSingleSelectedRow();
final I_M_HU sourceLUorTU = row.getM_HU();
final HUsToNewTUsRequest request = HUsToNewTUsRequest.forSourceHuAndQty(sourceLUorTU, qtyTUs);
final List<I_M_HU> extractedTUs = HUTransformService.newInstance().husToNewTUs(r... | final PPOrderBOMLineId selectedOrderBOMLineId = getSelectedOrderBOMLineId();
if (selectedOrderBOMLineId != null)
{
issueProducer.targetOrderBOMLine(selectedOrderBOMLineId);
}
issueProducer.createIssues(extractedTUs);
getView().invalidateAll();
ppOrderView.invalidateAll();
return MSG_OK;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_HUEditor_IssueTUs.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class AmountSourceAndAcct
{
@NonNull CurrencyAndRate currencyAndRate;
@NonNull BigDecimal amtSource;
@NonNull BigDecimal amtAcct;
public static AmountSourceAndAcct zero(@NonNull final CurrencyAndRate currencyAndRate)
{
return builder().currencyAndRate(currencyAndRate).amtSource(BigDecimal.... | {
return this;
}
else if (this.isZero())
{
return other;
}
else
{
return toBuilder()
.amtSource(this.amtSource.add(other.amtSource))
.amtAcct(this.amtAcct.add(other.amtAcct))
.build();
}
}
public AmountSourceAndAcct subtract(@NonNull final AmountSourceAndAcct othe... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-legacy\org\compiere\acct\Doc_BankStatement.java | 2 |
请完成以下Java代码 | public <ID extends RepoIdAware> ImmutableSet<ID> getRecordIdsToRefresh(
@NonNull final DocumentIdsSelection rowIds,
@NonNull final Function<DocumentId, ID> idMapper)
{
if (rowIds.isEmpty())
{
return ImmutableSet.of();
}
else if (rowIds.isAll())
{
return Stream.concat(this.rowIds.stream(), this.in... | return rowIds.stream()
.filter(this::isRelevantForRefreshing)
.map(idMapper)
.collect(ImmutableSet.toImmutableSet());
}
}
public Stream<T> stream() {return rowsById.values().stream();}
public Stream<T> stream(final Predicate<T> predicate) {return rowsById.values().stream().filter(predicate);}
pu... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\template\ImmutableRowsIndex.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BPartnerNameAndGreetingStrategies
{
private static final Logger logger = LogManager.getLogger(BPartnerNameAndGreetingStrategies.class);
private final ImmutableMap<BPartnerNameAndGreetingStrategyId, BPartnerNameAndGreetingStrategy> strategiesById;
public BPartnerNameAndGreetingStrategies(
@NonNull f... | @NonNull final ComputeNameAndGreetingRequest request)
{
return getStrategyById(strategyId).compute(request);
}
private BPartnerNameAndGreetingStrategy getStrategyById(@NonNull final BPartnerNameAndGreetingStrategyId strategyId)
{
final BPartnerNameAndGreetingStrategy strategy = strategiesById.get(strategyId);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\name\strategy\BPartnerNameAndGreetingStrategies.java | 2 |
请完成以下Java代码 | public Object getOldValue()
{
return oldValue;
}
public Object getNewValue()
{
return newValue;
}
public String getEventType()
{
return eventType;
}
public int getAD_User_ID()
{
return AD_User_ID;
}
public PInstanceId getAD_PInstance_ID()
{
return AD_PInstance_ID;
}
public static final cla... | public Builder setAD_Client_ID(final int AD_Client_ID)
{
this.AD_Client_ID = AD_Client_ID;
return this;
}
public Builder setAD_Org_ID(final int AD_Org_ID)
{
this.AD_Org_ID = AD_Org_ID;
return this;
}
public Builder setOldValue(final Object oldValue)
{
this.oldValue = oldValue;
return t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\session\ChangeLogRecord.java | 1 |
请完成以下Java代码 | public class SplitFloatingPointNumbers {
public static void main(String[] args) {
double doubleNumber = 24.04;
splitUsingFloatingTypes(doubleNumber);
splitUsingString(doubleNumber);
splitUsingBigDecimal(doubleNumber);
}
private static void splitUsingFloatingTypes(... | private static void splitUsingString(double doubleNumber) {
System.out.println("Using String Operations:");
String doubleAsString = String.valueOf(doubleNumber);
int indexOfDecimal = doubleAsString.indexOf(".");
System.out.println("Double Number: "+doubleNumber);
System.out.print... | repos\tutorials-master\core-java-modules\core-java-lang-math\src\main\java\com\baeldung\doubles\SplitFloatingPointNumbers.java | 1 |
请完成以下Java代码 | public TimerEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
return new TimerEventDefinitionImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
timeDateChild = sequenceBuilder.element(TimeDate.class)
.build();
timeDur... | public void setTimeDate(TimeDate timeDate) {
timeDateChild.setChild(this, timeDate);
}
public TimeDuration getTimeDuration() {
return timeDurationChild.getChild(this);
}
public void setTimeDuration(TimeDuration timeDuration) {
timeDurationChild.setChild(this, timeDuration);
}
public TimeCycle... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\TimerEventDefinitionImpl.java | 1 |
请完成以下Java代码 | private static DateTimeTranslatableString ofTime(@NonNull final LocalTime time)
{
final Instant instant = LocalDate.now()
.atTime(time)
.atZone(SystemTime.zoneId())
.toInstant();
return new DateTimeTranslatableString(instant, DisplayType.Time);
}
static DateTimeTranslatableString ofObject(@NonNull ... | this.instant = instant;
this.displayType = displayType;
}
@Override
@Deprecated
public String toString()
{
return getDefaultValue();
}
@Override
public String translate(final String adLanguage)
{
final Language language = Language.getLanguage(adLanguage);
final SimpleDateFormat dateFormat = DisplayTy... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\DateTimeTranslatableString.java | 1 |
请完成以下Java代码 | abstract class AggregateBinder<T> {
private final Context context;
AggregateBinder(Context context) {
this.context = context;
}
/**
* Determine if recursive binding is supported.
* @param source the configuration property source or {@code null} for all sources.
* @return if recursive binding is supported... | * Internal class used to supply the aggregate and cache the value.
*
* @param <T> the aggregate type
*/
protected static class AggregateSupplier<T> {
private final Supplier<T> supplier;
private @Nullable T supplied;
public AggregateSupplier(Supplier<T> supplier) {
this.supplier = supplier;
}
pub... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\bind\AggregateBinder.java | 1 |
请完成以下Java代码 | private static void setDaysOfWeek(@NonNull final I_C_BP_PurchaseSchedule scheduleRecord, @NonNull final ImmutableSet<DayOfWeek> daysOfWeek)
{
if (daysOfWeek.contains(DayOfWeek.MONDAY))
{
scheduleRecord.setOnMonday(true);
}
if (daysOfWeek.contains(DayOfWeek.TUESDAY))
{
scheduleRecord.setOnTuesday(true);... | }
if (daysOfWeek.contains(DayOfWeek.FRIDAY))
{
scheduleRecord.setOnFriday(true);
}
if (daysOfWeek.contains(DayOfWeek.SATURDAY))
{
scheduleRecord.setOnSaturday(true);
}
if (daysOfWeek.contains(DayOfWeek.SUNDAY))
{
scheduleRecord.setOnSunday(true);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\BPPurchaseScheduleRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean monthBetween(final int monthOneBased, final Date dateStart, final Date dateEnd)
{
if (monthOneBased < 1 || monthOneBased > 12)
{
throw new IllegalArgumentException("Invalid month value '" + monthOneBased + "'. It shall be between 1 and 12.");
}
// convert the "one based" month (i.e. Jan=1)... | return false;
}
// convert the "one based" month (i.e. Jan=1) to "zero based" (i.e. Jan=0)
final int month = monthOneBased - 1;
logger.trace("Evaluating monthBetween: month(zero based)={}, date={} -> {}", month, dateStart, dateEnd);
@SuppressWarnings("deprecation")
final int fromMonth = dateStart == null... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\xls\engine\JexlCustomFunctions.java | 2 |
请完成以下Java代码 | public Optional<MqttMessage> convertToGatewayPublish(MqttDeviceAwareSessionContext ctx, String deviceName, TransportProtos.GetAttributeResponseMsg responseMsg) throws AdaptorException {
if (!StringUtils.isEmpty(responseMsg.getError())) {
throw new AdaptorException(responseMsg.getError());
} ... | @Override
public Optional<MqttMessage> convertToGatewayPublish(MqttDeviceAwareSessionContext ctx, String deviceName, TransportProtos.ToDeviceRpcRequestMsg rpcRequest) {
TransportApiProtos.GatewayDeviceRpcRequestMsg.Builder builder = TransportApiProtos.GatewayDeviceRpcRequestMsg.newBuilder();
builder... | repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\adaptors\ProtoMqttAdaptor.java | 1 |
请完成以下Java代码 | public int getAttributeInvoice(String pConcept)
{
MHRConcept concept = MHRConcept.forValue(getCtx(), pConcept);
if (concept == null)
{
return 0;
}
ArrayList<Object> params = new ArrayList<>();
StringBuffer whereClause = new StringBuffer();
// check ValidFrom:
whereClause.append(MHRAttribute.COLUMNN... | //
if (!MHRConcept.TYPE_Information.equals(concept.getType()))
{
whereClause.append(" AND " + MHRAttribute.COLUMNNAME_C_BPartner_ID + " = ?");
params.add(m_C_BPartner_ID);
}
MHRAttribute attribute = new Query(getCtx(), MHRAttribute.Table_Name, whereClause.toString(), get_TrxName())
.setParameters(par... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\model\MHRProcess.java | 1 |
请完成以下Java代码 | public void assertPickedFrom()
{
if (!isPickedFrom()) {throw new AdempiereException("Pick from required first");}
}
public void assertInTransit()
{
assertNotDroppedTo();
assertPickedFrom();
}
public void removePickedHUs()
{
this.pickedHUs = null;
this.qtyNotPickedReason = null;
updateStatus();
}
... | {
assertInTransit();
final DDOrderMoveSchedulePickedHUs pickedHUs = Check.assumeNotNull(this.pickedHUs, "Expected to be already picked: {}", this);
pickedHUs.setDroppedTo(dropToLocatorId, dropToMovementId);
updateStatus();
}
private void updateStatus()
{
this.status = computeStatus();
}
private DDOrd... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\DDOrderMoveSchedule.java | 1 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ProcessTask.class, CMMN_ELEMENT_PROCESS_TASK)
.namespaceUri(CMMN11_NS)
.extendsType(Task.class)
.instanceProvider(new ModelTypeInstanceProvider<ProcessTask>() {
... | camundaProcessTenantIdAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_PROCESS_TENANT_ID)
.namespace(CAMUNDA_NS)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
parameterMappingCollection = sequenceBuilder.elementCollection(ParameterMapping.class)
.build();... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ProcessTaskImpl.java | 1 |
请完成以下Java代码 | public void setCurrentLUTUConfiguration(final I_M_ReceiptSchedule documentLine, final I_M_HU_LUTU_Configuration lutuConfiguration)
{
documentLine.setM_HU_LUTU_Configuration(lutuConfiguration);
}
@Override
public I_M_HU_LUTU_Configuration createNewLUTUConfiguration(final I_M_ReceiptSchedule documentLine)
{
fin... | // Set BPartner / Location to be used
final int bpartnerId = receiptScheduleBL.getC_BPartner_Effective_ID(documentLine);
final int bpartnerLocationId = receiptScheduleBL.getC_BPartner_Location_Effective_ID(documentLine);
lutuConfiguration.setC_BPartner_ID(bpartnerId);
lutuConfiguration.setC_BPartner_Location_ID... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\ReceiptScheduleDocumentLUTUConfigurationHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MainApplication {
@Autowired
private BookstoreService bookstoreService;
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
@Bean
public ApplicationRunner init() {
return args -> {
System.out.println("\n\n Fet... | System.out.println("\n\n Fetch authors as Spring projection (DTO):");
System.out.println("-----------------------------------------------------------------------------");
bookstoreService.fetchAuthorAsDtoClass();
System.out.println("\n\n Fetch authors as Spring projection (DTO) by s... | repos\Hibernate-SpringBoot-master\HibernateSpringBootJoinDtoAllFields\src\main\java\com\bookstore\MainApplication.java | 2 |
请完成以下Java代码 | public Post findUsingJpql(Long id) {
EntityManager entityManager = emf.createEntityManager();
EntityGraph entityGraph = entityManager.getEntityGraph("post-entity-graph-with-comment-users");
Post post = entityManager.createQuery("Select p from Post p where p.id=:id", Post.class)
... | EntityGraph entityGraph = entityManager.getEntityGraph("post-entity-graph-with-comment-users");
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Post> criteriaQuery = criteriaBuilder.createQuery(Post.class);
Root<Post> root = criteriaQuery.from(Post.class);
... | repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\entitygraph\repo\PostRepository.java | 1 |
请完成以下Java代码 | protected Comment executeInternal(CommandContext commandContext, String processDefinitionId) {
String userId = Authentication.getAuthenticatedUserId();
CommentEntity comment = commandContext.getCommentEntityManager().create();
comment.setUserId(userId);
comment.setType((type == null) ? C... | comment.setFullMessage(message);
commandContext.getCommentEntityManager().insert(comment);
return comment;
}
protected String getSuspendedTaskException() {
return "Cannot add a comment to a suspended task";
}
protected String getSuspendedExceptionMessage() {
return "C... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\AddCommentCmd.java | 1 |
请完成以下Java代码 | public class MessageJobDeclaration extends JobDeclaration<AtomicOperationInvocation, MessageEntity> {
public static final String ASYNC_BEFORE = "async-before";
public static final String ASYNC_AFTER = "async-after";
private static final long serialVersionUID = 1L;
protected String[] operationIdentifier;
p... | protected JobHandlerConfiguration resolveJobHandlerConfiguration(AtomicOperationInvocation context) {
AsyncContinuationConfiguration configuration = new AsyncContinuationConfiguration();
configuration.setAtomicOperation(context.getOperation().getCanonicalName());
ExecutionEntity execution = context.getExe... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\MessageJobDeclaration.java | 1 |
请完成以下Java代码 | public class OrderedServerInterceptor implements ServerInterceptor, Ordered {
private final ServerInterceptor serverInterceptor;
private final int order;
/**
* Creates a new OrderedServerInterceptor with the given server interceptor and order.
*
* @param serverInterceptor The server interce... | final ServerCallHandler<ReqT, RespT> next) {
return this.serverInterceptor.interceptCall(call, headers, next);
}
@Override
public int getOrder() {
return this.order;
}
@Override
public String toString() {
return "OrderedServerInterceptor [interceptor=" + this.serverInte... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\interceptor\OrderedServerInterceptor.java | 1 |
请完成以下Java代码 | public void onBeforeInvoiceLineCreated(
@NonNull final I_C_InvoiceLine invoiceLine,
@NonNull final IInvoiceLineRW fromInvoiceLine,
@NonNull final List<I_C_Invoice_Candidate> fromCandidates)
{
for (final IInvoiceCandidateListener listener : listeners)
{
listener.onBeforeInvoiceLineCreated(invoiceLine, f... | for (final IInvoiceCandidateListener listener : listeners)
{
listener.onBeforeInvoiceComplete(invoice, fromCandidates);
}
}
@Override
public void onBeforeClosed(@NonNull final I_C_Invoice_Candidate candidate)
{
for (final IInvoiceCandidateListener listener : listeners)
{
listener.onBeforeClosed(candi... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidateListeners.java | 1 |
请完成以下Java代码 | public I_I_Postal retrieveImportRecord(final Properties ctx, final ResultSet rs)
{
return new X_I_Postal(ctx, rs, ITrx.TRXNAME_ThreadInherited);
}
@Override
protected ImportRecordResult importRecord(
@NonNull final IMutable<Object> state_NOTUSED,
@NonNull final I_I_Postal importRecord,
final boolean is... | final I_C_Postal cPostal = InterfaceWrapperHelper.create(getCtx(), I_C_Postal.class, ITrx.TRXNAME_ThreadInherited);
cPostal.setC_Country(Services.get(ICountryDAO.class).retrieveCountryByCountryCode(importRecord.getCountryCode()));
cPostal.setCity(importRecord.getCity());
cPostal.setPostal(importRecord.getPostal(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impexp\PostalCodeImportProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public InsuranceContractQuantity pcn(String pcn) {
this.pcn = pcn;
return this;
}
/**
* PZN für Maximalmenge
* @return pcn
**/
@Schema(example = "54658452", description = "PZN für Maximalmenge")
public String getPcn() {
return pcn;
}
public void setPcn(String pcn) {
this.pcn = pcn... | return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InsuranceContractQuantity insuranceContractQuantity = (InsuranceContractQuantity) o;
return Objects.equals(this.pcn, insuranceContractQuantity.pcn) &&
Objects.equals(this.quantity, insuranceContractQuantity.q... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractQuantity.java | 2 |
请完成以下Java代码 | public void setWEBUI_Shortcut (java.lang.String WEBUI_Shortcut)
{
set_Value (COLUMNNAME_WEBUI_Shortcut, WEBUI_Shortcut);
}
/** Get Shortcut.
@return Shortcut */
@Override
public java.lang.String getWEBUI_Shortcut ()
{
return (java.lang.String)get_Value(COLUMNNAME_WEBUI_Shortcut);
}
/** Set Is View Ac... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Default quick action.
@param WEBUI_ViewQuickAction_Default Default quick action */
@Override
public void setWEBUI_ViewQuickAction_Default (boolean WEBUI_ViewQuickAction_Default)
{
set_Value (COLUMNNAME_WEBUI_ViewQu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Table_Process.java | 1 |
请完成以下Java代码 | public Object execute(CommandContext commandContext) {
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
ManagementService managementService = processEngineConfiguration.getManagementService();
List<Job> cleanupJobs = ma... | }
return null;
}
protected void scheduleTimerJob(ProcessEngineConfigurationImpl processEngineConfiguration) {
TimerJobService timerJobService = processEngineConfiguration.getJobServiceConfiguration().getTimerJobService();
TimerJobEntity timerJob = timerJobService.createTimerJob();
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\HandleHistoryCleanupTimerJobCmd.java | 1 |
请完成以下Java代码 | public int getRetryWaitTimeInMillis() {
return determineAsyncExecutor().getRetryWaitTimeInMillis();
}
public void setRetryWaitTimeInMillis(int retryWaitTimeInMillis) {
for (AsyncExecutor asyncExecutor : tenantExecutors.values()) {
asyncExecutor.setRetryWaitTimeInMillis(retryWaitTime... | }
}
@Override
public int getResetExpiredJobsPageSize() {
return determineAsyncExecutor().getResetExpiredJobsPageSize();
}
@Override
public void setResetExpiredJobsPageSize(int resetExpiredJobsPageSize) {
for (AsyncExecutor asyncExecutor : tenantExecutors.values()) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\asyncexecutor\multitenant\ExecutorPerTenantAsyncExecutor.java | 1 |
请完成以下Spring Boot application配置 | #
# Copyright 2015-2022 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | issions and
# limitations under the License.
#
logging.level.root=WARN
logging.level.sample.mybatis.velocity.legacy.mapper=TRACE
mybatis.mapper-locations=classpath*:/mappers/*.xml
mybatis.type-aliases-package=sample.mybatis.velocity.legacy.domain | repos\spring-boot-starter-master\mybatis-spring-boot-samples\mybatis-spring-boot-sample-velocity-legacy\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public void consumeSSE() {
ParameterizedTypeReference<ServerSentEvent<String>> type = new ParameterizedTypeReference<ServerSentEvent<String>>() {
};
Flux<ServerSentEvent<String>> eventStream = client.get()
.uri("/stream-sse")
.retrieve()
.bodyToFlux(type);
... | stringStream.subscribe(content -> logger.info("Current time: {} - Received content: {} ", LocalTime.now(), content), error -> logger.error("Error retrieving content: {}", error), () -> logger.info("Completed!!!"));
}
@Async
public void consumeSSEFromFluxEndpoint() {
ParameterizedTypeReference<Serve... | repos\tutorials-master\spring-reactive-modules\spring-reactive-2\src\main\java\com\baeldung\reactive\serversentevents\consumer\controller\ClientController.java | 2 |
请完成以下Java代码 | public String getName() {
return this.name;
}
@Override
public long getId() {
return this.id;
}
Instant getStartTime() {
return this.startTime;
}
@Override
public @Nullable Long getParentId() {
return (this.parent != null) ? this.parent.getId() : null;
}
@Override
public Tags getTags() {
return... | this.recorder.accept(this);
}
boolean isEnded() {
return this.ended.get();
}
static class DefaultTag implements Tag {
private final String key;
private final String value;
DefaultTag(String key, String value) {
this.key = key;
this.value = value;
}
@Override
public String getKey() {
ret... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\metrics\buffering\BufferedStartupStep.java | 1 |
请完成以下Java代码 | public static @Nullable DockerComposeFile find(@Nullable File workingDirectory) {
File base = (workingDirectory != null) ? workingDirectory : new File(".");
if (!base.exists()) {
return null;
}
Assert.state(base.isDirectory(), () -> "'%s' is not a directory".formatted(base));
Path basePath = base.toPath();... | /**
* Creates a new {@link DockerComposeFile} for the given {@link File files}.
* @param files the source files
* @return the Docker Compose file
* @since 3.4.0
*/
public static DockerComposeFile of(Collection<? extends File> files) {
Assert.notNull(files, "'files' must not be null");
for (File file : fi... | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\DockerComposeFile.java | 1 |
请完成以下Java代码 | public java.lang.String getProductDescription()
{
return get_ValueAsString(COLUMNNAME_ProductDescription);
}
@Override
public void setQtyEnteredInBPartnerUOM (final @Nullable BigDecimal QtyEnteredInBPartnerUOM)
{
set_ValueNoCheck (COLUMNNAME_QtyEnteredInBPartnerUOM, QtyEnteredInBPartnerUOM);
}
@Override
... | }
@Override
public void setTaxAmtInfo (final @Nullable BigDecimal TaxAmtInfo)
{
set_Value (COLUMNNAME_TaxAmtInfo, TaxAmtInfo);
}
@Override
public BigDecimal getTaxAmtInfo()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmtInfo);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_invoic_500_v.java | 1 |
请完成以下Java代码 | public class MaterialTrackingPPOrderBL implements IMaterialTrackingPPOrderBL
{
// public only for testing
public static final String C_DocType_DOCSUBTYPE_QualityInspection = IMaterialTrackingBL.C_DocType_PPORDER_DOCSUBTYPE_QualityInspection;
/**
* Quality Inspection Filter
*
* NOTE: keep in sync with {@link #... | {
dateOfProduction = ppOrder.getDateDelivered();
}
else
{
dateOfProduction = ppOrder.getDateFinishSchedule();
}
Check.assumeNotNull(dateOfProduction, "dateOfProduction not null for PP_Order {}", ppOrder);
return dateOfProduction;
}
@Override
public List<I_M_InOutLine> retrieveIssuedInOutLines(fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingPPOrderBL.java | 1 |
请完成以下Java代码 | public int getIMP_ProcessorParameter_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_IMP_ProcessorParameter_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Na... | /** Get Parameter Value.
@return Parameter Value */
public String getParameterValue ()
{
return (String)get_Value(COLUMNNAME_ParameterValue);
}
/** Set Search Key.
@param Value
Search key for the record in the format required - must be unique
*/
public void setValue (String Value)
{
set_Value (C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_ProcessorParameter.java | 1 |
请完成以下Java代码 | public class DateUtil {
private DateUtil() {
super();
}
/***
* 查询当前小时
*
* @return
*/
public static int getCurrentHour() {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
return cal.get(Calendar.HOUR_OF_DAY); // 获取当前小时
}
/***
* 查询当前分钟
*
* @return
*/
public static int g... | * 获取几天前的日期格式
*
* @param dayNum
* @return
*/
public static String getDateByDayNum(int dayNum) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DAY_OF_MONTH, -dayNum);
String result = sdf.format(cal.getTime())... | repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\utils\DateUtil.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getItemRef() {
return itemRef;
}
public void setItemRef(String itemRef) {
this.itemRef = itemRef;
}
public Message clone() {
Message c... | }
public Builder xmlRowNumber(int xmlRowNumber) {
this.xmlRowNumber = xmlRowNumber;
return this;
}
public Builder xmlColumnNumber(int xmlColumnNumber) {
this.xmlColumnNumber = xmlColumnNumber;
return this;
}
public Builder extens... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\Message.java | 1 |
请完成以下Java代码 | public ModelInstance getEmptyModel() {
DomDocument document = null;
synchronized(documentBuilderFactory) {
document = DomUtil.getEmptyDocument(documentBuilderFactory);
}
return createModelInstance(document);
}
/**
* Validate DOM document
*
* @param document the DOM document to vali... | DomElement rootElement = document.getRootElement();
String namespaceURI = rootElement.getNamespaceURI();
return schemas.get(namespaceURI);
}
protected void addSchema(String namespaceURI, Schema schema) {
schemas.put(namespaceURI, schema);
}
protected Schema createSchema(String location, ClassLoade... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\parser\AbstractModelParser.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrgMappingId implements RepoIdAware
{
@JsonCreator
public static OrgMappingId ofRepoId(final int repoId)
{
return new OrgMappingId(repoId);
}
public static OrgMappingId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new OrgMappingId(repoId) : null;
}
public static int toRepoId(final O... | {
this.repoId = Check.assumeGreaterThanZero(repoId, "AD_OrgMapping_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(final OrgMappingId o1, final OrgMappingId o2)
{
return Objects.equals(o1, o2);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\service\OrgMappingId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String... | }
public Set<Authority> getAuthorities() {
return authorities;
}
public void setAuthorities(Set<Authority> authorities) {
this.authorities = authorities;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o i... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\User.java | 2 |
请完成以下Java代码 | public boolean hasField(String fieldName) {
return getDelegate().hasField(fieldName);
}
/**
* @inheritDoc
*/
@Override
public void sendTo(DataOutput out) throws IOException {
PdxInstance delegate = getDelegate();
if (delegate instanceof Sendable) {
((Sendable) delegate).sendTo(out);
}
}
/**
*... | StringBuilder buffer = new StringBuilder(ARRAY_BEGIN);
boolean addComma = false;
for (Object element : array) {
buffer.append(addComma ? COMMA_SPACE : EMPTY_STRING);
buffer.append(toStringObject(element, indent));
addComma = true;
}
buffer.append(ARRAY_END);
return buffer.toString();
}
private... | repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\pdx\PdxInstanceWrapper.java | 1 |
请完成以下Java代码 | public void startWithNotContain(String key) {
Assert.doesNotContain(key, "123", "key must not contain 123");
// ...
}
public void repair(Collection<String> repairParts) {
Assert.notEmpty(repairParts, "collection of repairParts mustn't be empty");
// ...
}
public void re... | car.сhangeEngine(new ToyotaEngine());
car.startWithHasLength(" ");
car.startWithHasText("t");
car.startWithNotContain("132");
List<String> repairPartsCollection = new ArrayList<>();
repairPartsCollection.add("part");
car.repair(repairPartsCollection);
Map<Strin... | repos\tutorials-master\spring-5\src\main\java\com\baeldung\assertions\Car.java | 1 |
请完成以下Java代码 | private boolean checkLastLoadedDataLineIsNotBlank()
{
return Check.isNotBlank(loadedDataLines.get(loadedDataLines.size() - 1));
}
/**
* add current line to the previous one
*/
private void appendToPreviousLine(@NonNull final String line)
{
final StringBuilder previousLine = new StringBuilder();
... | }
public List<String> readMultiLines(@NonNull final byte[] data, @NonNull final Charset charset) throws IOException
{
return ByteSource.wrap(data).asCharSource(charset).readLines(new MultiLineProcessor());
}
/**
* Read file that has not any multi-line text
*
* @param file
* @param charset
* @return
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\FileImportReader.java | 1 |
请完成以下Java代码 | public UniqueKey<AuthorRecord> getPrimaryKey() {
return Keys.AUTHOR_PKEY;
}
@Override
public List<UniqueKey<AuthorRecord>> getKeys() {
return Arrays.<UniqueKey<AuthorRecord>>asList(Keys.AUTHOR_PKEY);
}
@Override
public Author as(String alias) {
return new Author(DSL.nam... | }
/**
* Rename this table
*/
@Override
public Author rename(Name name) {
return new Author(name, null);
}
// -------------------------------------------------------------------------
// Row4 type methods
// -----------------------------------------------------------------... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\Author.java | 1 |
请完成以下Java代码 | protected boolean beforeSave(boolean newRecord)
{
if (getDateTo() == null)
setDateTo(getDateFrom());
if (getDateFrom().after(getDateTo()))
{
throw new AdempiereException("@DateTo@ > @DateFrom@");
}
return true;
} // beforeSave
/**
* Check if the resource is unavailable for date
* @return true if... | public boolean isUnAvailable(final Instant dateTime)
{
final ZoneId zoneId = SystemTime.zoneId();
LocalDate date = dateTime.atZone(zoneId).toLocalDate();
LocalDate dateFrom = TimeUtil.asLocalDate(getDateFrom(), zoneId);
LocalDate dateTo = TimeUtil.asLocalDate(getDateTo(), zoneId);
if (dateFrom != null && da... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MResourceUnAvailable.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isLogLeakedSessions() {
return this.logLeakedSessions;
}
public void setLogLeakedSessions(boolean logLeakedSessions) {
this.logLeakedSessions = logLeakedSessions;
}
public int getMaxConnectionPoolSize() {
return this.maxConnectionPoolSize;
}
public void setMaxConnectionPoolSize(in... | public void setTrustStrategy(TrustStrategy trustStrategy) {
this.trustStrategy = trustStrategy;
}
public @Nullable File getCertFile() {
return this.certFile;
}
public void setCertFile(@Nullable File certFile) {
this.certFile = certFile;
}
public boolean isHostnameVerificationEnabled() {
retur... | repos\spring-boot-4.0.1\module\spring-boot-neo4j\src\main\java\org\springframework\boot\neo4j\autoconfigure\Neo4jProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ConcurrencyControlConfigurer expiredUrl(String expiredUrl) {
SessionManagementConfigurer.this.expiredUrl = expiredUrl;
return this;
}
/**
* Determines the behaviour when an expired session is detected.
* @param expiredSessionStrategy the {@link SessionInformationExpiredStrategy} to
* use when... | SessionManagementConfigurer.this.maxSessionsPreventsLogin = maxSessionsPreventsLogin;
return this;
}
/**
* Controls the {@link SessionRegistry} implementation used. The default is
* {@link SessionRegistryImpl} which is an in memory implementation.
* @param sessionRegistry the {@link SessionRegistry} to... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\SessionManagementConfigurer.java | 2 |
请完成以下Java代码 | public class EventSubProcessStartEventActivityBehavior extends NoneStartEventActivityBehavior {
// default = true
protected boolean isInterrupting = true;
protected String activityId;
public EventSubProcessStartEventActivityBehavior(String activityId) {
this.activityId = activityId;
}
... | outgoingExecution.setActive(true);
outgoingExecution.setScope(false);
outgoingExecution.setConcurrent(true);
}
// set the outgoing execution to this activity
((InterpretableExecution) outgoingExecution).setActivity(activity);
// continue execution
outgoi... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\EventSubProcessStartEventActivityBehavior.java | 1 |
请完成以下Java代码 | private final boolean isDecimalOrGroupingSeparator(final char ch)
{
return ch == m_decimalSeparator || ch == m_groupingSeparator || ch == '.' || ch == ',';
}
/**
* Get Full Text
*
* @return text or empty string; never returns null
*/
private final String getText()
{
final Content content = getCont... | try
{
str = content.getString(0, length - 1); // cr at end
}
catch (BadLocationException e)
{
// ignore it, shall not happen
log.debug("Error while getting the string content", e);
}
catch (Exception e)
{
log.debug("Error while getting the string content", e);
}
return str;
} // getSt... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\MDocNumber.java | 1 |
请完成以下Java代码 | private void handleAuthorizationFailure(OAuth2AuthorizationException authorizationException,
Authentication principal) {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder
.getRequestAttributes();
Map<String, Object> attributes = new HashMap<>();
if (requestAttribut... | */
@Nullable
String resolve(HttpRequest request);
}
/**
* A strategy for resolving a {@link Authentication principal} from an intercepted
* request.
*/
@FunctionalInterface
public interface PrincipalResolver {
/**
* Resolve the {@link Authentication principal} from the current request, which is
... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\client\OAuth2ClientHttpRequestInterceptor.java | 1 |
请完成以下Java代码 | public void put(final IView view)
{
defaultViewsRepositoryStorage.put(view);
}
@Nullable
@Override
public IView getByIdOrNull(final ViewId viewId)
{
return defaultViewsRepositoryStorage.getByIdOrNull(viewId);
}
@Override
public void closeById(@NonNull final ViewId viewId, @NonNull final ViewCloseAction c... | defaultViewsRepositoryStorage.closeById(viewId, closeAction);
}
@Override
public Stream<IView> streamAllViews()
{
return defaultViewsRepositoryStorage.streamAllViews();
}
@Override
public void invalidateView(final ViewId viewId)
{
defaultViewsRepositoryStorage.invalidateView(viewId);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\MaterialCockpitViewsIndexStorage.java | 1 |
请完成以下Java代码 | public List<DocumentAdjustment1> getAdjstmntAmtAndRsn() {
if (adjstmntAmtAndRsn == null) {
adjstmntAmtAndRsn = new ArrayList<DocumentAdjustment1>();
}
return this.adjstmntAmtAndRsn;
}
/**
* Gets the value of the rmtdAmt property.
*
* @return
* possib... | }
/**
* Sets the value of the rmtdAmt property.
*
* @param value
* allowed object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public void setRmtdAmt(ActiveOrHistoricCurrencyAndAmount value) {
this.rmtdAmt = 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\RemittanceAmount1.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public MediaType contentType() {
return responseBody.contentType();
}
@Override
public long contentLength() throws IOException {
return responseBody.contentLength();
}
@Override
public BufferedSource source() throws IOException {
if (bufferedSource == null) {
... | private Source source(Source source) {
return new ForwardingSource(source) {
long totalBytesRead = 0L;
@Override
public long read(Buffer sink, long byteCount) throws IOException {
long bytesRead = super.read(sink, byteCount);
// read() returns... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\ProgressResponseBody.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UserProperties {
/**
* 用户 ID
*/
private Long id;
/**
* 年龄
*/
private int age;
/**
* 用户名称
*/
private String desc;
/**
* 用户 UUID
*/
private String uuid;
public Long getId() {
return id;
}
public void setId(Long i... | }
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
@Override
public String toString() {
ret... | repos\springboot-learning-example-master\springboot-properties\src\main\java\org\spring\springboot\property\UserProperties.java | 2 |
请完成以下Java代码 | class DefaultLibraryCoordinates implements LibraryCoordinates {
private final @Nullable String groupId;
private final @Nullable String artifactId;
private final @Nullable String version;
/**
* Create a new instance from discrete elements.
* @param groupId the group ID
* @param artifactId the artifact ID
... | * @return the artifact ID
*/
@Override
public @Nullable String getArtifactId() {
return this.artifactId;
}
/**
* Return the version of the coordinates.
* @return the version
*/
@Override
public @Nullable String getVersion() {
return this.version;
}
/**
* Return the coordinates in the form {@code... | repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\DefaultLibraryCoordinates.java | 1 |
请完成以下Java代码 | public class TbEntityActorId implements TbActorId {
@Getter
private final EntityId entityId;
public TbEntityActorId(EntityId entityId) {
this.entityId = entityId;
}
@Override
public String toString() {
return entityId.getEntityType() + "|" + entityId.getId();
}
@Overr... | if (o == null || getClass() != o.getClass()) return false;
TbEntityActorId that = (TbEntityActorId) o;
return entityId.equals(that.entityId);
}
@Override
public int hashCode() {
return Objects.hash(entityId);
}
@Override
public EntityType getEntityType() {
retur... | repos\thingsboard-master\common\actor\src\main\java\org\thingsboard\server\actors\TbEntityActorId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ReconciliationFileParserBiz implements BeanFactoryAware {
// 加载beanfactory
private BeanFactory beanFactory;
public Object getService(String payInterface) {
return beanFactory.getBean(payInterface);
}
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
priv... | // 解析成 ReconciliationEntityVo 对象
List<ReconciliationEntityVo> rcVoList = null;
// 根据支付方式得到解析器的名字
String parserClassName = interfaceCode + "Parser";
LOG.info("根据支付方式得到解析器的名字[" + parserClassName + "]");
ParserInterface service = null;
try {
// 根据名字获取相应的解析器
service = (ParserInterface) this.getService(pa... | repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\biz\ReconciliationFileParserBiz.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static void handleInsertVariableInstanceEntityCount(VariableInstanceEntity variableInstance, TaskServiceConfiguration taskServiceConfiguration) {
if (variableInstance.getTaskId() != null && isTaskRelatedEntityCountEnabledGlobally(taskServiceConfiguration)) {
CountingTaskEntity countingTaskEnt... | }
public static boolean isTaskRelatedEntityCountEnabled(TaskEntity taskEntity, TaskServiceConfiguration taskServiceConfiguration) {
if (taskEntity instanceof CountingTaskEntity) {
return isTaskRelatedEntityCountEnabled((CountingTaskEntity) taskEntity, taskServiceConfiguration);
}
... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\util\CountingTaskUtil.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Column
private String name;
@CreatedDate
private Date createdDate = new Date();
public Date getCreatedDate() {
return createdDate;
}
public Integer getId() { | return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\persistence-modules\spring-boot-mysql\src\main\java\com\baeldung\boot\User.java | 2 |
请完成以下Java代码 | public CarMaker getMaker() {
return maker;
}
/**
* @param maker the maker to set
*/
public void setMaker(CarMaker maker) {
this.maker = maker;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int pr... | if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CarModel other = (CarModel) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
if ... | repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\domain\CarModel.java | 1 |
请完成以下Java代码 | public class CallActivityBehavior extends CallableElementActivityBehavior implements MigrationObserverBehavior {
public CallActivityBehavior() {
}
public CallActivityBehavior(String className) {
super(className);
}
public CallActivityBehavior(Expression expression) {
super(expression);
}
@Over... | }
@Override
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) {
ActivityImpl callActivity = (ActivityImpl) migratingInstance.getSourceScope();
// A call activity is typically scope and since we guarantee stability of scope executi... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\CallActivityBehavior.java | 1 |
请完成以下Java代码 | public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues()
{
return values.get(this);
}
@Override
public Map<String, ViewEditorRenderMode> getViewEditorRenderModeByFieldName()
{
return values.getViewEditorRenderModeByFieldName();
}
public boolean isPriceEditable()
{
return isFieldEditable(FIELD_Pr... | {
if (Objects.equals(this.lastShipmentDays, lastShipmentDays))
{
return this;
}
else
{
return toBuilder().lastShipmentDays(lastShipmentDays).build();
}
}
public boolean isChanged()
{
return getProductPriceId() == null
|| !getPrice().isPriceListPriceUsed();
}
public boolean isMatching(@Non... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\model\ProductsProposalRow.java | 1 |
请完成以下Java代码 | public bdo addElement(String hashcode,Element element)
{
addElementToRegistry(hashcode,element);
return(this);
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
*/
... | }
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public bdo addElement(String element)
{
addElementToRegistry(element);
return(this);
}
/**
Removes an Element from the element.
@param hashcode ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\bdo.java | 1 |
请完成以下Java代码 | public class SpinValueMapperFactory {
protected static final ScalaFeelLogger LOGGER = ScalaFeelLogger.LOGGER;
public static final String SPIN_VALUE_MAPPER_CLASS_NAME =
"org.camunda.spin.plugin.impl.feel.integration.SpinValueMapper";
public CustomValueMapper createInstance() {
Class<?> valueMapperClass ... | } catch (IllegalAccessException e) {
throw LOGGER.spinValueMapperAccessException(e);
} catch (ClassCastException e) {
throw LOGGER.spinValueMapperCastException(e, CustomValueMapper.class.getName());
} catch (Throwable e) {
throw LOGGER.spinValueMapperException(e);
}
}
protected Cla... | repos\camunda-bpm-platform-master\engine-dmn\feel-scala\src\main\java\org\camunda\bpm\dmn\feel\impl\scala\spin\SpinValueMapperFactory.java | 1 |
请完成以下Java代码 | public class AttributeNotFoundException extends AdempiereException
{
/**
*
*/
private static final long serialVersionUID = -7800379395702483714L;
private final I_M_Attribute attribute;
private final IAttributeSet attributeSet;
public AttributeNotFoundException(final I_M_Attribute attribute, final Object attr... | }
private static final ITranslatableString buildMsg(final String attributeStr, final Object attributeSetObj)
{
final TranslatableStringBuilder builder = TranslatableStrings.builder();
builder.append("Attribute ");
if (attributeStr == null)
{
builder.append("<NULL>");
}
else
{
builder.append("'")... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\exceptions\AttributeNotFoundException.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.