instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public CaseInstanceStartEventSubscriptionDeletionBuilder caseDefinitionId(String caseDefinitionId) {
this.caseDefinitionId = caseDefinitionId;
return this;
}
@Override
public CaseInstanceStartEventSubscriptionDeletionBuilder tenantId(String tenantId) {
this.tenantId = tenantId;
... | public boolean hasCorrelationParameterValues() {
return correlationParameterValues.size() > 0;
}
public Map<String, Object> getCorrelationParameterValues() {
return correlationParameterValues;
}
@Override
public void deleteSubscriptions() {
checkValidInformation();
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceStartEventSubscriptionDeletionBuilderImpl.java | 1 |
请完成以下Java代码 | public class UmsResourceCategory implements Serializable {
private Long id;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "分类名称")
private String name;
@ApiModelProperty(value = "排序")
private Integer sort;
private static final long serialVersionU... | }
public void setName(String name) {
this.name = name;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(ge... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsResourceCategory.java | 1 |
请完成以下Java代码 | protected Class<TbMsgPushToEdgeNodeConfiguration> getConfigClazz() {
return TbMsgPushToEdgeNodeConfiguration.class;
}
@Override
protected void processMsg(TbContext ctx, TbMsg msg) {
try {
if (EntityType.EDGE.equals(msg.getOriginator().getEntityType())) {
EdgeEven... | }
@Override
public void onFailure(Throwable t) {
ctx.tellFailure(msg, t);
}
}, ctx.getDbCallbackExecutor());
}
}
} catch (Exception e) {
log.error("Fai... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\edge\TbMsgPushToEdgeNode.java | 1 |
请完成以下Java代码 | public List<String> getProcessKeyNotIn() {
return processKeyNotIn;
}
public Date getStartedAfter() {
return startedAfter;
}
public Date getStartedBefore() {
return startedBefore;
}
public Date getFinishedAfter() {
return finishedAfter;
}
public Date ge... | public boolean isIncludeProcessVariables() {
return includeProcessVariables;
}
public boolean isWithException() {
return withJobException;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
publi... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricProcessInstanceQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | HazelcastInstance hazelcastInstance(HazelcastProperties properties, ResourceLoader resourceLoader,
ObjectProvider<HazelcastConfigCustomizer> hazelcastConfigCustomizers) throws IOException {
Resource configLocation = properties.resolveConfigLocation();
Config config = (configLocation != null) ? loadConfig(conf... | @Bean
@Order(0)
HazelcastConfigCustomizer loggingHazelcastConfigCustomizer() {
return (config) -> {
if (!config.getProperties().containsKey(HAZELCAST_LOGGING_TYPE)) {
config.setProperty(HAZELCAST_LOGGING_TYPE, "slf4j");
}
};
}
}
/**
* {@link HazelcastConfigResourceCondition} that checks i... | repos\spring-boot-4.0.1\module\spring-boot-hazelcast\src\main\java\org\springframework\boot\hazelcast\autoconfigure\HazelcastServerConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void prepareErrorFile(@NonNull final Exchange exchange)
{
final StringBuilder content = new StringBuilder();
content.append(" Exchange body when error occurred: ")
.append(exchange.getIn().getBody(String.class))
.append("\n");
final Exception exception = exchange.getProperty(Exchange.EXCEPTION_... | }
}
private void prepareErrorLogMessage(@NonNull final Exchange exchange)
{
final Integer pInstanceId = exchange.getIn().getHeader(HEADER_PINSTANCE_ID, Integer.class);
if (pInstanceId == null)
{
throw new RuntimeException("No PInstanceId available!");
}
final JsonErrorItem errorItem = ErrorProcessor.... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\to_mf\ErrorReportRouteBuilder.java | 2 |
请完成以下Java代码 | public String toString()
{
return ObjectUtils.toString(this);
}
public int getAD_Session_ID()
{
return AD_Session_ID;
}
public String getTrxName()
{
return trxName;
}
public int getAD_Table_ID()
{
return AD_Table_ID;
}
public int getAD_Column_ID()
{
return AD_Column_ID;
}
public int getRec... | return this;
}
public Builder setAD_Column_ID(final int AD_Column_ID)
{
this.AD_Column_ID = AD_Column_ID;
return this;
}
public Builder setRecord_ID(final int record_ID)
{
this.record_ID = record_ID;
return this;
}
public Builder setAD_Client_ID(final int AD_Client_ID)
{
this.AD_Clie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\session\ChangeLogRecord.java | 1 |
请完成以下Java代码 | public class DiscordNotifier extends AbstractContentNotifier {
private static final String DEFAULT_MESSAGE = "*#{name}* (#{id}) is *#{status}*";
private RestTemplate restTemplate;
/**
* Webhook URI for the Discord API (i.e.
* https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token})
*/
@Nullable
p... | body.put("username", username);
}
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add(HttpHeaders.USER_AGENT, "RestTemplate");
return new HttpEntity<>(body, headers);
}
@Override
protected String getDefaultMessage() {
return DEFAULT_MESSAGE;
}
@Nu... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\DiscordNotifier.java | 1 |
请完成以下Java代码 | public static class Builder extends PermissionsBuilder<OrgPermission, OrgPermissions>
{
private final AdTreeId orgTreeId;
private final ImmutableSet.Builder<ClientId> adClientIds = ImmutableSet.builder();
private final ImmutableSet.Builder<OrgId> adOrgIds = ImmutableSet.builder();
private Builder(@Nullable fi... | + ", AD_Org_ID"
+ ", " + I_AD_Org.COLUMNNAME_IsSummary
+ " FROM AD_Org "
+ " WHERE IsActive='Y' AND AD_Org_ID IN (SELECT Node_ID FROM " + tree.getNodeTableName()
+ " WHERE AD_Tree_ID=? AND Parent_ID=? AND IsActive='Y')";
final Object[] sqlParams = new Object[] { tree.getAD_Tree_ID(), orgResource.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\OrgPermissions.java | 1 |
请完成以下Java代码 | protected Mono<ServerResponse> prepareResponse(ServerRequest request, WebGraphQlResponse response) {
MediaType responseMediaType = selectResponseMediaType(request);
HttpStatus responseStatus = selectResponseStatus(response, responseMediaType);
ServerResponse.BodyBuilder builder = ServerResponse.status(responseSta... | acceptedMediaTypes = headers.accept();
}
catch (InvalidMediaTypeException ex) {
throw new NotAcceptableStatusException("Could not parse " +
"Accept header [" + headers.firstHeader(HttpHeaders.ACCEPT) + "]: " + ex.getMessage());
}
for (MediaType accepted : acceptedMediaTypes) {
if (SUPPORTED_MEDIA_TYP... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\webflux\GraphQlHttpHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<Parameter> retrieveParams(Properties ctx, String parentTable, int parentId, String parameterTable, String trxName)
{
final List<Parameter> result = new ArrayList<Parameter>();
final List<IParameterPO> paramPOs = Services.get(IParametersDAO.class).retrieveParamPOs(ctx, parentTable, parentId, parameterT... | throw new IllegalArgumentException("Illegal displayType " + displayType);
}
return result;
}
private String mkParamValueStr(final Object valueObj, final int displayType)
{
final String result;
if (displayType == DisplayType.String)
{
result = (String)valueObj;
}
else if (displayType == DisplayTyp... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\ParameterBL.java | 2 |
请完成以下Java代码 | static Handler.Wrapper createGzipHandlerWrapper(Compression compression) {
CompressionHandler compressionHandler = new CompressionHandler();
GzipCompression gzip = new GzipCompression();
gzip.setMinCompressSize((int) compression.getMinResponseSize().toBytes());
compressionHandler.putCompression(gzip);
Builder... | private final String value;
ServerHeaderHandler(String value) {
this.value = value;
}
@Override
public boolean handle(Request request, Response response, Callback callback) throws Exception {
Mutable headers = response.getHeaders();
if (!headers.contains(SERVER_HEADER)) {
headers.add(SERVER_HEADE... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\JettyHandlerWrappers.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HelloWorldController {
@RequestMapping("/hello")
@RateLimiter(name="ratelimitApi",fallbackMethod = "fallback")
public ResponseEntity<String> showHelloWorld(){
return new ResponseEntity<>("success",HttpStatus.OK);
}
public ResponseEntity fallback(Throwable e){
log.error("fallback exception , ... | i++;
log.info("retry time:{}",i);
throw new HttpServerErrorException(HttpStatusCode.valueOf(101));
}
return new ResponseEntity<>("retry",HttpStatus.OK);
}
@RequestMapping("/bulkhead")
@Bulkhead(name = "backendA")
public ResponseEntity<String> bulkhead(){
return new ResponseEntity<>("bulkhead",HttpSt... | repos\springboot-demo-master\resilience4j\src\main\java\com\et\resilience4j\controller\HelloWorldController.java | 2 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ReceiveTask.class, BPMN_ELEMENT_RECEIVE_TASK)
.namespaceUri(BPMN20_NS)
.extendsType(Task.class)
.instanceProvider(new ModelTypeInstanceProvider<ReceiveTask>() {
public... | return new ReceiveTaskBuilder((BpmnModelInstance) modelInstance, this);
}
public String getImplementation() {
return implementationAttribute.getValue(this);
}
public void setImplementation(String implementation) {
implementationAttribute.setValue(this, implementation);
}
public boolean instantiat... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ReceiveTaskImpl.java | 1 |
请完成以下Java代码 | public byte[] addInterface() {
addInterfaceAdapter = new AddInterfaceAdapter(writer);
reader.accept(addInterfaceAdapter, 0);
return writer.toByteArray();
}
public class AddInterfaceAdapter extends ClassVisitor {
public AddInterfaceAdapter(ClassVisitor cv) {
super(AS... | tracer.visitEnd();
System.out.println(tracer.p.getText());
}
}
public class AddFieldAdapter extends ClassVisitor {
String fieldName;
int access;
boolean isFieldPresent;
public AddFieldAdapter(String fieldName, int access, ClassVisitor cv) {
sup... | repos\tutorials-master\libraries-bytecode\src\main\java\com\baeldung\asm\CustomClassWriter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | ReactiveTenantExtension tenantExtension() {
return ReactiveTenantExtension.INSTANCE;
}
/**
* Extension that looks up a {@link Tenant} from the {@link reactor.util.context.Context}.
*/
enum ReactiveTenantExtension implements ReactiveEvaluationContextExtension {
INSTANCE;
@Override
public Mono<? extends... | @Override
public String getExtensionId() {
return "my-tenant-extension";
}
@Override
public Tenant getRootObject() {
return tenant;
}
}
/**
* The root object.
*/
@Value
public static class Tenant {
String tenantId;
}
} | repos\spring-data-examples-main\cassandra\reactive\src\main\java\example\springdata\cassandra\spel\ApplicationConfiguration.java | 2 |
请完成以下Java代码 | public HistoricIncidentQuery orderByConfiguration() {
orderBy(HistoricIncidentQueryProperty.CONFIGURATION);
return this;
}
public HistoricIncidentQuery orderByHistoryConfiguration() {
orderBy(HistoricIncidentQueryProperty.HISTORY_CONFIGURATION);
return this;
}
public HistoricIncidentQuery orde... | public String getProcessInstanceId() {
return processInstanceId;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public String[] getProcessDefinitionKeys() {
return processDefinitionKeys;
}
public String getCauseIncidentId() {
return causeIncidentId;
}
public... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricIncidentQueryImpl.java | 1 |
请完成以下Java代码 | private static List<LiquibaseDataType> getDataTypes() {
return List.of(
new BooleanType(),
new TinyIntType(),
new IntType(),
new MediumIntType(),
new BigIntType(),
new FloatType(),
new DoubleType(),
new DecimalType(),
new ... | private static List<AbstractJdbcDatabase> getDatabases() {
return List.of(
new MySQLDatabase(),
new SQLiteDatabase(),
new H2Database(),
new PostgresDatabase(),
new DB2Database(),
new MSSQLDatabase(),
new OracleDatabase(),
new HsqlDa... | repos\tutorials-master\persistence-modules\liquibase\src\main\java\com\baeldung\liquibase\utility\LiquibaseDatatypes.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProgramPayResultVo implements Serializable {
private static final long serialVersionUID = 651601163997960632L;
/**
* 交易状态
*/
private String status;
/**
* 支付信息
*/
private String payMessage;
/**
* 银行返回信息
*/
private String bankReturnMsg;
/**
... | public String getBankReturnMsg() {
return bankReturnMsg;
}
public void setBankReturnMsg(String bankReturnMsg) {
this.bankReturnMsg = bankReturnMsg;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\ProgramPayResultVo.java | 2 |
请完成以下Java代码 | private Map<CacheKey, DataEntryRecord> loadRecords(final Collection<CacheKey> keys)
{
final DataEntryRecordQuery query = toDataEntryRecordQuery(keys);
final List<DataEntryRecord> records = recordsRepo.stream(query)
.map(DataEntryRecord::copyAsImmutable)
.collect(ImmutableList.toImmutableList());
if (reco... | int mainRecordId;
DataEntrySubTabId subTabId;
}
@ToString
@VisibleForTesting
static final class DataEntryRecordIdIndex implements CacheIndexDataAdapter<DataEntryRecordId, CacheKey, DataEntryRecord>
{
@Override
public DataEntryRecordId extractDataItemId(final DataEntryRecord dataItem)
{
return dataItem.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\dataentry\impl\DataEntryRecordCache.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private SecurityContext getContextByPath(String pathRegex) {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.operationSelector(oc -> oc.requestMappingPattern().matches(pathRegex))
.build();
}
private List<SecurityReference> defaultAut... | private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
List<T> copy = mappings.stream()
.filter(mapping -> mapping.getPatternParser() == null)
.collect(Collectors.toList());
mappings.... | repos\mall-master\mall-common\src\main\java\com\macro\mall\common\config\BaseSwaggerConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class MultipleRecipe {
@Id
@Column(name = "id")
private Long id;
@Column(name = "cocktail")
private String cocktail;
@Column(name = "instructions")
private String instructions;
@Column(name = "base_ingredient")
private String baseIngredient;
public MultipleRecipe() {
... | }
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
MultipleRecipe that = (MultipleRecipe) o;
return Objects.equals(id, that.id) &&
Objects.equals(cocktai... | repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\unrelated\entities\MultipleRecipe.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public SessionAttributesProperties getAttributes() {
return this.attributes;
}
public SessionExpirationProperties getExpiration() {
return this.expiration;
}
public SessionRegionProperties getRegion() {
return this.region;
}
public SessionSerializerProperties getSerializer() {
return this.ser... | int maxInactiveIntervalInSeconds = duration != null
? Long.valueOf(duration.toSeconds()).intValue()
: GemFireHttpSessionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL_IN_SECONDS;
setMaxInactiveIntervalSeconds(maxInactiveIntervalInSeconds);
}
}
public static class SessionRegionProperties {
private Strin... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\SpringSessionProperties.java | 2 |
请完成以下Java代码 | public boolean equals(Object obj)
{
if (this == obj)
{
return true;
}
final PlainContextAware other = EqualsBuilder.getOther(this, obj);
if (other == null)
{
return false;
}
return new EqualsBuilder()
.appendByRef(ctx, other.ctx)
.append(trxName, other.trxName)
.isEqual();
}
@Over... | public Properties getCtx()
{
return ctx;
}
@Override
public String getTrxName()
{
return trxName;
}
@Override
public boolean isAllowThreadInherited()
{
return allowThreadInherited;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\PlainContextAware.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setC_CostClassification_Category_ID (final int C_CostClassification_Category_ID)
{
if (C_CostClassification_Category_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Cos... | }
@Override
public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CostClassification_Category.java | 1 |
请完成以下Java代码 | public class ADRAttributeGenerator extends AbstractAttributeValueGenerator
{
@Override
public String getAttributeValueType()
{
return X_M_Attribute.ATTRIBUTEVALUETYPE_List;
}
/**
* @return <code>false</code>, because ADR is a List attribute.
*/
@Override
public boolean canGenerateValue(final Properties c... | final String adrRegionValue = Services.get(IADRAttributeBL.class).getADRForBPartner(partner, isSOTrx);
if (Check.isEmpty(adrRegionValue, true))
{
return null;
}
//
// Fetched AD_Ref_List record
final ADRefListItem adRefList = ADReferenceService.get().retrieveListItemOrNull(I_C_BPartner.ADRZertifizierung... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\spi\impl\ADRAttributeGenerator.java | 1 |
请完成以下Java代码 | public CleanableHistoricBatchReport orderByFinishedBatchOperation() {
orderBy(CleanableHistoricInstanceReportProperty.FINISHED_AMOUNT);
return this;
}
@Override
public long executeCount(CommandContext commandContext) {
provideHistoryCleanupStrategy(commandContext);
checkQueryOk();
checkPermi... | if (batchOperationKeys != null) {
for (String batchOperation : batchOperationKeys) {
Integer ttl = batchOperations.get(batchOperation);
batchOperations.put(batchOperation, ttl);
}
}
}
public Date getCurrentTimestamp() {
return currentTimestamp;
}
public void setCurrentTime... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\CleanableHistoricBatchReportImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BigDecimal getBPartnerQtyItemCapacity() {
return bPartnerQtyItemCapacity;
}
/**
* Sets the value of the bPartnerQtyItemCapacity property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setBPartnerQtyItemCapacity(Bi... | *
*/
public String getUPCTU() {
return upctu;
}
/**
* Sets the value of the upctu property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUPCTU(String value) {
this.upctu = value;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpDesadvLineType.java | 2 |
请完成以下Java代码 | public void setFirstname (final @Nullable java.lang.String Firstname)
{
set_Value (COLUMNNAME_Firstname, Firstname);
}
@Override
public java.lang.String getFirstname()
{
return get_ValueAsString(COLUMNNAME_Firstname);
}
@Override
public void setIsDefaultContact (final boolean IsDefaultContact)
{
set_V... | {
set_Value (COLUMNNAME_Lastname, Lastname);
}
@Override
public java.lang.String getLastname()
{
return get_ValueAsString(COLUMNNAME_Lastname);
}
@Override
public void setPhone (final @Nullable java.lang.String Phone)
{
set_Value (COLUMNNAME_Phone, Phone);
}
@Override
public java.lang.String getPho... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Contact_QuickInput.java | 1 |
请完成以下Java代码 | public boolean isRunning() {
return running.get();
}
/**
* Padding buffer in the thread pool
*/
public void asyncPadding() {
bufferPadExecutors.submit(this::paddingBuffer);
}
/**
* Padding buffer fill the slots until to catch the cursor
*/
public void paddin... | }
// not running now
running.compareAndSet(true, false);
LOGGER.info("End to padding buffer lastSecond:{}. {}", lastSecond.get(), ringBuffer);
}
/**
* Setters
*/
public void setScheduleInterval(long scheduleInterval) {
Assert.isTrue(scheduleInterval > 0, "Schedule... | repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\buffer\BufferPaddingExecutor.java | 1 |
请完成以下Java代码 | public int getAD_BusinessRule_Trigger_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_BusinessRule_Trigger_ID);
}
@Override
public void setAD_Issue_ID (final int AD_Issue_ID)
{
if (AD_Issue_ID < 1)
set_Value (COLUMNNAME_AD_Issue_ID, null);
else
set_Value (COLUMNNAME_AD_Issue_ID, AD_Issue_ID);
}
@Over... | set_Value (COLUMNNAME_Source_Table_ID, Source_Table_ID);
}
@Override
public int getSource_Table_ID()
{
return get_ValueAsInt(COLUMNNAME_Source_Table_ID);
}
@Override
public void setTarget_Record_ID (final int Target_Record_ID)
{
if (Target_Record_ID < 1)
set_Value (COLUMNNAME_Target_Record_ID, null);... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_Log.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class FooNameHelper {
public static Foo concatAndSubstringFooName(Foo foo) {
Foo concat = concatFooName(foo);
return substringFooName(concat);
}
public static Foo concatFooName(Foo foo) {
int random = ThreadLocalRandom.current()
.nextInt(0, 80);
String pr... | public static Foo substringFooName(Foo foo) {
int random = ThreadLocalRandom.current()
.nextInt(0, 100);
String processedName = (random == 0)
? foo.getFormattedName().substring(10, 15)
: foo.getFormattedName().substring(0, 5);
foo.setFormattedName(processedName);
... | repos\tutorials-master\spring-reactive-modules\spring-reactive\src\main\java\com\baeldung\reactive\debugging\consumer\service\FooNameHelper.java | 2 |
请完成以下Java代码 | public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public Strin... | return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCreationDate() {
return creationDate;
}
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\entity\Order.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getIsbn() {
return isbn;
}
public void ... | this.price = price;
}
public double getDiscounted() {
return discounted;
}
@PostLoad
private void postLoad() {
this.discounted = this.price - this.price * 0.25;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", title=" + title + ", isbn="... | repos\Hibernate-SpringBoot-master\HibernateSpringBootCalculatePropertyPostLoad\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public void setIsAddressLinesLocalReverse (boolean IsAddressLinesLocalReverse)
{
set_Value (COLUMNNAME_IsAddressLinesLocalReverse, Boolean.valueOf(IsAddressLinesLocalReverse));
}
/** Get Reverse Local Address Lines.
@return Print Local Address in reverse Order
*/
@Override
public boolean isAddressLinesLoca... | */
@Override
public java.lang.String getMediaSize ()
{
return (java.lang.String)get_Value(COLUMNNAME_MediaSize);
}
/** Set Name.
@param Name Name */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Name */
@Override
public java... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Country.java | 1 |
请完成以下Java代码 | public void setInstrId(String value) {
this.instrId = value;
}
/**
* Gets the value of the endToEndId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEndToEndId() {
return endToEndId;
}
/**
* S... | * Gets the value of the clrSysRef property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getClrSysRef() {
return clrSysRef;
}
/**
* Sets the value of the clrSysRef property.
*
* @param value
* allowed obje... | 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\TransactionReferences2.java | 1 |
请完成以下Java代码 | public class POJOLookupMapRestorePoint
{
private final POJOLookupMap db;
private final Map<String, Map<Integer, Object>> cachedObjects;
private final Map<PInstanceId, ImmutableSet<Integer>> selectionId2selection;
POJOLookupMapRestorePoint(final POJOLookupMap db)
{
super();
this.db = db;
this.cachedObjects =... | private static final Map<PInstanceId, ImmutableSet<Integer>> copySelection(final Map<PInstanceId, ImmutableSet<Integer>> selectionId2selection)
{
return new HashMap<>(selectionId2selection);
}
/**
* Restore the database as it was when this restore point was created.
*/
public void restore()
{
this.db.cach... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOLookupMapRestorePoint.java | 1 |
请完成以下Java代码 | public void setDescription (final @Nullable java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@Override
public void setIsShowInMainMenu (final boolean IsShowInMainMenu... | {
return get_ValueAsInt(COLUMNNAME_Mobile_Application_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setValue (final java.lang.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application.java | 1 |
请完成以下Java代码 | public int getReversalLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_ReversalLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Abschreiben.
@param WriteOffAmt
Amount to write-off
*/
@Override
public void setWriteOffAmt (java.math.BigDecimal WriteOffAmt)
{ | set_ValueNoCheck (COLUMNNAME_WriteOffAmt, WriteOffAmt);
}
/** Get Abschreiben.
@return Amount to write-off
*/
@Override
public java.math.BigDecimal getWriteOffAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AllocationLine.java | 1 |
请完成以下Java代码 | public static boolean resourceIsContainedInArray(Integer resourceTypeId, Resource[] resources) {
for (Resource resource : resources) {
if (resourceTypeId == resource.resourceType()) {
return true;
}
}
return false;
}
/**
* @return See {@link ResourceTypeUtil#PERMISSION_ENUMS}
... | * @throws BadUserRequestException in case the permission is not valid for the specified resource type
*/
public static Permission getPermissionByNameAndResourceType(String permissionName, int resourceType) {
for (Permission permission : getPermissionsByResourceType(resourceType)) {
if (permission.getName... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ResourceTypeUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CandidateDeploymentImpl implements CandidateDeployment {
protected String name;
protected Map<String, Resource> resources;
public CandidateDeploymentImpl(String name, Map<String, Resource> resources) {
this.name = name;
this.resources = resources;
}
@Override
public String getName() ... | }
@Override
public Map<String, Resource> getResources() {
return resources;
}
public void setResources(Map<String, Resource> resources) {
this.resources = resources;
}
public static CandidateDeploymentImpl fromDeploymentEntity(DeploymentEntity deploymentEntity) {
// first cast ResourceEntity ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\CandidateDeploymentImpl.java | 2 |
请完成以下Java代码 | public class ProductsToPick_PickAndPackSelected extends ProductsToPickViewBasedProcess
{
private final ProductsToPickRowsService rowsService = SpringContextHolder.instance.getBean(ProductsToPickRowsService.class);
private final AdMessageKey MSG_SET_DEFAULT_PACKING_INSTRUCTION = AdMessageKey.of("de.metas.ui.web.picki... | final ImmutableList<WebuiPickHUResult> result = rowsService.pick(getValidRowsForPickAndPack());
updateViewRowFromPickingCandidate(result);
}
private void pack()
{
final ImmutableList<WebuiPickHUResult> result = rowsService.setPackingInstruction(getValidRowsForPickAndPack(), getPackToSpec());
updateViewRowFr... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_PickAndPackSelected.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TitleRepository
{
private static final Map<TitleRepository.CacheKey, Title> cache = new HashMap<>();
@Value
private static class CacheKey
{
TitleId titleId;
Language language;
}
public Title getByIdAndLang(@NonNull final TitleId id, @Nullable final Language language)
{
final I_C_Title titleR... | {
titleTrlRecord = translate(titleRecord, I_C_Title.class);
}
else
{
titleTrlRecord = translate(titleRecord, I_C_Title.class, language.getAD_Language());
}
return Title.builder()
.id(id)
.language(language)
.title(titleTrlRecord.getName())
.build();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\title\TitleRepository.java | 2 |
请完成以下Java代码 | protected String doIt()
{
if (!I_AD_User.Table_Name.equals(getTableName()))
{
throw new AdempiereException("Call it from User window");
}
//
// Get the AD_User_ID and make sure it's the currently logged on.
final Properties ctx = getCtx(); // logged in context
final UserId adUserId = UserId.ofRepoId(... | //
// Actually change it's password
usersService.changePassword(ChangeUserPasswordRequest.builder()
.userId(adUserId)
.oldPassword(HashableString.ofPlainValue(oldPassword))
.newPassword(newPassword)
.newPasswordRetype(newPasswordRetype)
//
.contextClientId(Env.getClientId(ctx))
.contextU... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\process\AD_User_ChangeMyPassword.java | 1 |
请完成以下Java代码 | private static SessionFactory makeSessionFactory(ServiceRegistry serviceRegistry) {
MetadataSources metadataSources = new MetadataSources(serviceRegistry);
metadataSources.addPackage("com.baeldung.hibernate.pojo");
Metadata metadata = metadataSources.getMetadataBuilder()
.build();... | Properties properties = getProperties();
return new StandardServiceRegistryBuilder().applySettings(properties)
.build();
}
private static Properties getProperties() throws IOException {
Properties properties = new Properties();
URL propertiesURL = Thread.currentThread()
... | repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\persistmaps\HibernateUtil.java | 1 |
请完成以下Java代码 | public void setDatabaseType(String databaseType) {
this.databaseType = databaseType;
this.statementMappings = databaseSpecificStatements.get(databaseType);
}
// getters and setters //////////////////////////////////////////////////////
public SqlSessionFactory getSqlSessionFactory() {
return sqlSess... | }
public boolean isDbIdentityUsed() {
return isDbIdentityUsed;
}
public void setDbIdentityUsed(boolean isDbIdentityUsed) {
this.isDbIdentityUsed = isDbIdentityUsed;
}
public boolean isDbHistoryUsed() {
return isDbHistoryUsed;
}
public void setDbHistoryUsed(boolean isDbHistoryUsed) {
th... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\sql\DbSqlSessionFactory.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8079
spring:
data:
# MongoDB 配置项,对应 MongoProperties 类
mongodb:
host: 127.0.0.1
port: 27017
database: yourdatabase
| username: test01
password: password01
# 上述属性,也可以只配置 uri | repos\SpringBoot-Labs-master\lab-39\lab-39-mongodb\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public void setM_HU_Attribute(final de.metas.handlingunits.model.I_M_HU_Attribute M_HU_Attribute)
{
set_ValueFromPO(COLUMNNAME_M_HU_Attribute_ID, de.metas.handlingunits.model.I_M_HU_Attribute.class, M_HU_Attribute);
}
@Override
public void setM_HU_Attribute_ID (final int M_HU_Attribute_ID)
{
if (M_HU_Attribut... | else
set_ValueNoCheck (COLUMNNAME_M_Locator_ID, M_Locator_ID);
}
@Override
public int getM_Locator_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Locator_ID);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_ID, null);
el... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Stock_Detail_V.java | 1 |
请完成以下Java代码 | private long getNextSecond(long lastTimestamp) {
long timestamp = getCurrentSecond();
while (timestamp <= lastTimestamp) {
timestamp = getCurrentSecond();
}
return timestamp;
}
/**
* Get current second
*/
private long getCurrentSecond() {
long ... | this.timeBits = timeBits;
}
}
public void setWorkerBits(int workerBits) {
if (workerBits > 0) {
this.workerBits = workerBits;
}
}
public void setSeqBits(int seqBits) {
if (seqBits > 0) {
this.seqBits = seqBits;
}
}
public void se... | repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\impl\DefaultUidGenerator.java | 1 |
请完成以下Java代码 | public OAuth2ClientRegistration convert(Map<String, Object> source) {
Map<String, Object> parsedClaims = this.claimTypeConverter.convert(source);
Object clientSecretExpiresAt = parsedClaims.get(OAuth2ClientMetadataClaimNames.CLIENT_SECRET_EXPIRES_AT);
if (clientSecretExpiresAt instanceof Number && clientSecret... | }
if (source.getClientSecret() != null) {
long clientSecretExpiresAt = 0;
if (source.getClientSecretExpiresAt() != null) {
clientSecretExpiresAt = source.getClientSecretExpiresAt().getEpochSecond();
}
responseClaims.put(OAuth2ClientMetadataClaimNames.CLIENT_SECRET_EXPIRES_AT, clientSecretExpires... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\http\converter\OAuth2ClientRegistrationHttpMessageConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CommonResult<List<PmsProduct>> recommendProductList(@RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<PmsProduct> productList = homeService.rec... | }
@ApiOperation("分页获取人气推荐商品")
@RequestMapping(value = "/hotProductList", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<PmsProduct>> hotProductList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@Request... | repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\controller\HomeController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean isAccepted(String profile) {
return getAccepted().contains(profile);
}
@Override
public String toString() {
ToStringCreator creator = new ToStringCreator(this);
creator.append("active", getActive().toString());
creator.append("default", getDefault().toString());
creator.append("accepted", g... | String getName() {
return this.name;
}
String[] get(Environment environment) {
return this.getter.apply(environment);
}
Set<String> getDefaultValue() {
return this.defaultValue;
}
boolean isMergeWithEnvironmentProfiles() {
return this.mergeWithEnvironmentProfiles;
}
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\Profiles.java | 2 |
请完成以下Java代码 | public String computeCaption(@NonNull final ITranslatableString originalProcessCaption, @NonNull final String adLanguage)
{
final ITranslatableString caption = captionMapper != null
? captionMapper.computeCaption(originalProcessCaption)
: originalProcessCaption;
return caption.translate(adLanguage);
}
... | return toBuilder().captionMapper(captionMapper).build();
}
/**
* Override default SortNo used with ordering related processes
*/
public ProcessPreconditionsResolution withSortNo(final int sortNo)
{
return !this.sortNo.isPresent() || this.sortNo.getAsInt() != sortNo
? toBuilder().sortNo(OptionalInt.of(sor... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessPreconditionsResolution.java | 1 |
请完成以下Java代码 | public void setLastName(String userLastName) {
this.lastName = userLastName;
}
@CamundaQueryParam("lastNameLike")
public void setLastNameLike(String userLastNameLike) {
this.lastNameLike = userLastNameLike;
}
@CamundaQueryParam("email")
public void setEmail(String userEmail) {
this.email = use... | query.userLastName(lastName);
}
if (lastNameLike != null) {
query.userLastNameLike(lastNameLike);
}
if (email != null) {
query.userEmail(email);
}
if (emailLike != null) {
query.userEmailLike(emailLike);
}
if (memberOfGroup != null) {
query.memberOfGroup(memberOfG... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\identity\UserQueryDto.java | 1 |
请完成以下Java代码 | public int getFact_Acct_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Fact_Acct_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/**
* PostingType AD_Reference_ID=125
* Reference name: _Posting Type
*/
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public ... | Die Art des gebuchten Betrages dieser Transaktion
*/
@Override
public void setPostingType (java.lang.String PostingType)
{
set_ValueNoCheck (COLUMNNAME_PostingType, PostingType);
}
/** Get Buchungsart.
@return Die Art des gebuchten Betrages dieser Transaktion
*/
@Override
public java.lang.String getP... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_EndingBalance.java | 1 |
请完成以下Java代码 | public class InvoiceCandidateCompensationGroupUtils
{
public static void assertInGroup(final I_C_Invoice_Candidate invoiceCandidate)
{
if (!isInGroup(invoiceCandidate))
{
throw new AdempiereException("Invoice candidate " + invoiceCandidate + " shall be part of a compensation group");
}
}
public static voi... | }
public static boolean isInGroup(final I_C_Invoice_Candidate invoiceCandidate)
{
return invoiceCandidate.getC_Order_CompensationGroup_ID() > 0;
}
public static void assertCompensationLine(final I_C_Invoice_Candidate invoiceCandidate)
{
if (!invoiceCandidate.isGroupCompensationLine())
{
throw new Adempi... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\compensationGroup\InvoiceCandidateCompensationGroupUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static I_M_ProductPrice createProductPriceOrUpdateExistentOne(@NonNull final ProductPriceCreateRequest ppRequest, @NonNull final I_M_PriceList_Version plv)
{
final IProductDAO productDAO = Services.get(IProductDAO.class);
final BigDecimal price = ppRequest.getPrice().setScale(2);
I_M_ProductPrice pp = Pr... | pp.setM_PriceList_Version_ID(plv.getM_PriceList_Version_ID());
pp.setM_Product_ID(ppRequest.getProductId());
pp.setSeqNo(ppRequest.getSeqNo());
pp.setPriceLimit(price);
pp.setPriceList(price);
pp.setPriceStd(price);
final org.compiere.model.I_M_Product product = productDAO.getById(ppRequest.getProductId())... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\ProductPrices.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RestAuthController {
@Value("${google.client-id}")
private String clientid;
@Value("${google.client-secret}")
private String clientsecret;
@Value("${google.redirect-uri}")
private String redirecturi;
@RequestMapping("/render")
public void renderAuth(HttpServletResponse response) throws ... | AuthRequest authRequest = getAuthRequest();
return authRequest.login(callback);
}
private AuthRequest getAuthRequest() {
return new AuthGoogleRequest(AuthConfig.builder()
.clientId(clientid)
.clientSecret(clientsecret)
.redirectUri(redirecturi)
... | repos\springboot-demo-master\socia-login\google\src\main\java\com\et\google\controller\RestAuthController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Bar implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(nullable = false)
private String name;
@OneToMany(mappedBy = "bar", fetch = FetchType.EAGER, cascade = CascadeType.ALL)
... | //
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
... | repos\tutorials-master\persistence-modules\spring-hibernate-5\src\main\java\com\baeldung\hibernate\cache\model\Bar.java | 2 |
请完成以下Java代码 | private String printKeys(Set<String> keys) {
return Stream.ofNullable(keys).map(String::valueOf).collect(Collectors.joining(", "));
}
@SuppressWarnings("unchecked")
@Override
public <T> T getInBoundVariable(String name) {
return Optional.ofNullable(inBoundVariables)
.map(it ... | .orElse(null);
}
@SuppressWarnings("unchecked")
@Override
public <T> T getOutBoundVariable(String name, Class<T> type) {
return Optional.ofNullable(outBoundVariables)
.map(it -> (T) it.get(name))
.orElse(null);
}
@Override
@JsonProperty("ephemeralVariables")... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\IntegrationContextImpl.java | 1 |
请完成以下Java代码 | protected Class<?> findClass(String name) throws ClassNotFoundException {
String path = name.replace('.', '/').concat(".class");
final ClassLoaderFile file = this.updatedFiles.getFile(path);
if (file == null) {
return super.findClass(name);
}
if (file.getKind() == Kind.DELETED) {
throw new ClassNotFound... | */
private static class CompoundEnumeration<E> implements Enumeration<E> {
private @Nullable E firstElement;
private final Enumeration<E> enumeration;
CompoundEnumeration(@Nullable E firstElement, Enumeration<E> enumeration) {
this.firstElement = firstElement;
this.enumeration = enumeration;
}
@Ove... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\classloader\RestartClassLoader.java | 1 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = pr... | public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
public String getLockOwner() {
return lockOwner;
}
public void setLockOwner(String lockOwner) {
this.lockOwner = lockOwner;
}
public String getLockTime() {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\EventLogEntryEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isValidateTransactionState() {
return this.validateTransactionState;
}
public void setValidateTransactionState(boolean validateTransactionState) {
this.validateTransactionState = validateTransactionState;
}
public @Nullable Isolation getIsolationLevelForCreate() {
return this.isolationLevelFo... | public @Nullable String getTablePrefix() {
return this.tablePrefix;
}
public void setTablePrefix(@Nullable String tablePrefix) {
this.tablePrefix = tablePrefix;
}
@Override
public String getDefaultSchemaLocation() {
return DEFAULT_SCHEMA_LOCATION;
}
} | repos\spring-boot-4.0.1\module\spring-boot-batch-jdbc\src\main\java\org\springframework\boot\batch\jdbc\autoconfigure\BatchJdbcProperties.java | 2 |
请完成以下Java代码 | protected Endpoint createEndpoint(String s, String s1, Map<String, Object> parameters) throws Exception {
FlowableEndpoint ae = new FlowableEndpoint(s, getCamelContext());
ae.setComponent(this);
ae.setIdentityService(identityService);
ae.setRuntimeService(runtimeService);
ae.setR... | public void setCopyVariablesToProperties(boolean copyVariablesToProperties) {
this.copyVariablesToProperties = copyVariablesToProperties;
}
public boolean isCopyCamelBodyToBody() {
return copyCamelBodyToBody;
}
public void setCopyCamelBodyToBody(boolean copyCamelBodyToBody) {
t... | repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\FlowableComponent.java | 1 |
请完成以下Java代码 | public Optional<ResourceId> getPlantOfWarehouse(@NonNull final WarehouseId warehouseId)
{
final I_M_Warehouse warehouse = Services.get(IWarehouseBL.class).getById(warehouseId);
return ResourceId.optionalOfRepoId(warehouse.getPP_Plant_ID());
}
public Optional<PPRoutingId> getDefaultRoutingId(@NonNull final PPRou... | @NonNull final BigDecimal qty)
{
final int leadTimeDays = productPlanningRecord.getLeadTimeDays();
if (leadTimeDays > 0)
{
// LeadTime was set in Product Planning/ take the leadtime as it is
return leadTimeDays;
}
final PPRoutingId routingId = productPlanningRecord.getWorkflowId();
final ResourceId ... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\ProductPlanningService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected final F getAuthenticationFilter() {
return this.authFilter;
}
/**
* Sets the Authentication Filter
* @param authFilter the Authentication Filter
*/
protected final void setAuthenticationFilter(F authFilter) {
this.authFilter = authFilter;
}
/**
* Gets the login page
* @return the login pa... | LogoutConfigurer<B> logoutConfigurer = getBuilder().getConfigurer(LogoutConfigurer.class);
if (logoutConfigurer != null && !logoutConfigurer.isCustomLogoutSuccess()) {
logoutConfigurer.logoutSuccessUrl(this.loginPage + "?logout");
}
}
/**
* Updates the default values for access.
*/
protected final void u... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AbstractAuthenticationFilterConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RequestFilter extends OncePerRequestFilter implements Filter {
@Autowired
TokenService tokenService;
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
try {
... | private void setUsername(HttpServletRequest request) {
//通过token解析出username
String token = request.getHeader("token");
if (!StringTools.isNullOrEmpty(token)) {
MDC.put("token", token);
try {
SessionUserInfo info = tokenService.getUserInfo();
... | repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\config\filter\RequestFilter.java | 2 |
请完成以下Java代码 | public class VariableCreatedListenerDelegate implements ActivitiEventListener {
private final List<VariableEventListener<VariableCreatedEvent>> listeners;
private final ToVariableCreatedConverter converter;
private final VariableEventFilter variableEventFilter;
public VariableCreatedListenerDelegate... | converter
.from(internalEvent)
.ifPresent(convertedEvent -> {
if (listeners != null) {
for (VariableEventListener<VariableCreatedEvent> listener : listeners) {
listener.onEvent(convertedEvent);
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-runtime-shared-impl\src\main\java\org\activiti\runtime\api\event\internal\VariableCreatedListenerDelegate.java | 1 |
请完成以下Java代码 | public Set<DocumentId> process(final QuickInput quickInput)
{
final I_C_Invoice invoice = quickInput.getRootDocumentAs(I_C_Invoice.class);
final IInvoiceLineQuickInput invoiceLineQuickInput = quickInput.getQuickInputDocumentAs(IInvoiceLineQuickInput.class);
// 3834
final ProductId productId = ProductId.ofRepo... | : HUPIItemProductId.VIRTUAL_HU);
huPackingAwareBL.computeAndSetQtysForNewHuPackingAware(huPackingAware, invoiceLineQuickInput.getQty());
huPackingAwareBL.prepareCopyFrom(huPackingAware)
.overridePartner(false)
.copyTo(InvoiceLineHUPackingAware.of(invoiceLine));
invoiceLineBL.updatePrices(invoiceLine);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\quickinput\invoiceline\InvoiceLineQuickInputProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class DmnEngineProcessConfiguration extends BaseEngineConfigurationWithConfigurers<SpringDmnEngineConfiguration> {
@Bean
@ConditionalOnMissingBean(name = "dmnProcessEngineConfigurationConfigurer")
public EngineConfigurationConfigurer<SpringProcessEngineConfiguration> dmnProcessEng... | "org.flowable.app.spring.SpringAppEngineConfiguration"
})
public static class DmnEngineAppConfiguration extends BaseEngineConfigurationWithConfigurers<SpringDmnEngineConfiguration> {
@Bean
@ConditionalOnMissingBean(name = "dmnAppEngineConfigurationConfigurer")
public EngineConfiguration... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\dmn\DmnEngineAutoConfiguration.java | 2 |
请完成以下Java代码 | public class OrderCreatedEvent {
private final String orderId;
public OrderCreatedEvent(String orderId) {
this.orderId = orderId;
}
public String getOrderId() {
return orderId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;... | }
OrderCreatedEvent that = (OrderCreatedEvent) o;
return Objects.equals(orderId, that.orderId);
}
@Override
public int hashCode() {
return Objects.hash(orderId);
}
@Override
public String toString() {
return "OrderCreatedEvent{" + "orderId='" + orderId + '\'' + ... | repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\coreapi\events\OrderCreatedEvent.java | 1 |
请完成以下Java代码 | public boolean appliesTo(@NonNull final MappingCriteria mappingCriteria)
{
return appliesToCustomer(mappingCriteria.getCustomerId())
&& appliesToProduct(mappingCriteria.getProductId())
&& appliesToProductCategory(mappingCriteria.getProductCategoryId());
}
private boolean appliesToCustomer(@NonNull final ... | return true;
}
return this.productCategoryId.equals(productCategoryId);
}
@NonNull
public Percent getPercent()
{
return Percent.of(this.marginPercent);
}
@Value
@Builder
public static class MappingCriteria
{
@NonNull BPartnerId customerId;
@NonNull ProductId productId;
@NonNull ProductCategoryI... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\pricing\trade_margin\CustomerTradeMarginLine.java | 1 |
请完成以下Java代码 | default void setProductId(final ProductId productId)
{
setM_Product_ID(ProductId.toRepoId(productId));
}
int getC_BPartner_ID();
/**
* Match only those {@link I_M_HU_PI_Item_Product}s which are about this partner or any bpartner.
*/
void setC_BPartner_ID(final int bpartnerId);
default void setBPartnerId(... | * {@link I_M_HU_PI_Item_Product#getQty()}.
* </ul>
*/
void setAllowDifferentCapacities(boolean allowDifferentCapacities);
// 08393
// the possibility to create the query for any partner (not just for a given one or null)
boolean isAllowAnyPartner();
void setAllowAnyPartner(final boolean allowAnyPartner);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\IHUPIItemProductQuery.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public EndpointDetectionTrigger endpointDetectionTrigger(EndpointDetector endpointDetector,
Publisher<InstanceEvent> events) {
return new EndpointDetectionTrigger(endpointDetector, events);
}
@Bean
@ConditionalOnMissingBean
public InfoUpdater infoUpdater(InstanceRepository instanceRepository,
InstanceWebCl... | this.adminServerProperties.getMonitor().getInfoMaxBackoff());
}
@Bean
@ConditionalOnMissingBean(InstanceEventStore.class)
public InMemoryEventStore eventStore() {
return new InMemoryEventStore();
}
@Bean(initMethod = "start", destroyMethod = "stop")
@ConditionalOnMissingBean(InstanceRepository.class)
public... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerAutoConfiguration.java | 2 |
请完成以下Java代码 | public final class LocalMessages {
private static final String BUNDLE_NAME = "org.activiti.core.el.juel.misc.LocalStrings";
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, Locale.US);
public static String get(String key, Object... args) {
String template... | b.append(key);
if (args != null && args.length > 0) {
b.append("(");
b.append(args[0]);
for (int i = 1; i < args.length; i++) {
b.append(", ");
b.append(args[i]);
}
b.append(")");
... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\misc\LocalMessages.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserController {
@Autowired
private UserService userService;
/**
* 查询用户列表
*
* @return 用户列表
*/
@GetMapping("/list")
public Flux<UserVO> list() {
// 查询列表
List<UserVO> result = new ArrayList<>();
result.add(new UserVO().setId(1).setUsername("yu... | * 添加用户
*
* @param addDTO 添加用户信息 DTO
* @return 添加成功的用户编号
*/
@PostMapping("add2")
public Mono<Integer> add2(Mono<UserAddDTO> addDTO) {
// 插入用户记录,返回编号
Integer returnId = 1;
// 返回用户编号
return Mono.just(returnId);
}
/**
* 更新指定用户编号的用户
*
* @par... | repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-01\src\main\java\cn\iocoder\springboot\lab27\springwebflux\controller\UserController.java | 2 |
请完成以下Java代码 | public EventSubscriptionEntity createSubscriptionForExecution(ExecutionEntity execution) {
EventSubscriptionEntity eventSubscriptionEntity = new EventSubscriptionEntity(execution, eventType);
String eventName = resolveExpressionOfEventName(execution);
eventSubscriptionEntity.setEventName(eventName);
if... | // during expression evaluation the current context is updated with the scope execution
return (String) eventName.getValue(scope, (BaseDelegateExecution) scope);
} else {
return (String) eventName.getValue(scope);
}
} else {
return null;
}
}
protected boolean isExpressionA... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\parser\EventSubscriptionDeclaration.java | 1 |
请完成以下Java代码 | public class OccurPlanItemInstanceOperation extends AbstractMovePlanItemInstanceToTerminalStateOperation {
public OccurPlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {
super(commandContext, planItemInstanceEntity);
}
@Override
public... | @Override
protected boolean shouldAggregateForMultipleInstances() {
return true;
}
@Override
protected void internalExecute() {
planItemInstanceEntity.setEndedTime(getCurrentTime(commandContext));
planItemInstanceEntity.setOccurredTime(planItemInstanceEntity.getEndedTime());
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\OccurPlanItemInstanceOperation.java | 1 |
请完成以下Java代码 | final class Doc_GLJournal_FactTrxStrategy implements FactTrxStrategy
{
public static final Doc_GLJournal_FactTrxStrategy instance = new Doc_GLJournal_FactTrxStrategy();
private Doc_GLJournal_FactTrxStrategy() {}
@Override
public List<FactTrxLines> createFactTrxLines(final List<FactLine> factLines)
{
if (factLi... | .map(FactTrxLines.FactTrxLinesBuilder::build)
.collect(ImmutableList.toImmutableList());
}
private static int extractGroupNo(final FactLine factLine)
{
final DocLine<?> docLine = factLine.getDocLine();
if (docLine instanceof DocLine_GLJournal)
{
return ((DocLine_GLJournal)docLine).getGroupNo();
}
e... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_GLJournal_FactTrxStrategy.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public LocationEntity getLocationEntity() {
return locationEntity;
}
public void setLocationEntity(LocationEntity locationEntity) {
this.locationEntity = locationEntity;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.... | }
public void setBuyer(UserEntity buyer) {
this.buyer = buyer;
}
@Override
public String toString() {
return "OrdersEntity{" +
"id='" + id + '\'' +
", buyer=" + buyer +
", company=" + company +
", productOrderList=" + prod... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\OrdersEntity.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public DecisionRequirementsDefinitionXmlDto getDecisionRequirementsDefinitionDmnXml() {
InputStream decisionRequirementsModelInputStream = null;
try {
decisionRequirementsModelInputStream = engine.getRepositoryService().getDecisionRequirementsModel(decisionRequirementsDefinitionId);
byte[] decision... | }
}
@Override
public Response getDecisionRequirementsDefinitionDiagram() {
DecisionRequirementsDefinition definition = engine.getRepositoryService().getDecisionRequirementsDefinition(decisionRequirementsDefinitionId);
InputStream decisionRequirementsDiagram = engine.getRepositoryService().getDecisionRequ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\repository\impl\DecisionRequirementsDefinitionResourceImpl.java | 2 |
请完成以下Java代码 | public void onMsg(TbContext ctx, TbMsg msg) throws TbNodeException {
try {
Alarm alarm = JacksonUtil.fromString(msg.getData(), Alarm.class);
Objects.requireNonNull(alarm, "alarm is null");
ListenableFuture<Alarm> latest = ctx.getAlarmService().findAlarmByIdAsync(ctx.getTenant... | public void onFailure(Throwable t) {
ctx.tellFailure(msg, t);
}
}, ctx.getDbCallbackExecutor());
} catch (Exception e) {
if (e instanceof IllegalArgumentException || e instanceof NullPointerException) {
log.debug("[{}][{}] Failed to par... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\filter\TbCheckAlarmStatusNode.java | 1 |
请完成以下Java代码 | public CaseInstanceChangeState setChangePlanItemIdsWithDefinitionId(Set<ChangePlanItemIdWithDefinitionIdMapping> changePlanItemIdsWithDefinitionId) {
this.changePlanItemIdsWithDefinitionId = changePlanItemIdsWithDefinitionId;
return this;
}
public Set<ChangePlanItemDefinitionWithNewTargetIdsMap... | public CaseInstanceChangeState setCreatedStageInstances(HashMap<String, PlanItemInstanceEntity> createdStageInstances) {
this.createdStageInstances = createdStageInstances;
return this;
}
public void addCreatedStageInstance(String key, PlanItemInstanceEntity planItemInstance) {
this... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceChangeState.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BigDecimal getPlatCost() {
return platCost;
}
public void setPlatCost(BigDecimal platCost) {
this.platCost = platCost;
}
public BigDecimal getPlatProfit() {
return platProfit;
}
public void setPlatProfit(BigDecimal platProfit) {
this.platProfit = platProfit;
}
public String getPayWayCode() {
... | public void setIsRefund(String isRefund) {
this.isRefund = isRefund == null ? null : isRefund.trim();
}
public Short getRefundTimes() {
return refundTimes;
}
public void setRefundTimes(Short refundTimes) {
this.refundTimes = refundTimes;
}
public BigDecimal getSuccessRefundAmount() {
return successRefu... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java | 2 |
请完成以下Java代码 | public boolean isDetached() {
return jobEntity.getExecutionId() == null;
}
public void detachState() {
jobEntity.setExecution(null);
for (MigratingInstance dependentInstance : migratingDependentInstances) {
dependentInstance.detachState();
}
}
public void attachState(MigratingScopeInsta... | public void migrateDependentEntities() {
for (MigratingInstance migratingDependentInstance : migratingDependentInstances) {
migratingDependentInstance.migrateState();
}
}
public void remove() {
jobEntity.delete();
}
public boolean migrates() {
return targetScope != null;
}
public Sc... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingJobInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public String getScopeId() {
return scopeId;
}
public void setScopeId(String scopeI... | public void setSubScopeId(String subScopeId) {
this.subScopeId = subScopeId;
}
public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
public String getTenantId() {
return tenantId;
}
... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskLogEntryResponse.java | 2 |
请完成以下Java代码 | protected void stopExecutingJobs() {
super.stopExecutingJobs();
// Ask the thread pool to finish and exit
threadPoolExecutor.shutdown();
// Waits for 1 minute to finish all currently executing jobs
try {
if(!threadPoolExecutor.awaitTermination(60L, TimeUnit.SECONDS)) {
LOG.timeoutDu... | public void setQueueSize(int queueSize) {
this.queueSize = queueSize;
}
public int getCorePoolSize() {
return corePoolSize;
}
public void setCorePoolSize(int corePoolSize) {
this.corePoolSize = corePoolSize;
}
public int getMaxPoolSize() {
return maxPoolSize;
}
public void setMaxPool... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\DefaultJobExecutor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUserId() {
return userI... | }
public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
public Date getFrom() {
return from;
}
public void setFrom(Date from) {
this.from = from;
}
public Date getTo() {
return to;
}
public void setTo(Date to) {
this.t... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskLogEntryQueryRequest.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CountryId getCountryId()
{
return countryId;
}
@Override
public IEditablePricingContext setCountryId(@Nullable final CountryId countryId)
{
this.countryId = countryId;
return this;
}
@Override
public boolean isFailIfNotCalculated()
{
return failIfNotCalculated;
}
@Override
public IEditable... | @Override
public IEditablePricingContext setForcePricingConditionsBreak(@Nullable final PricingConditionsBreak forcePricingConditionsBreak)
{
this.forcePricingConditionsBreak = forcePricingConditionsBreak;
return this;
}
@Override
public Optional<IAttributeSetInstanceAware> getAttributeSetInstanceAware()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PricingContext.java | 2 |
请完成以下Java代码 | public class ReturnWhileValidIterator<T> implements Iterator<T>, IteratorWrapper<T>
{
private final Predicate<T> isValidPredicate;
private final Iterator<T> iterator;
private T current;
public ReturnWhileValidIterator(final Iterator<T> iterator, final Predicate<T> isValidPredicate)
{
super();
Check.assumeNot... | @Override
public final T next()
{
if (!hasNext())
{
throw new NoSuchElementException();
}
// NOTE: we assume "current" was also checked if it's still valid (in hasNext() method)
if (current != null)
{
return current;
}
return iterator.next();
}
@Override
public void remove()
{
throw ne... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\ReturnWhileValidIterator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class KafkaConfig {
private final KafkaProperties kafkaProperties;
@Bean
public KafkaTemplate<String, String> kafkaTemplate() {
return new KafkaTemplate<>(producerFactory());
}
@Bean
public ProducerFactory<String, String> producerFactory() {
return new DefaultKafkaProduc... | @Bean
public ConsumerFactory<String, String> consumerFactory() {
return new DefaultKafkaConsumerFactory<>(kafkaProperties.buildConsumerProperties());
}
@Bean("ackContainerFactory")
public ConcurrentKafkaListenerContainerFactory<String, String> ackContainerFactory() {
ConcurrentKafkaList... | repos\spring-boot-demo-master\demo-mq-kafka\src\main\java\com\xkcoding\mq\kafka\config\KafkaConfig.java | 2 |
请完成以下Java代码 | public Decision getRequiredDecision() {
return requiredDecisionRef.getReferenceTargetElement(this);
}
public void setRequiredDecision(Decision requiredDecision) {
requiredDecisionRef.setReferenceTargetElement(this, requiredDecision);
}
public InputData getRequiredInput() {
return requiredInputRef.... | public AuthorityRequirement newInstance(ModelTypeInstanceContext instanceContext) {
return new AuthorityRequirementImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
requiredDecisionRef = sequenceBuilder.element(RequiredDecisionReference.class)
... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\AuthorityRequirementImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTypeName() {
return TYPE_NAME;
}
@Override
public boolean isCachable() {
return forceCacheable;
}
@Override
public boolean isAbleToStore(Object value) {
if (value == null) {
return true;
}
return mappings.isJPAEntity(value);
... | } else {
valueFields.setTextValue(null);
valueFields.setTextValue2(null);
}
}
@Override
public Object getValue(ValueFields valueFields) {
if (valueFields.getTextValue() != null && valueFields.getTextValue2() != null) {
return mappings.getJPAEntity(valueFi... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\JPAEntityVariableType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class MSV3ServerConfigRepository
{
private final CCache<Integer, MSV3ServerConfig> serverConfigCache = CCache.<Integer, MSV3ServerConfig> builder()
.tableName(I_MSV3_Server.Table_Name)
.initialCapacity(1)
.additionalTableNameToResetFor(I_MSV3_Server_Product_Category.Table_Name)
.build();
public MS... | if (serverConfigRecord != null)
{
final int fixedQtyAvailableToPromise = serverConfigRecord.getFixedQtyAvailableToPromise();
serverConfigBuilder.fixedQtyAvailableToPromise(fixedQtyAvailableToPromise);
final IWarehouseDAO warehouseDAO = Services.get(IWarehouseDAO.class);
final WarehousePickingGroupId ware... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java\de\metas\vertical\pharma\msv3\server\peer\metasfresh\services\MSV3ServerConfigRepository.java | 2 |
请完成以下Java代码 | static JsonDocument retrieveAndUpsertExample(Bucket bucket, String id) {
JsonDocument document = bucket.get(id);
JsonObject content = document.content();
content.put("homeTown", "Kansas City");
JsonDocument upserted = bucket.upsert(document);
return upserted;
}
static Js... | if (!list.isEmpty()) {
return list.get(0);
}
}
return null;
}
static JsonDocument getLatestReplicaVersion(Bucket bucket, String id) {
long maxCasValue = -1;
JsonDocument latest = null;
for (JsonDocument replica : bucket.getFromReplica(id, Repl... | repos\tutorials-master\persistence-modules\couchbase\src\main\java\com\baeldung\couchbase\intro\CodeSnippets.java | 1 |
请完成以下Java代码 | public SuspendedJobQueryImpl jobWithoutTenantId() {
this.withoutTenantId = true;
return this;
}
// sorting //////////////////////////////////////////
public SuspendedJobQuery orderByJobDuedate() {
return orderBy(JobQueryProperty.DUEDATE);
}
public SuspendedJobQuery orderBy... | return Context.getProcessEngineConfiguration().getClock().getCurrentTime();
}
public boolean isWithException() {
return withException;
}
public String getExceptionMessage() {
return exceptionMessage;
}
public String getTenantId() {
return tenantId;
}
public St... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\SuspendedJobQueryImpl.java | 1 |
请完成以下Java代码 | public Builder setProcessId(final ProcessId processId)
{
this.processId = processId;
return this;
}
public Builder setLayoutType(final PanelLayoutType layoutType)
{
this.layoutType = layoutType;
return this;
}
public Builder setCaption(final ITranslatableString caption)
{
this.caption = c... | public Builder addElement(final DocumentFieldDescriptor processParaDescriptor)
{
Check.assumeNotNull(processParaDescriptor, "Parameter processParaDescriptor is not null");
final DocumentLayoutElementDescriptor element = DocumentLayoutElementDescriptor.builder()
.setCaption(processParaDescriptor.getCaption(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\descriptor\ProcessLayout.java | 1 |
请完成以下Java代码 | public UserEntity getUser() {
return user;
}
public void setUser(UserEntity user) {
this.user = user;
}
public GroupEntity getGroup() {
return group;
}
public void setGroup(GroupEntity group) {
this.group = group;
}
// required for mybatis
public String getUserId(){ | return user.getId();
}
// required for mybatis
public String getGroupId(){
return group.getId();
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[user=" + user
+ ", group=" + group
+ "]";
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\MembershipEntity.java | 1 |
请完成以下Java代码 | public ResourceLoader getResourceLoader() {
return resourceLoader;
}
/**
* @param resourceLoader
* the resourceLoader to set
*/
public void setResourceLoader(ResourceLoader resourceLoader) {
this.resourceLoader = resourceLoader;
}
/**
* @return the webappProperty
*/
public ... | */
public void setWebappProperty(WebappProperty webappProperty) {
this.webappProperty = webappProperty;
}
/**
* @param input - String to trim
* @param charachter - Char to trim
* @return the trimmed String
*/
protected String trimChar(String input, char charachter) {
input = StringUtils.tri... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-webapp-core\src\main\java\org\camunda\bpm\spring\boot\starter\webapp\filter\ResourceLoadingProcessEnginesFilter.java | 1 |
请完成以下Java代码 | private Optional<Quantity> getTrxCatchWeight(
@NonNull final IHUContext huContext,
@NonNull final Quantity qtyPicked,
@NonNull final I_M_HU hu,
@NonNull final I_M_HU_Trx_Line trxLine)
{
final AttributeId weightNetAttributeId = Services.get(IAttributeDAO.class)
.getAttributeIdByCode(Weightables.ATTR_W... | final Function<BigDecimal, Quantity> toNetWeightQty = netWeight -> {
final IAttributeStorage attributeStorage = huContext.getHUAttributeStorageFactory().getAttributeStorage(hu);
final IWeightable weightable = Weightables.wrap(attributeStorage);
return Quantity.of(netWeight, weightable.getWeightNetUOM());
};
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\util\CatchWeightHelper.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.