instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public EventDefinition getOneBehaviorEventRef() {
return oneBehaviorEventRefAttribute.getReferenceTargetElement(this);
}
public void setOneBehaviorEventRef(EventDefinition oneBehaviorEventRef) {
oneBehaviorEventRefAttribute.setReferenceTargetElement(this, oneBehaviorEventRef);
}
public EventDefinition... | public boolean isCamundaExclusive() {
return camundaExclusive.getValue(this);
}
public void setCamundaExclusive(boolean isCamundaExclusive) {
camundaExclusive.setValue(this, isCamundaExclusive);
}
public String getCamundaCollection() {
return camundaCollection.getValue(this);
}
public void se... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\MultiInstanceLoopCharacteristicsImpl.java | 1 |
请完成以下Java代码 | class TargetPOKeyPropertiesPartDescriptor implements ICachedMethodPartDescriptor
{
// private static final transient Logger logger = CLogMgt.getLogger(TargetPOKeyPropertiesPartDescriptor.class);
public static final TargetPOKeyPropertiesPartDescriptor createIfApplies(Method method, Cached annotation)
{
final Strin... | final StringBuilder getMethodName = new StringBuilder("get");
getMethodName.append(keyProp.substring(0, 1).toUpperCase());
getMethodName.append(keyProp.substring(1));
try
{
final Method method = targetObject.getClass().getMethod(getMethodName.toString());
final Object keyValue = method.invoke(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\TargetPOKeyPropertiesPartDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Account {
@Id
@GeneratedValue(strategy = IDENTITY)
private int id;
private String name;
private String password;
private String[] roles;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String ... | return password;
}
public void setPassword(String password) {
this.password = password;
}
public String[] getRoles() {
return roles;
}
public void setRoles(String[] roles) {
this.roles = roles;
}
} | repos\spring-boot-quick-master\quick-oauth2\quick-oauth2-server\src\main\java\com\quick\auth\server\entity\Account.java | 2 |
请完成以下Java代码 | public class UserParam {
private long id;
@NotEmpty(message="姓名不能为空")
private String userName;
@NotEmpty(message="密码不能为空")
@Length(min=6,message="密码长度不能小于6位")
private String passWord;
@Max(value = 100, message = "年龄不能大于100岁")
@Min(value= 18 ,message= "必须年满18岁!" )
private int age;
... | return passWord;
}
public void setPassWord(String passWord) {
this.passWord = passWord;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToSt... | repos\spring-boot-leaning-master\1.x\第06课:Jpa 和 Thymeleaf 实践\spring-boot-jpa-thymeleaf\src\main\java\com\neo\param\UserParam.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProfileController implements Initializable {
private final UserService userService;
private User currentUser;
@FXML
private Label usernameLabel;
public ProfileController(UserService userService) {
this.userService = userService;
this.currentUser = userService.getCurre... | static class User {
private String name;
public User(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
} | repos\tutorials-master\javafx-2\src\main\java\com\baeldung\controller\ProfileController.java | 2 |
请完成以下Java代码 | protected String getTargetTableName() {return I_M_Forecast.Table_Name;}
@Override
protected void updateAndValidateImportRecordsImpl()
{
MForecastImportTableSqlUpdater.builder()
.selection(getImportRecordsSelection())
.tableName(getImportTableName())
.build()
.updateIForecast();
}
@Override
pro... | @NonNull WarehouseId warehouseId;
@Nullable PriceListId priceListId;
@Nullable BPartnerId bpartnerId;
@Nullable String externalId;
@NonNull LocalDate datePromisedDay;
public static ForecastHeaderKey of(final I_I_Forecast importRecord)
{
return ForecastHeaderKey.builder()
.name(StringUtils.trimBlank... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\mforecast\impexp\ForecastImportProcess.java | 1 |
请完成以下Java代码 | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("HistoricDetailVariableInstanceUpdateEntity[");
sb.append("id=").append(id);
sb.append(", name=").append(name);
sb.append(", type=").append(variableType != null ? variableType.getTypeName() : "null");
... | return sb.toString();
}
@Override
public String getScopeId() {
return null;
}
@Override
public String getSubScopeId() {
return null;
}
@Override
public String getScopeType() {
return null;
}
} | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\HistoricDetailVariableInstanceUpdateEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | OtlpMetricsConnectionDetails otlpMetricsConnectionDetails() {
return new PropertiesOtlpMetricsConnectionDetails(this.properties);
}
@Bean
@ConditionalOnMissingBean
OtlpConfig otlpConfig(OpenTelemetryProperties openTelemetryProperties,
OtlpMetricsConnectionDetails connectionDetails, Environment environment) {
... | */
static class PropertiesOtlpMetricsConnectionDetails implements OtlpMetricsConnectionDetails {
private final OtlpMetricsProperties properties;
PropertiesOtlpMetricsConnectionDetails(OtlpMetricsProperties properties) {
this.properties = properties;
}
@Override
public @Nullable String getUrl() {
ret... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsExportAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getIdNo() {
... | return bankAccountNo;
}
public void setBankAccountNo(String bankAccountNo) {
this.bankAccountNo = bankAccountNo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getSign() {
ret... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\AuthParamVo.java | 2 |
请完成以下Java代码 | public void setExternalId (final java.lang.String ExternalId)
{
set_Value (COLUMNNAME_ExternalId, ExternalId);
}
@Override
public java.lang.String getExternalId()
{
return get_ValueAsString(COLUMNNAME_ExternalId);
}
@Override
public void setTimestamp (final java.sql.Timestamp Timestamp)
{
set_Value (C... | {
return get_ValueAsString(COLUMNNAME_UI_TabId);
}
@Override
public void setUI_Trace_ID (final int UI_Trace_ID)
{
if (UI_Trace_ID < 1)
set_ValueNoCheck (COLUMNNAME_UI_Trace_ID, null);
else
set_ValueNoCheck (COLUMNNAME_UI_Trace_ID, UI_Trace_ID);
}
@Override
public int getUI_Trace_ID()
{
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_UI_Trace.java | 1 |
请完成以下Java代码 | public class ConsumerRetryAuthEvent extends KafkaEvent {
private static final long serialVersionUID = 1L;
/**
* Reasons for retrying auth a consumer.
*/
public enum Reason {
/**
* An authentication exception occurred.
*/
AUTHENTICATION,
/**
* An authorization exception occurred.
*/
AUTHORI... | /**
* Return the reason for the auth failure.
* @return the reason.
*/
public Reason getReason() {
return this.reason;
}
@Override
public String toString() {
return "ConsumerRetryAuthEvent [source=" + getSource() + ", reason=" + this.reason + "]";
}
} | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\event\ConsumerRetryAuthEvent.java | 1 |
请完成以下Java代码 | private void createLogRecord(@NonNull final DhlClientLogEvent event)
{
final I_Dhl_ShipmentOrder_Log logRecord = InterfaceWrapperHelper.newInstance(I_Dhl_ShipmentOrder_Log.class);
logRecord.setConfigSummary(event.getConfigSummary());
logRecord.setDurationMillis((int)event.getDurationMillis());
logRecord.setDH... | @Nullable
private String toJsonOrNull(@Nullable final Object object)
{
if (object == null)
{
return null;
}
if (object instanceof String)
{
return (String)object;
}
try
{
return JsonObjectMapperHolder.sharedJsonObjectMapper().writeValueAsString(object);
}
catch (final JsonProcessingExcept... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\logger\DhlDatabaseClientLogger.java | 1 |
请完成以下Java代码 | public void setPriceEntered (final @Nullable BigDecimal PriceEntered)
{
set_Value (COLUMNNAME_PriceEntered, PriceEntered);
}
@Override
public BigDecimal getPriceEntered()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PriceEntered);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public... | @Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyEnteredInPriceUOM (final @Nullable BigDecimal QtyEnteredInPriceUOM)
{
set_Value (COLUMNNAME_QtyEnteredInPriceUOM, QtyEnteredInPriceUOM... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Detail.java | 1 |
请完成以下Java代码 | public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.appen... | sb.append(", billReceiverEmail=").append(billReceiverEmail);
sb.append(", receiverName=").append(receiverName);
sb.append(", receiverPhone=").append(receiverPhone);
sb.append(", receiverPostCode=").append(receiverPostCode);
sb.append(", receiverProvince=").append(receiverProvince);
... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrder.java | 1 |
请完成以下Java代码 | public I_M_Product getM_Product()
{
return product;
}
@Override
public int getM_Product_ID()
{
return productId;
}
@Override
public IMRPSegment setM_Product(final I_M_Product product)
{
final int productIdNew;
if (product == null || product.getM_Product_ID() <= 0)
{
productIdNew = -1;
}
else | {
productIdNew = product.getM_Product_ID();
}
// No change => return this
if (productIdNew == this.productId)
{
return this;
}
final MRPSegment mrpSegmentNew = new MRPSegment(this);
mrpSegmentNew.productId = productIdNew;
mrpSegmentNew.product = product;
return mrpSegmentNew;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\mrp\api\impl\MRPSegment.java | 1 |
请完成以下Java代码 | private ADProcessInstanceController getOrLoad(final DocumentId pinstanceId)
{
try
{
return processInstances.get(pinstanceId, () -> retrieveProcessInstance(pinstanceId));
}
catch (final ExecutionException e)
{
throw AdempiereException.wrapIfNeeded(e);
}
}
@Override
public <R> R forProcessInstanceW... | // Actually put it back
processInstance.saveIfValidAndHasChanges(false); // throwEx=false
processInstances.put(pinstanceId, processInstance.copyReadonly());
return result;
}
}
}
public void addProcessParameters(final ProcessId processId, final DocumentEntityDescriptor.Builder parametersDescriptorB... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\ADProcessInstancesRepository.java | 1 |
请完成以下Java代码 | public Set<HuId> retrieveActiveSourceHUIds(@NonNull final MatchingSourceHusQuery query)
{
final IQueryBuilder<I_M_HU> queryBuilder = retrieveActiveSourceHusQuery(query);
if (queryBuilder == null)
{
return ImmutableSet.of();
}
return queryBuilder
.create()
.listIds()
.stream()
.map(HuId::o... | .create()
.list();
}
@VisibleForTesting
static ICompositeQueryFilter<I_M_HU> createHuFilter(@NonNull final MatchingSourceHusQuery query)
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);
final ICompositeQueryFilter... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\sourcehu\impl\SourceHuDAO.java | 1 |
请完成以下Java代码 | public void insertTail(T value) {
if (size == 0) {
head = tail = new Node<>(value);
} else {
tail.next = new Node<>(value);
tail = tail.next;
}
size++;
}
public void insertHead(T value) {
Node<T> newNode = new Node<>(value);
n... | }
public void removeAtIndex(int index) {
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException("Index out of bounds");
}
if (index == 0) {
removeHead();
return;
}
Node<T> current = head;
for (int i = 0; i < index ... | repos\tutorials-master\core-java-modules\core-java-collections-7\src\main\java\com\baeldung\customlinkedlist\CustomLinkedList.java | 1 |
请完成以下Java代码 | public Context[] getParams()
{
return params;
}
public int getNumOutcomes()
{
return numOutcomes;
}
public double getCorrectionConstant()
{
return correctionConstant;
} | public double getConstantInverse()
{
return constantInverse;
}
public double getCorrectionParam()
{
return correctionParam;
}
public void setCorrectionParam(double correctionParam)
{
this.correctionParam = correctionParam;
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\maxent\EvalParameters.java | 1 |
请完成以下Java代码 | public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
... | }
@java.lang.Override
public com.google.protobuf.Parser<User> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.baeldung.serialization.protocols.UserProtos.User getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
... | repos\tutorials-master\libraries-data-io\src\main\java\com\baeldung\serialization\protocols\UserProtos.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<String, Boolean> getPercentilesHistogram() {
return this.percentilesHistogram;
}
public Map<String, double[]> getPercentiles() {
return this.percentiles;
}
public Map<String, ServiceLevelObjectiveBoundary[]> getSlo() {
return this.slo;
}
public Map<String, String> getMinimumExpectedVa... | }
public static class Observations {
/**
* Meters that should be ignored when recoding observations.
*/
private Set<IgnoredMeters> ignoredMeters = new LinkedHashSet<>();
public Set<IgnoredMeters> getIgnoredMeters() {
return this.ignoredMeters;
}
public void setIgnoredMeters(Set<IgnoredMeters> ig... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\MetricsProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Integer getTotalCount() {
return totalCount;
}
/**
* 交易总笔数
*
* @param totalCount
*/
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
/**
* 结算状态(参考枚举:SettDailyCollectStatusEnum)
*
* @return
*/
public String getSettStatus() {
return settStatus;
}
/*... | *
* @param settStatus
*/
public void setSettStatus(String settStatus) {
this.settStatus = settStatus;
}
/**
* 风险预存期
*/
public Integer getRiskDay() {
return riskDay;
}
/**
* 风险预存期
*/
public void setRiskDay(Integer riskDay) {
this.riskDay = riskDay;
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpSettDailyCollect.java | 2 |
请在Spring Boot框架中完成以下Java代码 | static class SpanAspectConfiguration {
@Bean
@ConditionalOnMissingBean(NewSpanParser.class)
DefaultNewSpanParser newSpanParser() {
return new DefaultNewSpanParser();
}
@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(ValueExpressionResolver.class)
SpanTagAnnotationHandler spanTagAnnotationHandler... | ImperativeMethodInvocationProcessor imperativeMethodInvocationProcessor(NewSpanParser newSpanParser,
Tracer tracer, ObjectProvider<SpanTagAnnotationHandler> spanTagAnnotationHandler) {
return new ImperativeMethodInvocationProcessor(newSpanParser, tracer,
spanTagAnnotationHandler.getIfAvailable());
}
@B... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing\src\main\java\org\springframework\boot\micrometer\tracing\autoconfigure\MicrometerTracingAutoConfiguration.java | 2 |
请完成以下Java代码 | public java.math.BigDecimal getQtyIssued ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyIssued);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Empfangene Menge.
@param QtyReceived Empfangene Menge */
@Override
public void setQtyReceived (java.math.BigDecimal QtyReceived)
{... | Direct internal record ID
*/
@Override
public void setRecord_ID (int Record_ID)
{
if (Record_ID < 0)
set_Value (COLUMNNAME_Record_ID, null);
else
set_Value (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Datensatz-ID.
@return Direct internal record ID
*/
@Override
public int ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java-gen\de\metas\materialtracking\model\X_M_Material_Tracking_Ref.java | 1 |
请完成以下Java代码 | public void setCamelHttpResourceAuthKey (final @Nullable java.lang.String CamelHttpResourceAuthKey)
{
set_Value (COLUMNNAME_CamelHttpResourceAuthKey, CamelHttpResourceAuthKey);
}
@Override
public java.lang.String getCamelHttpResourceAuthKey()
{
return get_ValueAsString(COLUMNNAME_CamelHttpResourceAuthKey);
... | else
set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_WooCommerce_ID, ExternalSystem_Config_WooCommerce_ID);
}
@Override
public int getExternalSystem_Config_WooCommerce_ID()
{
return get_ValueAsInt(COLUMNNAME_ExternalSystem_Config_WooCommerce_ID);
}
@Override
public void setExternalSystemValue (final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_WooCommerce.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private ExternalSystemServiceModel getServiceNotNull(@NonNull final String serviceValue)
{
return serviceRepo.getByValue(serviceValue)
.orElseThrow(() -> new AdempiereException("No ExternalSystemService found by given value!")
.appendParametersToMessage()
.setParameter("ExternalSystemService.value", ... | .collect(ImmutableList.toImmutableList());
if (externalSystemServices.size() > 1)
{
//dev-note: should never happen hence "command" is an InvokeExternalSystemProcess#externalRequest meant to uniquely identify a camel service route
throw new AdempiereException("More than one ExternalSystemService found for gi... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\externalservice\ExternalServices.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public HigherInsurance createHigherInsurance() {
return new HigherInsurance();
}
/**
* Create an instance of {@link ParcelShopDelivery }
*
*/
public ParcelShopDelivery createParcelShopDelivery() {
return new ParcelShopDelivery();
}
/**
* Create an instance of {... | * the new instance of {@link JAXBElement }{@code <}{@link StoreOrders }{@code >}
*/
@XmlElementDecl(namespace = "http://dpd.com/common/service/types/ShipmentService/3.2", name = "storeOrders")
public JAXBElement<StoreOrders> createStoreOrders(StoreOrders value) {
return new JAXBElement<StoreOrd... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ObjectFactory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class MyBatisConfig1 {
@Bean(name = "test1DataSource") //test1DataSource
public DataSource testDataSource(DBConfig1 testConfig) throws SQLException {
MysqlXADataSource mysqlXaDataSource = new MysqlXADataSource();
//mysqlXaDataSource.setUrl(testConfig.getUrl());
mysqlXaDataSource... | return xaDataSource;
}
@Bean(name = "test1SqlSessionFactory")
public SqlSessionFactory testSqlSessionFactory(@Qualifier("test1DataSource") DataSource dataSource)
throws Exception {
SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
bean.setDataSource(dataSource);
... | repos\springboot-demo-master\atomikos\src\main\java\com\et\atomikos\config\MyBatisConfig1.java | 2 |
请完成以下Java代码 | private BooleanWithReason extractEnforcePriceLimit(final I_M_PriceList priceList)
{
final ITranslatableString reason = TranslatableStrings.builder()
.appendADElement("M_PriceList_ID")
.append(": ")
.append(priceList.getName())
.build();
return priceList.isEnforcePriceLimit()
? BooleanWithReaso... | return plv != null && plv.isActive() ? plv : null;
}
private UomId getProductPriceUomId(final I_M_ProductPrice productPrice)
{
final UomId productPriceUomId = UomId.ofRepoIdOrNull(productPrice.getC_UOM_ID());
if (productPriceUomId != null)
{
return productPriceUomId;
}
final ProductId productId = Prod... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\MainProductPriceRule.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 getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
} | repos\tutorials-master\persistence-modules\hibernate-queries-2\src\main\java\com\baeldung\hibernate\groupby\Product.java | 1 |
请完成以下Java代码 | public void deleteRequestAudit(@NonNull final ApiRequestAuditId apiRequestAuditId)
{
final I_API_Request_Audit record = InterfaceWrapperHelper.load(apiRequestAuditId, I_API_Request_Audit.class);
InterfaceWrapperHelper.deleteRecord(record);
}
@NonNull
public static ApiRequestAudit recordToRequestAudit(@NonNull... | .apiAuditConfigId(ApiAuditConfigId.ofRepoId(record.getAPI_Audit_Config_ID()))
.status(Status.ofCode(record.getStatus()))
.isErrorAcknowledged(record.isErrorAcknowledged())
.body(record.getBody())
.method(HttpMethod.ofNullableCode(record.getMethod()))
.path(record.getPath())
.remoteAddress(record... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\request\ApiRequestAuditRepository.java | 1 |
请完成以下Java代码 | public static AnnotatedBean of(String name, Object instance) {
return of(name, instance.getClass().getAnnotation(EnableProcessApplication.class));
}
public static AnnotatedBean ofEntry(Entry<String,Object> entry) {
return of(entry.getKey(), entry.getValue());
}
public String getName() {
... | * @throws IllegalStateException if more than one bean is found
*/
public static Function<ApplicationContext, Optional<AnnotatedBean>> getAnnotatedBean = applicationContext -> {
final Set<Entry<String, Object>> beans = Optional.ofNullable(applicationContext.getBeansWithAnnotation(EnableProcessApplication.class)... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\util\GetProcessApplicationNameFromAnnotation.java | 1 |
请完成以下Java代码 | public EventModelBuilder header(String name, String type) {
eventPayloadDefinitions.put(name, EventPayload.header(name, type));
return this;
}
@Override
public EventModelBuilder headerWithCorrelation(String name, String type) {
eventPayloadDefinitions.put(name, EventPayload.head... | @Override
public EventDeployment deploy() {
if (resourceName == null) {
throw new FlowableIllegalArgumentException("A resource name is mandatory");
}
EventModel eventModel = buildEventModel();
return eventRepository.createDeployment()
.name(deploymen... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\EventModelBuilderImpl.java | 1 |
请完成以下Java代码 | private static ClientId getClientId(
@NonNull final Login loginService,
@NonNull final UserId userId,
@NonNull final RoleId roleId)
{
final Set<ClientId> clientIds = loginService.getAvailableClients(roleId, userId);
if (clientIds == null || clientIds.isEmpty())
{
throw new AdempiereException("User is... | }
else
{
final ArrayList<Role> nonSysAdminRoles = new ArrayList<>();
for (final Role role : roles)
{
if (role.isSystem())
{
continue;
}
nonSysAdminRoles.add(role);
}
if (nonSysAdminRoles.size() == 1)
{
return nonSysAdminRoles.get(0);
}
else
{
throw new Ademp... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\authentication\AuthenticationRestController.java | 1 |
请完成以下Java代码 | public class C_Order
{
private final IOrderDeliveryDayBL orderDeliveryDayBL = Services.get(IOrderDeliveryDayBL.class);
@Init
public void setupCallouts()
{
final IProgramaticCalloutProvider calloutProvider = Services.get(IProgramaticCalloutProvider.class);
calloutProvider.registerAnnotatedCallout(new de.metas.... | {
return; // task 09000: nothing to do, the PreparationDate is only relevant for sales orders.
}
//
// Make sure the PreparationDate is set
final Timestamp preparationDate = order.getPreparationDate();
if (preparationDate == null)
{
throw new FillMandatoryException(I_C_Order.COLUMNNAME_PreparationDat... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\model\validator\C_Order.java | 1 |
请完成以下Java代码 | public List<I_M_HU_Item> retrieveItems(final I_M_HU hu)
{
final HUItemsLocalCache huItemsCache = HUItemsLocalCache.getCreate(hu);
return huItemsCache.getItems();
}
@VisibleForTesting
public static I_M_HU_Item createHUItemNoSave(
@NonNull final I_M_HU hu,
@NonNull final I_M_HU_PI_Item piItem)
{
final b... | @Override
public I_M_HU_Item createAggregateHUItem(@NonNull final I_M_HU hu)
{
return createHuItemWithoutPI(hu, X_M_HU_Item.ITEMTYPE_HUAggregate);
}
private I_M_HU_Item createHuItemWithoutPI(@NonNull final I_M_HU hu, @NonNull final String itemType)
{
final I_M_HU_Item item = InterfaceWrapperHelper.newInstance... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUAndItemsDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Forecast
{
int forecastId;
String docStatus;
@Singular
List<ForecastLine> forecastLines;
@JsonCreator
public Forecast(
@JsonProperty("forecastId") final int forecastId,
@JsonProperty("docStatus") @NonNull final String docStatus,
@JsonProperty("forecastLines") final List<ForecastLine> fore... | public void validate()
{
checkIdGreaterThanZero("forecastId", forecastId);
try
{
forecastLines.forEach(ForecastLine::validate);
}
catch (final RuntimeException e)
{
AdempiereException.wrapIfNeeded(e).appendParametersToMessage()
.setParameter("forecast", this);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\forecast\Forecast.java | 2 |
请完成以下Java代码 | public class ApplicationFailedEvent extends SpringApplicationEvent {
private final @Nullable ConfigurableApplicationContext context;
private final Throwable exception;
/**
* Create a new {@link ApplicationFailedEvent} instance.
* @param application the current application
* @param args the arguments the app... | /**
* Return the application context.
* @return the context or {@code null}
*/
public @Nullable ConfigurableApplicationContext getApplicationContext() {
return this.context;
}
/**
* Return the exception that caused the failure.
* @return the exception
*/
public Throwable getException() {
return thi... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\event\ApplicationFailedEvent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public MembershipResponse createMembershipResponse(String userId, String groupId) {
return createMembershipResponse(userId, groupId, createUrlBuilder());
}
public MembershipResponse createMembershipResponse(String userId, String groupId, RestUrlBuilder urlBuilder) {
MembershipResponse response ... | public PrivilegeResponse createPrivilegeResponse(Privilege privilege, List<User> users, List<Group> groups) {
PrivilegeResponse response = createPrivilegeResponse(privilege);
List<UserResponse> userResponses = new ArrayList<>(users.size());
for (User user : users) {
userResp... | repos\flowable-engine-main\modules\flowable-idm-rest\src\main\java\org\flowable\idm\rest\service\api\IdmRestResponseFactory.java | 2 |
请完成以下Java代码 | public int getMobileUI_UserProfile_DD_ID()
{
return get_ValueAsInt(COLUMNNAME_MobileUI_UserProfile_DD_ID);
}
@Override
public void setMobileUI_UserProfile_DD_Sort_ID (final int MobileUI_UserProfile_DD_Sort_ID)
{
if (MobileUI_UserProfile_DD_Sort_ID < 1)
set_ValueNoCheck (COLUMNNAME_MobileUI_UserProfile_DD... | return get_ValueAsInt(COLUMNNAME_MobileUI_UserProfile_DD_Sort_ID);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_UserProfile_DD_Sort.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MyBatisUserRepository implements UserRepository {
private final UserMapper userMapper;
@Autowired
public MyBatisUserRepository(UserMapper userMapper) {
this.userMapper = userMapper;
}
@Override
public void save(User user) {
if (userMapper.findById(user.getId()) == null) {
userMa... | }
@Override
public void saveRelation(FollowRelation followRelation) {
if (!findRelation(followRelation.getUserId(), followRelation.getTargetId()).isPresent()) {
userMapper.saveRelation(followRelation);
}
}
@Override
public Optional<FollowRelation> findRelation(String userId, String targetId) {... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\infrastructure\repository\MyBatisUserRepository.java | 2 |
请完成以下Java代码 | public Document processRequestHandlerResult(final IReplRequestHandlerResult result)
{
final PO poToExport = result.getPOToExport();
if (poToExport == null)
{
logger.debug("Skip because poToExport is null");
return null;
}
final I_EXP_Format formatToUse = result.getFormatToUse();
Check.errorIf(format... | final String entityType)
{
// TODO check if it already exists (by clazz and entityType).
// If it exists, then Util.assume that AD_Client_ID=0 and return it
// if it doesn't yet exist, then create it, save and return
// final String classname = clazz.getName();
// final int adClientId = 0;
//
// final S... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\process\rpl\requesthandler\api\impl\ReplRequestHandlerBL.java | 1 |
请完成以下Java代码 | public void setPA_ReportLineSet_ID (int PA_ReportLineSet_ID)
{
if (PA_ReportLineSet_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_ReportLineSet_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_ReportLineSet_ID, Integer.valueOf(PA_ReportLineSet_ID));
}
/** Get Report Line Set.
@return Report Line Set */
pu... | */
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return M... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportLine.java | 1 |
请完成以下Java代码 | public void detach() {
return;
}
@Override
public DoublyLinkedList<T> getListReference() {
return list;
}
@Override
public LinkedListNode<T> setPrev(LinkedListNode<T> next) {
return next;
}
@Override
public LinkedListNode<T> setNext(LinkedListNode<T> prev) ... | @Override
public LinkedListNode<T> getPrev() {
return this;
}
@Override
public LinkedListNode<T> getNext() {
return this;
}
@Override
public LinkedListNode<T> search(T value) {
return this;
}
} | repos\tutorials-master\data-structures\src\main\java\com\baeldung\lrucache\DummyNode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableList<PickingJobFacetGroup> getFilterGroupsInOrder() {return filters.getGroupsInOrder();}
public boolean isLauncherField(@NonNull final PickingJobFieldType fieldType)
{
return launcherFieldsInOrder.stream().anyMatch(field -> PickingJobFieldType.equals(field.getField(), fieldType));
}
@NonNull
pu... | final T option = extractOption.apply(pickingJobOptions);
if (option != null)
{
return option;
}
}
}
final T option = extractOption.apply(defaultPickingJobOptions);
if (option != null)
{
return option;
}
return defaultValue;
}
@NonNull
public ImmutableSet<BPartnerId> getPickOnlyC... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\config\mobileui\MobileUIPickingUserProfile.java | 2 |
请完成以下Java代码 | public class ChannelModel {
protected String key;
protected String category;
protected String name;
protected String description;
// inbound or outbound
protected String channelType;
// jms, rabbitmq, kafka etc
protected String type;
protected JsonNode extension;
... | }
public void setChannelType(String channelType) {
this.channelType = channelType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public JsonNode getExtension() {
return extension;
}
public void s... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\ChannelModel.java | 1 |
请完成以下Java代码 | public class ShippableOrder {
private int orderId;
private String address;
private List<PackageItem> packageItems;
public ShippableOrder(int orderId, List<PackageItem> packageItems) {
this.orderId = orderId;
this.packageItems = packageItems;
}
public int getOrderId() {
... | public List<PackageItem> getPackageItems() {
return packageItems;
}
public void setPackageItems(List<PackageItem> packageItems) {
this.packageItems = packageItems;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.ad... | repos\tutorials-master\patterns-modules\ddd-contexts\ddd-contexts-shippingcontext\src\main\java\com\baeldung\dddcontexts\shippingcontext\model\ShippableOrder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public R<GrantTreeVO> grantTree(BladeUser user) {
GrantTreeVO vo = new GrantTreeVO();
vo.setMenu(menuService.grantTree(user));
vo.setDataScope(menuService.grantDataScopeTree(user));
return R.data(vo);
}
/**
* 获取权限分配树形结构
*/
@GetMapping("/role-tree-keys")
@ApiOperationSupport(order = 11)
@Operation(summ... | return R.data(list);
}
/**
* 获取顶部菜单树形结构
*/
@GetMapping("/grant-top-tree")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
@ApiOperationSupport(order = 14)
@Operation(summary = "顶部菜单树形结构", description = "顶部菜单树形结构")
public R<GrantTreeVO> grantTopTree(BladeUser user) {
GrantTreeVO vo = new GrantTreeVO();
vo.setMenu(... | repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\MenuController.java | 2 |
请完成以下Java代码 | protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
final DocumentIdsSelection selectedRowIds = getSelectedRowIds();
if (selectedRowIds.isEmpty())
{
return ProcessPreconditionsResolution.rejectBecauseNoSelection().toInternal();
}
return ProcessPreconditionsResolution.accept();
}
... | }
else
{
return selectedRowIds.stream()
.map(PP_Order_Candidate_SetWorkstation::toPPOrderCandidateId)
.collect(ImmutableSet.toImmutableSet());
}
}
@NonNull
private static PPOrderCandidateId extractPPOrderCandidateId(final IViewRow row) {return toPPOrderCandidateId(row.getId());}
@NonNull
priva... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.webui\src\main\java\de\metas\manufacturing\webui\process\PP_Order_Candidate_SetWorkstation.java | 1 |
请完成以下Java代码 | public int getDatev_Kost1()
{
return get_ValueAsInt(COLUMNNAME_Datev_Kost1);
}
@Override
public void setDatev_Kost2 (final int Datev_Kost2)
{
set_Value (COLUMNNAME_Datev_Kost2, Datev_Kost2);
}
@Override
public int getDatev_Kost2()
{
return get_ValueAsInt(COLUMNNAME_Datev_Kost2);
}
@Override
publi... | set_Value (COLUMNNAME_Leistungsdatum, Leistungsdatum);
}
@Override
public java.lang.String getLeistungsdatum()
{
return get_ValueAsString(COLUMNNAME_Leistungsdatum);
}
@Override
public void setSkonto (final @Nullable java.lang.String Skonto)
{
set_Value (COLUMNNAME_Skonto, Skonto);
}
@Override
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_DatevAcctExportLine.java | 1 |
请完成以下Java代码 | protected void onViewClosedByUser(final PurchaseView purchaseView)
{
saveRowsAndEnqueueIfOrderCompleted(purchaseView);
}
private void saveRowsAndEnqueueIfOrderCompleted(final PurchaseView purchaseView)
{
final List<PurchaseCandidate> purchaseCandidates = saveRows(purchaseView);
if (purchaseCandidates.isEmpty... | return PurchaseRowsSaver.builder()
.purchaseCandidatesRepo(purchaseCandidatesRepo)
.build()
.save(rows);
}
private boolean isSalesOrderCompleted(@NonNull final List<PurchaseCandidate> purchaseCandidates)
{
final IOrderDAO ordersRepo = Services.get(IOrderDAO.class);
final OrderId salesOrderId = getS... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\purchasePlanning\view\SalesOrder2PurchaseViewFactory.java | 1 |
请完成以下Java代码 | public AuthorizationGrantType convert(JsonNode jsonNode) {
String value = JsonNodeUtils.findStringValue(jsonNode, "value");
if (AuthorizationGrantType.AUTHORIZATION_CODE.getValue().equalsIgnoreCase(value)) {
return AuthorizationGrantType.AUTHORIZATION_CODE;
}
if (AuthorizationGrantType.CLIENT_CREDENTIAL... | public AuthenticationMethod convert(JsonNode jsonNode) {
String value = JsonNodeUtils.findStringValue(jsonNode, "value");
if (AuthenticationMethod.HEADER.getValue().equalsIgnoreCase(value)) {
return AuthenticationMethod.HEADER;
}
if (AuthenticationMethod.FORM.getValue().equalsIgnoreCase(value)) {
re... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\jackson\StdConverters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HomeController {
@Autowired
UserService userService;
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public String getUsers() {
return "getUsers";
}
@Secured({"ROLE_ADMIN","ROLE_USER"})
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
pu... | public String update() {
return "updateUser";
}
@Secured("ROLE_ADMIN")
@RequestMapping(method = RequestMethod.DELETE)
@ResponseBody
public String delete() {
return "deleteUser";
}
} | repos\springBoot-master\springboot-springSecurity2\src\main\java\com\us\example\controller\HomeController.java | 2 |
请完成以下Java代码 | public void delete(DeadLetterJobEntity jobEntity) {
super.delete(jobEntity);
deleteExceptionByteArrayRef(jobEntity);
if (jobEntity.getExecutionId() != null && isExecutionRelatedEntityCountEnabledGlobally()) {
CountingExecutionEntity executionEntity = (CountingExecutionEntity) getEx... | newJobEntity.setJobHandlerConfiguration(job.getJobHandlerConfiguration());
newJobEntity.setJobHandlerType(job.getJobHandlerType());
newJobEntity.setExclusive(job.isExclusive());
newJobEntity.setRepeat(job.getRepeat());
newJobEntity.setRetries(job.getRetries());
newJobEntity.setEn... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\DeadLetterJobEntityManagerImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected DeploymentQuery createNewQuery(ProcessEngine engine) {
return engine.getRepositoryService().createDeploymentQuery();
}
@Override
protected void applyFilters(DeploymentQuery query) {
if (withoutSource != null && withoutSource && source != null) {
throw new InvalidRequestException(Status.BA... | query.withoutTenantId();
}
if (TRUE.equals(includeDeploymentsWithoutTenantId)) {
query.includeDeploymentsWithoutTenantId();
}
}
@Override
protected void applySortBy(DeploymentQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
if (sortBy.equals(SORT_BY_ID_VAL... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\DeploymentQueryDto.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private <C> C getBeanOrNull(B http, Class<C> clazz) {
ApplicationContext context = http.getSharedObject(ApplicationContext.class);
if (context == null) {
return null;
}
return context.getBeanProvider(clazz).getIfUnique();
}
private <C> void setSharedObject(B http, Class<C> clazz, C object) {
if (http.ge... | }
else {
matchers.add(new ParameterRequestMatcher(parts[0], parts[1]));
}
}
this.matcher = new AndRequestMatcher(matchers);
}
@Override
public boolean matches(HttpServletRequest request) {
return matcher(request).isMatch();
}
@Override
public MatchResult matcher(HttpServletRequest re... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\saml2\Saml2LoginConfigurer.java | 2 |
请完成以下Java代码 | public void setESR_Import_ID (final int ESR_Import_ID)
{
if (ESR_Import_ID < 1)
set_Value (COLUMNNAME_ESR_Import_ID, null);
else
set_Value (COLUMNNAME_ESR_Import_ID, ESR_Import_ID);
}
@Override
public int getESR_Import_ID()
{
return get_ValueAsInt(COLUMNNAME_ESR_Import_ID);
}
@Override
public v... | @Override
public void setIsReceipt (final boolean IsReceipt)
{
set_Value (COLUMNNAME_IsReceipt, IsReceipt);
}
@Override
public boolean isReceipt()
{
return get_ValueAsBoolean(COLUMNNAME_IsReceipt);
}
@Override
public void setIsValid (final boolean IsValid)
{
set_Value (COLUMNNAME_IsValid, IsValid);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportFile.java | 1 |
请完成以下Java代码 | public void setDateAcct (Timestamp DateAcct)
{
set_Value (COLUMNNAME_DateAcct, DateAcct);
}
/** Get Account Date.
@return Accounting Date
*/
public Timestamp getDateAcct ()
{
return (Timestamp)get_Value(COLUMNNAME_DateAcct);
}
/** Set Document Date.
@param DateDoc
Date of the Document
*/
pub... | Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLU... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Disposed.java | 1 |
请完成以下Java代码 | protected TypedValueSerializer determineSerializer(VariableSerializers serializers, TypedValue value) {
TypedValueSerializer serializer = serializers.findSerializerForValue(value);
if(serializer.getType() == ValueType.BYTES){
throw new ProcessEngineException("Variables of type ByteArray cannot be used to... | this.textValue2 = textValue2;
}
public Long getLongValue() {
return longValue;
}
public void setLongValue(Long longValue) {
this.longValue = longValue;
}
public Double getDoubleValue() {
return doubleValue;
}
public void setDoubleValue(Double doubleValue) {
this.doubleValue = doubleValue... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\SingleQueryVariableValueCondition.java | 1 |
请完成以下Java代码 | public String getCaseDefinitionKey() {
return caseDefinitionKey;
}
@Override
public void setCaseDefinitionKey(String caseDefinitionKey) {
this.caseDefinitionKey = caseDefinitionKey;
}
@Override
public String getCaseDefinitionName() {
return caseDefinitionName;
}
... | public String getCaseDefinitionDeploymentId() {
return caseDefinitionDeploymentId;
}
@Override
public void setCaseDefinitionDeploymentId(String caseDefinitionDeploymentId) {
this.caseDefinitionDeploymentId = caseDefinitionDeploymentId;
}
@Override
public String toString() {
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\HistoricCaseInstanceEntityImpl.java | 1 |
请完成以下Java代码 | public void setC_UOM_ID (final int C_UOM_ID)
{
if (C_UOM_ID < 1)
set_Value (COLUMNNAME_C_UOM_ID, null);
else
set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID);
}
@Override
public int getC_UOM_ID()
{
return get_ValueAsInt(COLUMNNAME_C_UOM_ID);
}
@Override
public void setM_Product_ID (final int M_Product... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToBeShipped);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQueryNo (final int QueryNo)
{
set_Value (COLUMNNAME_QueryNo, QueryNo);
}
@Override
public int getQueryNo()
{
return get_ValueAsInt(COLUMNNAME_QueryNo);
}
@... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_Available_For_Sales_QueryResult.java | 1 |
请完成以下Java代码 | public final class Effect extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
public static Effect getRootAsEffect(ByteBuffer _bb) { return getRootAsEffect(_bb, new Effect()); }
public static Effect getRootAsEffect(ByteBuffer _bb, Effect obj) { _bb.order(ByteOrder.LITTLE_ENDI... | return Effect.endEffect(builder);
}
public static void startEffect(FlatBufferBuilder builder) { builder.startTable(2); }
public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); }
public static void addDamage(FlatBufferBuilder builder, short damage) { builder... | repos\tutorials-master\libraries-data-io-2\src\main\java\com\baeldung\flatbuffers\MyGame\terrains\Effect.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CalendarId implements RepoIdAware
{
int repoId;
@JsonCreator
public static CalendarId ofRepoId(final int repoId)
{
return new CalendarId(repoId);
}
public static CalendarId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new CalendarId(repoId) : null;
} | public static int toRepoId(final CalendarId CalendarId)
{
return CalendarId != null ? CalendarId.getRepoId() : -1;
}
private CalendarId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "repoId");
}
@JsonValue
public int toJson()
{
return getRepoId();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\calendar\CalendarId.java | 2 |
请完成以下Java代码 | protected static Map<String, List<String>> resolvePaths(String sourceDirectory) {
File endpointsDir = new File(sourceDirectory + "/paths");
int endpointStartAt = endpointsDir.getAbsolutePath().length();
Collection<File> endpointsFiles = FileUtils.listFiles(
endpointsDir,
new RegexFileFilter... | } else {
operations = new ArrayList<>();
operations.add(endpointMethod);
endpoints.put(endpointPath, operations);
}
if(operations.size() > 1) {
Collections.sort(operations);
}
}
return endpoints;
}
} | repos\camunda-bpm-platform-master\engine-rest\engine-rest-openapi-generator\src\main\java\org\camunda\bpm\engine\rest\openapi\generator\impl\TemplateParser.java | 1 |
请完成以下Java代码 | public String getNumber() {
return number;
}
/**
* Sets the value of the number property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNumber(String value) {
this.number = value;
}
/**
* Gets the va... | * possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String val... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\GrouperDataType.java | 1 |
请完成以下Java代码 | public void setDLM_Referencing_Table_ID(final int DLM_Referencing_Table_ID)
{
if (DLM_Referencing_Table_ID < 1)
{
set_Value(COLUMNNAME_DLM_Referencing_Table_ID, null);
}
else
{
set_Value(COLUMNNAME_DLM_Referencing_Table_ID, Integer.valueOf(DLM_Referencing_Table_ID));
}
}
/**
* Get Referenzierend... | */
@Override
public void setIsDLM(final boolean IsDLM)
{
throw new IllegalArgumentException("IsDLM is virtual column");
}
/**
* Get DLM aktiviert.
*
* @return Die Datensätze einer Tabelle mit aktiviertem DLM können vom System unterschiedlichen DLM-Levels zugeordnet werden
*/
@Override
public boolean ... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config_Line.java | 1 |
请完成以下Java代码 | public String getHandOverAddress()
{
return delegate.getHandOverAddress();
}
@Override
public void setHandOverAddress(final String address)
{
delegate.setHandOverAddress(address);
}
@Override
public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDo... | }
@Override
public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL)
{
return documentLocationBL.toPlainDocumentLocation(this);
}
@Override
public OrderHandOverLocationAdapter toOldValues()
{
InterfaceWrapperHelper.assertNotOldValues(delegate);
return new Or... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\location\adapter\OrderHandOverLocationAdapter.java | 1 |
请完成以下Java代码 | public void setDIM_Dimension_Type_ID (int DIM_Dimension_Type_ID)
{
if (DIM_Dimension_Type_ID < 1)
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Type_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Type_ID, Integer.valueOf(DIM_Dimension_Type_ID));
}
/** Get Dimensionstyp.
@return Dimensionstyp ... | /** Get Interner Name.
@return Generally used to give records a name that can be safely referenced from code.
*/
@Override
public java.lang.String getInternalName ()
{
return (java.lang.String)get_Value(COLUMNNAME_InternalName);
}
/** Set Name.
@param Name Name */
@Override
public void setName (java... | repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Type.java | 1 |
请完成以下Java代码 | protected MessageEntity newJobInstance(EventSubscriptionEntity eventSubscription) {
MessageEntity message = new MessageEntity();
// initialize job
message.setActivityId(eventSubscription.getActivityId());
message.setExecutionId(eventSubscription.getExecutionId());
message.setProcessInstanceId(even... | protected JobHandlerConfiguration resolveJobHandlerConfiguration(EventSubscriptionEntity context) {
return new EventSubscriptionJobConfiguration(context.getId());
}
@SuppressWarnings("unchecked")
public static List<EventSubscriptionJobDeclaration> getDeclarationsForActivity(PvmActivity activity) {
Object... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\EventSubscriptionJobDeclaration.java | 1 |
请完成以下Java代码 | private QtyReportedAndQtyActual retreiveQtyReportedOrNull(
final I_C_Flatrate_Term flatrateTerm,
final Timestamp startDate, final Timestamp endDate,
final I_C_UOM uom)
{
final IFlatrateBL flatrateBL = Services.get(IFlatrateBL.class);
final List<String> errors = new ArrayList<>();
final List<I_C_Flatrat... | {
final BigDecimal qtyReported;
final BigDecimal qtyActual;
public QtyReportedAndQtyActual(BigDecimal qtyReported, BigDecimal qtyActual)
{
this.qtyReported = qtyReported;
this.qtyActual = qtyActual;
}
}
@Override
protected void prepare()
{
for (final ProcessInfoParameter para : getParametersAsAr... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\process\C_Flatrate_Term_Prepare_Closing.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Country {
@Id
@GeneratedValue
private int id;
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this... | Country country = (Country) o;
return id == country.id && name.equals(country.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
return "Country{" +
"id=" + id +
", name='" + name + '\'' +... | repos\tutorials-master\persistence-modules\spring-boot-persistence-h2\src\main\java\com\baeldung\h2db\springboot\models\Country.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceCandidateHeaderAggregationId implements RepoIdAware
{
@Nullable
public static InvoiceCandidateHeaderAggregationId cast(@Nullable final RepoIdAware repoIdAware)
{
return (InvoiceCandidateHeaderAggregationId)repoIdAware;
}
@JsonCreator
public static InvoiceCandidateHeaderAggregationId ofRepoI... | int repoId;
private InvoiceCandidateHeaderAggregationId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Invoice_Candidate_HeaderAggregation_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static int toRepoId(@Nullable final InvoiceCandidateHeaderAgg... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\InvoiceCandidateHeaderAggregationId.java | 2 |
请完成以下Java代码 | public void setKey(String key) {
this.key = key;
}
@Override
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
@Override
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
@Override
pu... | }
public String getLocalizedName() {
return localizedName;
}
@Override
public void setLocalizedName(String localizedName) {
this.localizedName = localizedName;
}
public String getLocalizedDescription() {
return localizedDescription;
}
@Override
public... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\CaseDefinitionEntityImpl.java | 1 |
请完成以下Java代码 | public void setProtocol (java.lang.String Protocol)
{
set_Value (COLUMNNAME_Protocol, Protocol);
}
/** Get Protocol.
@return Protocol
*/
@Override
public java.lang.String getProtocol ()
{
return (java.lang.String)get_Value(COLUMNNAME_Protocol);
}
@Override
public org.compiere.model.I_R_RequestType... | {
Integer ii = (Integer)get_Value(COLUMNNAME_R_RequestType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Nutzer-ID/Login.
@param UserName Nutzer-ID/Login */
@Override
public void setUserName (java.lang.String UserName)
{
set_Value (COLUMNNAME_UserName, UserName);
}
/** Get Nutz... | repos\metasfresh-new_dawn_uat\backend\de.metas.inbound.mail\src\main\java-gen\de\metas\inbound\mail\model\X_C_InboundMailConfig.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void deleteEventSubscriptionsForProcessDefinitionAndProcessStartEvent(String processDefinitionId, String eventType, String activityId, String configuration) {
Map<String, Object> params = new HashMap<>();
params.put("processDefinitionId", processDefinitionId);
params.put("eventType", even... | signalEventSubscriptionEntities.add((SignalEventSubscriptionEntity) eventSubscriptionEntity);
}
return signalEventSubscriptionEntities;
}
protected List<MessageEventSubscriptionEntity> toMessageEventSubscriptionEntityList(List<EventSubscriptionEntity> result) {
List<MessageEventSubscrip... | repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\impl\persistence\entity\data\impl\MybatisEventSubscriptionDataManager.java | 2 |
请完成以下Java代码 | public int getS_TimeExpenseLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_S_TimeExpenseLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_S_TimeType getS_TimeType() throws RuntimeException
{
return (I_S_TimeType)MTable.get(getCtx(), I_S_TimeType.Table_Name)
.getPO(getS... | else
set_Value (COLUMNNAME_S_TimeType_ID, Integer.valueOf(S_TimeType_ID));
}
/** Get Time Type.
@return Type of time recorded
*/
public int getS_TimeType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_S_TimeType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_TimeExpenseLine.java | 1 |
请完成以下Java代码 | public class X_PP_ComponentGenerator extends org.compiere.model.PO implements I_PP_ComponentGenerator, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -109296013L;
/** Standard Constructor */
public X_PP_ComponentGenerator (final Properties ctx, final int PP_ComponentGenerator... | @Override
public void setAD_Sequence_ID (final int AD_Sequence_ID)
{
if (AD_Sequence_ID < 1)
set_Value (COLUMNNAME_AD_Sequence_ID, null);
else
set_Value (COLUMNNAME_AD_Sequence_ID, AD_Sequence_ID);
}
@Override
public int getAD_Sequence_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Sequence_ID);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_ComponentGenerator.java | 1 |
请完成以下Java代码 | protected boolean calculateSize()
{
if (p_sizeCalculated)
return true;
//
p_height = m_renderer.getHeight();
p_width = m_renderer.getWidth();
// Limits
if (p_maxWidth != 0f)
p_width = p_maxWidth;
if (p_maxHeight != 0f)
{
if (p_maxHeight == -1f) // one line only
p_height = m_renderer.getH... | } // paint
/**
* String Representation
* @return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer("HTMLElement[");
sb.append("Bounds=").append(getBounds())
.append(",Height=").append(p_height).append("(").append(p_maxHeight)
.append("),Width=").append(p_width).append("(").appe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\HTMLElement.java | 1 |
请完成以下Java代码 | private Optional<Quantity> calculateWeight_usingNominalGrossWeight(final I_M_HU hu)
{
Quantity result = null;
for (final IHUProductStorage huProductStorage : handlingUnitsBL.getStorageFactory().getStorage(hu).getProductStorages())
{
final Quantity huProductStorageWeight = calculateWeight_usingNominalGrossWeig... | final Quantity qty = uomConversionBL.convertToProductUOM(huProductStorage.getQty(), productId);
final Quantity weight = productWeight.multiply(qty.toBigDecimal()).roundToUOMPrecision();
return Optional.of(weight);
}
private Optional<Quantity> calculateWeight_usingWeightGrossAttribute(final I_M_HU hu)
{
final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipping\weighting\ShippingWeightCalculator.java | 1 |
请完成以下Java代码 | public boolean isEnableHistoryCleaning() {
return enableHistoryCleaning;
}
public ProcessEngineConfiguration setEnableHistoryCleaning(boolean enableHistoryCleaning) {
this.enableHistoryCleaning = enableHistoryCleaning;
return this;
}
public String getHistoryCleaningTimeCycleCon... | public ProcessEngineConfiguration setCleanInstancesBatchSize(int cleanInstancesBatchSize) {
this.cleanInstancesBatchSize = cleanInstancesBatchSize;
return this;
}
public HistoryCleaningManager getHistoryCleaningManager() {
return historyCleaningManager;
}
public ProcessEngineCo... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\ProcessEngineConfiguration.java | 1 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("useBaseLanguage", useBaseLanguage)
.add("AD_Language", adLanguage)
.toString();
}
public boolean isUseBaseLanguage()
{
return adLanguage == null && Boolean.TRUE.equals(useBaseLanguage);
}
p... | {
return null;
}
else if (isUseBaseLanguage())
{
return trlString.getStringBaseLanguage();
}
else if (isUseTranslantionLanguage())
{
return trlString.getStringTrlPattern();
}
else if (isUseSpecificLanguage())
{
return trlString.translate(getAD_Language());
}
else
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MLookupFactory.java | 1 |
请完成以下Java代码 | public String getVersion() {
return version;
}
public MachineInfo setVersion(String version) {
this.version = version;
return this;
}
public boolean isHealthy() {
long delta = System.currentTimeMillis() - lastHeartbeat;
return delta < DashboardConfig.getUnhe... | .append(", heartbeatVersion=").append(heartbeatVersion)
.append(", lastHeartbeat=").append(lastHeartbeat)
.append(", version='").append(version).append('\'')
.append(", healthy=").append(isHealthy())
.append('}').toString();
}
@Override
public boolean equals(... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\discovery\MachineInfo.java | 1 |
请完成以下Java代码 | public static HalIdentityLink fromIdentityLink(IdentityLink identityLink) {
HalIdentityLink halIdentityLink = new HalIdentityLink();
halIdentityLink.type = identityLink.getType();
halIdentityLink.userId = identityLink.getUserId();
halIdentityLink.groupId = identityLink.getGroupId();
halIdentityLink... | return type;
}
public String getUserId() {
return userId;
}
public String getGroupId() {
return groupId;
}
public String getTaskId() {
return taskId;
}
} | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\hal\identitylink\HalIdentityLink.java | 1 |
请完成以下Java代码 | public static class Builder {
private List<InstanceExchangeFilterFunction> filters = new ArrayList<>();
private WebClient.Builder webClientBuilder;
public Builder() {
this(WebClient.builder());
}
public Builder(WebClient.Builder webClientBuilder) {
this.webClientBuilder = webClientBuilder;
}
pr... | public Builder webClient(WebClient.Builder builder) {
this.webClientBuilder = builder;
return this;
}
public Builder clone() {
return new Builder(this);
}
public InstanceWebClient build() {
this.filters.stream()
.map(InstanceWebClient::toExchangeFilterFunction)
.forEach(this.webClientBuild... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\web\client\InstanceWebClient.java | 1 |
请完成以下Java代码 | public Object getValueAsJsonObject(final JSONOptions jsonOpts)
{
return documentField.getValueAsJsonObject(jsonOpts);
}
@Override
public LogicExpressionResult getReadonly()
{
return documentField.getReadonly();
}
@Override
public LogicExpressionResult getMandatory()
{
return documentField.getMandatory(... | @Override
public DocumentValidStatus getValidStatus()
{
return documentField.getValidStatus();
}
@Override
public DeviceDescriptorsList getDevices()
{
return documentField.getDescriptor()
.getDeviceDescriptorsProvider()
.getDeviceDescriptors();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\DocumentFieldAsProcessInstanceParameter.java | 1 |
请完成以下Java代码 | public String getExpressionLanguage() {
return expressionLanguageAttribute.getValue(this);
}
public void setExpressionLanguage(String expressionLanguage) {
expressionLanguageAttribute.setValue(this, expressionLanguage);
}
public ImportedElement getImportedElement() {
return importedElementChild.ge... | });
expressionLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPRESSION_LANGUAGE)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
importedElementChild = sequenceBuilder.element(ImportedElement.class)
.required()
.build();
typeBuilder.build();
}
... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\ImportedValuesImpl.java | 1 |
请完成以下Java代码 | public final void addAssignedHUs(final Collection<I_M_HU> husToAssign)
{
huAssignmentBL.assignHUs(getDocumentLineModel(), husToAssign, getTrxName());
//
// Reset cached values
assignedHUs = null;
markStorageStaled();
}
private final void markStorageStaled()
{
if (productStorage == null)
{
return;... | assignedHUs = null;
markStorageStaled();
}
@Override
public final void destroyAssignedHU(final I_M_HU huToDestroy)
{
Check.assumeNotNull(huToDestroy, "huToDestroy not null");
InterfaceWrapperHelper.setThreadInheritedTrxName(huToDestroy);
removeAssignedHUs(Collections.singleton(huToDestroy));
final ICo... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\AbstractHUAllocations.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void save(@NonNull final Milestone milestone)
{
final I_S_Milestone record = InterfaceWrapperHelper.loadOrNew(milestone.getMilestoneId(), I_S_Milestone.class);
if (milestone.getDueDate() != null)
{
record.setMilestone_DueDate(Timestamp.from(milestone.getDueDate()));
}
record.setAD_Org_ID(mileston... | InterfaceWrapperHelper.saveRecord(record);
milestone.setMilestoneId(MilestoneId.ofRepoId(record.getS_Milestone_ID()));
}
public boolean exists(@NonNull final MilestoneId milestoneId)
{
return queryBL
.createQueryBuilder(I_S_Milestone.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_S_Milesto... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\milestone\MilestoneRepository.java | 2 |
请完成以下Java代码 | public AuthorizationQuery hasPermission(Permission p) {
queryByPermission = true;
if (resourcesIntersection.size() == 0) {
resourcesIntersection.addAll(Arrays.asList(p.getTypes()));
} else {
resourcesIntersection.retainAll(new HashSet<Resource>(Arrays.asList(p.getTypes())));
}
this.per... | public String getId() {
return id;
}
public boolean isQueryByPermission() {
return queryByPermission;
}
public String[] getUserIds() {
return userIds;
}
public String[] getGroupIds() {
return groupIds;
}
public int getResourceType() {
return resourceType;
}
public String get... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\AuthorizationQueryImpl.java | 1 |
请完成以下Java代码 | public LocalDate getDocumentDate()
{
return TimeUtil.asLocalDate(getDateDoc());
}
@Override
public String getProcessMsg()
{
return m_processMsg;
}
@Override
public int getDoc_User_ID()
{
return getAD_User_ID();
}
@Override
public int getC_Currency_ID()
{
final I_M_PriceList pl = Services.get(IPr... | return getTotalLines();
}
private String getUserName()
{
return Services.get(IUserDAO.class).retrieveUserOrNull(getCtx(), getAD_User_ID()).getName();
}
/**
* @return true if CO, CL or RE
*/
public boolean isComplete()
{
final String ds = getDocStatus();
return DOCSTATUS_Completed.equals(ds)
|| DO... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRequisition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class S3FileServiceImpl implements FileService {
private final FileReader s3ResponseReader;
@Override
public FileDownloadResponse downloadFile(String s3Url) {
try {
// Parse the S3 URL
URI uri = new URI(s3Url);
// Extract bucket name and object key
... | .contentType(contentType)
.build();
} catch (IOException | S3Exception e) {
e.printStackTrace();
return null;
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
private String extractFilenameFromKey(String objectKey) {
... | repos\tutorials-master\aws-modules\aws-rest\src\main\java\com\baeldung\aws\rest\s3\download\service\S3FileServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Img2TxtService {
public static String toChar = "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/|()1{}[]?-_+~<>i!lI;:, ^`'. ";
public static int width = 150, height = 150; // 大小自己可设置
private static String FILE_PATH;
static {
try {
FILE_PATH = ResourceUtils.getURL("classpath:").getPath();
Syst... | }
private static char[][] getImageMatrix(BufferedImage img) {
int w = img.getWidth(), h = img.getHeight();
char[][] rst = new char[w][h];
for (int i = 0; i < w; i++)
for (int j = 0; j < h; j++) {
int rgb = img.getRGB(i, j);
// 注意溢出
... | repos\spring-boot-quick-master\quick-img2txt\src\main\java\com\quick\img2txt\Img2TxtService.java | 2 |
请完成以下Java代码 | public boolean isValidEAN13Product(final @NonNull EAN13 ean13, @NonNull final ProductId lineProductId)
{
return productBL.isValidEAN13Product(ean13, lineProductId);
}
public ProductsLoadingCache newProductsLoadingCache()
{
return ProductsLoadingCache.builder()
.productBL(productBL)
.build();
}
publi... | .productId(productId)
.attributeInstanceBasicInfos(attributes.entrySet()
.stream()
.map(entry -> CreateAttributeInstanceReq.builder()
.attributeCode(entry.getKey())
.value(entry.getValue())
.build())
.collect(Collectors.toList()))
.build()
);
}
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\products\ProductService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ReturnT<String> add(XxlJobInfo jobInfo) {
return xxlJobService.add(jobInfo);
}
@RequestMapping("/update")
@ResponseBody
public ReturnT<String> update(XxlJobInfo jobInfo) {
return xxlJobService.update(jobInfo);
}
@RequestMapping("/remove")
@ResponseBody
public ReturnT<String> remove(int id) {
re... | List<String> result = new ArrayList<>();
try {
Date lastTime = new Date();
for (int i = 0; i < 5; i++) {
lastTime = JobScheduleHelper.generateNextValidTime(paramXxlJobInfo, lastTime);
if (lastTime != null) {
result.add(DateUtil.formatDateTime(lastTime));
} else {
break;
}
}
} catc... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\controller\JobInfoController.java | 2 |
请完成以下Java代码 | static PPOrderWeightingRunId extractId(final @NonNull I_PP_Order_Weighting_Run record)
{
return PPOrderWeightingRunId.ofRepoId(record.getPP_Order_Weighting_Run_ID());
}
public void save(final PPOrderWeightingRun weightingRun)
{
final I_PP_Order_Weighting_Run record = getRecordById(weightingRun.getId());
upda... | if (!savedIds.contains(id))
{
it.remove();
InterfaceWrapperHelper.delete(checkRecord);
}
}
}
}
private void saveRecordIfAllowed(final I_PP_Order_Weighting_Run record)
{
if (runIdToAvoidSaving.contains(extractId(record)))
{
return;
}
InterfaceWrapperHelper.save(record);
}
privat... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\run\PPOrderWeightingRunLoaderAndSaver.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public StatsdFlavor flavor() {
return obtain(StatsdProperties::getFlavor, StatsdConfig.super::flavor);
}
@Override
public boolean enabled() {
return obtain(StatsdProperties::isEnabled, StatsdConfig.super::enabled);
}
@Override
public String host() {
return obtain(StatsdProperties::getHost, StatsdConfig.su... | return obtain(StatsdProperties::getMaxPacketLength, StatsdConfig.super::maxPacketLength);
}
@Override
public Duration pollingFrequency() {
return obtain(StatsdProperties::getPollingFrequency, StatsdConfig.super::pollingFrequency);
}
@Override
public Duration step() {
return obtain(StatsdProperties::getStep,... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\statsd\StatsdPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public class AttributesIncludedTabData
{
@NonNull @Getter private final AttributesIncludedTabDataKey key;
@NonNull private final ImmutableMap<AttributeId, AttributesIncludedTabDataField> fields;
@Builder
private AttributesIncludedTabData(
@NonNull final AttributesIncludedTabDataKey key,
@Nullable final Map<A... | return field != null ? field.getValueString() : null;
}
public BigDecimal getValueAsBigDecimal(final AttributeId attributeId)
{
final AttributesIncludedTabDataField field = fields.get(attributeId);
return field != null ? field.getValueNumber() : null;
}
public Integer getValueAsInteger(final AttributeId attr... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\attributes_included_tab\data\AttributesIncludedTabData.java | 1 |
请完成以下Java代码 | public String toString()
{
return "MaterialTrackingQuery ["
+ "productId=" + productId
+ ", bpartnerId=" + bpartnerId
+ ", processed=" + processed
+ ", completeFlatrateTerm" + completeFlatrateTerm
+ ", withLinkedDocuments=" + withLinkedDocuments
+ ", returnReadOnlyRecords=" + returnReadOnlyRe... | @Override
public IMaterialTrackingQuery setOnMoreThanOneFound(final OnMoreThanOneFound onMoreThanOneFound)
{
Check.assumeNotNull(onMoreThanOneFound, "onMoreThanOneFound not null");
this.onMoreThanOneFound = onMoreThanOneFound;
return this;
}
@Override
public OnMoreThanOneFound getOnMoreThanOneFound()
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingQuery.java | 1 |
请完成以下Java代码 | private JSONDocumentOptions getJSONDocumentOptions()
{
final Supplier<JSONDocumentOptions> jsonDocumentOptionsSupplier = this._jsonDocumentOptionsSupplier;
if (jsonDocumentOptionsSupplier == null)
{
throw new IllegalStateException("jsonDocumentOptions suppliere not configured");
}
final JSONDocumentOptio... | return newResponse(HttpStatus.NOT_MODIFIED, etag).build();
}
// Get the result and convert it to JSON
final R result = this.result.get();
final ResponseEntity.BodyBuilder newResponse = newResponse(HttpStatus.OK, etag);
return toJsonMapper.apply(newResponse, result);
}
private final ResponseEntity.BodyBui... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\cache\ETagResponseEntityBuilder.java | 1 |
请完成以下Java代码 | public final class PublicClientAuthenticationProvider implements AuthenticationProvider {
private static final String ERROR_URI = "https://datatracker.ietf.org/doc/html/rfc6749#section-3.2.1";
private final Log logger = LogFactory.getLog(getClass());
private final RegisteredClientRepository registeredClientReposi... | if (this.logger.isTraceEnabled()) {
this.logger.trace("Validated client authentication parameters");
}
// Validate the "code_verifier" parameter for the public client
this.codeVerifierAuthenticator.authenticateRequired(clientAuthentication, registeredClient);
if (this.logger.isTraceEnabled()) {
this.log... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\PublicClientAuthenticationProvider.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.