instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class BPMNElementImpl implements BPMNElement { private String elementId; private String processInstanceId; private String processDefinitionId; @Override public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanc...
public void setElementId(String elementId) { this.elementId = elementId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BPMNElementImpl that ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\BPMNElementImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class EventProgress { @NonNull Map<String, EventStatus> eventId2Status; @NonNull CompletableFuture<Void> completableFuture; public EventProgress() { this.eventId2Status = new ConcurrentHashMap<>(); this.completableFuture = new CompletableFuture<>(); } public void enqueue(@NonNull final String event...
eventId2Status.put(eventId, EventStatus.ENQUEUED); } public void markAsProcessed(@NonNull final String eventId) { eventId2Status.put(eventId, PROCESSED); } public boolean areAllEventsProcessed() { return eventId2Status.values() .stream() .allMatch(PROCESSED::equals); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\tracking\EventProgress.java
2
请在Spring Boot框架中完成以下Java代码
public X509Certificate getCertificate() { return this.certificate; } /** * Indicate whether this credential can be used for signing * @return true if the credential has a {@link Saml2X509CredentialType#SIGNING} type */ public boolean isSigningCredential() { return getCredentialTypes().contains(Saml2X509Cr...
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Saml2X509Credential that = (Saml2X509Credential) o; return Objects.equals(this.privateKey, that.privateKey) && this.certificate.equals(that.certificate) && th...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\core\Saml2X509Credential.java
2
请完成以下Java代码
public Timestamp calculateDateOrdered(@NonNull final I_C_Invoice_Candidate invoiceCandidateRecord) { final I_C_Flatrate_Term term = HandlerTools.retrieveTerm(invoiceCandidateRecord); final Timestamp dateOrdered; final boolean termHasAPredecessor = Services.get(IContractsDAO.class).termHasAPredecessor(term); i...
final String termOfNoticeUnit = transition.getTermOfNoticeUnit(); final int termOfNotice = transition.getTermOfNotice(); final Timestamp minimumDateToStart; if (X_C_Flatrate_Transition.TERMOFNOTICEUNIT_MonatE.equals(termOfNoticeUnit)) { minimumDateToStart = TimeUtil.addMonths(startDateOfTerm, termOfNotice *...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\invoicecandidatehandler\FlatrateTermSubscription_Handler.java
1
请完成以下Java代码
public void setReversal_ID (final int Reversal_ID) { if (Reversal_ID < 1) set_Value (COLUMNNAME_Reversal_ID, null); else set_Value (COLUMNNAME_Reversal_ID, Reversal_ID); } @Override public int getReversal_ID() { return get_ValueAsInt(COLUMNNAME_Reversal_ID); } @Override public org.compiere.mode...
@Override public void setUser1_ID (final int User1_ID) { if (User1_ID < 1) set_Value (COLUMNNAME_User1_ID, null); else set_Value (COLUMNNAME_User1_ID, User1_ID); } @Override public int getUser1_ID() { return get_ValueAsInt(COLUMNNAME_User1_ID); } @Override public void setUser2_ID (final int Us...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { private static final Logger _logger = LoggerFactory.getLogger(UserController.class); // 创建线程安全的Map private static Map<Long, User> users = Collections.synchronizedMap(new HashMap<Long, User>()); @RequestMapping(value = "/", method = RequestMethod.GET) public BaseRespo...
public BaseResponse<String> putUser(@PathVariable Long id, @ModelAttribute User user) { // 处理"/users/{id}"的PUT请求,用来更新User信息 User u = users.get(id); u.setName(user.getName()); u.setAge(user.getAge()); users.put(id, u); return new BaseResponse<>(true, "更新成功", ""); } ...
repos\SpringBootBucket-master\springboot-restful\src\main\java\com\xncoding\pos\controller\UserController.java
2
请完成以下Java代码
public class AD_ColumnCallout_Migrate extends JavaProcess { @Override protected void prepare() { } @Override protected String doIt() throws Exception { final String sql = "SELECT c.AD_Table_ID, c.AD_Column_ID, t.TableName, c.ColumnName, c.Callout, c.EntityType" +" FROM AD_Column c" +" INNER JOIN AD_Tabl...
return "@Created@ OK="+cnt_ok+" / Error="+cnt_err; } private void migrate(int AD_Column_ID, String callouts, String entityType) { int seqNo = 10; for (String classname : toCalloutsList(callouts)) { I_AD_ColumnCallout cc = getColumnCallout(AD_Column_ID, classname); if (cc == null) { cc = Interface...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\process\AD_ColumnCallout_Migrate.java
1
请完成以下Java代码
public class ItemDefinition { protected String id; protected StructureDefinition structure; protected boolean isCollection; protected ItemKind itemKind; private ItemDefinition() { this.isCollection = false; this.itemKind = ItemKind.Information; } public ItemDefinition(S...
public StructureDefinition getStructureDefinition() { return this.structure; } public boolean isCollection() { return isCollection; } public void setCollection(boolean isCollection) { this.isCollection = isCollection; } public ItemKind getItemKind() { return it...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\data\ItemDefinition.java
1
请完成以下Java代码
protected String doIt() throws Exception { updateFromPreviousAddress(); return MSG_OK; } private void updateFromPreviousAddress() { final Instant now = SystemTime.asInstant(); final Map<Integer, I_C_BPartner_Location> newLocations = queryBL.createQueryBuilder(I_C_BPartner_Location.class) .addCompareFi...
locationsToDeactivate.forEach((oldLocId, location) -> replaceLocation(location, newLocations.get(oldLocToNewLoc.get(oldLocId)))); } private void replaceLocation(final I_C_BPartner_Location oldLocation, final I_C_BPartner_Location newLocation) { final BPartnerLocationId oldBPLocationId = BPartnerLocationId.ofRepoI...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\process\C_BPartner_Location_UpdateFromPreviousAddress.java
1
请完成以下Java代码
public PublicKeyCredentialUserEntityBuilder name(String name) { this.name = name; return this; } /** * Sets the {@link #getId()} property. * @param id the id * @return the {@link PublicKeyCredentialUserEntityBuilder} */ public PublicKeyCredentialUserEntityBuilder id(Bytes id) { this.id = id;...
public PublicKeyCredentialUserEntityBuilder displayName(String displayName) { this.displayName = displayName; return this; } /** * Builds a new {@link PublicKeyCredentialUserEntity} * @return a new {@link PublicKeyCredentialUserEntity} */ public PublicKeyCredentialUserEntity build() { return ne...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\ImmutablePublicKeyCredentialUserEntity.java
1
请完成以下Java代码
protected <T> JsonObjectConverter<T> getConverter() { JsonObjectConverter<T> converter = (JsonObjectConverter<T>) queryConverter.get(resourceType); if (converter != null) { return converter; } else { throw LOG.unsupportedResourceTypeException(resourceType); } } public Object getPers...
} } @Override public Set<String> getReferencedEntityIds() { Set<String> referencedEntityIds = new HashSet<String>(); return referencedEntityIds; } @Override public Map<String, Class> getReferencedEntitiesIdAndClass() { Map<String, Class> referenceIdAndClass = new HashMap<String, Class>(); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\FilterEntity.java
1
请在Spring Boot框架中完成以下Java代码
public Date getCreatedBefore() { return createdBefore; } public void setCreatedBefore(Date createdBefore) { this.createdBefore = createdBefore; } public Date getCreatedAfter() { return createdAfter; } public void setCreatedAfter(Date createdAfter) { this.create...
} public void setIncludeLocalVariables(boolean includeLocalVariables) { this.includeLocalVariables = includeLocalVariables; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public Boolean get...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\planitem\PlanItemInstanceQueryRequest.java
2
请完成以下Java代码
protected boolean tryRelease(int arg) { // 只有获取到锁的线程才会解锁,所以这里没有竞争,直接使用setState方法在来改变同步状态 setState(0); setExclusiveOwnerThread(null); return true; } @Override protected boolean isHeldExclusively() { // 如果货物到锁,当前线程独占 return g...
@Override public boolean tryLock(long time, TimeUnit unit) throws InterruptedException { return sync.tryAcquireNanos(1, unit.toNanos(time)); } @Override public void unlock() { sync.release(0); } @Override public Condition newCondition() { return sync.newCondition();...
repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\MutexLock.java
1
请完成以下Java代码
protected String doIt() { if (productId == null) { throw new FillMandatoryException(PARAM_M_Product_ID); } if (qtyCUsPerTU == null || qtyCUsPerTU.signum() <= 0) { throw new FillMandatoryException(PARAM_QtyCUsPerTU); } final HuId huId = getSelectedHUId(); final Quantity qtyToRemove = Quantity.of...
} private Quantity getHUStorageQty(@NonNull final ProductId productId) { return getHUProductStorages() .stream() .filter(productStorage -> ProductId.equals(productStorage.getProductId(), productId)) .map(IHUProductStorage::getQty) .findFirst() .orElseThrow(() -> new AdempiereException("No Qty f...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_ReturnQtyToSourceHU.java
1
请完成以下Java代码
public class ConnectionValidation { public static Connection getConnection() throws Exception { Class.forName("org.h2.Driver"); String url = "jdbc:h2:mem:testdb"; return DriverManager.getConnection(url, "user", "password"); } public static void runIfOpened(Connectio...
} public static void runIfConnectionValid(Connection connection) { if (isConnectionValid(connection)) { // run sql statements } else { // handle invalid connection } } public static boolean isConnectionValid(Connection connection) { t...
repos\tutorials-master\persistence-modules\core-java-persistence-2\src\main\java\com\baeldung\connectionstatus\ConnectionValidation.java
1
请完成以下Java代码
public LocalDate getDocumentDate(@NonNull final DocumentTableFields docFields) { return TimeUtil.asLocalDate(extractQMAnalysisReport(docFields).getDateDoc()); } /** * Sets the <code>Processed</code> flag of the given <code>dunningDoc</code> lines. * <p> * Assumes that the given doc is not yet processed. *...
} @Override public void voidIt(final DocumentTableFields docFields) { final I_QM_Analysis_Report analysisReport = extractQMAnalysisReport(docFields); analysisReport.setProcessed(true); analysisReport.setDocAction(IDocument.ACTION_None); } @Override public void reactivateIt(@NonNull final DocumentTableFie...
repos\metasfresh-new_dawn_uat\backend\de.metas.qualitymgmt\src\main\java\de\metas\qualitymgmt\analysis\QMAnalysisReportDocumentHandler.java
1
请完成以下Java代码
public boolean isEditable() { return getAD_Client_ID() == Env.getAD_Client_ID(Env.getCtx()); } // isEditable public WFNodeId getNodeId() { return m_node.getId(); } public WorkflowNodeModel getModel() { return m_node; } // getModel /** * Set Location - also for Node. * @param x x * @param y y ...
*/ protected void paintComponent (Graphics g) { Graphics2D g2D = (Graphics2D)g; // center icon m_icon.paintIcon(this, g2D, s_size.width/2 - m_icon.getIconWidth()/2, 5); // Paint Text Color color = getForeground(); g2D.setPaint(color); Font font = getFont(); // AttributedString aString = new Attribu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WFNodeComponent.java
1
请完成以下Java代码
public int getColumnModelIndex(final String columnName) { final Integer indexModel = columnName2modelIndex.get(columnName); if (indexModel == null) { return -1; } return indexModel; } /** * Note: this method only works as expected if the given <code>columnName</code> was set with {@link ColumnInfo#se...
final int rowIndexModel = convertRowIndexToModel(rowIndexView); return getModel().getValueAt(rowIndexModel, colIndexModel); } public void setValueAt(final Object value, final int rowIndexView, final String columnName) { final int colIndexModel = getColumnModelIndex(columnName); if (colIndexModel <= 0) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\minigrid\MiniTable.java
1
请完成以下Java代码
public class OneTimeTokenAuthentication extends AbstractAuthenticationToken { @Serial private static final long serialVersionUID = 1195893764725073959L; private final Object principal; public OneTimeTokenAuthentication(Object principal, Collection<? extends GrantedAuthority> authorities) { super(authorities); ...
/** * A builder of {@link OneTimeTokenAuthentication} instances * * @since 7.0 */ public static class Builder<B extends Builder<B>> extends AbstractAuthenticationBuilder<B> { private Object principal; protected Builder(OneTimeTokenAuthentication token) { super(token); this.principal = token.princip...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\ott\OneTimeTokenAuthentication.java
1
请在Spring Boot框架中完成以下Java代码
private String retrieveJsonSqlValue(@NonNull final ReportContext reportContext) { // // Get SQL final String sql = StringUtils.trimBlankToNull(reportContext.getSQLStatement()); if (sql == null) { return null; } // Parse the SQL Statement final IStringExpression sqlExpression = expressionFactory.com...
if (recordTableName != null && recordId > 0) { final TableRecordReference recordRef = TableRecordReference.of(recordTableName, recordId); final Evaluatee evalCtx = Evaluatees.ofTableRecordReference(recordRef); if (evalCtx != null) { contexts.add(evalCtx); } } // // 3: global context contex...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\data_source\RemoteRestAPIDataSource.java
2
请完成以下Java代码
public void assertNotDeliveryStopped(final I_C_Order order) { // Makes sense only for sales orders if (!order.isSOTrx()) { return; } final int billPartnerId = order.getBill_BPartner_ID(); final int deliveryStopShipmentConstraintId = Services.get(IShipmentConstraintsBL.class).getDeliveryStopShipmentCons...
@ModelChange(timings = ModelValidator.TYPE_BEFORE_CHANGE, ignoreColumnsChanged = { I_C_Order.COLUMNNAME_DocStatus, I_C_Order.COLUMNNAME_DocAction, I_C_Order.COLUMNNAME_Processing, I_C_Order.COLUMNNAME_Processed, I_C_Order.COLUMNNAME_IsApproved, I_C_Order.COLUMNNAME_QtyOrdered, I_C_...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\C_Order.java
1
请完成以下Java代码
public List<DefaultMetadataElement> getBootVersions() { return this.bootVersions; } public SimpleElement getGroupId() { return this.groupId; } public SimpleElement getArtifactId() { return this.artifactId; } public SimpleElement getVersion() { return this.version; } public SimpleElement getName() { ...
* @param value the value */ public SimpleElement(String value) { this.value = value; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return this.description; } public void setDescription(St...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\InitializrProperties.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (!context.isSingleSelection()) { return ProcessPreconditionsResolution.rejectB...
{ final de.metas.edi.model.I_C_Invoice invoice = ediDocOutBoundLogService.retreiveById(InvoiceId.ofRepoId(getRecord_ID())); final EDIExportStatus fromExportStatus = EDIExportStatus.ofCode(invoice.getEDI_ExportStatus()); return ChangeEDI_ExportStatusHelper.computeParameterDefaultValue(fromExportStatus); } @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\edi_desadv\ChangeEDI_ExportStatus_C_Invoice_SingleView.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final JdbcTemplate jdbcTemplate; public BookstoreService(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } @PostConstruct void init() { jdbcTemplate.setResultsMapCaseInsensitive(true); } public void fetchAnthologyAuth...
System.out.println("Result: " + authors); } public static Author fetchAuthor(Map<String, Object> data) { Author author = new Author(); author.setId((Long) data.get("id")); author.setName((String) data.get("name")); author.setGenre((String) data.get("genre")); author.se...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCallStoredProcedureJdbcTemplate\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public static void writeAttributes(DmnElement dmnElement, Map<String, String> namespaceMap, XMLStreamWriter xtw) throws Exception { if (!dmnElement.getAttributes().isEmpty()) { if (namespaceMap == null) { namespaceMap = new HashMap<>(); } for (List<DmnExtensio...
} } } } } public static String getUniqueElementId() { return getUniqueElementId(null); } public static String getUniqueElementId(String prefix) { UUID uuid = UUID.randomUUID(); if (StringUtils.isEmpty(prefix)) { return uuid.toStri...
repos\flowable-engine-main\modules\flowable-dmn-xml-converter\src\main\java\org\flowable\dmn\converter\util\DmnXMLUtil.java
1
请完成以下Java代码
public static DistributionFacetId ofDatePromised(@NonNull LocalDate datePromised) { return ofLocalDate(DistributionFacetGroupType.DATE_PROMISED, datePromised); } public static DistributionFacetId ofProductId(@NonNull ProductId productId) { return ofRepoId(DistributionFacetGroupType.PRODUCT, productId); } pr...
DistributionFacetGroupType.QUANTITY.toWorkflowLaunchersFacetGroupId(), qty.toBigDecimal(), qty.getUomId() ) ); } public static DistributionFacetId ofPlantId(@NonNull final ResourceId plantId) { return ofRepoId(DistributionFacetGroupType.PLANT_RESOURCE_ID, plantId); } private static Quantity g...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetId.java
1
请完成以下Java代码
public class GatewayMappingValidator implements MigrationInstructionValidator { @Override public void validate(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) { ActivityImpl targetActivity = instruction.getTargetA...
report.addFailure("The gateway's flow scope '" + flowScope.getId() + "' must be mapped"); } } } protected void validateSingleInstruction(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) { ActivityImpl targ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instruction\GatewayMappingValidator.java
1
请完成以下Java代码
public CasePlanModel getCasePlanModel() { return casePlanModelChild.getChild(this); } public void setCasePlanModel(CasePlanModel casePlanModel) { casePlanModelChild.setChild(this, casePlanModel); } public CaseFileModel getCaseFileModel() { return caseFileModelChild.getChild(this); } public vo...
caseRolesCollection = sequenceBuilder.elementCollection(CaseRole.class) .build(); caseRolesChild = sequenceBuilder.element(CaseRoles.class) .build(); inputCollection = sequenceBuilder.elementCollection(InputCaseParameter.class) .build(); outputCollection = sequenceBuilder.elementC...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseImpl.java
1
请完成以下Java代码
public MQuery getQuery() { final MQuery query = new MQuery(I_Fact_Acct.Table_Name); final ImmutableSet<FactAcctId> clearingFactAcctIds = getClearingFactAcctIds(); if (!clearingFactAcctIds.isEmpty()) { query.addRestriction(DB.buildSqlList(I_Fact_Acct.COLUMNNAME_Fact_Acct_ID, clearingFactAcctIds, null)); }...
return factAcctDAO.listIds(FactAcctQuery.builder() .tableName(I_SAP_GLJournal.Table_Name) .excludeRecordRef(fromRecordRef) .isOpenItem(true) .openItemTrxType(FAOpenItemTrxType.CLEARING) .openItemsKeys(openItemKeys) .build()); } private static FAOpenItemKey extractOpenItemKeyOrNull(final I_Fac...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\open_items\related_documents\ClearingFactAcctsQuerySupplier.java
1
请完成以下Java代码
public Optional<AccountId> getAccountId(@NonNull final TaxId taxId, @NonNull final AcctSchemaId acctSchemaId, final TaxAcctType acctType) { final I_C_Tax_Acct taxAcct = getTaxAcctRecord(acctSchemaId, taxId); if (TaxAcctType.TaxDue == acctType) { final Optional<AccountId> accountId = AccountId.optionalOfRepoI...
private I_C_Tax_Acct retrieveTaxAcctRecord(@NonNull final TaxIdAndAcctSchemaId key) { return Services.get(IQueryBL.class) .createQueryBuilderOutOfTrx(I_C_Tax_Acct.class) .addEqualsFilter(I_C_Tax_Acct.COLUMNNAME_C_Tax_ID, key.getTaxId()) .addEqualsFilter(I_C_Tax_Acct.COLUMNNAME_C_AcctSchema_ID, key.getAcc...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\tax\impl\TaxAcctBL.java
1
请完成以下Java代码
public final class DeviceCredentialsEntity extends BaseVersionedEntity<DeviceCredentials> { @Column(name = ModelConstants.DEVICE_CREDENTIALS_DEVICE_ID_PROPERTY) private UUID deviceId; @Enumerated(EnumType.STRING) @Column(name = ModelConstants.DEVICE_CREDENTIALS_CREDENTIALS_TYPE_PROPERTY) private D...
} this.credentialsType = deviceCredentials.getCredentialsType(); this.credentialsId = deviceCredentials.getCredentialsId(); this.credentialsValue = deviceCredentials.getCredentialsValue(); } @Override public DeviceCredentials toData() { DeviceCredentials deviceCredentials = ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\DeviceCredentialsEntity.java
1
请完成以下Java代码
class Neo4jDockerComposeConnectionDetailsFactory extends DockerComposeConnectionDetailsFactory<Neo4jConnectionDetails> { Neo4jDockerComposeConnectionDetailsFactory() { super("neo4j"); } @Override protected Neo4jConnectionDetails getDockerComposeConnectionDetails(DockerComposeConnectionSource source) { return ...
this.authToken = neo4jEnvironment.getAuthToken(); this.uri = URI.create("neo4j://%s:%d".formatted(service.host(), service.ports().get(BOLT_PORT))); } @Override public URI getUri() { return this.uri; } @Override public AuthToken getAuthToken() { return (this.authToken != null) ? this.authToken : A...
repos\spring-boot-4.0.1\module\spring-boot-neo4j\src\main\java\org\springframework\boot\neo4j\docker\compose\Neo4jDockerComposeConnectionDetailsFactory.java
1
请完成以下Java代码
public class AlarmComment extends BaseData<AlarmCommentId> implements HasName { @Serial private static final long serialVersionUID = -5454905526404017592L; @Schema(description = "JSON object with Alarm id.", accessMode = Schema.AccessMode.READ_ONLY) private AlarmId alarmId; @Schema(description = "...
public AlarmComment() { super(); } public AlarmComment(AlarmCommentId id) { super(id); } @Override @JsonProperty(access = JsonProperty.Access.READ_ONLY) @Schema(accessMode = Schema.AccessMode.READ_ONLY, description = "representing comment text", example = "Please take a look") ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\alarm\AlarmComment.java
1
请完成以下Java代码
public String getEmployeesByIdWithVariableName(@PathVariable("id") String employeeId) { return "ID: " + employeeId; } @GetMapping("/api/employees/{id}/{name}") @ResponseBody public String getEmployeesByIdAndName(@PathVariable String id, @PathVariable String name) { return "ID: " + id + ...
@ResponseBody public String getEmployeesByIdWithOptional(@PathVariable Optional<String> id) { if (id.isPresent()) { return "ID: " + id.get(); } else { return "ID missing"; } } @GetMapping(value = { "/api/defaultemployeeswithoptional", "/api/defaultemployeeswi...
repos\tutorials-master\spring-web-modules\spring-mvc-java\src\main\java\com\baeldung\pathvariable\PathVariableAnnotationController.java
1
请完成以下Java代码
Money getCostAmountMatched() { if (_costAmountMatched == null) { this._costAmountMatched = matchInvoiceService.getCostAmountMatched(getInvoiceAndLineId()) .orElseGet(() -> Money.zero(getCurrencyId())); } return _costAmountMatched; } @Override @NonNull // This is a workaround for a very specific ca...
final GroupId groupId = OrderGroupRepository.extractGroupIdOrNull(orderLineRecord); if (groupId == null) { return null; } final Group group = orderGroupRepo.retrieveGroupIfExists(groupId); if (group == null) { return null; } final GroupTemplateId groupTemplateId = group.getGroupTemplateId(); i...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_Invoice.java
1
请完成以下Java代码
public class DictVO extends Dict implements INode<DictVO> { @Serial private static final long serialVersionUID = 1L; /** * 主键ID */ @JsonSerialize(using = ToStringSerializer.class) private Long id; /** * 父节点ID */ @JsonSerialize(using = ToStringSerializer.class) private Long parentId; /** * 子孙节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List<DictVO> children; @Override public List<DictVO> getChildren() { if (this.children == null) { this.children = new ArrayList<>(); } return this.children; } /** * 上级字典 */ private String parentName; }
repos\SpringBlade-master\blade-service-api\blade-dict-api\src\main\java\org\springblade\system\vo\DictVO.java
1
请完成以下Java代码
public class CompensationEventHandler implements EventHandler { public static final String EVENT_HANDLER_TYPE = "compensate"; @Override public String getEventHandlerType() { return EVENT_HANDLER_TYPE; } @Override public void handleEvent(EventSubscriptionEntity eventSubscription, Objec...
} else { try { if (commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent( ActivitiEventBuilder.createActivityEvent(FlowableEngineEve...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\event\CompensationEventHandler.java
1
请完成以下Java代码
public BigDecimal getSalary() { return salary; } public void setSalary(BigDecimal salary) { this.salary = salary; } public LocalDate getRegisteredDate() { return registeredDate; } public void setRegisteredDate(LocalDate registeredDate) { this.registeredDate = r...
int result = 1; result = prime * result + id; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Perso...
repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonb\Person.java
1
请完成以下Java代码
private String extractReportBasename_IfDocument(@NonNull final ProcessInfo pi) { return Optional.ofNullable(getDocument(pi)) .map(IDocument::getDocumentInfo) .orElse(null); } private static boolean isDocument(@NonNull final ProcessInfo pi) { return Optional.ofNullable(getDocument(pi)) .isPresent()...
startProcessDirectPrint(reportPrintingInfo); } catch (final Exception e) { throw AdempiereException.wrapIfNeeded(e); } } private enum ReportingSystemType { Jasper, Excel, /** * May be used when no invocation to the jasper service is done */ Other } @Value @Builder private static clas...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\ReportStarter.java
1
请在Spring Boot框架中完成以下Java代码
private GraphDTO mapToGraph( Iterator<Map<String, Object>> neo4jDataIterator) { Map<Long, Object> nodeMap = new HashMap<>(); Map<Long, Object> linkMap = new HashMap<>(); while (neo4jDataIterator.hasNext()) { Map<String, Object> each = neo4jDataIterator.next(); ...
King t = kingDao.findByName(name); return t; } /** * 获取当前节点下的所有king * * @param name * @return */ public List<King> getKings(String name) { return kingDao.getKings(name); } /** * 保存父子关系 * * @param fatherName * @param sonName * @ret...
repos\springBoot-master\springboot-neo4j\src\main\java\cn\abel\neo4j\service\KingService.java
2
请完成以下Java代码
public Collection<LaneSet> getLaneSets() { return laneSetCollection.get(this); } public Collection<FlowElement> getFlowElements() { return flowElementCollection.get(this); } public Collection<Artifact> getArtifacts() { return artifactCollection.get(this); } /** camunda extensions */ /**
* @deprecated use isCamundaAsyncBefore() instead. */ @Deprecated public boolean isCamundaAsync() { return camundaAsyncAttribute.getValue(this); } /** * @deprecated use setCamundaAsyncBefore(isCamundaAsyncBefore) instead. */ @Deprecated public void setCamundaAsync(boolean isCamundaAsync) { ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\SubProcessImpl.java
1
请完成以下Java代码
public String label() { return label; } /** * Look up Element4 instances by the label field. This implementation finds the * label in the BY_LABEL cache. * @param label The label to look up * @return The Element4 instance with the label, or null if not found. */ public stat...
/** * Look up Element4 instances by the atomicWeight field. This implementation finds the * atomic weight in the cache. * @param weight the atomic weight to look up * @return The Element4 instance with the label, or null if not found. */ public static Element4 valueOfAtomicWeight(float weig...
repos\tutorials-master\core-java-modules\core-java-lang-oop-types\src\main\java\com\baeldung\enums\values\Element4.java
1
请在Spring Boot框架中完成以下Java代码
public static DemandDetailsQuery ofShipmentLineId(final int inOutLineId) { Check.assumeGreaterThanZero(inOutLineId, "inOutLineId"); return new DemandDetailsQuery( UNSPECIFIED_REPO_ID, UNSPECIFIED_REPO_ID, UNSPECIFIED_REPO_ID, UNSPECIFIED_REPO_ID, inOutLineId); } int shipmentScheduleId; int...
final int forecastLineId, final int inOutLineId) { this.shipmentScheduleId = shipmentScheduleId; this.orderLineId = orderLineId; this.subscriptionLineId = subscriptionLineId; this.forecastLineId = forecastLineId; this.inOutLineId = inOutLineId; IdConstants.assertValidId(shipmentScheduleId, "shipmentSch...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\query\DemandDetailsQuery.java
2
请完成以下Java代码
public void schedule(@NonNull DocumentPostMultiRequest requests) { if (!isEnabled()) { userNotificationsHolder.get().notifyPostingError("Accounting module is disabled", requests); return; } postingBusServiceHolder.get().sendAfterCommit(requests); } @Override public void postAfterCommit(@NonNull fina...
doc.post(request.isForce(), true); documentPostingLogServiceHolder.get().logPostingOK(request); } catch (final Exception ex) { final AdempiereException metasfreshException = AdempiereException.wrapIfNeeded(ex); documentPostingLogServiceHolder.get().logPostingError(request, metasfreshException); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\api\impl\PostingService.java
1
请完成以下Java代码
public class ProjectLinePricing extends JavaProcess { /** Project Line from Record */ private int m_C_ProjectLine_ID = 0; /** * Prepare - e.g., get Parameters. */ protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { String name ...
MProductPricing pp = new MProductPricing ( OrgId.ofRepoId(project.getAD_Org_ID()), projectLine.getM_Product_ID(), project.getC_BPartner_ID(), null, /* countryId */ projectLine.getPlannedQty(), isSOTrx); pp.setM_PriceList_ID(project.getM_PriceList_ID()); pp.setPriceDate(project.getDateContrac...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\de\metas\project\process\legacy\ProjectLinePricing.java
1
请完成以下Java代码
public final class OAuth2ClientRegistrationRegisteredClientConverter implements Converter<OAuth2ClientRegistration, RegisteredClient> { private static final StringKeyGenerator CLIENT_ID_GENERATOR = new Base64StringKeyGenerator( Base64.getUrlEncoder().withoutPadding(), 32); private static final StringKeyGenerat...
clientRegistration.getResponseTypes().contains(OAuth2AuthorizationResponseType.CODE.getValue())) { builder.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE); } if (!CollectionUtils.isEmpty(clientRegistration.getScopes())) { builder.scopes((scopes) -> scopes.addAll(clientRegistration.getS...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\converter\OAuth2ClientRegistrationRegisteredClientConverter.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public BigDecimal getPrice() { return pr...
} public void setPrice(BigDecimal price) { this.price = price; } @Override public String toString() { return "Book{" + "id=" + id + ", name='" + name + '\'' + ", author='" + author + '\'' + ", price=" + price + ...
repos\spring-boot-master\spring-rest-error-handling\src\main\java\com\mkyong\Book.java
1
请完成以下Java代码
public IAttributeStorageFactory getAttributeStorageFactory() { throw new UnsupportedOperationException(); } @Nullable @Override public UOMType getQtyUOMTypeOrNull() { // no UOMType available return null; } @Override public String toString() { return "NullAttributeStorage []"; } @Override public ...
public boolean isNew(final I_M_Attribute attribute) { throw new AttributeNotFoundException(attribute, this); } /** * @return true, i.e. never disposed */ @Override public boolean assertNotDisposed() { return true; // not disposed } @Override public boolean assertNotDisposedTree() { return true; //...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\NullAttributeStorage.java
1
请完成以下Java代码
public FactLineBuilder fromLocation(final Optional<LocationId> optionalLocationId) { optionalLocationId.ifPresent(locationId -> this.fromLocationId = locationId); return this; } public FactLineBuilder fromLocationOfBPartner(@Nullable final BPartnerLocationId bpartnerLocationId) { return fromLocation(getServi...
public FactLineBuilder openItemKey(@Nullable FAOpenItemTrxInfo openItemTrxInfo) { assertNotBuild(); this.openItemTrxInfo = openItemTrxInfo; return this; } public FactLineBuilder productId(@Nullable ProductId productId) { assertNotBuild(); this.productId = Optional.ofNullable(productId); return this; }...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\FactLineBuilder.java
1
请完成以下Java代码
protected FlowElement convertJsonToElement( JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap ) { EventSubProcess subProcess = new EventSubProcess(); JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES); processor.processJsonElements...
@Override public void setFormMap(Map<String, String> formMap) { this.formMap = formMap; } @Override public void setFormKeyMap(Map<String, ModelInfo> formKeyMap) { this.formKeyMap = formKeyMap; } @Override public void setDecisionTableMap(Map<String, String> decisionTableMap)...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\EventSubProcessJsonConverter.java
1
请完成以下Java代码
public HUEditorRow next() { if (currentPageIterator == null) { throw new NoSuchElementException(); } return currentPageIterator.next(); } public Stream<HUEditorRow> stream() { return IteratorUtils.stream(this); } private Iterator<HUEditorRow> getNextPageIterator() { // the result; part of it wi...
} } // // Load missing rows (which were not found in cache) if (!rowIdToLoad2index.isEmpty()) { final ListMultimap<HUEditorRowId, HUEditorRowId> topLevelRowId2rowIds = rowIdToLoad2index.keySet() .stream() .map(rowId -> GuavaCollectors.entry(rowId.toTopLevelRowId(), rowId)) .collect(GuavaCol...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowsPagedLoadingIterator.java
1
请完成以下Java代码
public class ExponentialBackOffWithMaxRetries extends ExponentialBackOff { private final int maxRetries; /** * Construct an instance that will calculate the {@link #setMaxElapsedTime(long)} from * the maxRetries. * @param maxRetries the max retries. */ @SuppressWarnings("this-escape") public ExponentialBa...
} @Override public void setMaxInterval(long maxInterval) { super.setMaxInterval(maxInterval); calculateMaxElapsed(); } @Override public void setMaxElapsedTime(long maxElapsedTime) { throw new IllegalStateException("'maxElapsedTime' is calculated from the 'maxRetries' property"); } @SuppressWarnings("thi...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\ExponentialBackOffWithMaxRetries.java
1
请在Spring Boot框架中完成以下Java代码
public String getScopeType() { return scopeType; } @Override public void setScopeType(String scopeType) { this.scopeType = scopeType; } @Override public String getSearchKey() { return searchKey; } @Override public void setSearchKey(String searchKey) { ...
public ByteArrayRef getResultDocRefId() { return resultDocRefId; } public void setResultDocRefId(ByteArrayRef resultDocRefId) { this.resultDocRefId = resultDocRefId; } @Override public String getResultDocumentJson(String engineType) { if (resultDocRefId != null) { ...
repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\BatchPartEntityImpl.java
2
请在Spring Boot框架中完成以下Java代码
private void convertAndSend(final String routingKey, final Object message) { if (amqpTemplate == null) { throw new IllegalStateException("AMQP is not enabled"); } amqpTemplate.convertAndSend(routingKey, message, this::messagePostProcess); logger.trace("AMQP sent to {}: {}", routingKey, message); } priv...
.event(event) .build()); } public void publishStockAvailabilityUpdatedEvent(@NonNull final MSV3StockAvailabilityUpdatedEvent event) { convertAndSend(RabbitMQConfig.QUEUENAME_StockAvailabilityUpdatedEvent, event); } public void publishProductExcludes(@NonNull final MSV3ProductExcludesUpdateEvent event) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer\src\main\java\de\metas\vertical\pharma\msv3\server\peer\service\MSV3ServerPeerService.java
2
请完成以下Java代码
public void setMSV3_Bestellung(de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_Bestellung MSV3_Bestellung) { set_ValueFromPO(COLUMNNAME_MSV3_Bestellung_ID, de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_Bestellung.class, MSV3_Bestellung); } /** Set MSV3_Bestellung. @param MSV3_Bestellung_ID...
return ii.intValue(); } /** Set GebindeId. @param MSV3_GebindeId GebindeId */ @Override public void setMSV3_GebindeId (java.lang.String MSV3_GebindeId) { set_Value (COLUMNNAME_MSV3_GebindeId, MSV3_GebindeId); } /** Get GebindeId. @return GebindeId */ @Override public java.lang.String getMSV3_Gebind...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_BestellungAuftrag.java
1
请完成以下Java代码
public String[] getCc() { return cc; } public void setCc(String[] cc) { this.cc = cc; } public List<String> getBcc() { return bcc; } public void setBcc(List<String> bcc) { this.bcc = bcc; } public class Credential { @NotNull private S...
public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } } }
repos\SpringBoot-Projects-FullStack-master\Part-1 Spring Boot Basic Fund Projects\SpringBootSourceCode\SpringEmailProcess\src\main\java\spring\basic\MailProperties.java
1
请在Spring Boot框架中完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public Boolean getWithoutTenantId() { return withoutTenantId; } public void setWithoutTenantId(Boolean withoutTenantId) { this.withoutTenantI...
public Boolean getIncludeLocalVariables() { return includeLocalVariables; } public void setIncludeLocalVariables(Boolean includeLocalVariables) { this.includeLocalVariables = includeLocalVariables; } public Set<String> getCaseInstanceIds() { return caseInstanceIds; } p...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\planitem\HistoricPlanItemInstanceQueryRequest.java
2
请完成以下Java代码
public String getInstanceId() { return instanceId; } @Override public void setInstanceId(String instanceId) { this.instanceId = instanceId; } @Override public String getExecutionId() { return executionId; } @Override public void setExecutionId(String execut...
this.executionJson = executionJson; } @Override public String getDecisionKey() { return decisionKey; } public void setDecisionKey(String decisionKey) { this.decisionKey = decisionKey; } @Override public String getDecisionName() { return decisionName; } ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\HistoricDecisionExecutionEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class OrgChangeService { private final OrgChangeRepository orgChangeRepo; private final BPartnerCompositeRepository bpCompositeRepo; private final OrgMappingRepository orgMappingRepo; private final OrgChangeHistoryRepository orgChangeHistoryRepo; private final GroupTemplateRepository groupTemplateRepo; fi...
.groupTemplateRepo(groupTemplateRepo) .request(request) .build() .execute(); } public OrgChangeBPartnerComposite getByIdAndOrgChangeDate(final BPartnerId partnerId, final Instant orgChangeDate) { return orgChangeRepo.getByIdAndOrgChangeDate(partnerId, orgChangeDate); } public boolean hasAnyMembersh...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\service\OrgChangeService.java
2
请在Spring Boot框架中完成以下Java代码
public ModelAndView getproduct() { ModelAndView mView = new ModelAndView("uproduct"); List<Product> products = this.productService.getProducts(); if(products.isEmpty()) { mView.addObject("msg","No products are available"); }else { mView.addObject("products",products); } return mView; } @Reques...
List<String> friends = new ArrayList<String>(); model.addAttribute("f",friends); friends.add("xyz"); friends.add("abc"); return "test"; } // for learning purpose of model and view ( how data is pass to view) @GetMapping("/test2") public ModelAndView Test2() { System.out.println("test ...
repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\controller\UserController.java
2
请完成以下Java代码
public class DelegateExpressionExecutionListener implements ExecutionListener { protected Expression expression; private final List<FieldDeclaration> fieldDeclarations; public DelegateExpressionExecutionListener(Expression expression, List<FieldDeclaration> fieldDeclarations) { this.expression = e...
throw new ActivitiIllegalArgumentException( "Delegate expression " + expression + " did not resolve to an implementation of " + ExecutionListener.class + " nor " + JavaDelegate.class ); } } /** ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\listener\DelegateExpressionExecutionListener.java
1
请完成以下Java代码
public PageData<NotificationRequest> findAllByStatus(NotificationRequestStatus status, PageLink pageLink) { return DaoUtil.toPageData(notificationRequestRepository.findAllByStatus(status, DaoUtil.toPageable(pageLink))); } @Override public void updateById(TenantId tenantId, NotificationRequestId req...
notificationRequestRepository.deleteByTenantId(tenantId.getId()); } @Override protected Class<NotificationRequestEntity> getEntityClass() { return NotificationRequestEntity.class; } @Override protected JpaRepository<NotificationRequestEntity, UUID> getRepository() { return noti...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\notification\JpaNotificationRequestDao.java
1
请完成以下Java代码
public java.sql.Timestamp getMovementDate_Override() { return get_ValueAsTimestamp(COLUMNNAME_MovementDate_Override); } @Override public void setNote (final @Nullable java.lang.String Note) { set_Value (COLUMNNAME_Note, Note); } @Override public java.lang.String getNote() { return get_ValueAsString(C...
public static final String STATUS_Planned = "P"; /** Running = R */ public static final String STATUS_Running = "R"; /** Finished = F */ public static final String STATUS_Finished = "F"; @Override public void setStatus (final java.lang.String Status) { set_ValueNoCheck (COLUMNNAME_Status, Status); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Verification_Run.java
1
请完成以下Java代码
public void setPP_MRP(org.eevolution.model.I_PP_MRP PP_MRP) { set_ValueFromPO(COLUMNNAME_PP_MRP_ID, org.eevolution.model.I_PP_MRP.class, PP_MRP); } /** Set Material Requirement Planning. @param PP_MRP_ID Material Requirement Planning */ @Override public void setPP_MRP_ID (int PP_MRP_ID) { if (PP_MRP_ID <...
set_ValueFromPO(COLUMNNAME_PP_Order_ID, org.eevolution.model.I_PP_Order.class, PP_Order); } /** Set Produktionsauftrag. @param PP_Order_ID Produktionsauftrag */ @Override public void setPP_Order_ID (int PP_Order_ID) { if (PP_Order_ID < 1) set_Value (COLUMNNAME_PP_Order_ID, null); else set_Value (C...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP_Alternative.java
1
请在Spring Boot框架中完成以下Java代码
public class GatewayResource { private final RouteLocator routeLocator; private final DiscoveryClient discoveryClient; public GatewayResource(RouteLocator routeLocator, DiscoveryClient discoveryClient) { this.routeLocator = routeLocator; this.discoveryClient = discoveryClient; } ...
@Timed @Secured(AuthoritiesConstants.ADMIN) public ResponseEntity<List<RouteVM>> activeRoutes() { List<Route> routes = routeLocator.getRoutes(); List<RouteVM> routeVMs = new ArrayList<>(); routes.forEach(route -> { RouteVM routeVM = new RouteVM(); routeVM.setPath(...
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\web\rest\GatewayResource.java
2
请完成以下Java代码
public ArrayList<Integer> getSelection() { return selection; } public void setSelection(ArrayList<Integer> selection) { this.selection = selection; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getReportEngineType() { return repo...
public void setReportEngineType(int reportEngineType) { this.reportEngineType = reportEngineType; } public MPrintFormat getPrintFormat() { return this.printFormat; } public void setPrintFormat(MPrintFormat printFormat) { this.printFormat = printFormat; } public String getAskPrintMsg() { return askPri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\GenForm.java
1
请完成以下Java代码
public ZonedDateTime getValueAsZonedDateTime() { return DateTimeConverters.fromObjectToZonedDateTime(value); } public LocalDate getValueAsLocalDate() { return DateTimeConverters.fromObjectToLocalDate(value); } public IntegerLookupValue getValueAsIntegerLookupValue() { return DataTypes.convertToIntegerLoo...
{ //noinspection unchecked return (T)value; } final String valueStr; if (value instanceof Map) { @SuppressWarnings("unchecked") final Map<String, Object> map = (Map<String, Object>)value; final LookupValue.StringLookupValue lookupValue = JSONLookupValue.stringLookupValueFromJsonMap(map); valueSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentChangedEvent.java
1
请完成以下Java代码
public void setReleaseNo (String ReleaseNo) { set_Value (COLUMNNAME_ReleaseNo, ReleaseNo); } /** Get Release No. @return Internal Release Number */ public String getReleaseNo () { return (String)get_Value(COLUMNNAME_ReleaseNo); } /** Set Script. @param Script Dynamic Java Language Script to calc...
/** Status AD_Reference_ID=53239 */ public static final int STATUS_AD_Reference_ID=53239; /** In Progress = IP */ public static final String STATUS_InProgress = "IP"; /** Completed = CO */ public static final String STATUS_Completed = "CO"; /** Error = ER */ public static final String STATUS_Error = "ER"; /** S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\ad\migration\model\X_AD_MigrationScript.java
1
请完成以下Java代码
public class ConversionException extends KafkaException { private transient @Nullable ConsumerRecord<?, ?> record; private transient @Nullable List<ConsumerRecord<?, ?>> records = new ArrayList<>(); private transient @Nullable Message<?> message; /** * Construct an instance with the provided properties. * @...
/** * Return the consumer record, if available. * @return the record. * @since 2.7.2 */ @Nullable public ConsumerRecord<?, ?> getRecord() { return this.record; } /** * Return the consumer record, if available. * @return the record. * @since 2.7.2 */ public List<ConsumerRecord<?, ?>> getRecords()...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\converter\ConversionException.java
1
请完成以下Spring Boot application配置
spring: application: name: Trend-Service artemis: user: ${ACTIVEMQ_ARTEMIS_USER:admin} password: ${ACTIVEMQ_ARTEMIS_PASSWORD:admin} broker-url: tcp://${ACTIVEMQ_ARTEMIS_HOST:localhost}:${ACTIVEMQ_ARTEMIS_PORT:61616} server: port: 8083 jms: content-checkerrequest-queue:...
probability: 1.0 health: jms: enabled: true zipkin: export: tracing: endpoint: http://${ZIPKIN_HOST:localhost}:${ZIPKIN_PORT:9411}/api/v2/spans
repos\spring-boot-web-application-sample-master\content-checker\content-checker-service\src\main\resources\application.yml
2
请完成以下Java代码
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { doFilter((HttpServletRequest) request, (HttpServletResponse) response, chain); } private void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) ...
finally { this.securityContextHolderStrategy.clearContext(); request.removeAttribute(FILTER_APPLIED); } } /** * Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use * the {@link SecurityContextHolderStrategy} stored in {@link SecurityContextHolder}. * * @since 5.8 */ ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\context\SecurityContextHolderFilter.java
1
请完成以下Java代码
public class SaveAttachmentCmd implements Command<Object>, Serializable { private static final long serialVersionUID = 1L; protected Attachment attachment; public SaveAttachmentCmd(Attachment attachment) { this.attachment = attachment; } @Override public Object execute(CommandContext ...
// Forced to fetch the process-instance to associate the right process definition String processDefinitionId = null; String processInstanceId = updateAttachment.getProcessInstanceId(); if (updateAttachment.getProcessInstanceId() != null) { ExecutionEntity process = co...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\SaveAttachmentCmd.java
1
请完成以下Java代码
public void setSeverity (final java.lang.String Severity) { set_Value (COLUMNNAME_Severity, Severity); } @Override public java.lang.String getSeverity() { return get_ValueAsString(COLUMNNAME_Severity); } @Override public org.compiere.model.I_AD_Val_Rule getValidation_Rule() { return get_ValueAsPO(COLU...
@Override public void setWarning_Message_ID (final int Warning_Message_ID) { if (Warning_Message_ID < 1) set_Value (COLUMNNAME_Warning_Message_ID, null); else set_Value (COLUMNNAME_Warning_Message_ID, Warning_Message_ID); } @Override public int getWarning_Message_ID() { return get_ValueAsInt(COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule.java
1
请完成以下Java代码
public MDunningRunLine[] getLines() { return getLines(false); } // getLines /** * Get Lines * * @param onlyInvoices only with invoices * @return Array of all lines for this Run */ public MDunningRunLine[] getLines(boolean onlyInvoices) { List<Object> params = new ArrayList<>(); StringBuffer whereC...
I_C_DunningLevel level = getC_DunningLevel(); // Set Amt if (isProcessed()) { MDunningRunLine[] theseLines = getLines(); for (int i = 0; i < theseLines.length; i++) { theseLines[i].setProcessed(true); theseLines[i].saveEx(get_TrxName()); } if (level.isSetCreditStop() || level.isSetPaymentTe...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MDunningRunEntry.java
1
请完成以下Java代码
public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public String getRootProcessInstanceId() { ...
+ ", userId=" + userId + ", time=" + time + ", taskId=" + taskId + ", processInstanceId=" + processInstanceId + ", rootProcessInstanceId=" + rootProcessInstanceId + ", revision= "+ revision + ", removalTime=" + removalTime + ", action=" + acti...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CommentEntity.java
1
请完成以下Java代码
public String getSql(final Properties ctx, final List<Object> params) { final StringBuilder sql = new StringBuilder(); if (valueColumn != null) { sql.append(columnName).append("=").append(valueColumn.getColumnName()); } else { sql.append(columnName).append("=?"); params.add(value); } return ...
@Nullable private static Object convertToPOValue(@Nullable final Object value) { if (value == null) { return null; } else if (value instanceof RepoIdAware) { return ((RepoIdAware)value).getRepoId(); } else if (TimeUtil.isDateOrTimeObject(value)) { return TimeUtil.asTimestamp(value); } els...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\SetColumnNameQueryUpdater.java
1
请完成以下Java代码
public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ...
@param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getValue () { return (Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Template.java
1
请完成以下Java代码
final ILockDatabase getLockDatabase() { return lockDatabase; } @Override public int getCountLocked() { return _countLocked; } /* package */ final void subtractCountLocked(final int countLockedToSubtract) { try (final CloseableReentrantLock ignore = mutex.open()) { if (_countLocked < countLockedToS...
ImmutableList.of(this), Lock::unlockAllNoFail); } private static void unlockAllNoFail(final List<Lock> locks) { if (locks.isEmpty()) { return; } for (final Lock lock : locks) { if (lock.isClosed()) { continue; } try { lock.unlockAll(); } catch (Exception ex) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\Lock.java
1
请完成以下Java代码
public class InitializrMetadataV21JsonMapper extends InitializrMetadataV2JsonMapper { private final TemplateVariables dependenciesVariables; /** * Create a new instance. */ public InitializrMetadataV21JsonMapper() { this.dependenciesVariables = new TemplateVariables( new TemplateVariable("bootVersion", T...
protected String formatVersionRange(VersionRange versionRange) { return versionRange.format(Format.V1).toRangeString(); } protected ObjectNode dependenciesLink(String appUrl) { String uri = (appUrl != null) ? appUrl + "/dependencies" : "/dependencies"; UriTemplate uriTemplate = UriTemplate.of(uri, getDependenc...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\InitializrMetadataV21JsonMapper.java
1
请完成以下Java代码
private UserId extractBPartnerContactId(final Object record) { final Integer userIdObj = InterfaceWrapperHelper.getValueOrNull(record, "AD_User_ID"); if (!(userIdObj instanceof Integer)) { return null; } final int userRepoId = userIdObj.intValue(); return UserId.ofRepoIdOrNull(userRepoId); } private...
} public MailTextBuilder customVariable(@NonNull final String name, @Nullable final String value) { return customVariable(name, TranslatableStrings.anyLanguage(value)); } public MailTextBuilder customVariable(@NonNull final String name, @NonNull final ITranslatableString value) { _customVariables.put(name, v...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\templates\MailTextBuilder.java
1
请完成以下Java代码
public void setBatchId(String batchId) { this.batchId = batchId; } @CamundaQueryParam("userId") public void setUserId(String userId) { this.userId = userId; } @CamundaQueryParam("operationId") public void setOperationId(String operationId) { this.operationId = operationId; } @CamundaQue...
public void setEntityTypeIn(String[] entityTypes) { this.entityTypes = entityTypes; } @CamundaQueryParam("category") public void setcategory(String category) { this.category = category; } @CamundaQueryParam(value = "categoryIn", converter = StringArrayConverter.class) public void setCategoryIn(S...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\UserOperationLogQueryDto.java
1
请完成以下Java代码
public static AvailabilityMultiResult of(@NonNull final AvailabilityResult result) { return of(ImmutableList.of(result)); } public static final AvailabilityMultiResult EMPTY = new AvailabilityMultiResult(); @Getter(AccessLevel.NONE) private final ImmutableListMultimap<TrackingId, AvailabilityResult> results; ...
{ return other; } else if (other.isEmpty()) { return this; } else { return new AvailabilityMultiResult(ImmutableListMultimap.<TrackingId, AvailabilityResult> builder() .putAll(results) .putAll(other.results) .build()); } } public Set<TrackingId> getTrackingIds() { return resu...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\availability\AvailabilityMultiResult.java
1
请完成以下Java代码
public void setBackoffDecreaseThreshold(Integer backoffDecreaseThreshold) { this.backoffDecreaseThreshold = backoffDecreaseThreshold; } public Float getWaitIncreaseFactor() { return waitIncreaseFactor; } public void setWaitIncreaseFactor(Float waitIncreaseFactor) { this.waitIncreaseFactor = waitIn...
.add("maxPoolSize=" + maxPoolSize) .add("keepAliveSeconds=" + keepAliveSeconds) .add("queueCapacity=" + queueCapacity) .add("lockTimeInMillis=" + lockTimeInMillis) .add("maxJobsPerAcquisition=" + maxJobsPerAcquisition) .add("waitTimeInMillis=" + waitTimeInMillis) .add("maxWait=" + ma...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\JobExecutionProperty.java
1
请完成以下Java代码
public String schemaUpdate() { return schemaUpdate(null); } @Override public String schemaUpdate(String engineDbVersion) { String feedback = null; if (isUpdateNeeded()) { String dbVersion = getSchemaVersion(); String compareWithVersion = null; ...
@Override public void schemaCheckVersion() { String dbVersion = getSchemaVersion(); if (!FlowableVersions.CURRENT_VERSION.equals(dbVersion)) { throw new FlowableWrongDbException(FlowableVersions.CURRENT_VERSION, dbVersion); } } protected boolean isUpdateNeeded() { ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\db\ServiceSqlScriptBasedDbSchemaManager.java
1
请在Spring Boot框架中完成以下Java代码
public class POSPaymentProcessorService { private static final Logger logger = LogManager.getLogger(POSPaymentProcessorService.class); private final ImmutableMap<POSPaymentProcessorType, POSPaymentProcessor> paymentProcessors; public POSPaymentProcessorService(final Optional<List<POSPaymentProcessor>> paymentProce...
{ final POSPaymentProcessor paymentProcessor = getPaymentProcessor(request.getPaymentProcessorConfig().getType()); return paymentProcessor.refund(request); } private POSPaymentProcessor getPaymentProcessor(@NonNull final POSPaymentProcessorType type) { final POSPaymentProcessor paymentProcessor = paymentProce...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\payment_gateway\POSPaymentProcessorService.java
2
请在Spring Boot框架中完成以下Java代码
public class Publisher implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String company; public Long getId() { return id; } public void setId(Long id) {
this.id = id; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } @Override public String toString() { return "Publisher{" + "id=" + id + ", company=" + company + '}'; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootFetchJoinAndQueries\src\main\java\com\bookstore\entity\Publisher.java
2
请完成以下Java代码
public ResponseEntity<Object> createDatabase(@Validated @RequestBody Database resources){ databaseService.create(resources); return new ResponseEntity<>(HttpStatus.CREATED); } @Log("修改数据库") @ApiOperation(value = "修改数据库") @PutMapping @PreAuthorize("@el.check('database:edit')") public Resp...
return new ResponseEntity<>(databaseService.testConnection(resources),HttpStatus.CREATED); } @Log("执行SQL脚本") @ApiOperation(value = "执行SQL脚本") @PostMapping(value = "/upload") @PreAuthorize("@el.check('database:add')") public ResponseEntity<Object> uploadDatabase(@RequestBody MultipartFile file, HttpServletRequest...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\rest\DatabaseController.java
1
请完成以下Java代码
public void hit(int begin, int end, CoreDictionary.Attribute value) { int length = end - begin; if (length > lengthArray[begin]) { lengthArray[begin] = length; attributeArray[begin] = value; ...
} } else dat.parseLongestText(text, processor); } /** * 热更新(重新加载)<br> * 集群环境(或其他IOAdapter)需要自行删除缓存文件(路径 = HanLP.Config.CustomDictionaryPath[0] + Predefine.BIN_EXT) * * @return 是否加载成功 */ public boolean reload() { if (path == null || path.lengt...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\DynamicCustomDictionary.java
1
请完成以下Java代码
private void setDiscountSchemaBreakFields(@NonNull final I_I_DiscountSchema importRecord, @NonNull final I_M_DiscountSchemaBreak schemaBreak) { schemaBreak.setSeqNo(10); schemaBreak.setBreakDiscount(importRecord.getBreakDiscount()); schemaBreak.setBreakValue(importRecord.getBreakValue()); // if (importRecor...
private void setPricingFields(@NonNull final I_I_DiscountSchema importRecord, @NonNull final I_M_DiscountSchemaBreak schemaBreak) { schemaBreak.setPriceBase(importRecord.getPriceBase()); schemaBreak.setBase_PricingSystem_ID(importRecord.getBase_PricingSystem_ID()); schemaBreak.setPriceStdFixed(importRecord.getPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\impexp\DiscountSchemaImportProcess.java
1
请完成以下Java代码
protected int get_AccessLevel() { return accessLevel.intValue(); } /** Load Meta Data */ protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new Strin...
return ii.intValue(); } /** Set Description. @param Description Optional short description of the record */ public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_OrgType.java
1
请完成以下Java代码
public void setSelectClause (String SelectClause) { set_Value (COLUMNNAME_SelectClause, SelectClause); } /** Get Sql SELECT. @return SQL SELECT clause */ public String getSelectClause () { return (String)get_Value(COLUMNNAME_SelectClause); } /** Set Sql WHERE. @param WhereClause
Fully qualified SQL WHERE clause */ public void setWhereClause (String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ public String getWhereClause () { return (String)get_Value(COLUMNNAME_WhereClause); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AlertRule.java
1
请完成以下Java代码
void flush() { final ImmutableList<ViewChanges> changesList = getAndClean(); if (changesList.isEmpty()) { return; } // // Try flushing to parent collector if any final ViewChangesCollector parentCollector = getParentOrNull(); if (parentCollector != null) { logger.trace("Flushing {} to parent c...
} private void sendToWebsocket(@NonNull final List<JSONViewChanges> jsonChangeEvents) { if (jsonChangeEvents.isEmpty()) { return; } WebsocketSender websocketSender = _websocketSender; if (websocketSender == null) { websocketSender = this._websocketSender = SpringContextHolder.instance.getBean(Webs...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\event\ViewChangesCollector.java
1
请完成以下Java代码
class ServiceReadinessChecks { private static final Log logger = LogFactory.getLog(ServiceReadinessChecks.class); private static final String DISABLE_LABEL = "org.springframework.boot.readiness-check.disable"; private static final Duration SLEEP_BETWEEN_READINESS_TRIES = Duration.ofSeconds(1); private final Clo...
this.sleep.accept(SLEEP_BETWEEN_READINESS_TRIES); } } private List<ServiceNotReadyException> check(List<RunningService> runningServices) { List<ServiceNotReadyException> exceptions = null; for (RunningService service : runningServices) { if (isDisabled(service)) { continue; } logger.trace(LogMessa...
repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\lifecycle\ServiceReadinessChecks.java
1
请完成以下Java代码
public Class<?> getCommonPropertyType(ELContext context, Object base) { return isResolvable(base) ? Integer.class : null; } /** * Test whether the given base should be resolved by this ELResolver. * * @param base * The bean to analyze. * @return base instanceof List */ private static boole...
return (Character) property; } if (property instanceof Boolean) { return (Boolean) property ? 1 : 0; } if (property instanceof String) { try { return Integer.parseInt((String) property); } catch (NumberFormatException e) { throw new IllegalArgumentException("Cannot parse list index: " + propert...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\ListELResolver.java
1
请完成以下Java代码
public class JwtValidationException extends BadJwtException { @Serial private static final long serialVersionUID = 134652048447295615L; private final Collection<OAuth2Error> errors; /** * Constructs a {@link JwtValidationException} using the provided parameters * * While each {@link OAuth2Error} does conta...
* validation result */ public JwtValidationException(String message, Collection<OAuth2Error> errors) { super(message); Assert.notEmpty(errors, "errors cannot be empty"); this.errors = new ArrayList<>(errors); } /** * Return the list of {@link OAuth2Error}s associated with this exception * @return the li...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtValidationException.java
1
请完成以下Java代码
public void setPayPal_Order_ID (final int PayPal_Order_ID) { if (PayPal_Order_ID < 1) set_ValueNoCheck (COLUMNNAME_PayPal_Order_ID, null); else set_ValueNoCheck (COLUMNNAME_PayPal_Order_ID, PayPal_Order_ID); } @Override public int getPayPal_Order_ID() { return get_ValueAsInt(COLUMNNAME_PayPal_Order...
public void setPayPal_PayerApproveUrl (final @Nullable java.lang.String PayPal_PayerApproveUrl) { set_Value (COLUMNNAME_PayPal_PayerApproveUrl, PayPal_PayerApproveUrl); } @Override public java.lang.String getPayPal_PayerApproveUrl() { return get_ValueAsString(COLUMNNAME_PayPal_PayerApproveUrl); } @Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Order.java
1
请完成以下Java代码
public Integer getId() { return id; } /** * 设置 主键ID. * * @param id 主键ID. */ public void setId(Integer id) { this.id = id; } /** * 获取 权限名称. * * @return 权限名称. */ public String getPermission() { return permission; } /** ...
/** * 设置 创建时间. * * @param createdTime 创建时间. */ public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } /** * 获取 更新时间. * * @return 更新时间. */ public Date getUpdatedTime() { return updatedTime; } /** * 设置 更新时间. ...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\dao\domain\Permission.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; }
public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public boolean isAvailable() { return available; } public void setAvailable(boolean available) { this.available = available; } }
repos\tutorials-master\persistence-modules\spring-data-mongodb-2\src\main\java\com\baeldung\multicriteria\Product.java
1
请在Spring Boot框架中完成以下Java代码
public class BPGroupRepository { public BPGroup getbyId(@NonNull final BPGroupId groupId) { return ofRecord(loadOutOfTrx(groupId, I_C_BP_Group.class)).get(); } public Optional<BPGroup> getByNameAndOrgId(@NonNull final String name, @NonNull final OrgId orgId) { final I_C_BP_Group groupRecord = Services.get(IQu...
private Optional<BPGroup> ofRecord(@Nullable final I_C_BP_Group groupRecord) { if (groupRecord == null) { return Optional.empty(); } return Optional.of(BPGroup.builder() .id(BPGroupId.ofRepoId(groupRecord.getC_BP_Group_ID())) .orgId(OrgId.ofRepoIdOrAny(groupRecord.getAD_Org_ID())) .value(groupR...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPGroupRepository.java
2
请完成以下Java代码
private LookupValue extractWarehouse(@NonNull final I_M_ShipmentSchedule record) { final WarehouseId warehouseId = shipmentScheduleBL.getWarehouseId(record); return warehousesLookup.findById(warehouseId); } private LookupValue extractProduct(@NonNull final I_M_ShipmentSchedule record) { final ProductId produ...
private Quantity extractQtyCUToDeliver(@NonNull final I_M_ShipmentSchedule record) { return shipmentScheduleBL.getQtyToDeliver(record); } private BigDecimal extractQtyToDeliverCatchOverride(@NonNull final I_M_ShipmentSchedule record) { return shipmentScheduleBL .getCatchQtyOverride(record) .map(qty -> ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\shipment_candidates_editor\ShipmentCandidateRowsLoader.java
1