instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private EventLogId getEventLogIdUsingCacheOutOfTrx(@NonNull final UUID uuid) { final Collection<EventLogId> eventLogIds = getEventLogIdsUsingCacheOutOfTrx(ImmutableSet.of(uuid)); if (eventLogIds.isEmpty()) { throw new AdempiereException("No EventLog found for " + uuid); } else { if (eventLogIds.size(...
.createQueryBuilderOutOfTrx(I_AD_EventLog.class) .addOnlyActiveRecordsFilter() .addInArrayFilter(I_AD_EventLog.COLUMN_Event_UUID, uuidStrs) .orderBy(I_AD_EventLog.COLUMN_AD_EventLog_ID) // just to have a predictable order .create() .listColumns(I_AD_EventLog.COLUMNNAME_AD_EventLog_ID, I_AD_EventLog....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\log\EventLogsRepository.java
1
请完成以下Java代码
public Integer getAttendCount() { return attendCount; } public void setAttendCount(Integer attendCount) { this.attendCount = attendCount; } public Integer getFansCount() { return fansCount; } public void setFansCount(Integer fansCount) { this.fansCount = fansCo...
public void setRecentOrderTime(Date recentOrderTime) { this.recentOrderTime = recentOrderTime; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode(...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMemberStatisticsInfo.java
1
请完成以下Java代码
public void setM_InOutLine_ID (final int M_InOutLine_ID) { if (M_InOutLine_ID < 1) set_Value (COLUMNNAME_M_InOutLine_ID, null); else set_Value (COLUMNNAME_M_InOutLine_ID, M_InOutLine_ID); } @Override public int getM_InOutLine_ID() { return get_ValueAsInt(COLUMNNAME_M_InOutLine_ID); } @Override ...
{ final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyEntered); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyInvoicedInUOM (final @Nullable BigDecimal QtyInvoicedInUOM) { set_Value (COLUMNNAME_QtyInvoicedInUOM, QtyInvoicedInUOM); } @Override public BigDecimal getQtyInvoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderDetail.java
1
请完成以下Java代码
void okB_actionPerformed(ActionEvent e) { this.dispose(); } void cancelB_actionPerformed(ActionEvent e) { CANCELLED = true; this.dispose(); } void tdBgcolorB_actionPerformed(ActionEvent e) { Color c = JColorChooser.showDialog(this, Local.getString("Table cell background color"), Util.decodeC...
void trBgcolorB_actionPerformed(ActionEvent e) { Color c = JColorChooser.showDialog(this, Local.getString("Table row background color"), Util.decodeColor(trBgcolorField.getText())); if (c == null) return; trBgcolorField.setText(Util.encodeColor(c)); Util.setBgcolorField(trBgcolorField); } void ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\TdDialog.java
1
请完成以下Java代码
public Builder put(final String columnName, final ICalloutInstance callout) { if (callout == null) { logger.warn("Skip adding callout for ColumnName={} to map because it's null", columnName); return this; } final ArrayKey calloutKey = mkCalloutKey(columnName, callout); if (!seenCalloutKeys.add...
{ continue; } final String columnName = entry.getKey(); for (final ICalloutInstance callout : callouts) { put(columnName, callout); } } return this; } public Builder putAll(final TableCalloutsMap callouts) { if (callouts == null || callouts.isEmpty()) { return this...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\api\TableCalloutsMap.java
1
请完成以下Java代码
public EventModel getEventModelByKeyAndParentDeploymentId(String eventDefinitionKey, String parentDeploymentId) { return commandExecutor.execute(new GetEventModelCmd(eventDefinitionKey, null, parentDeploymentId)); } @Override public EventModel getEventModelByKeyAndParentDeploymentId(String eventDef...
return new EventModelBuilderImpl(this, eventRegistryEngineConfiguration.getEventJsonConverter()); } @Override public InboundChannelModelBuilder createInboundChannelModelBuilder() { return new InboundChannelDefinitionBuilderImpl(this, eventRegistryEngineConfiguration.getChannelJsonConverter...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\EventRepositoryServiceImpl.java
1
请完成以下Java代码
public void afterPropertiesSet() throws Exception { mergeSubscriptionWithProperties(); super.afterPropertiesSet(); } @Override protected Predicate<ApplicationEvent> isEventThatCanStartSubscription() { return event -> event instanceof ApplicationStartedEvent; } protected void mergeSubscriptionWit...
if (subscriptionProperties.getProcessDefinitionVersionTag() != null) { merge.setProcessDefinitionVersionTag(subscriptionProperties.getProcessDefinitionVersionTag()); } if (subscriptionProperties.getProcessVariables() != null) { merge.setProcessVariables(subscriptionProperties.getProcessVaria...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring-boot\src\main\java\org\camunda\bpm\client\spring\boot\starter\impl\PropertiesAwareSpringTopicSubscription.java
1
请完成以下Java代码
protected boolean beforeSave(boolean newRecord) { if (newRecord && getParent().isComplete()) { throw new AdempiereException("@ParentComplete@ @M_MovementLine_ID@"); } // Set Line No if (getLine() == 0) { final String sql = "SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM M_MovementLine WHERE M_M...
*/ @Override public void setM_Locator_ID(int M_Locator_ID) { if (M_Locator_ID < 0) throw new IllegalArgumentException("M_Locator_ID is mandatory."); // set to 0 explicitly to reset set_Value(COLUMNNAME_M_Locator_ID, M_Locator_ID); } // setM_Locator_ID /** * Set M_LocatorTo_ID * * @param M_Loc...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MMovementLine.java
1
请完成以下Java代码
public final class JSONAddressLayout implements Serializable { public static JSONAddressLayout of(final AddressLayout layout, final JSONDocumentLayoutOptions options) { return new JSONAddressLayout(layout, options); } @JsonProperty("elements") @JsonInclude(JsonInclude.Include.NON_EMPTY) private final List<JSON...
} @Override public String toString() { return MoreObjects.toStringHelper(this) .add("elements", elements) .toString(); } public List<JSONDocumentLayoutElement> getElements() { return elements; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\json\JSONAddressLayout.java
1
请完成以下Java代码
public Optional<ApiResponseAudit> getLatestByRequestId(@NonNull final ApiRequestAuditId apiRequestAuditId) { return queryBL.createQueryBuilder(I_API_Response_Audit.class) .addEqualsFilter(I_API_Response_Audit.COLUMNNAME_API_Request_Audit_ID, apiRequestAuditId.getRepoId()) .orderByDescending(I_API_Response_Au...
@NonNull private ApiResponseAudit recordToResponseAudit(@NonNull final I_API_Response_Audit record) { return ApiResponseAudit.builder() .orgId(OrgId.ofRepoId(record.getAD_Org_ID())) .apiRequestAuditId(ApiRequestAuditId.ofRepoId(record.getAPI_Request_Audit_ID())) .apiResponseAuditId(ApiResponseAuditId.of...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\response\ApiResponseAuditRepository.java
1
请完成以下Java代码
public class PosterUtil { public static String ossDomain="http://qdliuhaihua.oss-cn-qingdao-internal.aliyuncs.com/"; public static void main(String[] args) throws Exception{ //String in1pathString = PosterUtil.class.getResource("/static/css/fonts/simkai.ttf").getFile(); //System.out.printf(in1pathString); t...
.siteSlogon(siteSlogon) .postTitle("Java generate poster in 5 miniutes") .postDate("2022年11月14日 pm1:23 Author:Harries") .posttitleDesc("Demand Background\u200B We often encounter such a demand in multi-terminal application development: when users browse products, they feel good and want to share them with f...
repos\springboot-demo-master\poster\src\main\java\com\et\poster\service\PosterUtil.java
1
请完成以下Spring Boot application配置
server: port: 8095 servlet: session: timeout: 30 spring: application: name: roncoo-pay-app-notify logging: config: classpath:logback.
xml mybatis: mapper-locations: classpath*:mybatis/mapper/**/*.xml
repos\roncoo-pay-master\roncoo-pay-app-notify\src\main\resources\application.yml
2
请完成以下Java代码
public int getPay_OnlinePaymentHistory_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Pay_OnlinePaymentHistory_ID); if (ii == null) { return 0; } return ii.intValue(); } /** Set Authorization Code. @param R_AuthCode Authorization Code returned */ @Override public void setR_AuthCode (Stri...
*/ @Override public String getTenderType () { return (String)get_Value(COLUMNNAME_TenderType); } // /** TrxType AD_Reference_ID=215 */ // public static final int TRXTYPE_AD_Reference_ID=215; // /** Verkauf = S */ // public static final String TRXTYPE_Verkauf = "S"; // /** Delayed Capture = D */ // public static...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\schaeffer\pay\model\X_Pay_OnlinePaymentHistory.java
1
请完成以下Java代码
public boolean isValueUpdatedBefore(final AttributeCode attributeCode) { return getLastPropagatorOrNull(attributeCode) != null; } @Override public IHUAttributePropagator getLastPropagatorOrNull(@NonNull final AttributeCode attributeCode) { // Iterate up chain of parents, starting with the parent context. for ...
return currentParentContext.getPropagator(); } return null; } @Override public IAttributeValueContext copy() { return cloneForPropagation(getAttributeStorage(), getAttribute(), getPropagator()); } @Override public IHUAttributePropagationContext cloneForPropagation(final IAttributeStorage attributeStorag...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\propagation\impl\HUAttributePropagationContext.java
1
请完成以下Java代码
public static boolean isBlacklisted(ExtensionAttribute attribute, List<ExtensionAttribute>... blackLists) { if (blackLists != null) { for (List<ExtensionAttribute> blackList : blackLists) { for (ExtensionAttribute blackAttribute : blackList) { if (blackAttribute.g...
public static void writeOutgoingElementChild(XMLStreamWriter xtw, SequenceFlow outgoingSequence) throws Exception { xtw.writeStartElement(BPMN2_PREFIX, ELEMENT_GATEWAY_OUTGOING, BPMN2_NAMESPACE); xtw.writeCharacters(outgoingSequence.getId()); xtw.writeEndElement(); } /** * 'safe' i...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\util\BpmnXMLUtil.java
1
请完成以下Java代码
public int getRank() { return sales; } @Override public String toString() { return "Product [name=" + name + ", price=" + price + ", sales=" + sales + "]"; } // getters and setters public String getName() { return name; } public void setName(String name) { ...
public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public int getSales() { return sales; } public void setSales(int sales) { this.sales = sales; } }
repos\tutorials-master\core-java-modules\core-java-lang-oop-generics-2\src\main\java\com\baeldung\generics\Product.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public int getSalary() { return salary; } public void setSalary(int salary) { this.salary = salary; }
public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } @Override public String toString() { return "Employee{" + "name='" + name + '\'' + ", salary=" + salary + ", department='" + department + '\''...
repos\tutorials-master\core-java-modules\core-java-9-streams\src\main\java\com\baledung\streams\entity\Employee.java
1
请完成以下Java代码
public int getBatchJobsPerSeed() { return batchJobsPerSeed; } public void setBatchJobsPerSeed(int batchJobsPerSeed) { this.batchJobsPerSeed = batchJobsPerSeed; } public int getInvocationsPerBatchJob() { return invocationsPerBatchJob; } public void setInvocationsPerBatchJob(int invocationsPerB...
} public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } @Override public Date getExecutionStartTime()...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchEntity.java
1
请完成以下Java代码
public class DeviceActor extends ContextAwareActor { private final DeviceActorMessageProcessor processor; DeviceActor(ActorSystemContext systemContext, TenantId tenantId, DeviceId deviceId) { super(systemContext); this.processor = new DeviceActorMessageProcessor(systemContext, tenantId, device...
break; case DEVICE_ACTOR_SERVER_SIDE_RPC_TIMEOUT_MSG: processor.processServerSideRpcTimeout((DeviceActorServerSideRpcTimeoutMsg) msg); break; case SESSION_TIMEOUT_MSG: processor.checkSessionsTimeout(); break; case DEVICE...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\device\DeviceActor.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public org.compiere.model.I_C_BPartner_QuickInput getC_BPartner_QuickInput() { return get_ValueAsPO(COLUMNNAME_C_BPartner_QuickInput_ID, org.compiere.model.I_C_BPartner_QuickI...
} @Override public int getC_BPartner_QuickInput_RelatedRecord1_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_QuickInput_RelatedRecord1_ID); } @Override public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null); else set_Value (COLUMNNAME_Reco...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput_RelatedRecord1.java
1
请完成以下Java代码
class Frame { private static final byte[] NO_BYTES = new byte[0]; private final Type type; private final byte[] payload; /** * Create a new {@link Type#TEXT text} {@link Frame} instance with the specified * payload. * @param payload the text payload */ Frame(String payload) { Assert.notNull(payload, ...
for (int i = 0; i < payload.length; i++) { payload[i] ^= mask[i % 4]; } } return new Frame(Type.forCode(firstByte & 0x0F), payload); } /** * Frame types. */ enum Type { /** * Continuation frame. */ CONTINUATION(0x00), /** * Text frame. */ TEXT(0x01), /** * Binary frame. ...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\livereload\Frame.java
1
请完成以下Java代码
public void setC_MembershipMonth_ID (final int C_MembershipMonth_ID) { if (C_MembershipMonth_ID < 1) set_ValueNoCheck (COLUMNNAME_C_MembershipMonth_ID, null); else set_ValueNoCheck (COLUMNNAME_C_MembershipMonth_ID, C_MembershipMonth_ID); } @Override public int getC_MembershipMonth_ID() { return get...
else set_Value (COLUMNNAME_C_Year_ID, C_Year_ID); } @Override public int getC_Year_ID() { return get_ValueAsInt(COLUMNNAME_C_Year_ID); } @Override public void setValidTo (final @Nullable java.sql.Timestamp ValidTo) { set_ValueNoCheck (COLUMNNAME_ValidTo, ValidTo); } @Override public java.sql.Time...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_MembershipMonth.java
1
请完成以下Java代码
public boolean isEmpty() { final List<I_M_HU_Item_Storage> storages = dao.retrieveItemStorages(item); for (final I_M_HU_Item_Storage storage : storages) { if (!isEmpty(storage)) { return false; } } return true; } private boolean isEmpty(final I_M_HU_Item_Storage storage) { final BigDecima...
return false; } return true; } @Override public boolean isEmpty(final ProductId productId) { final I_M_HU_Item_Storage storage = dao.retrieveItemStorage(item, productId); if (storage == null) { return true; } return isEmpty(storage); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUItemStorage.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonResponseBPGroup { public static final String METASFRESH_ID = "metasfreshId"; public static final String NAME = "name"; public static final String VALUE = "value"; public static final String ACTIVE = "active"; @ApiModelProperty( // required = true, // dataType = "java.lang.Integer", // va...
String name; @ApiModelProperty(value = "This translates to `C_BP_Group.Value`.") @JsonProperty(VALUE) String value; @JsonCreator @Builder(toBuilder = true) private JsonResponseBPGroup( @JsonProperty(METASFRESH_ID) @NonNull final JsonMetasfreshId metasfreshId, @JsonProperty(VALUE) @NonNull final String val...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\response\JsonResponseBPGroup.java
2
请完成以下Java代码
public Class<? extends ObservationConvention<? extends Context>> getDefaultConvention() { return DefaultRabbitTemplateObservationConvention.class; } @Override public KeyName[] getLowCardinalityKeyNames() { return TemplateLowCardinalityTags.values(); } }; /** * Low cardinality tags. */ public enu...
} /** * Default {@link RabbitTemplateObservationConvention} for Rabbit template key values. */ public static class DefaultRabbitTemplateObservationConvention implements RabbitTemplateObservationConvention { /** * A singleton instance of the convention. */ public static final DefaultRabbitTemplateObser...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\support\micrometer\RabbitTemplateObservation.java
1
请完成以下Java代码
public Date getCreateTime() { return getStartTime(); } public void setCreateTime(Date createTime) { setStartTime(createTime); } public Date getCloseTime() { return getEndTime(); } public void setCloseTime(Date closeTime) { setEndTime(closeTime); } public String getCreateUserId() { ...
} public boolean isTerminated() { return state == TERMINATED.getStateCode(); } public boolean isFailed() { return state == FAILED.getStateCode(); } public boolean isSuspended() { return state == SUSPENDED.getStateCode(); } public boolean isClosed() { return state == CLOSED.getStateCode...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricCaseInstanceEventEntity.java
1
请在Spring Boot框架中完成以下Java代码
public static void register(BeanDefinitionRegistry registry, Collection<String> packageNames) { Assert.notNull(registry, "'registry' must not be null"); Assert.notNull(packageNames, "'packageNames' must not be null"); if (registry.containsBeanDefinition(BEAN)) { EntityScanPackagesBeanDefinition beanDefinition ...
packagesToScan.add(this.environment.resolvePlaceholders(ClassUtils.getPackageName(basePackageClass))); } if (packagesToScan.isEmpty()) { String packageName = ClassUtils.getPackageName(metadata.getClassName()); Assert.state(StringUtils.hasLength(packageName), "@EntityScan cannot be used with the default pa...
repos\spring-boot-4.0.1\module\spring-boot-persistence\src\main\java\org\springframework\boot\persistence\autoconfigure\EntityScanPackages.java
2
请完成以下Java代码
public final class NullVendorGatewayInvoker implements VendorGatewayInvoker { public static final String NO_REMOTE_PURCHASE_ID = "NO_REMOTE_PURCHASE_ID"; public static final NullVendorGatewayInvoker INSTANCE = new NullVendorGatewayInvoker(); private NullVendorGatewayInvoker() { } /** * Does not actually plac...
} private static PurchaseOrderItem createPlainPurchaseOrderItem( @NonNull final PurchaseCandidate purchaseCandidate) { return purchaseCandidate.createOrderItem() .remotePurchaseOrderId(NO_REMOTE_PURCHASE_ID) .datePromised(purchaseCandidate.getPurchaseDatePromised()) .dateOrdered(purchaseCandidate.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\purchaseordercreation\remoteorder\NullVendorGatewayInvoker.java
1
请完成以下Java代码
private String getFileName(String template, String className, String packageName, String moduleName) { // 包路径 String packagePath = GenConstants.SIGNATURE + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator; // 资源路径 String resourcePath = GenConsta...
} if (template.contains(SERVICE_IMPL_JAVA_VM)) { return packagePath + "service" + File.separator + "impl" + File.separator + className + "ServiceImpl.java"; } if (template.contains(CONTROLLER_JAVA_VM)) { return packagePath + "controller" + File.separator + className + "...
repos\spring-boot-demo-master\demo-codegen\src\main\java\com\xkcoding\codegen\utils\CodeGenUtil.java
1
请完成以下Java代码
public abstract class AbstractEmptyBodyFilter implements Filter { protected static final Pattern CONTENT_TYPE_JSON_PATTERN = Pattern.compile("^application\\/json((;)(.*)?)?$", Pattern.CASE_INSENSITIVE); @Override public void doFilter(final ServletRequest req, final ServletResponse resp, FilterChain chain) throw...
@Override public void destroy() { } @Override public void init(FilterConfig filterConfig) throws ServletException { } public BufferedReader getReader(final ServletInputStream inputStream) { return new BufferedReader(new InputStreamReader(inputStream)); } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\filter\AbstractEmptyBodyFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class Group { @Id @GeneratedValue private Long id; private String name; @ManyToMany(mappedBy = "groups") private List<User> users = new ArrayList<>(); public Group(String name) { this.name = name; } public Long getId() { return id; } public void s...
public List<User> getUsers() { return users; } public void setUsers(List<User> users) { this.users = users; } @Override public String toString() { return "Group [name=" + name + "]"; } }
repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\wherejointable\Group.java
2
请完成以下Java代码
public void destroy() { } protected void setAuthenticatedUser(ProcessEngine engine, String userId, List<String> groupIds, List<String> tenantIds) { if (groupIds == null) { groupIds = getGroupsOfUser(engine, userId); } if (tenantIds == null) { tenantIds = getTenantsOfUser(engine, userId); ...
for (Pattern whiteListedUrlPattern : WHITE_LISTED_URL_PATTERNS) { Matcher matcher = whiteListedUrlPattern.matcher(requestUrl); if (matcher.matches()) { return false; } } return true; } /** * May not return null */ protected String extractEngineName(String requestUrl) { ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\security\auth\ProcessEngineAuthenticationFilter.java
1
请完成以下Java代码
private static Decoder<?> findJsonDecoder(CodecConfigurer configurer) { return configurer.getReaders().stream() .filter((reader) -> reader.canRead(MESSAGE_TYPE, MediaType.APPLICATION_JSON)) .map((reader) -> ((DecoderHttpMessageReader<?>) reader).getDecoder()) .findFirst() .orElseThrow(() -> new Illega...
@SuppressWarnings("ConstantConditions") @Nullable GraphQlWebSocketMessage decode(WebSocketMessage webSocketMessage) { DataBuffer buffer = DataBufferUtils.retain(webSocketMessage.getPayload()); return (GraphQlWebSocketMessage) this.decoder.decode(buffer, MESSAGE_TYPE, null, null); } WebSocketMessage encodeConnec...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\webflux\WebSocketCodecDelegate.java
1
请在Spring Boot框架中完成以下Java代码
public class UserRepositoryImpl implements UserRepository { @Autowired private JdbcTemplate primaryJdbcTemplate; @Override public int save(User user,JdbcTemplate jdbcTemplate) { if(jdbcTemplate == null){ jdbcTemplate= primaryJdbcTemplate; } return jdbcTemplate.update...
} @Override public List<User> findALL(JdbcTemplate jdbcTemplate) { if(jdbcTemplate==null){ jdbcTemplate= primaryJdbcTemplate; } return jdbcTemplate.query("SELECT * FROM users", new UserRowMapper()); // return jdbcTemplate.query("SELECT * FROM users", new BeanProperty...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-1 课: Spring Boot 使用 JDBC 操作数据库\spring-boot-multi-jdbc\src\main\java\com\neo\repository\impl\UserRepositoryImpl.java
2
请完成以下Java代码
public PublicKeyCredentialBuilder type(PublicKeyCredentialType type) { this.type = type; return this; } /** * Sets the {@link #getRawId()} property. * @param rawId the raw id * @return the PublicKeyCredentialBuilder */ public PublicKeyCredentialBuilder rawId(Bytes rawId) { this.rawId = rawId...
* @param clientExtensionResults the client extension results * @return the PublicKeyCredentialBuilder */ public PublicKeyCredentialBuilder clientExtensionResults( AuthenticationExtensionsClientOutputs clientExtensionResults) { this.clientExtensionResults = clientExtensionResults; return this; } /...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredential.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonExternalReferenceItem { public static JsonExternalReferenceItem of( @NonNull final JsonExternalReferenceLookupItem lookupItem, @NonNull final JsonMetasfreshId metasfreshId) { return new JsonExternalReferenceItem(lookupItem, metasfreshId, null, null, null, null, null); } public static JsonE...
@Nullable @JsonInclude(JsonInclude.Include.NON_NULL) JsonMetasfreshId externalReferenceId; @JsonCreator @Builder private JsonExternalReferenceItem( @JsonProperty("lookupItem") @NonNull final JsonExternalReferenceLookupItem lookupItem, @JsonProperty("metasfreshId") @Nullable final JsonMetasfreshId metasfres...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-externalreference\src\main\java\de\metas\common\externalreference\v2\JsonExternalReferenceItem.java
2
请完成以下Java代码
public static PlainContextAware newCopy(final IContextAware contextProvider) { return new PlainContextAware(contextProvider.getCtx(), contextProvider.getTrxName(), contextProvider.isAllowThreadInherited()); } private final Properties ctx; private final String trxName; private final boolean allowThreadInherited;...
{ return new HashcodeBuilder() .append(ctx) .append(trxName) .toHashcode(); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } final PlainContextAware other = EqualsBuilder.getOther(this, obj); if (other == null) { return false; } return new Equal...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\PlainContextAware.java
1
请完成以下Java代码
public class UserExcel implements Serializable { @Serial private static final long serialVersionUID = 1L; @ColumnWidth(15) @ExcelProperty("租户编号") private String tenantId; @ColumnWidth(15) @ExcelProperty("账户") private String account; @ColumnWidth(10) @ExcelProperty("昵称") private String name; @ColumnWidth...
private String roleId; @ExcelIgnore @ExcelProperty("部门ID") private String deptId; @ExcelIgnore @ExcelProperty("岗位ID") private String postId; @ExcelProperty("角色名称") private String roleName; @ExcelProperty("部门名称") private String deptName; @ExcelProperty("岗位名称") private String postName; @ColumnWidth(20)...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\excel\UserExcel.java
1
请完成以下Spring Boot application配置
## tomcat\u914D\u7F6E server.port=8009 #server.tomcat.maxHttpHeaderSize=8192 server.tomcat.uri-encoding=UTF-8 spring.http.encoding.charset=UTF-8 spring.http.encoding.enabled=true spring.http.encoding.force=true spring.es.encoding=UTF-8 # tomcat\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u9ED8\u8BA4\u4E3A200 server.tomcat.ma...
spring.datasource.connection-init-sql= set names utf8mb4 logging.level.cn.abel.dao=debug #Mapper.xml\u6240\u5728\u7684\u4F4D\u7F6E mybatis.mapper-locations=classpath*:mapper/*Mapper.xml smybatis.type-aliases-package=cn.abel.bean #Mapper.xml\u6240\u5728\u7684\u4F4D\u7F6E ## pagehelper pagehelper.helperDialect=mysql p...
repos\springBoot-master\springboot-elasticsearch\src\main\resources\local\application.properties
2
请完成以下Java代码
public PublicKeyCredentialRequestOptionsBuilder allowCredentials( List<PublicKeyCredentialDescriptor> allowCredentials) { Assert.notNull(allowCredentials, "allowCredentials cannot be null"); this.allowCredentials = allowCredentials; return this; } /** * Sets the {@link #getUserVerification()} prope...
* Allows customizing the {@link PublicKeyCredentialRequestOptionsBuilder} * @param customizer the {@link Consumer} used to customize the builder * @return the {@link PublicKeyCredentialRequestOptionsBuilder} */ public PublicKeyCredentialRequestOptionsBuilder customize( Consumer<PublicKeyCredentialRequest...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredentialRequestOptions.java
1
请完成以下Java代码
public void deleteHistoricIdentityLinksLogByProcessDefinitionId(String processDefId) { if (isHistoryEventProduced()) { getDbEntityManager().delete(HistoricIdentityLinkLogEntity.class, "deleteHistoricIdentityLinksByProcessDefinitionId", processDefId); } } public void deleteHistoricIdentityLinksLogByTa...
parameters.put("minuteFrom", minuteFrom); parameters.put("minuteTo", minuteTo); } parameters.put("batchSize", batchSize); return getDbEntityManager() .deletePreserveOrder(HistoricIdentityLinkLogEntity.class, "deleteHistoricIdentityLinkLogByRemovalTime", new ListQueryParameterObject(para...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricIdentityLinkLogManager.java
1
请完成以下Java代码
public Collection<Dependency> getAll() { return Collections .unmodifiableCollection(this.indexedDependencies.values().stream().distinct().collect(Collectors.toList())); } public void validate() { index(); } public void updateCompatibilityRange(VersionParser versionParser) { this.indexedDependencies.value...
if (dependency.getBom() == null && group.getBom() != null) { dependency.setBom(group.getBom()); } if (dependency.getRepository() == null && group.getRepository() != null) { dependency.setRepository(group.getRepository()); } dependency.resolve(); indexDependency(dependency.getId(), dependency); ...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\DependenciesCapability.java
1
请完成以下Java代码
public QueryService getQueryService(String processEngineName) { CommandExecutor commandExecutor = getCommandExecutor(processEngineName); return new QueryServiceImpl(commandExecutor); } @Override public CommandExecutor getCommandExecutor(String processEngineName) { CommandExecutor commandExecutor = c...
mappingFiles.addAll(plugin.getMappingFiles()); } return mappingFiles; } /** * Create command executor for the engine with the given name * * @param processEngineName * @return */ protected CommandExecutor createCommandExecutor(String processEngineName) { ProcessEngine processEngine =...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\DefaultCockpitRuntimeDelegate.java
1
请完成以下Java代码
public void setDescription (final java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setOffsetDays (final int OffsetDays) { set_Value (COLUMNNA...
public static final String REFERENCEDATETYPE_BLDate = "BL"; /** OrderDate = OD */ public static final String REFERENCEDATETYPE_OrderDate = "OD"; /** LCDate = LC */ public static final String REFERENCEDATETYPE_LCDate = "LC"; /** ETADate = ET */ public static final String REFERENCEDATETYPE_ETADate = "ET"; @Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentTerm_Break.java
1
请完成以下Java代码
public String getProcessDefinitionId() { return processDefinitionId; } /** Reference to the overall process instance */ public String getProcessInstanceId() { return processInstanceId; } /** * Return the id of the tenant this execution belongs to. Can be * <code>null</code> if the execution be...
public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", eventName=" + eventName + ", businessKey=" + businessKey + ", activityInstanceId=" + activityInstanceId + ", currentActivityId=" + currentActivityId + ", currentActivityName=" + curre...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\event\ExecutionEvent.java
1
请完成以下Java代码
public BigDecimal getQtyBOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyBOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setScrap (final @Nullable BigDecimal Scrap) { set_Value (COLUMNNAME_Scrap, Scrap); } @Override public BigDecimal getScrap() { final BigDe...
set_Value (COLUMNNAME_TM_Product_ID, null); else set_Value (COLUMNNAME_TM_Product_ID, TM_Product_ID); } @Override public int getTM_Product_ID() { return get_ValueAsInt(COLUMNNAME_TM_Product_ID); } @Override public void setValidFrom (final @Nullable java.sql.Timestamp ValidFrom) { set_Value (COLUMNN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_RV_PP_Product_BOMLine.java
1
请完成以下Java代码
public I_C_ValidCombination getV_Liability_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .getPO(getV_Liability_Acct(), get_TrxName()); } /** Set Vendor Liability. @param V_Liability_Acct Account for Vendor Liability */ public void se...
public int getV_Liability_Services_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_V_Liability_Services_Acct); if (ii == null) return 0; return ii.intValue(); } public I_C_ValidCombination getV_Prepayment_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_Valid...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Vendor_Acct.java
1
请完成以下Java代码
public void remove() { throw new RuntimeException("不支持的操作"); } @Override public boolean hasNext() { try { boolean next = in.available() > 0; ...
{ try { return new Document(in); } catch (IOException e) { throw new RuntimeException(e); } } }; } catch (IO...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\FileDataSet.java
1
请完成以下Java代码
public Liefervorgabe getBestellLiefervorgabe() { return bestellLiefervorgabe; } /** * Sets the value of the bestellLiefervorgabe property. * * @param value * allowed object is * {@link Liefervorgabe } * */ public void setBestellLiefervorgabe(Liefervo...
* <p> * For example, to add a new item, do as follows: * <pre> * getAnteile().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link BestellungAnteil } * * */ public List<BestellungAnteil> getAnteile() {...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\BestellungAntwortPosition.java
1
请完成以下Java代码
public Class<NoDeviceResponse> getResponseClass() { return NoDeviceResponse.class; } @NonNull public String getCmd() { final int scale = getTargetScale(); return "<K180K" + format(targetWeight, scale) + ";" + format(negativeTolerance, scale) + ";" + format(positiveTolerance, scale) + ">"; } ...
{ return Optional.ofNullable(targetWeightScale).orElse(DEFAULT_SCALE); } /** * Formats decimal value to fit Soehenle scale specs. */ @NonNull private static String format(@NonNull final BigDecimal value, final int scale) { final BigDecimal absValue = value.abs(); final BigDecimal valueToUse = absValue.s...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.scales\src\main\java\de\metas\device\scales\impl\soehenle\SoehenleSendTargetWeightRequest.java
1
请完成以下Java代码
public MWebProject getWebProject() { if (m_project == null) m_project = MWebProject.get(getCtx(), getCM_WebProject_ID()); return m_project; } // getWebProject /** * Get AD_Tree_ID * @return tree */ public int getAD_Tree_ID() { return getWebProject().getAD_TreeCMM_ID(); } // getAD_Tree_ID; /...
if (no > 0) log.debug("#" + no + " - TreeType=CMM"); else log.warn("#" + no + " - TreeType=CMM"); return no > 0; } // afterDelete /** * Get File Name * @return file name return ID */ public String getFileName() { return get_ID() + getExtension(); } // getFileName /** * Get Extension with ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MMedia.java
1
请在Spring Boot框架中完成以下Java代码
public void export(HttpServletResponse response) throws Exception { //mock datas Goods goods1 = new Goods(); List<GoodType> goodTypeList1 = new ArrayList<>(); GoodType goodType1 = new GoodType(); goodType1.setTypeId("apple-1"); goodType1.setTypeName("apple-red"); ...
System.out.println(goods); } //export FileUtil.exportExcel(goodsList, Goods.class,"product.xls",response); } @RequestMapping("/importExcel") public void importExcel() throws Exception { //loal file String filePath = "C:\\Users\\Dell\\Downloads\\product.xls"; ...
repos\springboot-demo-master\eaypoi\src\main\java\com\et\easypoi\controller\HelloWorldController.java
2
请完成以下Java代码
public ProcessEngine getProcessEngine(String processEngineName) { try { return processEngineProvider.getProcessEngine(processEngineName); } catch (Exception e) { throw new ProcessEngineException("No process engine with name " + processEngineName + " found.", e); } } public Set<String> getPr...
throw new IllegalStateException(message, e); } } public List<PluginResourceOverride> getResourceOverrides() { if(resourceOverrides == null) { initResourceOverrides(); } return resourceOverrides; } protected synchronized void initResourceOverrides() { if(resourceOverrides == null) { /...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\AbstractAppRuntimeDelegate.java
1
请完成以下Java代码
public ColumnInfo setColumnName(final String columnName) { this.columnName = columnName; return this; } /** * * @return internal (not translated) column name */ public String getColumnName() { return columnName; } private int precision = -1; /** * Sets precision to be used in case it's a numb...
{ this.sortNo = sortNo; return this; } /** * Gets SortNo. * * @return * @see I_AD_Field#COLUMNNAME_SortNo. */ public int getSortNo() { return sortNo; } @Override public String toString() { return ObjectUtils.toString(this); } } // infoColumn
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\minigrid\ColumnInfo.java
1
请完成以下Java代码
public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public de.metas.ui.web.base.model.I_WEBUI_Board getWEBUI_Board() { return get_ValueAsPO(COLUMNNAME_WEBUI_Board_ID, de.metas.ui.web.base...
set_ValueNoCheck (COLUMNNAME_WEBUI_Board_ID, null); else set_ValueNoCheck (COLUMNNAME_WEBUI_Board_ID, WEBUI_Board_ID); } @Override public int getWEBUI_Board_ID() { return get_ValueAsInt(COLUMNNAME_WEBUI_Board_ID); } @Override public void setWEBUI_Board_Lane_ID (final int WEBUI_Board_Lane_ID) { if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Board_Lane.java
1
请完成以下Java代码
public int getAD_User_SortPref_Hdr_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_SortPref_Hdr_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_AD_Window_ID, org....
/** Get Beschreibung. @return Beschreibung */ @Override public java.lang.String getDescription () { return (java.lang.String)get_Value(COLUMNNAME_Description); } /** Set Konferenz. @param IsConference Konferenz */ @Override public void setIsConference (boolean IsConference) { set_Value (COLUMNNAME...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_SortPref_Hdr.java
1
请在Spring Boot框架中完成以下Java代码
private BPartner importBPartnerNoCascade(final SyncBPartner syncBpartner) { // // BPartner BPartner bpartner = bpartnersRepo.findByUuid(syncBpartner.getUuid()); // // Handle delete request if (syncBpartner.isDeleted()) { if (bpartner != null) { deleteBPartner(bpartner); } return bpartner...
bpartner.setName(syncBpartner.getName()); bpartnersRepo.save(bpartner); logger.debug("Imported: {} -> {}", syncBpartner, bpartner); return bpartner; } private void deleteBPartner(final BPartner bpartner) { if (bpartner.isDeleted()) { return; } bpartner.setDeleted(true); bpartnersRepo.save(bpartn...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\SyncBPartnerImportService.java
2
请完成以下Java代码
private Optional<InvoiceId> retrieveInvoice(final IdentifierString invoiceIdentifier, final OrgId orgId, final DocBaseAndSubType docType) { final InvoiceQuery invoiceQuery = createInvoiceQuery(invoiceIdentifier).docType(docType).orgId(orgId).build(); return invoiceDAO.retrieveIdByInvoiceQuery(invoiceQuery); } p...
} else if (IdentifierString.Type.EXTERNAL_ID.equals(type)) { return builder .externalId(identifierString.asExternalId()) .build(); } else if (IdentifierString.Type.DOC.equals(type)) { return builder .documentNo(identifierString.asDoc()) .build(); } else { throw new Adempiere...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\payment\JsonPaymentService.java
1
请完成以下Java代码
public static MProductPO[] getOfProduct (Properties ctx, int M_Product_ID, String trxName) { final String whereClause = "M_Product_ID=? AND IsActive=?"; List<MProductPO> list = new Query(ctx, Table_Name, whereClause, trxName) .setParameters(new Object[]{M_Product_ID, "Y"}) .setOrderBy("IsCurrentV...
// setC_BPartner_ID (0); // 0 // setVendorProductNo (null); // @Value@ setIsCurrentVendor (true); // Y } } // MProduct_PO /** * Load Constructor * @param ctx context * @param rs result set * @param trxName transaction */ public MProductPO(Properties ctx, ResultSet rs, String trxName) { super...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MProductPO.java
1
请在Spring Boot框架中完成以下Java代码
public class RpNotifyRecordLog extends BaseEntity { /** 通知记录ID **/ private String notifyId; /** 请求信息 **/ private String request; /** 返回信息 **/ private String response; /** 商户编号 **/ private String merchantNo; /** 商户订单号 **/ private String merchantOrderNo; /** HTTP状态 **/ ...
/** 请求信息 **/ public void setRequest(String request) { this.request = request == null ? null : request.trim(); } /** 返回信息 **/ public String getResponse() { return response; } /** 返回信息 **/ public void setResponse(String response) { this.response = response == null ? n...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\notify\entity\RpNotifyRecordLog.java
2
请完成以下Java代码
public String toString() { return getClass().getSimpleName() + "[" + delegate + "]"; } @Override public void setHUIterator(final IHUIterator iterator) { delegate.setHUIterator(iterator); } protected IHUIterator getHUIterator() { if (delegate instanceof HUIteratorListenerAdapter) { return ((HUIterat...
@Override public Result afterHU(final I_M_HU hu) { return delegate.afterHU(hu); } @Override public Result beforeHUItem(final IMutable<I_M_HU_Item> item) { return delegate.beforeHUItem(item); } @Override public Result afterHUItem(final I_M_HU_Item item) { return delegate.afterHUItem(item); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HUIteratorListenerDelegateAdapter.java
1
请完成以下Java代码
public UOMConversionRate getRate(@NonNull final UomId fromUomId, @NonNull final UomId toUomId) { final UOMConversionRate rate = getRateOrNull(fromUomId, toUomId); if (rate == null) { throw new NoUOMConversionException(productId, fromUomId, toUomId); } return rate; } public Optional<UOMConversionRate> g...
return rates.values() .stream() .filter(UOMConversionRate::isCatchUOMForProduct) .map(UOMConversionRate::getToUomId) .collect(ImmutableSet.toImmutableSet()); } private static FromAndToUomIds toFromAndToUomIds(final UOMConversionRate conversion) { return FromAndToUomIds.builder() .fromUomId(con...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\UOMConversionsMap.java
1
请在Spring Boot框架中完成以下Java代码
public class JwtAuthenticationController { private final JwtTokenService tokenService; private final AuthenticationManager authenticationManager; public JwtAuthenticationController(JwtTokenService tokenService, AuthenticationManager authenticationManager) { this.tokenService ...
var authenticationToken = new UsernamePasswordAuthenticationToken( jwtTokenRequest.username(), jwtTokenRequest.password()); var authentication = authenticationManager.authenticate(authenticationToken); v...
repos\master-spring-and-spring-boot-main\13-full-stack\02-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\jwt\JwtAuthenticationController.java
2
请完成以下Java代码
public void setM_InOut_ID (final int M_InOut_ID) { if (M_InOut_ID < 1) set_Value (COLUMNNAME_M_InOut_ID, null); else set_Value (COLUMNNAME_M_InOut_ID, M_InOut_ID); } @Override public int getM_InOut_ID() { return get_ValueAsInt(COLUMNNAME_M_InOut_ID); } @Override public org.compiere.model.I_M_In...
{ final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInUOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyEntered (final @Nullable BigDecimal QtyEntered) { set_Value (COLUMNNAME_QtyEntered, QtyEntered); } @Override public BigDecimal getQtyEntered() { final B...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderDetail.java
1
请在Spring Boot框架中完成以下Java代码
public BeetlSqlScannerConfigurer getBeetlSqlScannerConfigurer() { BeetlSqlScannerConfigurer conf = new BeetlSqlScannerConfigurer(); conf.setBasePackage("com.forezp.dao"); conf.setDaoSuffix("Dao"); conf.setSqlManagerFactoryBeanName("sqlManagerFactoryBean"); return conf; } @Bean(name = "sqlManagerFactoryBean...
factory.setSqlLoader(new ClasspathLoader("/sql"));//sql文件路径 return factory; } //配置数据库 @Bean(name = "datasource") public DataSource getDataSource() { return DataSourceBuilder.create().url("jdbc:mysql://127.0.0.1:3306/test").username("root").password("123456").build(); } //开启事务 @Bean(name = "txManager") pu...
repos\SpringBootLearning-master\springboot-beatlsql\src\main\java\com\forezp\SpringbootBeatlsqlApplication.java
2
请完成以下Java代码
public PropertySource<?> toPropertySource() { return new PropertiesPropertySource(getClass().getSimpleName(), copy(this.entries)); } private Properties copy(Properties properties) { Properties copy = new Properties(); copy.putAll(properties); return copy; } private static final class PropertiesIterator im...
/** * Property entry. */ public static final class Entry { private final String key; private final String value; private Entry(String key, String value) { this.key = key; this.value = value; } public String getKey() { return this.key; } public String getValue() { return this.value; ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\InfoProperties.java
1
请完成以下Java代码
private static String generateMainClass(String packageName) { return packageName + ";\n" + "\n" + "public class Main {\n" + " public static void main(String[] args){\n" + " System.out.println(\"Hello World!\");\n" + " }\n" + ...
Xpp3Dom configuration = new Xpp3Dom("configuration"); Xpp3Dom source = new Xpp3Dom("source"); source.setValue(javaVersion.getVersion()); Xpp3Dom target = new Xpp3Dom("target"); target.setValue(javaVersion.getVersion()); configuration.addChild(source); configuration.addChi...
repos\tutorials-master\maven-modules\maven-exec-plugin\src\main\java\com\baeldung\learningplatform\ProjectBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public String getGoodsId() { return goodsId; } public void setGoodsId(String goodsId) { this.goodsId = goodsId; } public String getGoodsName() { return goodsName; } public void setGoodsName(String goodsName) { this.goodsName = goodsName; }
public Long getSinglePrice() { return singlePrice; } public void setSinglePrice(Long singlePrice) { this.singlePrice = singlePrice; } public Integer getNums() { return nums; } public void setNums(Integer nums) { this.nums = nums; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\RoncooPayGoodsDetails.java
2
请完成以下Java代码
private void recordTaskUpdated(TaskComparatorImpl taskComparator) { // Only update history if history is enabled if (commandContext.getProcessEngineConfiguration().getHistoryLevel().isAtLeast(HistoryLevel.AUDIT)) { TaskInfo updatedTask = taskComparator.getUpdatedTask(); if (taskC...
} if (taskComparator.hasTaskFormKeyChanged()) { commandContext .getHistoryManager() .recordTaskFormKeyChange(updatedTask.getId(), updatedTask.getFormKey()); } if (taskComparator.hasTaskParentIdChanged()) { comman...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\helper\task\TaskUpdater.java
1
请完成以下Java代码
public void setIsAsync (final boolean IsAsync) { set_Value (COLUMNNAME_IsAsync, IsAsync); } @Override public boolean isAsync() { return get_ValueAsBoolean(COLUMNNAME_IsAsync); } @Override public void setIsFeatureActivated (final boolean IsFeatureActivated) { set_Value (COLUMNNAME_IsFeatureActivated, I...
} @Override public int getMD_AvailableForSales_Config_ID() { return get_ValueAsInt(COLUMNNAME_MD_AvailableForSales_Config_ID); } @Override public void setSalesOrderLookBehindHours (final int SalesOrderLookBehindHours) { set_Value (COLUMNNAME_SalesOrderLookBehindHours, SalesOrderLookBehindHours); } @Ove...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_AvailableForSales_Config.java
1
请完成以下Java代码
public String getExpressionString() { return "@Value@"; } @Override public Set<CtxName> getParameters() { return PARAMETERS; } @Override public String evaluate(final Evaluatee ctx, final OnVariableNotFound onVariableNotFound) throws ExpressionEvaluationException { Integer adClientId = ctx.get_ValueAsIn...
{ adOrgId = Env.getAD_Org_ID(Env.getCtx()); } final IDocumentNoBuilderFactory documentNoFactory = Services.get(IDocumentNoBuilderFactory.class); final String value = documentNoFactory.forTableName(tableName, adClientId, adOrgId) .setFailOnError(onVariableNotFound == OnVariableNotFound.Fail) .setUsePre...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\AutoSequenceDefaultValueExpression.java
1
请完成以下Java代码
public final Mono<List<GraphQLError>> resolveException(Throwable ex, DataFetchingEnvironment env) { return Mono.defer(() -> Mono.justOrEmpty(resolveInternal(ex, env))); } private @Nullable List<GraphQLError> resolveInternal(Throwable exception, DataFetchingEnvironment env) { try { return (this.threadLocalCont...
GraphQLError error = resolveToSingleError(ex, env); return (error != null) ? Collections.singletonList(error) : null; } /** * Override this method to resolve an Exception to a single GraphQL error. * @param ex the exception to resolve * @param env the environment for the invoked {@code DataFetcher} * @retu...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\DataFetcherExceptionResolverAdapter.java
1
请在Spring Boot框架中完成以下Java代码
private String resolveBeanId(String mode) { if (isUnboundidEnabled(mode)) { return BeanIds.EMBEDDED_UNBOUNDID; } return null; } private boolean isUnboundidEnabled(String mode) { return "unboundid".equals(mode) || unboundIdPresent; } private String getPort(Element element) { String port = element.getA...
@Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @SuppressWarnings("unused") private DefaultSpringSecurityContextSource createEmbeddedContextSource(String suffix) { int port = getPort(); String providerUrl = "ldap://12...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\ldap\LdapServerBeanDefinitionParser.java
2
请完成以下Java代码
public Path createSourceFile(String packageName, String fileName) throws IOException { Path sourceFile = resolveSourceFile(packageName, fileName); createFile(sourceFile); return sourceFile; } /** * Resolve a resource file defined in the specified package. * @param packageName the name of the package * @p...
* @return the {@link Path file} to use to store a resource with the specified package * @throws IOException if an error occurred while trying to create the directory * structure or the file itself * @see #getResourcesDirectory() */ public Path createResourceFile(String packageName, String file) throws IOExcept...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\SourceStructure.java
1
请完成以下Java代码
public void staleTabs(final WindowId windowId, final DocumentId documentId, final Set<DetailId> tabIds) { forCollector(collector -> collector.staleTabs(windowId, documentId, tabIds)); } public void staleIncludedDocuments(final WindowId windowId, final DocumentId documentId, final DetailId tabId, final DocumentIds...
{ final CloseableCollector closeableCollector = new CloseableCollector(); closeableCollector.open(); return closeableCollector; } public class CloseableCollector implements IAutoCloseable { @NonNull private final JSONDocumentChangedWebSocketEventCollector collector = JSONDocumentChangedWebSocketEventCollect...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\events\DocumentWebsocketPublisher.java
1
请完成以下Java代码
private void configureEditor() { editor.setVisible(false); editor.setSaveListener(employee -> { var saved = employeeRepository.save(employee); updateEmployees(filter.getValue()); editor.setEmployee(null); grid.asSingleSelect().setValue(saved); });...
// Deselect grid grid.asSingleSelect().setValue(null); editor.setVisible(false); } } private void updateEmployees(String filterText) { if (filterText.isEmpty()) { grid.setItems(employeeRepository.findAll()); } else { grid.setItems(employe...
repos\tutorials-master\vaadin\src\main\java\com\baeldung\spring\EmployeesView.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal getCreditWatchRatio(final BPartnerStats stats) { // bp group will be taken from the stats' bpartner final I_C_BPartner partner = Services.get(IBPartnerDAO.class).getById(stats.getBpartnerId()); final I_C_BP_Group bpGroup = partner.getC_BP_Group(); final BigDecimal creditWatchPercent = bpGrou...
final BPartnerStats bpartnerStats = Services.get(IBPartnerStatsDAO.class).getCreateBPartnerStats(bpartner); final I_C_BP_Group bpGroup = bpartner.getC_BP_Group(); final String creditStatus = bpGroup.getSOCreditStatus(); if (Check.isEmpty(creditStatus, true)) { return; } final I_C_BPartner_Stats stats =...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPartnerStatsBL.java
2
请完成以下Java代码
public class DistributionJobLineId { @NonNull private final DDOrderLineId ddOrderLineId; private DistributionJobLineId(@NonNull final DDOrderLineId ddOrderLineId) { this.ddOrderLineId = ddOrderLineId; } public static DistributionJobLineId ofDDOrderLineId(final @NonNull DDOrderLineId ddOrderLineId) { return ...
} @JsonValue public String toString() { return toJson(); } @NonNull private String toJson() { return String.valueOf(ddOrderLineId.getRepoId()); } public DDOrderLineId toDDOrderLineId() {return ddOrderLineId;} public static boolean equals(@Nullable final DistributionJobLineId id1, @Nullable final Distr...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\model\DistributionJobLineId.java
1
请完成以下Java代码
public class EvaluationConditionDto { private String businessKey; private Map<String, VariableValueDto> variables; private String tenantId; private boolean withoutTenantId; private String processDefinitionId; public String getBusinessKey() { return businessKey; } public void setBusinessKey(String b...
return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public boolean isWithoutTenantId() { return withoutTenantId; } public void setWithoutTenantId(boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } public String getProcessDefinitionId() ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\condition\EvaluationConditionDto.java
1
请完成以下Java代码
public int getStartImpression () { Integer ii = (Integer)get_Value(COLUMNNAME_StartImpression); if (ii == null) return 0; return ii.intValue(); } /** Set Target Frame. @param Target_Frame Which target should be used if user clicks? */ public void setTarget_Frame (String Target_Frame) { set_Va...
} /** Set Target URL. @param TargetURL URL for the Target */ public void setTargetURL (String TargetURL) { set_Value (COLUMNNAME_TargetURL, TargetURL); } /** Get Target URL. @return URL for the Target */ public String getTargetURL () { return (String)get_Value(COLUMNNAME_TargetURL); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Ad.java
1
请在Spring Boot框架中完成以下Java代码
public String getAgreementNumber() { return agreementNumber; } /** * Sets the value of the agreementNumber property. * * @param value * allowed object is * {@link String } * */ public void setAgreementNumber(String value) { this.agreementNumb...
public List<FreeTextType> getFreeText() { if (freeText == null) { freeText = new ArrayList<FreeTextType>(); } return this.freeText; } /** * Reference to the consignment. * * @return * possible object is * {@link String } * */ ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ORDERSExtensionType.java
2
请完成以下Java代码
public E poll() { if (isNotEmpty()) { E nextValue = data[readSequence % capacity]; readSequence++; return nextValue; } return null; } public int capacity() { return capacity; } public int size() { return (writeSequence - r...
return writeSequence < readSequence; } public boolean isFull() { return size() >= capacity; } private boolean isNotEmpty() { return !isEmpty(); } private boolean isNotFull() { return !isFull(); } }
repos\tutorials-master\data-structures-2\src\main\java\com\baeldung\circularbuffer\CircularBuffer.java
1
请完成以下Java代码
public final class PIAttributes implements Iterable<I_M_HU_PI_Attribute> { public static PIAttributes of(@NonNull final Collection<I_M_HU_PI_Attribute> piAttributes) { if (piAttributes.isEmpty()) { return EMPTY; } return new PIAttributes(piAttributes); } public static final PIAttributes EMPTY = new PIA...
public PIAttributes addIfAbsent(@NonNull final PIAttributes from) { if (from.isEmpty()) { return this; } if (this.isEmpty()) { return from; } final LinkedHashMap<AttributeId, I_M_HU_PI_Attribute> piAttributesNew = new LinkedHashMap<>(attributesByAttributeId); from.attributesByAttributeId.forEac...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\PIAttributes.java
1
请完成以下Java代码
public void setM_Securpharm_Action_Result_ID (int M_Securpharm_Action_Result_ID) { if (M_Securpharm_Action_Result_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Securpharm_Action_Result_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Securpharm_Action_Result_ID, Integer.valueOf(M_Securpharm_Action_Result_ID)); } ...
/** Get Securpharm Produktdaten Ergebnise. @return Securpharm Produktdaten Ergebnise */ @Override public int getM_Securpharm_Productdata_Result_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Securpharm_Productdata_Result_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Transakti...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java-gen\de\metas\vertical\pharma\securpharm\model\X_M_Securpharm_Action_Result.java
1
请完成以下Java代码
public Object getCachedValue() { return cachedValue; } public void setCachedValue(Object cachedValue) { this.cachedValue = cachedValue; } // misc methods /////////////////////////////////////////////////////////////// @Override public String toString() { StringBuilder ...
} if (doubleValue != null) { sb.append(", doubleValue=").append(doubleValue); } if (textValue != null) { sb.append(", textValue=").append(StringUtils.abbreviate(textValue, 40)); } if (textValue2 != null) { sb.append(", textValue2=").append(Stri...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\VariableInstanceEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class CommissionPointsService { public Optional<Money> getCommissionPointsValue(@NonNull final CommissionPoints commissionPoints, @NonNull final FlatrateTermId flatrateTermId, @NonNull final LocalDate priceDate) { final IPricingResult pricingResult = calculateCommissionPointPriceFor(flatrateTermId, pri...
final PriceListId priceListId = priceListDAO.retrievePriceListIdByPricingSyst(pricingSystemId, commissionToLocationId, SOTrx.PURCHASE); final ProductId commissionProductId = ProductId.ofRepoId(flatrateTerm.getM_Product_ID()); final IEditablePricingContext pricingContext = pricingBL .createInitialContext( ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\CommissionPointsService.java
2
请完成以下Java代码
private static void addArrayIfNotNull(ObjectNode node, List<String> values) { if (!CollectionUtils.isEmpty(values)) { ArrayNode arrayNode = nodeFactory.arrayNode(); values.forEach(arrayNode::add); node.set("repositories", arrayNode); } } private static ObjectNode mapNode(Map<String, JsonNode> content) {...
} private ObjectNode mapRepositories(Map<String, Repository> repositories) { return mapNode(repositories.entrySet() .stream() .collect(Collectors.toMap(Map.Entry::getKey, (entry) -> mapRepository(entry.getValue())))); } private ObjectNode mapBoms(Map<String, BillOfMaterials> boms) { return mapNode(boms.e...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\DependencyMetadataV21JsonMapper.java
1
请完成以下Java代码
public String getCustomPropertiesResolverImplementationType() { return customPropertiesResolverImplementationType; } public void setCustomPropertiesResolverImplementationType(String customPropertiesResolverImplementationType) { this.customPropertiesResolverImplementationType = customPropertiesR...
*/ @Override public void setScriptInfo(ScriptInfo scriptInfo) { this.scriptInfo = scriptInfo; } @Override public FlowableListener clone() { FlowableListener clone = new FlowableListener(); clone.setValues(this); return clone; } public void setValues(Flowable...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\FlowableListener.java
1
请完成以下Java代码
public void setAD_Window(org.compiere.model.I_AD_Window AD_Window) { set_ValueFromPO(COLUMNNAME_AD_Window_ID, org.compiere.model.I_AD_Window.class, AD_Window); } /** Set Fenster. @param AD_Window_ID Eingabe- oder Anzeige-Fenster */ @Override public void setAD_Window_ID (int AD_Window_ID) { if (AD_Win...
set_Value (COLUMNNAME_AD_Window_ID, Integer.valueOf(AD_Window_ID)); } /** Get Fenster. @return Eingabe- oder Anzeige-Fenster */ @Override public int getAD_Window_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Window_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_AD_Element_Link.java
1
请完成以下Java代码
public OrderAndLineId getSalesOrderLineId() { final DemandDetail demandDetail = getDemandDetail(); if (demandDetail == null) { return null; } return OrderAndLineId.ofRepoIdsOrNull(demandDetail.getOrderId(), demandDetail.getOrderLineId()); } @NonNull public BusinessCaseDetail getBusinessCaseDetailNotN...
@Nullable public String getTraceId() { final DemandDetail demandDetail = getDemandDetail(); return demandDetail != null ? demandDetail.getTraceId() : null; } /** * This is enabled by the current usage of {@link #parentId} */ public boolean isStockCandidateOfThisCandidate(@NonNull final Candidate potential...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\candidate\Candidate.java
1
请在Spring Boot框架中完成以下Java代码
public Collection<Class<? extends AbstractStockEstimateEvent>> getHandledEventType() { return ImmutableList.of(StockEstimateDeletedEvent.class); } @Override public void handleEvent(final AbstractStockEstimateEvent event) { final Candidate candidateToDelete = stockEstimateEventService.retrieveExistingStockEsti...
.isReverted(true) .build(); final CandidatesQuery query = CandidatesQuery.fromCandidate(candidateToDelete, false); final I_MD_Candidate candidateRecord = RepositoryCommons .mkQueryBuilder(query) .create() .firstOnly(I_MD_Candidate.class); if (candidateRecord == null) { throw new AdempiereE...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\stockchange\StockEstimateDeletedHandler.java
2
请完成以下Java代码
public void setCM_NewsItem_ID (int CM_NewsItem_ID) { if (CM_NewsItem_ID < 1) set_ValueNoCheck (COLUMNNAME_CM_NewsItem_ID, null); else set_ValueNoCheck (COLUMNNAME_CM_NewsItem_ID, Integer.valueOf(CM_NewsItem_ID)); } /** Get News Item / Article. @return News item or article defines base content */ p...
*/ public void setLinkURL (String LinkURL) { set_Value (COLUMNNAME_LinkURL, LinkURL); } /** Get LinkURL. @return Contains URL to a target */ public String getLinkURL () { return (String)get_Value(COLUMNNAME_LinkURL); } /** Set Publication Date. @param PubDate Date on which this article will / s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_NewsItem.java
1
请完成以下Java代码
public int getSingleSelectedRecordId() { return document.getDocumentIdAsInt(); } @Override public SelectionSize getSelectionSize() { return SelectionSize.ofSize(1); } @Override public <T> IQueryFilter<T> getQueryFilter(@NonNull final Class<T> recordClass) { final String keyColumnName = InterfaceWrapper...
return EqualsQueryFilter.of(keyColumnName, getSingleSelectedRecordId()); } @Override public OptionalBoolean isExistingDocument() { return OptionalBoolean.ofBoolean(!document.isNew()); } @Override public OptionalBoolean isProcessedDocument() { return OptionalBoolean.ofBoolean(document.isProcessed()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\DocumentPreconditionsAsContext.java
1
请在Spring Boot框架中完成以下Java代码
public void log(TbRuleEngineProcessingResult msg, boolean finalIterationForPack) { int success = msg.getSuccessMap().size(); int pending = msg.getPendingMap().size(); int failed = msg.getFailedMap().size(); totalMsgCounter.add(success + pending + failed); successMsgCounter.add(su...
return tenantStats; } public String getQueueName() { return queueName; } public ConcurrentMap<TenantId, RuleEngineException> getTenantExceptions() { return tenantExceptions; } public void printStats() { int total = totalMsgCounter.get(); if (total > 0) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\TbRuleEngineConsumerStats.java
2
请完成以下Java代码
public void run() { try { runnable.run(); } catch (Exception e) { handleException(e); } } }; } protected final void handleException(final Exception e) { final OnFail onFail = getOnFail(); if (OnFail.ThrowException == onFail) { throw AdempiereException.wrapIfNeeded(...
protected final boolean isShowGlassPane() { return showGlassPane; } @Override public final IClientUIInvoker setOnFail(OnFail onFail) { Check.assumeNotNull(onFail, "onFail not null"); this.onFail = onFail; return this; } private final OnFail getOnFail() { return onFail; } @Override public final I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUIInvoker.java
1
请完成以下Java代码
public void postConstruct() { final Thread thread = new Thread(this::runNow); thread.setDaemon(true); thread.setName("SumUp-pending-transaction-updater"); thread.start(); logger.info("Started {}", thread); } private void runNow() { while (true) { final Duration delay = getPollInterval(); for (i...
return false; } } private void bulkUpdatePendingTransactionsNoFail() { try { final BulkUpdateByQueryResult result = sumUpService.bulkUpdatePendingTransactions(false); if (!result.isZero()) { logger.debug("Pending transactions updated: {}", result); } // Set the pending transactions flag as...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\server\SumUpPendingTransactionContinuousUpdater.java
1
请完成以下Java代码
protected void deleteTask(String taskId, CommandContext commandContext) { TaskManager taskManager = commandContext.getTaskManager(); TaskEntity task = taskManager.findTaskById(taskId); if (task != null) { if(task.getExecutionId() != null) { throw new ProcessEngineException("The task cannot be...
task.delete(reason, cascade); } else if (cascade) { Context .getCommandContext() .getHistoricTaskInstanceManager() .deleteHistoricTaskInstanceById(taskId); } } protected void checkDeleteTask(TaskEntity task, CommandContext commandContext) { for (CommandChecker checker : c...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeleteTaskCmd.java
1
请完成以下Java代码
public PaymentString parse(@NonNull final String paymentText) throws IndexOutOfBoundsException { final List<String> collectedErrors = new ArrayList<>(); // // First 3 digits: transaction type final String trxType = paymentText.substring(0, 3); final String postAccountNo = paymentText.substring(3, 12); fi...
.collectedErrors(collectedErrors) .rawPaymentString(paymentText) .postAccountNo(postAccountNo) .innerAccountNo(invoiceReferenceNo.getBankAccount()) .amount(amount) .referenceNoComplete(esrReferenceNoComplete) .paymentDate(paymentDate) .accountDate(accountDate) .orgValue(invoiceReferenceN...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\spi\impl\ESRRegularLineParser.java
1
请完成以下Java代码
protected void onCreate(FlowableEvent event) { // Default implementation is a NO-OP } /** * Called when an entity initialized event is received. */ protected void onInitialized(FlowableEvent event) { // Default implementation is a NO-OP } /** * Called when an entity ...
} /** * Called when an entity update event is received. */ protected void onUpdate(FlowableEvent event) { // Default implementation is a NO-OP } /** * Called when an event is received, which is not a create, an update or delete. */ protected void onEntityEvent(FlowableE...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\delegate\event\BaseEntityEventListener.java
1
请在Spring Boot框架中完成以下Java代码
public String getParentCaseInstanceId() { return parentCaseInstanceId; } public void setParentCaseInstanceId(String parentCaseInstanceId) { this.parentCaseInstanceId = parentCaseInstanceId; } public Boolean getWithoutCallbackId() { return withoutCallbackId; } public vo...
} public String getRootScopeId() { return rootScopeId; } public void setRootScopeId(String rootScopeId) { this.rootScopeId = rootScopeId; } public String getParentScopeId() { return parentScopeId; } public void setParentScopeId(String parentScopeId) { this...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricProcessInstanceQueryRequest.java
2