instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
boolean matches(String content) { return content.contains("\"spdxVersion\""); } }, SYFT(MimeType.valueOf("application/vnd.syft+json")) { @Override boolean matches(String content) { return content.contains("\"FoundBy\"") || content.contains("\"foundBy\""); } }, UNKNOWN(null) { @Override ...
private final @Nullable MimeType mediaType; SbomType(@Nullable MimeType mediaType) { this.mediaType = mediaType; } @Nullable MimeType getMediaType() { return this.mediaType; } abstract boolean matches(String content); } }
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\sbom\SbomEndpointWebExtension.java
1
请完成以下Java代码
private void mutate(Individual indiv) { for (int i = 0; i < indiv.getDefaultGeneLength(); i++) { if (Math.random() <= mutationRate) { byte gene = (byte) Math.round(Math.random()); indiv.setSingleGene(i, gene); } } } private Individual tour...
} } return fitness; } protected int getMaxFitness() { int maxFitness = solution.length; return maxFitness; } protected void setSolution(String newSolution) { solution = new byte[newSolution.length()]; for (int i = 0; i < newSolution.length(); i++) { ...
repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\binary\SimpleGeneticAlgorithm.java
1
请完成以下Java代码
public class RemoveEntryApplication { public static void main(String[] args) { HashMap<String, String> foodItemTypeMap = new HashMap<>(); foodItemTypeMap.put("Apple", "Fruit"); foodItemTypeMap.put("Grape", "Fruit"); foodItemTypeMap.put("Mango", "Fruit"); foodItemTypeMap.put...
// Use ConcurrentHashMap ConcurrentHashMap<String, String> foodItemTypeConcMap = new ConcurrentHashMap<>(); foodItemTypeConcMap.put("Apple", "Fruit"); foodItemTypeConcMap.put("Grape", "Fruit"); foodItemTypeConcMap.put("Mango", "Fruit"); foodItemTypeConcMap.put("Carrot", "Vegetabl...
repos\tutorials-master\core-java-modules\core-java-collections-maps-3\src\main\java\com\baeldung\map\hashmap\entryremoval\RemoveEntryApplication.java
1
请完成以下Java代码
public class IrisClassifier { private static final int CLASSES_COUNT = 3; private static final int FEATURES_COUNT = 4; public static void main(String[] args) throws IOException, InterruptedException { DataSet allData; try (RecordReader recordReader = new CSVRecordReader(0, ',')) { ...
.build()) .layer(1, new DenseLayer.Builder().nIn(3).nOut(3) .build()) .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) .activation(Activation.SOFTMAX) .nIn(3).nOut(CLASSES_COUNT).bu...
repos\tutorials-master\deeplearning4j\src\main\java\com\baeldung\deeplearning4j\IrisClassifier.java
1
请完成以下Java代码
public void setSourceExecution(DelegateCaseExecution sourceExecution) { this.sourceExecution = sourceExecution; } /** * Currently not part of public interface. */ public DelegateCaseExecution getScopeExecution() { return scopeExecution; } public void setScopeExecution(DelegateCaseExecution sco...
return name; } public Object getValue() { if(value != null) { return value.getValue(); } else { return null; } } public TypedValue getTypedValue() { return value; } public ProcessEngineServices getProcessEngineServices() { return Context.getProcessEngineConfiguration()...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\listener\DelegateCaseVariableInstanceImpl.java
1
请完成以下Java代码
public void add(T object) { CountDownLatch lock = new CountDownLatch(1); this.locks.putIfAbsent(object, lock); } public void release(T object) { CountDownLatch remove = this.locks.remove(object); if (remove != null) { remove.countDown(); } } public boolean await(long timeout, TimeUnit timeUnit) throw...
this.locks.remove(object); } } } return false; } public int getCount() { return this.locks.size(); } public void reset() { this.locks.clear(); this.active = true; } public void deactivate() { this.active = false; } public boolean isActive() { return this.active; } }
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\support\ActiveObjectCounter.java
1
请完成以下Java代码
private void loadIfNeeded() { if (loaded) { return; } load(); loaded = true; } private void load() { // // Load the HU // NOTE: instead of getting the HU by using huStorage.getM_HU() we are loading it directly because the huStorage's transaction is already closed, // and our ModelCacheServic...
@Override public Set<Integer> getProductIds() { loadIfNeeded(); return productIds; } @Override public Set<Integer> getBpartnerIds() { loadIfNeeded(); return bpartnerIds; } @Override public Set<Integer> getLocatorIds() { loadIfNeeded(); return locatorIds; } @Override public Set<ShipmentSchedu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\segments\ShipmentScheduleSegmentFromHUAttribute.java
1
请完成以下Java代码
public class MyDtoIgnoreFieldByName { private String stringValue; private int intValue; private boolean booleanValue; public MyDtoIgnoreFieldByName() { super(); } // API public String getStringValue() { return stringValue; } public void setStringValue(final Strin...
} public int getIntValue() { return intValue; } public void setIntValue(final int intValue) { this.intValue = intValue; } public boolean isBooleanValue() { return booleanValue; } public void setBooleanValue(final boolean booleanValue) { this.booleanValue =...
repos\tutorials-master\jackson-simple\src\main\java\com\baeldung\jackson\ignore\MyDtoIgnoreFieldByName.java
1
请完成以下Java代码
public static long filesCompareByByte(Path path1, Path path2) throws IOException { if (path1.getFileSystem() .provider() .isSameFile(path1, path2)) { return -1; } try (BufferedInputStream fis1 = new BufferedInputStream(new FileInputStream(path1.toFile())); ...
return lineNumber; } lineNumber++; } if (bf2.readLine() == null) { return -1; } else { return lineNumber; } } } public static boolean compareByMemoryMappedFiles(Path path1, Path path2) throws...
repos\tutorials-master\core-java-modules\core-java-12\src\main\java\com\baeldung\file\content\comparison\CompareFileContents.java
1
请完成以下Java代码
public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * */ public void setTitle(String value) { this.title = value; } /** * Gets the value o...
* @return * possible object is * {@link String } * */ public String getMimeType() { return mimeType; } /** * Sets the value of the mimeType property. * * @param value * allowed object is * {@link String } * */ pub...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\DocumentType.java
1
请完成以下Java代码
public boolean hasAttachment() { return attachmentExists; } @Override public boolean hasComment() { return commentExists; } public void escalation(String escalationCode, Map<String, Object> variables) { ensureTaskActive(); ActivityExecution activityExecution = getExecution(); if (variable...
STATE_INIT ("Init"), STATE_CREATED ("Created"), STATE_COMPLETED ("Completed"), STATE_DELETED ("Deleted"), STATE_UPDATED ("Updated"); private String taskState; private TaskState(String taskState) { this.taskState = taskState; } } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TaskEntity.java
1
请完成以下Java代码
public static int unlabeledContinue() { String searchName = "Wilson"; int counter = 0; Map<String, List<String>> nameMap = new HashMap<>(); nameMap.put("Grade1", Arrays.asList("John", "Wilson", "Robert", "Wilson")); nameMap.put("Grade2", Arrays.asList("Anthony", "Donald", "Wilson...
nameMap.put("Grade3", Arrays.asList("Wilson", "Michael", "Wilson", "Ryan")); Iterator<Entry<String, List<String>>> iterator = nameMap.entrySet() .iterator(); Entry<String, List<String>> entry = null; List<String> names = null; compare: while (iterator.hasNext()) { ...
repos\tutorials-master\core-java-modules\core-java-lang-syntax\src\main\java\com\baeldung\breakcontinue\BreakContinue.java
1
请完成以下Java代码
public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Sequence. @param SeqNo Method of ordering re...
} /** Get Valid to. @return Valid to including this date (last day) */ public Timestamp getValidTo () { return (Timestamp)get_Value(COLUMNNAME_ValidTo); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_C_TaxDefinition.java
1
请完成以下Java代码
protected OrderId getSalesOrderId() { final Optional<OrderId> optionalSalesOrderId = CollectionUtils.extractSingleElementOrDefault( getDocLines(), docLine -> Optional.ofNullable(docLine.getSalesOrderId()), Optional.empty()); //noinspection DataFlowIssue return optionalSalesOrderId.orElse(null); } ...
static class InOutDocBaseType { @NonNull DocBaseType docBaseType; boolean isSOTrx; public boolean isCustomerShipment() {return isSOTrx && docBaseType.isShipment();} public boolean isCustomerReturn() {return isSOTrx && docBaseType.isReceipt();} public boolean isVendorReceipt() {return !isSOTrx && docBaseTy...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_InOut.java
1
请完成以下Java代码
private void indent() { this.level++; refreshIndent(); } /** * Decrease the indentation level. */ private void outdent() { this.level--; refreshIndent(); } private void refreshIndent() { this.indent = this.indentStrategy.apply(this.level); } @Override public void write(char[] chars, int offset,...
} catch (IOException ex) { throw new IllegalStateException(ex); } } @Override public void flush() throws IOException { this.out.flush(); } @Override public void close() throws IOException { this.out.close(); } }
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\io\IndentingWriter.java
1
请完成以下Java代码
public void pushRfQs(@Nullable final List<SyncRfQ> syncRfqs) { if (disabled.get()) { logger.info("Disabled is set to true in this thread; -> doing nothing"); return; } if (syncRfqs == null || syncRfqs.isEmpty()) { return; } final IAgentSync agent = getAgentSync(); agent.syncRfQs(syncRfqs); ...
{ if (disabled.get()) { logger.info("Disabled is set to true in this thread; -> doing nothing"); return; } if (syncRfQCloseEvents == null || syncRfQCloseEvents.isEmpty()) { return; } final IAgentSync agent = getAgentSync(); agent.closeRfQs(syncRfQCloseEvents); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\impl\WebuiPush.java
1
请完成以下Java代码
public int hashCode() { 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; ...
.isEqual(); } @Override public Properties getCtx() { return ctx; } @Override public String getTrxName() { return trxName; } @Override public boolean isAllowThreadInherited() { return allowThreadInherited; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\PlainContextAware.java
1
请完成以下Java代码
public class OLCandDeleteSelectedRecords extends ViewBasedProcessTemplate implements IProcessPrecondition { private static final AdMessageKey PROCESSED_RECORDS_CANNOT_BE_DELETED = AdMessageKey.of("de.metas.ui.web.ordercandidate.process.PROCESSED_RECORDS_CANNOT_BE_DELETED"); private final IOLCandDAO candDAO = Service...
} @Override protected String doIt() throws Exception { final int count = getSelectedRowIds().isAll() ? candDAO.deleteUnprocessedRecords(getProcessInfo().getQueryFilterOrElseFalse()) : candDAO.deleteRecords(getSelectedRowIds().toIds(OLCandId::ofRepoId)); return "@Deleted@ #" + count; } @Override pro...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\ordercandidate\process\OLCandDeleteSelectedRecords.java
1
请在Spring Boot框架中完成以下Java代码
private Area getArea() { Check.assumeNotNull(_area, "area not null"); return _area; } @Override public Size applyAt(final CellRef cellRef, final Context context) { // // Process area final Area area = getArea(); final Size size = area.applyAt(cellRef, context); // // If given condition is evaluat...
return; } final AreaRef areaRef = getArea().getAreaRef(); final CellRef areaFirstCell = areaRef.getFirstCellRef(); final CellRef areaLastCell = areaRef.getLastCellRef(); final int firstColumn = Math.min(areaFirstCell.getCol(), areaLastCell.getCol()); final int lastColumn = Math.max(areaFirstCell.getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\xls\engine\HideColumnIfCommand.java
2
请完成以下Java代码
public ResponseEntity<HttpStatus> saveColumn(@RequestBody List<ColumnInfo> columnInfos){ generatorService.save(columnInfos); return new ResponseEntity<>(HttpStatus.OK); } @ApiOperation("同步字段数据") @PostMapping(value = "sync") public ResponseEntity<HttpStatus> syncColumn(@RequestBody List<...
throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!"); } switch (type){ // 生成代码 case 0: generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName)); break; // 预览 case 1: return generatorServic...
repos\eladmin-master\eladmin-generator\src\main\java\me\zhengjie\rest\GeneratorController.java
1
请在Spring Boot框架中完成以下Java代码
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Environment environment = context.getEnvironment(); String propertyName = getConfiguredProperty(environment); DatabaseInitializationMode mode = getDatabaseInitializationMode(environment, propertyName); boolean ma...
} } return DatabaseInitializationMode.EMBEDDED; } private @Nullable String getConfiguredProperty(Environment environment) { for (String propertyName : this.propertyNames) { if (environment.containsProperty(propertyName)) { return propertyName; } } return null; } }
repos\spring-boot-4.0.1\module\spring-boot-sql\src\main\java\org\springframework\boot\sql\autoconfigure\init\OnDatabaseInitializationCondition.java
2
请完成以下Java代码
private static BPartnerId extractSingleCustomerIdOrNull(final Collection<HUReservationEntry> entries) { final ImmutableSet<BPartnerId> customerIds = entries .stream() .map(HUReservationEntry::getCustomerId) .filter(Objects::nonNull) .collect(ImmutableSet.toImmutableSet()); return customerIds.size()...
public ImmutableSet<HuId> getVhuIds() { return entriesByVHUId.keySet(); } public Quantity getReservedQtyByVhuId(@NonNull final HuId vhuId) { final HUReservationEntry entry = entriesByVHUId.get(vhuId); if (entry == null) { throw new AdempiereException("@NotFound@ @VHU_ID@"); } return entry.getQtyRese...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\reservation\HUReservation.java
1
请完成以下Java代码
private I_M_InOut getReceiptOrNull(final int huId) { final I_M_InOut receipt = huId2inout.get(huId); return receipt; } public List<I_M_InOut> getReceiptsToReverseFromHUs(final Collection<I_M_HU> huAwareList) { return getReceiptsToReverse(IHUAware.transformHUCollection(hus)); } /** * Get the receipts to ...
{ private I_M_ReceiptSchedule receiptSchedule; private boolean tolerateNoHUsFound = false; private Builder() { super(); } public ReceiptCorrectHUsProcessor build() { return new ReceiptCorrectHUsProcessor(this); } public Builder setM_ReceiptSchedule(final I_M_ReceiptSchedule receiptSchedule) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\ReceiptCorrectHUsProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public BigInteger getEDICctop140VID() { return ediCctop140VID; } /** * Sets the value of the ediCctop140VID property. * * @param value * allowed object is * {@link BigInteger } * */ public void setEDICctop140VID(BigInteger value) { this.ediCc...
} /** * Sets the value of the discountAmt property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setDiscountAmt(BigDecimal value) { this.discountAmt = value; } /** * Gets the value of the discountBaseAmt prope...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop140VType.java
2
请在Spring Boot框架中完成以下Java代码
public WidgetsBundle save(WidgetsBundle widgetsBundle, SecurityUser user) throws Exception { ActionType actionType = widgetsBundle.getId() == null ? ActionType.ADDED : ActionType.UPDATED; TenantId tenantId = widgetsBundle.getTenantId(); try { WidgetsBundle savedWidgetsBundle = checkN...
} } @Override public void updateWidgetsBundleWidgetTypes(WidgetsBundleId widgetsBundleId, List<WidgetTypeId> widgetTypeIds, User user) throws Exception { widgetTypeService.updateWidgetsBundleWidgetTypes(user.getTenantId(), widgetsBundleId, widgetTypeIds); autoCommit(user, widgetsBundleId); ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\widgets\bundle\DefaultWidgetsBundleService.java
2
请在Spring Boot框架中完成以下Java代码
public BigDecimal getOrderAmount() { return orderAmount; } public void setOrderAmount(BigDecimal orderAmount) { this.orderAmount = orderAmount; } public String getProductName() { return productName; } public void setProductName(String productName) { this.produc...
this.merchantOrderNo = merchantOrderNo; } public String getPayKey() { return payKey; } public void setPayKey(String payKey) { this.payKey = payKey; } public Map<String, PayTypeEnum> getPayTypeEnumMap() { return payTypeEnumMap; } public void setPayTypeEnumMap(M...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\RpPayGateWayPageShowVo.java
2
请完成以下Java代码
public class TimezoneDisplay { public enum OffsetBase { GMT, UTC } public List<String> getTimeZoneList(OffsetBase base) { Set<String> availableZoneIds = ZoneId.getAvailableZoneIds(); LocalDateTime now = LocalDateTime.now(); return availableZoneIds .stream() ...
LocalDateTime now = LocalDateTime.now(); ZoneOffset offset1 = now .atZone(zoneId1) .getOffset(); ZoneOffset offset2 = now .atZone(zoneId2) .getOffset(); return offset1.compareTo(offset2); } } }
repos\tutorials-master\core-java-modules\core-java-datetime-string-2\src\main\java\com\baeldung\timezonedisplay\TimezoneDisplay.java
1
请完成以下Java代码
public void setUltmtDbtr(PartyIdentification32 value) { this.ultmtDbtr = value; } /** * Gets the value of the cdtr property. * * @return * possible object is * {@link PartyIdentification32 } * */ public PartyIdentification32 getCdtr() { retur...
* Gets the value of the tradgPty property. * * @return * possible object is * {@link PartyIdentification32 } * */ public PartyIdentification32 getTradgPty() { return tradgPty; } /** * Sets the value of the tradgPty property. * * @param val...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TransactionParty2.java
1
请完成以下Java代码
public DmnDeploymentEntity getDeployment() { return deploymentEntity; } public List<DecisionEntity> getAllDecisions() { return decisions; } public EngineResource getResourceForDecision(DecisionEntity decision) { return mapDecisionsToResources.get(decision); } public Dm...
return (parse == null ? null : parse.getDmnDefinition()); } public DecisionService getDecisionServiceForDecisionEntity(DecisionEntity decisionEntity) { DmnDefinition dmnDefinition = getDmnDefinitionForDecision(decisionEntity); return (dmnDefinition == null ? null : dmnDefinition.getDecisionSer...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\deployer\ParsedDeployment.java
1
请完成以下Java代码
private static boolean isDefaultValuePresent(@Nullable String defaultValue) { return !Check.isEmpty(defaultValue); } @Override public String toString() { return toStringWithoutMarkers(); } @Override public int hashCode() { if (_hashcode == null) { final int prime = 31; int result = 1; result...
{ if (other.modifiers != null) { return false; } } else if (!modifiers.equals(other.modifiers)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return true; } public boolean eq...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\CtxName.java
1
请完成以下Java代码
public static List<Indexed<String>> getOddIndexedStrings(List<String> names) { List<Indexed<String>> list = StreamUtils.zipWithIndex(names.stream()) .filter(i -> i.getIndex() % 2 == 1) .collect(Collectors.toList()); return list; } public static List<String> getOddIndexed...
} public static List<String> getEvenIndexedStringsUsingAtomicInteger(String[] names) { AtomicInteger index = new AtomicInteger(0); return Arrays.stream(names) .filter(name -> index.getAndIncrement() % 2 == 0) .collect(Collectors.toList()); } public static List<Strin...
repos\tutorials-master\core-java-modules\core-java-streams\src\main\java\com\baeldung\stream\StreamIndices.java
1
请完成以下Java代码
public final class ReceiptMovementDateRule { public static final ReceiptMovementDateRule ORDER_DATE_PROMISED = new ReceiptMovementDateRule(Type.ORDER_DATE_PROMISED, null); public static final ReceiptMovementDateRule EXTERNAL_DATE_IF_AVAIL = new ReceiptMovementDateRule(Type.EXTERNAL_DATE_IF_AVAIL, null); public stati...
public <T> T map(@NonNull final CaseMapper<T> mapper) { switch (type) { case ORDER_DATE_PROMISED: return mapper.orderDatePromised(); case EXTERNAL_DATE_IF_AVAIL: return mapper.externalDateIfAvailable(); case CURRENT_DATE: return mapper.currentDate(); case FIXED_DATE: final Instant fixed...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptMovementDateRule.java
1
请在Spring Boot框架中完成以下Java代码
public class SbomProperties { /** * Application SBOM configuration. */ private final Sbom application = new Sbom(); /** * Additional SBOMs. */ private Map<String, Sbom> additional = new HashMap<>(); public Sbom getApplication() { return this.application; } public Map<String, Sbom> getAdditional() {...
* Media type of the SBOM. If null, the media type will be auto-detected. */ private @Nullable MimeType mediaType; public @Nullable String getLocation() { return this.location; } public void setLocation(@Nullable String location) { this.location = location; } public @Nullable MimeType getMediaTyp...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\sbom\SbomProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class MyGrantedAuthority implements GrantedAuthority { private String url; private String method; public String getPermissionUrl() { return url; } public void setPermissionUrl(String permissionUrl) { this.url = permissionUrl; } public String getMethod() { r...
} public void setMethod(String method) { this.method = method; } public MyGrantedAuthority(String url, String method) { this.url = url; this.method = method; } @Override public String getAuthority() { return this.url + ";" + this.method; } }
repos\springBoot-master\springboot-springSecurity3\src\main\java\com\us\example\service\MyGrantedAuthority.java
2
请在Spring Boot框架中完成以下Java代码
public String getSqlParser() { return sqlParser; } public void setSqlParser(String sqlParser) { this.sqlParser = sqlParser; Optional.ofNullable(sqlParser).ifPresent(v -> properties.setProperty("sqlParser", v)); } public Boolean getAsyncCount() { return asyncCount; }...
public String getOrderBySqlParser() { return orderBySqlParser; } public void setOrderBySqlParser(String orderBySqlParser) { this.orderBySqlParser = orderBySqlParser; Optional.ofNullable(orderBySqlParser).ifPresent(v -> properties.setProperty("orderBySqlParser", v)); } public St...
repos\pagehelper-spring-boot-master\pagehelper-spring-boot-autoconfigure\src\main\java\com\github\pagehelper\autoconfigure\PageHelperStandardProperties.java
2
请在Spring Boot框架中完成以下Java代码
private String serialize(EntityDescriptor entityDescriptor) { return this.saml.serialize(entityDescriptor).prettyPrint(this.usePrettyPrint).serialize(); } private String serialize(EntitiesDescriptor entities) { return this.saml.serialize(entities).prettyPrint(this.usePrettyPrint).serialize(); } /** * Config...
private final EntityDescriptor entityDescriptor; private final RelyingPartyRegistration registration; EntityDescriptorParameters(EntityDescriptor entityDescriptor, RelyingPartyRegistration registration) { this.entityDescriptor = entityDescriptor; this.registration = registration; } EntityDescriptor get...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\metadata\BaseOpenSamlMetadataResolver.java
2
请完成以下Java代码
public void setIsSyncExternalReferencesToRabbitMQ (final boolean IsSyncExternalReferencesToRabbitMQ) { set_Value (COLUMNNAME_IsSyncExternalReferencesToRabbitMQ, IsSyncExternalReferencesToRabbitMQ); } @Override public boolean isSyncExternalReferencesToRabbitMQ() { return get_ValueAsBoolean(COLUMNNAME_IsSyncEx...
@Override public String getRouting_Key() { return get_ValueAsString(COLUMNNAME_Routing_Key); } @Override public void setAuthToken (final String AuthToken) { set_Value (COLUMNNAME_AuthToken, AuthToken); } @Override public String getAuthToken() { return get_ValueAsString(COLUMNNAME_AuthToken); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_RabbitMQ_HTTP.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isActivated() { return activated; } public void setActivated(boolean activated) { this.activated = activated; } public String getActivationKey() { return activationKey; } public void setActivationKey(String activationKey) { this.activationKey = a...
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof User)) { return false; } return id != null && id.equals(((User) o).id); } @Override public int hashCode() { // see https://vladmihalcea....
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\User.java
2
请在Spring Boot框架中完成以下Java代码
public static class FallbackHeadersConfig { private String executionExceptionTypeHeaderName = CB_EXECUTION_EXCEPTION_TYPE; private String executionExceptionMessageHeaderName = CB_EXECUTION_EXCEPTION_MESSAGE; private String rootCauseExceptionTypeHeaderName = CB_ROOT_CAUSE_EXCEPTION_TYPE; private String rootC...
public String getRootCauseExceptionTypeHeaderName() { return rootCauseExceptionTypeHeaderName; } public void setRootCauseExceptionTypeHeaderName(String rootCauseExceptionTypeHeaderName) { this.rootCauseExceptionTypeHeaderName = rootCauseExceptionTypeHeaderName; } public String getRootCauseExceptionMessa...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\BeforeFilterFunctions.java
2
请完成以下Java代码
public FacetCollectorRequestBuilder<ModelType> setSource(final IFacetFilterable<ModelType> dataSource) { this.source_filterable = dataSource; return this; } /** * @param onlyFacetCategoriesPredicate * @return facets collecting source to be used when collecting facets. */ public IQueryBuilder<ModelType> g...
return this; } /** * * @param facetCategory * @return true if given facet category shall be considered when collecting facets */ public boolean acceptFacetCategory(final IFacetCategory facetCategory) { // Don't accept it if is excluded by includes/excludes list if (!facetCategoryIncludesExcludes.build...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\FacetCollectorRequestBuilder.java
1
请完成以下Java代码
public class FlinkDataPipeline { public static void capitalize() throws Exception { String inputTopic = "flink_input"; String outputTopic = "flink_output"; String consumerGroup = "baeldung"; String address = "localhost:9092"; StreamExecutionEnvironment environment = StreamE...
String kafkaAddress = "localhost:9092"; StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment(); environment.setStreamTimeCharacteristic(TimeCharacteristic.EventTime); FlinkKafkaConsumer<InputMessage> flinkKafkaConsumer = createInputMessageConsumer(inputT...
repos\tutorials-master\apache-kafka-2\src\main\java\com\baeldung\flink\FlinkDataPipeline.java
1
请完成以下Java代码
public Todo create(Todo item) { if (null == item || null != item.id()) { throw new IllegalArgumentException("item must exist without any id"); } return mapper.map(repo.save(mapper.map(item))); } /** * Aktualisiert ein Item im Datenbestand. * * @param item das ...
* Entfernt ein Item aus dem Datenbestand. * * @param id die ID des zu löschenden Items * @throws NotFoundException * wenn das Element mit der ID nicht gefunden wird */ public void delete(long id) { if (repo.existsById(id)) { repo.deleteById(id); } else { ...
repos\tutorials-master\spring-boot-modules\spring-boot-3\src\main\java\com\baeldung\sample\control\TodosService.java
1
请完成以下Java代码
public static void setSelectAllOnFocus(final JComponent c) { if (c instanceof JTextComponent) { setSelectAllOnFocus((JTextComponent)c); } else { for (Component cc : c.getComponents()) { if (cc instanceof JTextComponent) { setSelectAllOnFocus((JTextComponent)cc); break; } } ...
return ((CEditor)c).isReadWrite(); if (c instanceof JTextComponent) return ((JTextComponent)c).isEditable(); // log.warn("Unknown component type - "+c.getClass()); return false; } public static void focusNextNotEmpty(Component component, Collection<Component> editors) { boolean found = false; Compone...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\form\swing\SwingFieldsUtil.java
1
请完成以下Java代码
public class RestFilter implements ContainerRequestFilter, ClientRequestFilter, ContainerResponseFilter, ClientResponseFilter { /** logger */ private static final Logger logger = LoggerFactory.getLogger(RestFilter.class); @Override public void filter(ClientRequestContext context) throws IOExce...
protected void logHttpHeaders(MultivaluedMap<String, String> headers) { StringBuilder msg = new StringBuilder("The HTTP headers are: \n"); for (Map.Entry<String, List<String>> entry : headers.entrySet()) { msg.append(entry.getKey()).append(": "); for (int i = 0; i < entry.getValu...
repos\springBoot-master\springboot-dubbo\abel-user-provider\src\main\java\cn\abel\user\filter\RestFilter.java
1
请完成以下Java代码
public boolean isPublished () { Object oo = get_Value(COLUMNNAME_IsPublished); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void ...
/** Set Details. @param TextDetails Details */ public void setTextDetails (String TextDetails) { set_Value (COLUMNNAME_TextDetails, TextDetails); } /** Get Details. @return Details */ public String getTextDetails () { return (String)get_Value(COLUMNNAME_TextDetails); } /** Set Text Message. @pa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Topic.java
1
请在Spring Boot框架中完成以下Java代码
public class AuthorExtractor { private final JdbcTemplate jdbcTemplate; public AuthorExtractor(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } public List<AuthorDto> extract() { String sql = "SELECT a.id, a.name, a.age, b.id, b.title " + "FROM author ...
if (author == null) { author = new AuthorDto(rs.getLong("id"), rs.getString("name"), rs.getInt("age"), new ArrayList()); } BookDto book = new BookDto(rs.getLong("id"), rs.getString("title")); ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoRecordJbcTemplate\src\main\java\com\bookstore\jdbcTemplate\dto\AuthorExtractor.java
2
请在Spring Boot框架中完成以下Java代码
public class RateLimitService { private static Logger log = LogManager.getLogger(RateLimitService.class); private final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class); public Optional<RateLimit> extractRateLimit(final HttpHeaders httpHeaders) { final List<String> rateLimitRemaining = httpHeaders.ge...
} final int maxTimeToWait = sysConfigBL.getIntValue(MAX_TIME_TO_WAIT_FOR_LIMIT_RESET.getName(), MAX_TIME_TO_WAIT_FOR_LIMIT_RESET.getDefaultValue() ); if (msToLimitReset > maxTimeToWait) { throw new AdempiereException("Limit Reset is too far in the future! aborting!") .appendParametersToMessage() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.issue.tracking.github\src\main\java\de\metas\issue\tracking\github\api\v3\service\RateLimitService.java
2
请在Spring Boot框架中完成以下Java代码
public String getAll() { return this.all; } public void setAll(String all) { this.all = all; } public String getCluster() { return this.cluster; } public void setCluster(String cluster) { this.cluster = cluster; } public String getDefaultAlias() { return this.defaultAlias; } publ...
public String getLocator() { return this.locator; } public void setLocator(String locator) { this.locator = locator; } public String getServer() { return this.server; } public void setServer(String server) { this.server = server; } public String getWeb() { return this.web; } publ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\SslProperties.java
2
请完成以下Java代码
private ImmutableList<ImpFormatColumn> retrieveColumns(@NonNull final ImpFormatId impFormatId) { return Services.get(IQueryBL.class) .createQueryBuilderOutOfTrx(I_AD_ImpFormat_Row.class) .addEqualsFilter(I_AD_ImpFormat_Row.COLUMNNAME_AD_ImpFormat_ID, impFormatId) .addOnlyActiveRecordsFilter() .orderB...
return null; } return ImpFormatColumn.builder() .name(rowRecord.getName()) .columnName(adColumn.getColumnName()) .startNo(rowRecord.getStartNo()) .endNo(rowRecord.getEndNo()) .dataType(ImpFormatColumnDataType.ofCode(rowRecord.getDataType())) .maxLength(adColumn.getFieldLength()) .dataFo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\format\ImpFormatRepository.java
1
请完成以下Java代码
public class Consumer implements Runnable { private static final Logger LOG = LoggerFactory.getLogger(Consumer.class); private final TransferQueue<String> transferQueue; private final String name; final int numberOfMessagesToConsume; final AtomicInteger numberOfConsumedMessages = new AtomicInteger(...
LOG.debug("Consumer: " + name + " is waiting to take element..."); String element = transferQueue.take(); longProcessing(element); LOG.debug("Consumer: " + name + " received element: " + element); } catch (InterruptedException e) { e.printStack...
repos\tutorials-master\core-java-modules\core-java-concurrency-collections-2\src\main\java\com\baeldung\transferqueue\Consumer.java
1
请完成以下Java代码
public static boolean isCompensationThrowing(PvmExecutionImpl execution, Map<ScopeImpl, PvmExecutionImpl> activityExecutionMapping) { if (CompensationBehavior.isCompensationThrowing(execution)) { ScopeImpl compensationThrowingActivity = execution.getActivity(); if (compensationThrowingActivity.isScope(...
* The jobs created prior <code>7.13</code> and not executed before do not have historic information of variables. * This method takes care of that. */ public static void createMissingHistoricVariables(PvmExecutionImpl execution) { Collection<VariableInstanceEntity> variables = ((ExecutionEntity) execution)....
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\LegacyBehavior.java
1
请完成以下Java代码
public UserQuery createUserQuery() { return getIdmIdentityService().createUserQuery(); } @Override public NativeUserQuery createNativeUserQuery() { return getIdmIdentityService().createNativeUserQuery(); } @Override public GroupQuery createGroupQuery() { return getIdmId...
public void deleteUser(String userId) { getIdmIdentityService().deleteUser(userId); } @Override public void setUserPicture(String userId, Picture picture) { getIdmIdentityService().setUserPicture(userId, picture); } @Override public Picture getUserPicture(String userId) { ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\IdentityServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class ReceiptScheduleExternalInfo { @Nullable LocalDate movementDate; @Nullable LocalDate dateAcct; @Nullable ZonedDateTime dateReceived; @Nullable String externalId; @Builder public ReceiptScheduleExternalInfo(@Nullable final LocalDate movementDate,
@Nullable final LocalDate dateAcct, @Nullable final ZonedDateTime dateReceived, @Nullable final String externalId) { if (movementDate == null && dateReceived == null && Check.isBlank(externalId)) { throw new AdempiereException("Empty object!"); } this.movementDate = movementDate; this.dateAcct = da...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleExternalInfo.java
2
请完成以下Java代码
public static void setSelectAllOnFocus(final JTextComponent c) { c.addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent e) { c.selectAll(); } }); } public static boolean isEmpty(Object editor) { if (editor == null) { return false; } if (editor instanceof CComboBox) {...
log.warn("Unknown component type - "+c.getClass()); return false; } public static void focusNextNotEmpty(Component component, Collection<Component> editors) { boolean found = false; Component last = null; for (Component c : editors) { last = c; if (found) { if (isEditable(c) && isEmpty(c)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\form\swing\SwingFieldsUtil.java
1
请完成以下Java代码
public List<Role> getRoles() { return roles; } public void setRoles(List<Role> roles) { this.roles = roles; } @ManyToMany(cascade = CascadeType.MERGE) @JoinTable( name = "user_role", joinColumns = {@JoinColumn(name = "USER_ID", referencedColumnName = "ID")},...
} public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password...
repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\SpringSecurity\src\main\java\spring\security\entities\User.java
1
请在Spring Boot框架中完成以下Java代码
public class BpartnerProductRestController { private final IBPartnerDAO bpartnersRepo = Services.get(IBPartnerDAO.class); private final IBPartnerProductDAO bpartnerProductsRepo = Services.get(IBPartnerProductDAO.class); private final IProductBL productsService = Services.get(IProductBL.class); @ApiOperation("For a...
{ return bpartnersRepo.retrieveBPartnerIdBy(BPartnerQuery.builder() .bpartnerName(customerName) .build()); } private Optional<ProductId> findProductId(final BPartnerId customerId, final String customerProductSearchString) { final Optional<ProductId> productIdByProductNo = bpartnerProductsRepo.getProduct...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\bpartner_product\impl\BpartnerProductRestController.java
2
请完成以下Java代码
public I_M_Material_Tracking getMaterialTracking(final IContextAware context, final IAttributeSet attributeSet) { final int materialTrackingId = getMaterialTrackingId(context, attributeSet); if (materialTrackingId <= 0) { return null; } final I_M_Material_Tracking materialTracking = InterfaceWrapperHelpe...
} final String materialTrackingIdStr = materialTrackingIdObj.toString(); return getMaterialTrackingIdFromMaterialTrackingIdStr(materialTrackingIdStr); } @Override public boolean hasMaterialTrackingAttribute(@NonNull final AttributeSetInstanceId asiId) { if (asiId.isNone()) { return false; } final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingAttributeBL.java
1
请完成以下Java代码
public java.lang.String getSecretKey_2FA() { return get_ValueAsString(COLUMNNAME_SecretKey_2FA); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setSuperv...
return get_ValueAsString(COLUMNNAME_Title); } @Override public void setUnlockAccount (final @Nullable java.lang.String UnlockAccount) { set_Value (COLUMNNAME_UnlockAccount, UnlockAccount); } @Override public java.lang.String getUnlockAccount() { return get_ValueAsString(COLUMNNAME_UnlockAccount); } @O...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User.java
1
请完成以下Java代码
public void setP_TradeDiscountRec_Acct (int P_TradeDiscountRec_Acct) { set_Value (COLUMNNAME_P_TradeDiscountRec_Acct, Integer.valueOf(P_TradeDiscountRec_Acct)); } /** Get Trade Discount Received. @return Trade Discount Receivable Account */ @Override public int getP_TradeDiscountRec_Acct () { Integer i...
} @Override public void setP_WIP_A(org.compiere.model.I_C_ValidCombination P_WIP_A) { set_ValueFromPO(COLUMNNAME_P_WIP_Acct, org.compiere.model.I_C_ValidCombination.class, P_WIP_A); } /** Set Work In Process. @param P_WIP_Acct The Work in Process account is the account used Manufacturing Order */ @Ove...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Acct.java
1
请完成以下Java代码
private static final class LaneCardsSequence { private final int laneId; private final List<Integer> cardIds; public LaneCardsSequence(final int laneId, final List<Integer> cardIds) { this.laneId = laneId; this.cardIds = new ArrayList<>(cardIds); } public LaneCardsSequence copy() { return new ...
cardIds.remove((Object)cardId); cardIds.add(cardId); } else { cardIds.remove((Object)cardId); cardIds.add(position, cardId); } } public void removeCardId(final int cardId) { Preconditions.checkArgument(cardId > 0, "cardId > 0"); cardIds.remove((Object)cardId); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\board\BoardDescriptorRepository.java
1
请完成以下Java代码
public int compare(final IQualityInspectionLine line1, final IQualityInspectionLine line2) { final int index1 = getIndex(line1); final int index2 = getIndex(line2); return index1 - index2; } private final int getIndex(final IQualityInspectionLine line) { Check.assumeNotNull(line, "line not null"); final...
} } } /** * Sort given lines with this comparator. * * NOTE: we assume the list is read-write. * * @param lines */ public void sort(final List<IQualityInspectionLine> lines) { Collections.sort(lines, this); } /** * Remove from given lines those which their type is not specified in our list. Th...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\QualityInspectionLineByTypeComparator.java
1
请完成以下Java代码
public Builder setWidgetType(final DocumentFieldWidgetType widgetType) { this._widgetType = widgetType; return this; } private DocumentFieldWidgetType getWidgetType() { Check.assumeNotNull(_widgetType, "Parameter widgetType is not null"); return _widgetType; } public Builder setMinPrecision(@N...
} public Builder setEncrypted(final boolean encrypted) { this.encrypted = encrypted; return this; } /** * Sets ORDER BY priority and direction (ascending/descending) * * @param priority priority; if positive then direction will be ascending; if negative then direction will be descending */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlDocumentFieldDataBindingDescriptor.java
1
请完成以下Java代码
public String getCustomerAddress() {return packageable.getCustomerAddress();} public @NonNull InstantAndOrgId getPreparationDate() {return packageable.getPreparationDate();} public @NonNull InstantAndOrgId getDeliveryDate() {return packageable.getDeliveryDate();} public @Nullable OrderId getSalesOrderId() {return...
return schedule != null ? schedule.getQtyToPick() : packageable.getQtyToDeliver(); } public @NonNull HUPIItemProductId getPackToHUPIItemProductId() {return packageable.getPackToHUPIItemProductId();} public @NonNull Quantity getQtyToPick() { return schedule != null ? schedule.getQtyToPick() : pac...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageable.java
1
请完成以下Java代码
private Mono<CompleteMultipartUploadResponse> completeUpload(UploadState state) { log.info("[I202] completeUpload: bucket={}, filekey={}, completedParts.size={}", state.bucket, state.filekey, state.completedParts.size()); CompletedMultipartUpload multipartUpload = CompletedMultipartUplo...
final String bucket; final String filekey; String uploadId; int partCounter; Map<Integer, CompletedPart> completedParts = new HashMap<>(); int buffered = 0; UploadState(String bucket, String filekey) { this.bucket = bucket; this.filekey = filekey...
repos\tutorials-master\aws-modules\aws-reactive\src\main\java\com\baeldung\aws\reactive\s3\UploadResource.java
1
请完成以下Java代码
public final class OidcScopes { /** * The {@code openid} scope is required for OpenID Connect Authentication Requests. */ public static final String OPENID = "openid"; /** * The {@code profile} scope requests access to the default profile claims, which are: * {@code name, family_name, given_name, middle_na...
/** * The {@code address} scope requests access to the {@code address} claim. */ public static final String ADDRESS = "address"; /** * The {@code phone} scope requests access to the {@code phone_number} and * {@code phone_number_verified} claims. */ public static final String PHONE = "phone"; private Oi...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\OidcScopes.java
1
请完成以下Java代码
public Message getByAdMessage(@NonNull final String adMessage) { return getByAdMessage(AdMessageKey.of(adMessage)); } @Nullable public Message getByAdMessage(@NonNull final AdMessageKey adMessage) { return byAdMessage.get(adMessage); } public Stream<Message> stream() {return byAdMessage.values().stream();}...
return stream() .filter(message -> message.getAdMessage().startsWith(prefix)) .collect(ImmutableMap.toImmutableMap(keyFunction, message -> message.getMsgText(adLanguage))); } public Optional<Message> getById(@NonNull final AdMessageId adMessageId) { return Optional.ofNullable(byId.get(adMessageId)); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\MessagesMap.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductAvailableStocks { // Services @NonNull final IHandlingUnitsBL handlingUnitsBL; // Params @NonNull final ImmutableSet<LocatorId> pickFromLocatorIds; // State @NonNull private final HashMap<ProductId, ProductAvailableStock> map = new HashMap<>(); @Builder(access = AccessLevel.PACKAGE) priva...
{ CollectionUtils.getAllOrLoad(map, productIds, this::loadByProductIds); } private Map<ProductId, ProductAvailableStock> loadByProductIds(final Set<ProductId> productIds) { final HashMap<ProductId, ProductAvailableStock> result = new HashMap<>(); productIds.forEach(productId -> result.put(productId, new Produ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\external\hu\ProductAvailableStocks.java
2
请完成以下Java代码
public boolean isAsync(PvmExecutionImpl execution) { return false; } public boolean isAsyncCapable() { return false; } public void execute(PvmExecutionImpl execution) { PvmExecutionImpl nextLeaf; do { nextLeaf = findNextLeaf(execution); // nextLeaf can already be removed, if it wa...
} while (!nextLeaf.isDeleteRoot()); } protected PvmExecutionImpl findNextLeaf(PvmExecutionImpl execution) { if (execution.hasChildren()) { return findNextLeaf(execution.getExecutions().get(0)); } return execution; } protected PvmExecutionImpl getDeleteRoot(PvmExecutionImpl execution) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationDeleteCascade.java
1
请完成以下Java代码
public String getDestination() { return destination; } public void setDestination(String destination) { this.destination = destination; } public String getSelector() { return selector; } public void setSelector(String selector) { this.selector = selector; }...
return subscription; } public void setSubscription(String subscription) { this.subscription = subscription; } public String getConcurrency() { return concurrency; } public void setConcurrency(String concurrency) { this.concurrency = concurrency; } }
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\JmsInboundChannelModel.java
1
请在Spring Boot框架中完成以下Java代码
public class TaskModelAutoConfiguration { //this bean will be automatically injected inside boot's ObjectMapper @Bean public Module customizeTaskModelObjectMapper() { SimpleModule module = new SimpleModule("mapTaskRuntimeInterfaces", Version.unknownVersion()); SimpleAbstractTypeResolver res...
module.registerSubtypes(new NamedType(DeleteTaskPayload.class, DeleteTaskPayload.class.getSimpleName())); module.registerSubtypes(new NamedType(GetTasksPayload.class, GetTasksPayload.class.getSimpleName())); module.registerSubtypes( new NamedType(GetTaskVariablesPayload.class, GetTaskVaria...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-model-impl\src\main\java\org\activiti\api\task\conf\impl\TaskModelAutoConfiguration.java
2
请完成以下Java代码
public void setMacro (String Macro) { set_Value (COLUMNNAME_Macro, Macro); } /** Get Macro. @return Macro */ public String getMacro () { return (String)get_Value(COLUMNNAME_Macro); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set...
@param TokenType Wiki Token Type */ public void setTokenType (String TokenType) { set_Value (COLUMNNAME_TokenType, TokenType); } /** Get TokenType. @return Wiki Token Type */ public String getTokenType () { return (String)get_Value(COLUMNNAME_TokenType); } /** Set Sql WHERE. @param WhereCla...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WikiToken.java
1
请完成以下Java代码
public void run(String... args) { LOGGER.info("WITH JDBC TEMPLATE APPROACH..."); LOGGER.info("Student id 10001 -> {}", repository.findById(10001L)); LOGGER.info("Inserting -> {}", repository.insert(new Student(10010L, "John", "A1234657"))); LOGGER.info("Update 10003 -> {}", repositor...
LOGGER.info("WITH JDBC CLIENT APPROACH..."); LOGGER.info("Student id 10001 -> {}", jdbcClientRepository.findById(10001L)); LOGGER.info("Inserting -> {}", jdbcClientRepository.insert(new Student(10011L, "Ranga", "R1234657"))); LOGGER.info("Update 10011 -> {}", jdbcClientRepository.update(new S...
repos\spring-boot-examples-master\spring-boot-2-jdbc-with-h2\src\main\java\com\in28minutes\springboot\jdbc\h2\example\SpringBoot2JdbcWithH2Application.java
1
请完成以下Java代码
private void process( @NonNull final SecurPharmProduct product, @NonNull final Action action, @NonNull final InventoryId inventoryId) { if (action == Action.DECOMMISSION) { securPharmService.decommissionProductIfEligible(product, inventoryId); } else if (action == Action.UNDO_DECOMMISSION) { s...
private enum Action { DECOMMISSION, UNDO_DECOMMISSION } @Value @Builder private static class ProductsToProcess { @NonNull Action action; @NonNull InventoryId inventoryId; @NonNull @Singular ImmutableList<SecurPharmProduct> products; public boolean isEmpty() { return getProducts().isEmpt...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\process\M_Inventory_SecurpharmActionRetry.java
1
请完成以下Java代码
public File save(byte[] bytes,String name) throws IOException { File newFile = new File(FILE_PATH + File.separator + name); if(!newFile.exists()){ newFile.createNewFile(); } IOUtils.write(bytes,new FileOutputStream(newFile)); return img2txt(newFile); } privat...
int w = img.getWidth(), h = img.getHeight(); char[][] rst = new char[w][h]; for (int i = 0; i < w; i++) for (int j = 0; j < h; j++) { int rgb = img.getRGB(i, j); // 注意溢出 int r = Integer.valueOf(Integer.toBinaryString(rgb).substring(0, 8), 2); ...
repos\spring-boot-quick-master\quick-img2txt\src\main\java\com\quick\img2txt\Img2TxtService.java
1
请在Spring Boot框架中完成以下Java代码
public Deployment deploy(String url, String pngUrl) { Deployment deploy = createDeployment().addClasspathResource(url).addClasspathResource(pngUrl).deploy(); return deploy; } @Override public Deployment deploy(String name, String tenantId, String category, ZipInputStream zipInputStream) { ...
} @Override public ProcessDefinition queryByProcessDefinitionKey(String processDefinitionKey) { ProcessDefinition processDefinition = createProcessDefinitionQuery() .processDefinitionKey(processDefinitionKey) .active().singleResult(); return proce...
repos\spring-boot-quick-master\quick-flowable\src\main\java\com\quick\flowable\service\handler\ProcessHandler.java
2
请完成以下Java代码
public MessageEventSubscriptionEntity createMessageEventSubscription( CommandContext commandContext, DelegateExecution execution ) { String messageName = getMessageName(execution); Optional<String> correlationKey = getCorrelationKey(execution); correlationKey.ifPresent(key -...
.orElseThrow(() -> new ActivitiIllegalArgumentException("Expression '" + expression + "' is null")); } protected void assertNoExistingDuplicateEventSubscriptions( String messageName, String correlationKey, CommandContext commandContext ) { List<EventSubscriptionEntity> exist...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\factory\DefaultMessageExecutionContext.java
1
请完成以下Java代码
private void restoreHUsFromSnapshots(final I_M_Inventory inventory) { final String snapshotId = inventory.getSnapshot_UUID(); if (Check.isBlank(snapshotId)) { throw new HUException("@NotFound@ @Snapshot_UUID@ (" + inventory + ")"); } final InventoryId inventoryId = InventoryId.ofRepoId(inventory.getM_Inv...
.restoreFromSnapshot(); } private void reverseEmptiesMovements(final I_M_Inventory inventory) { final InventoryId inventoryId = InventoryId.ofRepoId(inventory.getM_Inventory_ID()); movementDAO.retrieveMovementsForInventoryQuery(inventoryId) .addEqualsFilter(I_M_Inventory.COLUMNNAME_DocStatus, X_M_Inventory...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\interceptor\M_Inventory.java
1
请完成以下Java代码
public ReturnT<String> callback(List<HandleCallbackParam> callbackParamList) { callbackThreadPool.execute(new Runnable() { @Override public void run() { for (HandleCallbackParam handleCallbackParam: callbackParamList) { ReturnT<String> callbackResult = callback(handleCallbackParam); logger.debug(...
} if (handleCallbackParam.getHandleMsg() != null) { handleMsg.append(handleCallbackParam.getHandleMsg()); } // success, save log log.setHandleTime(new Date()); log.setHandleCode(handleCallbackParam.getHandleCode()); log.setHandleMsg(handleMsg.toString()); XxlJobCompleter.updateHandleInfoAndFinish(log)...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\thread\JobCompleteHelper.java
1
请完成以下Java代码
public void enableModelValidatorSubsequentProcessing(final ModelValidator validator, final boolean processDirectly) { m_modelChangeSubsequent.put(validator, processDirectly); } public void disableModelValidatorSubsequentProcessing(final ModelValidator validator) { m_modelChangeSubsequent.remove(validator); } ...
return ModelValidationEngine::changeStateToBeInitialized; } private static synchronized void changeStateToSkipInitialization() { Check.assumeEquals(state, State.TO_BE_INITALIZED); state = State.SKIP_INITIALIZATION; } private static synchronized void changeStateToBeInitialized() { if (state == State.SKIP_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\ModelValidationEngine.java
1
请在Spring Boot框架中完成以下Java代码
public class ProcessApplicationStopService implements Service<ProcessApplicationStopService> { private final static Logger LOGGER = Logger.getLogger(ProcessApplicationStopService.class.getName()); // for view-exposing ProcessApplicationComponents protected InjectedValue<ComponentView> paComponentViewInjector =...
} BpmPlatformPlugins bpmPlatformPlugins = platformPluginsInjector.getValue(); List<BpmPlatformPlugin> plugins = bpmPlatformPlugins.getPlugins(); for (BpmPlatformPlugin bpmPlatformPlugin : plugins) { bpmPlatformPlugin.postProcessApplicationUndeploy(processApplication); } } catc...
repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\ProcessApplicationStopService.java
2
请完成以下Java代码
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setM_PricingSystem_ID (final int M_PricingSystem_ID...
@Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Contract_Change.java
1
请完成以下Java代码
public int getRetries() { return retries; } public Date getDueDate() { return dueDate; } public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public boolean isSuspended() { return suspended...
} public long getPriority() { return priority; } public String getTenantId() { return tenantId; } public Date getCreateTime() { return createTime; } public String getBatchId() { return batchId; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\JobDto.java
1
请完成以下Java代码
public void setPeriodType (String PeriodType) { set_ValueNoCheck (COLUMNNAME_PeriodType, PeriodType); } /** Get Period Type. @return Period Type */ public String getPeriodType () { return (String)get_Value(COLUMNNAME_PeriodType); } /** Set Process Now. @param Processing Process Now */ public vo...
return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Start Date. @param StartDate First effective day (inclusive) */ public void setStartDate (Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); } /** Get Start Date. @return First effective da...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Period.java
1
请完成以下Java代码
private TransportMod createTransportMod() { if (Check.isEmpty(exportFileFromEAN, true)) { return null; } return TransportMod.builder() .from(exportFileFromEAN) .replacementViaEAN(exportFileViaEAN) .build(); } private PayloadMod createPayloadMod( @NonNull final DunningToExport dunning, @...
gregorianCal.setTime(cal.getTime()); return DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCal); } catch (final DatatypeConfigurationException e) { throw new AdempiereException(e).appendParametersToMessage() .setParameter("cal", cal); } } private SoftwareMod createSoftwareMod(@Non...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\dunning\DunningExportClientImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void setActivityInstanceId(String activityInstanceId) { this.activityInstanceId = activityInstanceId; } public String getActivityName() { return activityName; } public void setActivityName(String activityName) { this.activityName = activityName; } public String ...
public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getTenantIdLike() { return tenantIdLike; } public void setTenantIdLike(String tenantIdLike) { this.tenantIdLike = tenantIdLike; } public Boolean getWithoutTenantId() { return w...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricActivityInstanceQueryRequest.java
2
请完成以下Java代码
public void setAD_UserGroup_User_Assign_ID (int AD_UserGroup_User_Assign_ID) { if (AD_UserGroup_User_Assign_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_UserGroup_User_Assign_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_UserGroup_User_Assign_ID, Integer.valueOf(AD_UserGroup_User_Assign_ID)); } /** Get Use...
} /** Set Gültig bis. @param ValidTo Gültig bis inklusiv (letzter Tag) */ @Override public void setValidTo (java.sql.Timestamp ValidTo) { set_Value (COLUMNNAME_ValidTo, ValidTo); } /** Get Gültig bis. @return Gültig bis inklusiv (letzter Tag) */ @Override public java.sql.Timestamp getValidTo ()...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserGroup_User_Assign.java
1
请完成以下Java代码
public StringAttributeBuilder defaultValue(String defaultValue) { return (StringAttributeBuilder) super.defaultValue(defaultValue); } @Override public StringAttributeBuilder required() { return (StringAttributeBuilder) super.required(); } @Override public StringAttributeBuilder idAttribute() { ...
AttributeReferenceCollectionBuilder<V> referenceBuilder = new AttributeReferenceCollectionBuilderImpl<V>(attribute, referenceTargetElement, attributeReferenceCollection); setAttributeReference(referenceBuilder); return referenceBuilder; } protected <V extends ModelElementInstance> void setAttributeReferenc...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\attribute\StringAttributeBuilderImpl.java
1
请完成以下Java代码
private void setIds(LegoSet legoSet) { if (legoSet.getId() == 0) { legoSet.setId(id.incrementAndGet()); } var manual = legoSet.getManual(); if (manual != null) { manual.setId((long) legoSet.getId()); } } @Override public JdbcCustomConversions jdbcCustomConversions() { return new JdbcCustomConv...
} } })); } @Bean public NamedParameterJdbcTemplate namedParameterJdbcTemplate(JdbcOperations operations) { return new NamedParameterJdbcTemplate(operations); } @Bean DataSourceInitializer initializer(DataSource dataSource) { var initializer = new DataSourceInitializer(); initializer.setDataSource(da...
repos\spring-data-examples-main\jdbc\basics\src\main\java\example\springdata\jdbc\basics\aggregate\AggregateConfiguration.java
1
请完成以下Java代码
public static void createPeriodControls(Properties ctx, int AD_Client_ID, JavaProcess sp, String trxName) { s_log.info("AD_Client_ID=" + AD_Client_ID); // Delete Duplicates String sql = "DELETE FROM C_PeriodControl pc1 " + "WHERE (C_Period_ID, DocBaseType) IN " + "(SELECT C_Period_ID, DocBaseType " +...
if (pc.save()) { counter++; s_log.debug(pc.toString()); } else s_log.warn("Not saved: " + pc); } rs.close(); pstmt.close(); pstmt = null; } catch (Exception e) { s_log.error(sql, e); } try { if (pstmt != null) pstmt.close(); pstmt = null; } catch (Exce...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\DocumentTypeVerify.java
1
请完成以下Java代码
public static <T> T uiAsk(final String title, final String message, final T[] options, final T defaultOption) { final Object messageObj; if (message != null && message.startsWith("<html>")) { final JTextPane tp = new JTextPane(); tp.setContentType("text/html"); tp.setText(message); tp.setEditable(fal...
} finally { // Make sure we are disposing the frame (note: it is not disposed by default) frame.dispose(); } if (responseIdx < 0) { // user closed the popup => defaultOption shall be returned return defaultOption; } final T response = options[responseIdx]; return response; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\applier\impl\SwingUIScriptsApplierListener.java
1
请在Spring Boot框架中完成以下Java代码
public class RefreshTokenAuthenticationProvider extends AbstractAuthenticationProvider { private final JwtTokenFactory tokenFactory; private final TokenOutdatingService tokenOutdatingService; public RefreshTokenAuthenticationProvider(JwtTokenFactory jwtTokenFactory, UserAuthDetailsCache userAuthDetailsCac...
securityUser = authenticateByPublicId(principal.getValue()); } securityUser.setSessionId(unsafeUser.getSessionId()); if (tokenOutdatingService.isOutdated(rawAccessToken.token(), securityUser.getId())) { throw new CredentialsExpiredException("Token is outdated"); } re...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\jwt\RefreshTokenAuthenticationProvider.java
2
请完成以下Java代码
public class NativeProcessInstanceQueryImpl extends AbstractNativeQuery<NativeProcessInstanceQuery, ProcessInstance> implements NativeProcessInstanceQuery { private static final long serialVersionUID = 1L; public NativeProcessInstanceQueryImpl(CommandContext commandContext) { super(commandCont...
CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults ) { return commandContext .getExecutionEntityManager() .findProcessInstanceByNativeQuery(parameterMap, firstResult, maxResults); } public long executeCoun...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\NativeProcessInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
TemperatureSensor temperatureSensor(TemperatureReadingRepository repository) { return new TemperatureSensor(repository); } @Bean RegionConfigurer temperatureReadingsConfigurer() { return new RegionConfigurer() { @Override public void configure(String beanName, PeerRegionFactoryBean<?, ?> regionBean) { ...
temperatureTimestampIndex.setExpression("temperature"); temperatureTimestampIndex.setFrom("/TemperatureReadings"); temperatureTimestampIndex.setName("TemperatureReadingTemperatureIdx"); return temperatureTimestampIndex; } @Bean @DependsOn("TemperatureReadings") IndexFactoryBean temperatureReadingTimestampIn...
repos\spring-boot-data-geode-main\spring-geode-samples\boot\actuator\src\main\java\example\app\temp\geode\server\BootGeodeServerApplication.java
2
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof User)) { return false; } User that = (User) obj; return this.getName().equals(that.getName()); } @Override public int hashCode() { int hashValue = 17; hashValue = 37 * hashValue + ObjectUtils.nullS...
.filter(role -> role.name().equalsIgnoreCase(String.valueOf(name).trim())) .findFirst() .orElse(null); } public boolean isClusterOperator() { return CLUSTER_OPERATOR.equals(this); } public boolean isDeveloper() { return DEVELOPER.equals(this); } @Override public String toString() { ret...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\support\User.java
1
请完成以下Java代码
public final class LockOwner { public static enum OwnerType { None, Any, RealOwner, }; private static final String OWNERNAME_Null = "NULL"; // use the string "NULL", because we don't want null to end up in a database. public static final LockOwner NONE = new LockOwner(OWNERNAME_Null, OwnerType.None); /** ...
* @param ownerName the name of the new owner. Other than with the <code>newOwner(...)</code> methods, nothing will be added to it. * @return */ public static final LockOwner forOwnerName(final String ownerName) { Check.assumeNotEmpty(ownerName, "ownerName not empty"); return new LockOwner(ownerName, OwnerType...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\LockOwner.java
1
请在Spring Boot框架中完成以下Java代码
public class StructDepartment { @Id @GeneratedValue private Integer id; @Column private String departmentName; @Embedded @Column private StructManager manager; @Override public String toString() { return "Department{" + "id=" + id + ", d...
} public Integer getId() { return id; } public String getDepartmentName() { return departmentName; } public void setDepartmentName(String departmentName) { this.departmentName = departmentName; } public StructManager getManager() { return manager; } ...
repos\tutorials-master\persistence-modules\hibernate-jpa-2\src\main\java\com\baeldung\hibernate\struct\entities\StructDepartment.java
2
请完成以下Java代码
public String toString() { return combine(qualifier, localName); } public static String combine(String qualifier, String localName) { if (qualifier == null || qualifier.isEmpty()) { return localName; } else { return qualifier + ":" + localName; } } @Override public int hashCo...
if (localName == null) { if (other.localName != null) { return false; } } else if (!localName.equals(other.localName)) { return false; } if (qualifier == null) { if (other.qualifier != null) { return false; } } else if (!qualifier.equals(other.qualifier)) { ...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\QName.java
1
请完成以下Java代码
public void setImpex_ConnectorParam_ID (int Impex_ConnectorParam_ID) { if (Impex_ConnectorParam_ID < 1) set_ValueNoCheck (COLUMNNAME_Impex_ConnectorParam_ID, null); else set_ValueNoCheck (COLUMNNAME_Impex_ConnectorParam_ID, Integer.valueOf(Impex_ConnectorParam_ID)); } /** Get Konnektor-Parameter. @ret...
@param ParamValue Parameterwert */ public void setParamValue (String ParamValue) { set_Value (COLUMNNAME_ParamValue, ParamValue); } /** Get Parameterwert. @return Parameterwert */ public String getParamValue () { return (String)get_Value(COLUMNNAME_ParamValue); } /** Set Reihenfolge. @param SeqNo...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_Impex_ConnectorParam.java
1
请完成以下Java代码
public Set<ProductId> getProductIds() { return productPricesByProductId.keySet(); } public Money getProductPrice(@NonNull final ProductId productId) { final ProductPrice productPrice = productPricesByProductId.get(productId); if (productPrice == null) { throw new AdempiereException("No product price fou...
@JsonProperty("price") Money price; @Builder @JsonCreator private ProductPrice( @JsonProperty("productId") @NonNull final ProductId productId, @JsonProperty("price") @NonNull final Money price) { this.productId = productId; this.price = price; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\InvoiceChangedEvent.java
1
请完成以下Java代码
public String getId() { return id; } @Override public void setId(String id) { this.id = id; } @Override public int getRevisionNext() { return revision + 1; } @Override public int getRevision() { return revision; } @Override public void ...
} @Override public boolean isUpdated() { return isUpdated; } @Override public void setUpdated(boolean isUpdated) { this.isUpdated = isUpdated; } @Override public boolean isDeleted() { return isDeleted; } @Override public void setDeleted(boolean isD...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\persistence\entity\AbstractEntity.java
1