instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
class PropertiesFileLoader { @NonNull private final DirectoryChecker directoryChecker; public Properties loadFromFile(@NonNull final String dir, @NonNull final String filename) { return loadFromFile(new File(dir), filename); } public Properties loadFromFile(@NonNull final File dir, @NonNull final String filen...
{ fileProperties.load(in); } catch (final IOException e) { throw new CantLoadPropertiesException("Cannot load " + settingsFile, e); } return fileProperties; } public static final class CantLoadPropertiesException extends RuntimeException { private static final long serialVersionUID = 424025051734...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\PropertiesFileLoader.java
1
请完成以下Java代码
public final String toString () { StringBuffer retVal = new StringBuffer (); if (codeset != null) { for (int i = 0; i < prolog.size (); i++) { ConcreteElement e = (ConcreteElement)prolog.elementAt (i); retVal.append (e.toString (getCodeset ()) + "\n"); } if (content != null) retVal.append...
for (int i = 0; i < prolog.size (); i++) { ConcreteElement e = (ConcreteElement)prolog.elementAt (i); retVal.append (e.toString (getCodeset ()) + "\n"); } if (content != null) retVal.append (content.toString (getCodeset ()) + "\n"); /** * FIXME: The other part of the version hack! Add the vers...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xml\XMLDocument.java
1
请完成以下Java代码
private String toBOMLineString(final I_PP_Product_BOMLine bomLine) { if (!bomLine.isActive()) { return null; } final I_M_Product product = productsRepo.getById(bomLine.getM_Product_ID()); final String qtyStr = toBOMLineQtyAndUOMString(bomLine); return (product.getName() + " " + qtyStr).trim(); } pr...
else { final StringBuilder qtyStr = new StringBuilder(); qtyStr.append(NumberUtils.stripTrailingDecimalZeros(bomLine.getQtyBOM())); final int uomId = bomLine.getC_UOM_ID(); if (uomId > 0) { final I_C_UOM uom = uomsRepo.getById(uomId); qtyStr.append(" ").append(uom.getUOMSymbol()); } ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\impl\ProductBOMDescriptionBuilder.java
1
请完成以下Java代码
protected String doIt() { final IPPOrderReceiptHUProducer producer = newReceiptCandidatesProducer() .bestBeforeDate(computeBestBeforeDate()); if (isReceiveIndividualCUs) { producer.withPPOrderLocatorId() .receiveIndividualPlanningCUs(getIndividualCUsCount()); } else { producer.packUsingLUTU...
private IPPOrderReceiptHUProducer newReceiptCandidatesProducer() { final PPOrderLineRow row = getSingleSelectedRow(); final PPOrderLineType type = row.getType(); if (type == PPOrderLineType.MainProduct) { final PPOrderId ppOrderId = row.getOrderId(); return huPPOrderBL.receivingMainProduct(ppOrderId); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_Receipt.java
1
请完成以下Java代码
protected WorkManager lookupWorkMananger() { try { InitialContext initialContext = new InitialContext(); return (WorkManager) initialContext.lookup(commonJWorkManagerName); } catch (Exception e) { throw new RuntimeException("Error while starting JobExecutor: could not look up CommonJ WorkManag...
// of the calling thread (application), so the jndi lookup is working -> see JCA 1.6 specification if(workManager == null) { workManager = lookupWorkMananger(); } try { workManager.schedule(new CommonjDeamonWorkRunnableAdapter(acquisitionRunnable)); return true; } catch (...
repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\commonj\CommonJWorkManagerExecutorService.java
1
请完成以下Java代码
public Iterator<GolfTournament.Pairing> iterator() { return Collections.unmodifiableList(this.pairings).iterator(); } public GolfTournament play() { Assert.state(this.golfCourse != null, "No golf course was declared"); Assert.state(!this.players.isEmpty(), "Golfers must register to play before the golf tourna...
private final Golfer playerTwo; public synchronized void setHole(int hole) { this.playerOne.setHole(hole); this.playerTwo.setHole(hole); } public synchronized int getHole() { return getPlayerOne().getHole(); } public boolean in(@NonNull Golfer golfer) { return this.playerOne.equals(golfer) || t...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\model\GolfTournament.java
1
请完成以下Java代码
public int getEXP_ReplicationTrxLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_EXP_ReplicationTrxLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Datensatz-ID. @param Record_ID Direct internal record ID */ @Override public void setRecord_ID (int Record_ID) { if (R...
public static final String REPLICATIONTRXSTATUS_Vollstaendig = "Completed"; /** Nicht vollständig importiert = ImportedWithIssues */ public static final String REPLICATIONTRXSTATUS_NichtVollstaendigImportiert = "ImportedWithIssues"; /** Fehler = Failed */ public static final String REPLICATIONTRXSTATUS_Fehler = "Fa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\process\rpl\model\X_EXP_ReplicationTrxLine.java
1
请在Spring Boot框架中完成以下Java代码
public Date getLastUpdateTime() { return lastUpdateTime; } public void setLastUpdateTime(Date lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } @ApiModelProperty(example = "http://localhost:8182/repository/deployments/2") public String getDeploymentUrl() { return de...
this.tenantId = tenantId; } public String getSourceUrl() { return sourceUrl; } public void setSourceUrl(String sourceUrl) { this.sourceUrl = sourceUrl; } public String getSourceExtraUrl() { return sourceExtraUrl; } public void setSourceExtraUrl(String sourceEx...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ModelResponse.java
2
请完成以下Java代码
public class HUAttributePropagatorFactory implements IHUAttributePropagatorFactory { private final Map<String, IHUAttributePropagator> propagators = new ConcurrentHashMap<String, IHUAttributePropagator>(); public HUAttributePropagatorFactory() { // Register defaults registerPropagator(new TopDownHUAttributeProp...
final IHUAttributePropagator propagator = propagators.get(propagationType); if (propagator == null) { throw new IllegalStateException("No propagator was found for type: " + propagationType); } return propagator; } @Override public IHUAttributePropagator getReversalPropagator(final String propagationType...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\propagation\impl\HUAttributePropagatorFactory.java
1
请完成以下Java代码
public int getIncrementNo () { Integer ii = (Integer)get_Value(COLUMNNAME_IncrementNo); if (ii == null) return 0; return ii.intValue(); } /** Set Serial No Control. @param M_SerNoCtl_ID Product Serial Number Control */ public void setM_SerNoCtl_ID (int M_SerNoCtl_ID) { if (M_SerNoCtl_ID < 1) ...
} /** Get Prefix. @return Prefix before the sequence number */ public String getPrefix () { return (String)get_Value(COLUMNNAME_Prefix); } /** Set Start No. @param StartNo Starting number/position */ public void setStartNo (int StartNo) { set_Value (COLUMNNAME_StartNo, Integer.valueOf(StartNo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_SerNoCtl.java
1
请在Spring Boot框架中完成以下Java代码
public void setMaxConcurrentRequests(@Nullable Integer maxConcurrentRequests) { this.maxConcurrentRequests = maxConcurrentRequests; } public @Nullable Integer getMaxRequestsPerSecond() { return this.maxRequestsPerSecond; } public void setMaxRequestsPerSecond(@Nullable Integer maxRequestsPerSecond) { ...
*/ CONCURRENCY_LIMITING("ConcurrencyLimitingRequestThrottler"), /** * Limits the request rate per second. */ RATE_LIMITING("RateLimitingRequestThrottler"), /** * No request throttling. */ NONE("PassThroughRequestThrottler"); private final String type; ThrottlerType(String type) { this.t...
repos\spring-boot-4.0.1\module\spring-boot-cassandra\src\main\java\org\springframework\boot\cassandra\autoconfigure\CassandraProperties.java
2
请完成以下Java代码
protected List<FormDefinition> getFormDefinitionsFromModel(Case caseModel, CaseDefinition caseDefinition) { Set<String> formKeys = new HashSet<>(); List<FormDefinition> formDefinitions = new ArrayList<>(); // for all user tasks List<HumanTask> humanTasks = caseModel.getPlanModel().findP...
CmmnDeployment deployment = CommandContextUtil.getCmmnDeploymentEntityManager().findById(caseDefinition.getDeploymentId()); if (deployment.getParentDeploymentId() != null) { List<FormDeployment> formDeployments = formRepositoryService.createDeploymentQuery().parentDeploymentId(deployment.getParentDe...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\GetFormDefinitionsForCaseDefinitionCmd.java
1
请完成以下Java代码
protected boolean isConcurrentStart(ActivityStartBehavior startBehavior) { return startBehavior == ActivityStartBehavior.DEFAULT || startBehavior == ActivityStartBehavior.CONCURRENT_IN_FLOW_SCOPE; } protected void instantiate(ExecutionEntity ancestorScopeExecution, List<PvmActivity> parentFlowScopes, C...
variablesLocal, skipCustomListeners, skipIoMappings); } else { throw new ProcessEngineException("Cannot instantiate element " + targetElement); } } protected abstract ScopeImpl getTargetFlowScope(ProcessDefinitionImpl processDefinition); protected abstract CoreModelElement getTargetElement(Pr...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AbstractInstantiationCmd.java
1
请完成以下Java代码
protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new StringBuffer ("X_M_PromotionGroupLine[") .append(get_ID()).append("]"); return sb.toString(); } p...
/** Get Promotion Group. @return Promotion Group */ public int getM_PromotionGroup_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_PromotionGroup_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Promotion Group Line. @param M_PromotionGroupLine_ID Promotion Group Line */ publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionGroupLine.java
1
请完成以下Java代码
private static SessionFactory createSessionFactory() { Map<String, Object> settings = new HashMap<>(); settings.put(URL, System.getenv("DB_URL")); settings.put(DIALECT, "org.hibernate.dialect.PostgreSQLDialect"); settings.put(DEFAULT_SCHEMA, "shipping"); settings.put(DRIVER, "org...
return new MetadataSources(registry) .addAnnotatedClass(Consignment.class) .addAnnotatedClass(Item.class) .addAnnotatedClass(Checkin.class) .buildMetadata() .buildSessionFactory(); } private void flushConnectionPool() { ConnectionProvider connectionProv...
repos\tutorials-master\aws-modules\aws-lambda-modules\shipping-tracker-lambda\ShippingFunction\src\main\java\com\baeldung\lambda\shipping\App.java
1
请完成以下Java代码
public void initialize(final ModelValidationEngine engine, final MClient client) { if (client != null) { m_AD_Client_ID = client.getAD_Client_ID(); } final String tableName = getTableName(); if (isDocument()) { engine.addDocValidate(tableName, this); } else { engine.addModelChange(tableNam...
{ voidDocOutbound(po); } return null; } /** * @return true if the given PO was just processed */ private boolean isJustProcessed(final PO po, final int changeType) { if (!po.isActive()) { return false; } final boolean isNew = changeType == ModelValidator.TYPE_BEFORE_NEW || changeType == Mod...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\interceptor\DocOutboundProducerValidator.java
1
请完成以下Java代码
public class MEntityType extends X_AD_EntityType { /** * */ private static final long serialVersionUID = -2183955192373166750L; public MEntityType(final Properties ctx, final int AD_EntityType_ID, final String trxName) { super(ctx, AD_EntityType_ID, trxName); } public MEntityType(final Properties ctx, fin...
} CacheMgt.get().reset(I_AD_EntityType.Table_Name); return true; } @Override protected boolean beforeDelete() { if (EntityTypesCache.instance.isSystemMaintained(getEntityType())) // all pre-defined { throw new AdempiereException("You cannot delete a System maintained entity"); } return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MEntityType.java
1
请完成以下Java代码
public Integer getStatus() { return status.value(); } @Schema(description = "Error message", example = "Authentication failed", accessMode = Schema.AccessMode.READ_ONLY) public String getMessage() { return message; } @Schema(description = "Platform error code:" + "\n* `...
"\n\n* `31` - Bad request params (HTTP: 400 - Bad Request)" + "\n\n* `32` - Item not found (HTTP: 404 - Not Found)" + "\n\n* `33` - Too many requests (HTTP: 429 - Too Many Requests)" + "\n\n* `34` - Too many updates (Too many updates over Websocket session)" + "\n\n* `40`...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\exception\ThingsboardErrorResponse.java
1
请完成以下Java代码
public void setEntityType (final java.lang.String EntityType) { set_Value (COLUMNNAME_EntityType, EntityType); } @Override public java.lang.String getEntityType() { return get_ValueAsString(COLUMNNAME_EntityType); } @Override public void setIsSubcontracting (final boolean IsSubcontracting) { set_Value...
public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_WF_Node_Product.java
1
请完成以下Java代码
public static SealedObject encryptObject(String algorithm, Serializable object, SecretKey key, GCMParameterSpec iv) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IOException, IllegalBlockSizeException { Cipher cipher = Cipher.ge...
InvalidKeyException, BadPaddingException, IllegalBlockSizeException { Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, key, iv); return Base64.getEncoder() .encodeToString(cipher.doFinal(plainText.getBytes())); } public static String ...
repos\tutorials-master\core-java-modules\core-java-security-algorithms\src\main\java\com\baeldung\aes\AESUtil.java
1
请完成以下Java代码
public List<I_M_ReceiptSchedule_Alloc> getReceiptScheduleAllocs() { return receiptScheduleAllocsRO; } private final void updateIfStale() { if (!_stale) { return; } final HUReceiptLinePartAttributes attributes = getAttributes(); // // Qty & Quality final Percent qualityDiscountPercent = Percent...
// package level access for testing purposes HUReceiptLinePartAttributes getAttributes() { return _attributes; } /** * @return qty & quality; never returns null */ public final ReceiptQty getQtyAndQuality() { updateIfStale(); return _qtyAndQuality; } public int getSubProducer_BPartner_ID() { upda...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inoutcandidate\spi\impl\HUReceiptLinePartCandidate.java
1
请完成以下Java代码
public static Service with(String name) { return new Service(name); } private final String name; /** * Constructs a new {@link Service} initialized with a {@link String name}. * * @param name {@link String} containing the name of the {@link Service}. * @throws IllegalArgumentException if the {@link Strin...
} /** * Returns the {@link String name} of this {@link Service}. * * @return this {@link Service Service's} {@link String name}. */ public String getName() { return this.name; } @Override public String toString() { return getName(); } }
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\support\Service.java
1
请完成以下Java代码
public ActivityInstanceQueryImpl orderByActivityType() { orderBy(ActivityInstanceQueryProperty.ACTIVITY_TYPE); return this; } @Override public ActivityInstanceQueryImpl orderByTenantId() { orderBy(ActivityInstanceQueryProperty.TENANT_ID); return this; } @Override ...
public String getAssignee() { return assignee; } public String getCompletedBy() { return completedBy; } public boolean isFinished() { return finished; } public boolean isUnfinished() { return unfinished; } public String getActivityInstanceId() { ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ActivityInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getReplacement() { return this.replacement; } public void setReplacement(String replacement) { this.replacement = replacement; } public String getSince() { return this.since; } public void setSince(String since) { this.since = since; } public String getLevel() { return this.level; }...
@Override public int hashCode() { int result = nullSafeHashCode(this.reason); result = 31 * result + nullSafeHashCode(this.replacement); result = 31 * result + nullSafeHashCode(this.level); result = 31 * result + nullSafeHashCode(this.since); return result; } @Override public String toString() { return...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ItemDeprecation.java
2
请完成以下Java代码
public class InvalidConfigurationPropertyValueException extends RuntimeException { private final String name; private final @Nullable Object value; private final @Nullable String reason; /** * Creates a new instance for the specified property {@code name} and {@code value}, * including a {@code reason} why ...
/** * Return the invalid value, can be {@code null}. * @return the invalid value */ public @Nullable Object getValue() { return this.value; } /** * Return the reason why the value is invalid. * @return the reason */ public @Nullable String getReason() { return this.reason; } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\InvalidConfigurationPropertyValueException.java
1
请完成以下Java代码
public class X_AD_Printer_Tray extends org.compiere.model.PO implements I_AD_Printer_Tray, org.compiere.model.I_Persistent { private static final long serialVersionUID = -593882204L; /** Standard Constructor */ public X_AD_Printer_Tray (Properties ctx, int AD_Printer_Tray_ID, String trxName) { sup...
@Override public int getAD_Printer_Tray_ID() { return get_ValueAsInt(COLUMNNAME_AD_Printer_Tray_ID); } @Override public void setDescription (java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return (java.lang.Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_Printer_Tray.java
1
请完成以下Java代码
public final void create(final T entity) { Preconditions.checkNotNull(entity); // getCurrentSession().persist(entity); getCurrentSession().saveOrUpdate(entity); } @Override public final T update(final T entity) { Preconditions.checkNotNull(entity); return (T) getCurr...
getCurrentSession().delete(entity); } @Override public final void deleteById(final long entityId) { final T entity = findOne(entityId); Preconditions.checkState(entity != null); delete(entity); } protected final Session getCurrentSession() { return sessionFactory.ge...
repos\tutorials-master\spring-exceptions\src\main\java\com\baeldung\persistence\common\AbstractHibernateDao.java
1
请在Spring Boot框架中完成以下Java代码
public class RequestParticipant { /** two-letter ISO-3166 */ String country; String zip; @JsonFormat(shape = Shape.STRING, pattern = TIME_FORMAT) LocalTime timeFrom; @JsonFormat(shape = Shape.STRING, pattern = TIME_FORMAT) LocalTime timeTo; String desiredStation; @Builder
@JsonCreator public RequestParticipant( @JsonProperty("country") final String country, @JsonProperty("zip") final String zip, @JsonProperty("timeFrom") final LocalTime timeFrom, @JsonProperty("timeTo") final LocalTime timeTo, @JsonProperty("desiredStation") final String desiredStation) { this.country...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\restapi\models\RequestParticipant.java
2
请完成以下Java代码
public void onFailure(@NonNull Throwable t) { ctx.tellFailure(msg, t); } }; Futures.addCallback(future, futureCallback, ctx.getDbCallbackExecutor()); } else { List<ListenableFuture<Void>> futures = new ArrayList<>();...
@Override public void onFailure(Throwable t) { ctx.tellFailure(msg, t); } }, ctx.getDbCallbackExecutor()); } } } catch (Exception e) { log.error("Failed to build edge event", e...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\edge\TbMsgPushToEdgeNode.java
1
请在Spring Boot框架中完成以下Java代码
public final void persistState(CalculatedFieldEntityCtxId stateId, CalculatedFieldState state, TbCallback callback) { if (state.isSizeExceedsLimit()) { throw new CalculatedFieldStateException("State size exceeds the maximum allowed limit. The state will not be persisted to RocksDB."); } ...
} @Override public void onPartitionRestored(TopicPartitionInfo partition) { partition = partition.withTopic(DataConstants.CF_STATES_QUEUE_NAME); actorSystemContext.tellWithHighPriority(new CalculatedFieldStatePartitionRestoreMsg(partition)); } ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\cf\AbstractCalculatedFieldStateService.java
2
请完成以下Java代码
public void setRolePrefix(String rolePrefix) { this.rolePrefix = rolePrefix; } @Override public boolean supports(ConfigAttribute attribute) { return (attribute.getAttribute() != null) && attribute.getAttribute().startsWith(getRolePrefix()); } /** * This implementation supports any type of class, because it...
if (this.supports(attribute)) { result = ACCESS_DENIED; // Attempt to find a matching granted authority for (GrantedAuthority authority : authorities) { if (attribute.getAttribute().equals(authority.getAuthority())) { return ACCESS_GRANTED; } } } } return result; } Collection<?...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\RoleVoter.java
1
请完成以下Java代码
public static Document columnToJson(List<CanalEntry.Column> columns) { Document obj = new Document(); for (CanalEntry.Column column : columns) { Object value = dataTypeConvert(column.getMysqlType(), column.getValue()); obj.put(column.getName(), value); } return ob...
int length = Integer.parseInt(mysqlType.substring(lenCenter + 1, lenEnd)); if (length == 0) { return StringUtils.isBlank(value) ? null : Long.parseLong(value); } } return StringUtils.isBlank(value) ? null : Double.parseDoubl...
repos\spring-boot-leaning-master\2.x_data\3-3 使用 canal 将业务数据从 Mysql 同步到 MongoDB\spring-boot-canal-mongodb\src\main\java\com\neo\util\DBConvertUtil.java
1
请完成以下Java代码
public Timestamp getNextInspectionDate() { return nextInspectionDate; } public int getDLM_Partition_ID() { return DLM_Partition_ID; } public boolean isAborted() { return aborted; } @Override public String toString() { return "Partition [DLM_Partition_ID=" + DLM_Partition_ID + ", records.size()=" +...
public ITableRecordReference getTableRecordReference() { return tableRecordReference; } public int getDLM_Partition_Workqueue_ID() { return dlmPartitionWorkqueueId; } public void setDLM_Partition_Workqueue_ID(final int dlm_Partition_Workqueue_ID) { dlmPartitionWorkqueueId = dlm_Partition_Workq...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\Partition.java
1
请完成以下Java代码
public FactLineBuilder description(@Nullable final String description) { assertNotBuild(); this.description = StringUtils.trimBlankToOptional(description); return this; } public FactLineBuilder additionalDescription(@Nullable final String additionalDescription) { assertNotBuild(); this.additionalDescript...
this.productId = Optional.ofNullable(productId); return this; } public FactLineBuilder userElementString1(@Nullable final String userElementString1) { assertNotBuild(); this.userElementString1 = StringUtils.trimBlankToOptional(userElementString1); return this; } public FactLineBuilder salesOrderId(@Nulla...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\FactLineBuilder.java
1
请完成以下Java代码
public TokenQuery orderByTokenId() { return orderBy(TokenQueryProperty.TOKEN_ID); } @Override public TokenQuery orderByTokenDate() { return orderBy(TokenQueryProperty.TOKEN_DATE); } // results ////////////////////////////////////////////////////////// @Override public long...
public String getIpAddress() { return ipAddress; } public String getIpAddressLike() { return ipAddressLike; } public String getUserAgent() { return userAgent; } public String getUserAgentLike() { return userAgentLike; } public String getUserId() { ...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\TokenQueryImpl.java
1
请完成以下Java代码
public List<Job> executeList(CommandContext commandContext, Page page) { checkQueryOk(); return commandContext.getDeadLetterJobEntityManager().findJobsByQueryCriteria(this, page); } // getters ////////////////////////////////////////// public String getProcessInstanceId() { return ...
public String getId() { return id; } public String getProcessDefinitionId() { return processDefinitionId; } public boolean isOnlyTimers() { return onlyTimers; } public boolean isOnlyMessages() { return onlyMessages; } public Date getDuedateHigherThan()...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\DeadLetterJobQueryImpl.java
1
请完成以下Java代码
public class Polynom { private double a; private double b; private double c; public Polynom(double a, double b, double c) { if (a == 0) { throw new IllegalArgumentException("a can not be equal to 0"); } this.a = a; this.b = b; this.c = c; } ...
return a; } public double getB() { return b; } public double getC() { return c; } public double getDiscriminant() { return b * b - 4 * a * c; } }
repos\tutorials-master\core-java-modules\core-java-lang-math-3\src\main\java\com\baeldung\math\quadraticequationroot\Polynom.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult updateBrand(@PathVariable("id") Long id, @Validated @RequestBody PmsBrandDto pmsBrandDto) { CommonResult commonResult; int count = demoService.updateBrand(id, pmsBrandDto); if (count == 1) { commonResult = CommonResult.success(pmsBrandDto); LOGGER.debu...
} else { LOGGER.debug("deleteBrand failed :id={}", id); return CommonResult.failed("操作失败"); } } @ApiOperation(value = "分页获取品牌列表") @RequestMapping(value = "/brand/list", method = RequestMethod.GET) @ResponseBody public CommonResult<CommonPage<PmsBrand>> listBrand(@Req...
repos\mall-master\mall-demo\src\main\java\com\macro\mall\demo\controller\DemoController.java
2
请完成以下Java代码
public class RecieverMDB implements MessageListener { @Resource private ConnectionFactory connectionFactory; @Resource(name = "ackQueue") private Queue ackQueue; public void onMessage(Message message) { try { TextMessage textMessage = (TextMessage) message; String...
Connection connection = null; Session session = null; try { connection = connectionFactory.createConnection(); connection.start(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer ackSender = session.createProducer(ac...
repos\tutorials-master\spring-ejb-modules\ejb-beans\src\main\java\com\baeldung\ejbspringcomparison\ejb\messagedriven\RecieverMDB.java
1
请完成以下Java代码
public LoginDto pass(String pass) { this.pass = pass; return this; } /** * Get pass * @return pass */ @Schema(name = "pass", required = true) public String getPass() { return pass; } public void setPass(String pass) { this.pass = pass; } ...
sb.append(" user: ") .append(toIndentedString(user)) .append("\n"); sb.append(" pass: ") .append(toIndentedString(pass)) .append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each l...
repos\tutorials-master\spring-boot-modules\spring-boot-springdoc-2\src\main\java\com\baeldung\defaultglobalsecurityscheme\dto\LoginDto.java
1
请在Spring Boot框架中完成以下Java代码
public List<BusinessEntityType> getAdditionalBusinessPartner() { if (additionalBusinessPartner == null) { additionalBusinessPartner = new ArrayList<BusinessEntityType>(); } return this.additionalBusinessPartner; } /** * Arbitrary free text, which is sent with the foreca...
* allowed object is * {@link Duration } * */ public void setMaterialAuthorizationDuration(Duration value) { this.materialAuthorizationDuration = value; } /** * Additional duration information for ProductionAuthorization (.../ForecastListLineItem/AdditionalForecastIn...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ForecastListLineItemExtensionType.java
2
请完成以下Java代码
public class DeptDto extends BaseDTO implements Serializable { @ApiModelProperty(value = "ID") private Long id; @ApiModelProperty(value = "名称") private String name; @ApiModelProperty(value = "是否启用") private Boolean enabled; @ApiModelProperty(value = "排序") private Integer deptSort; ...
} @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeptDto deptDto = (DeptDto) o; return Objects.equals(id, deptDto.id) && Objects.eq...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\dto\DeptDto.java
1
请完成以下Java代码
public static Optional<EMailAddress> optionalOfNullable(@Nullable final String emailStr) { return Optional.ofNullable(ofNullableString(emailStr)); } @JsonCreator public static EMailAddress ofString(@NonNull final String emailStr) { return new EMailAddress(emailStr); } public static List<EMailAddress> ofSem...
return TranslatableStrings.constant(ex.getLocalizedMessage()); } } private static final Logger logger = LogManager.getLogger(EMailAddress.class); private final String emailStr; private EMailAddress(@NonNull final String emailStr) { this.emailStr = emailStr.trim(); if (this.emailStr.isEmpty()) { throw...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\EMailAddress.java
1
请完成以下Java代码
public void onParameterChanged(final String parameterName) { if (I_M_Shipper.COLUMNNAME_M_Shipper_ID.equals(parameterName)) { shipperTransportationId = getNextTransportationOrderId(); } } private int getNextTransportationOrderId() { final ShipperId shipperId = ShipperId.ofRepoId(shipperRecordId); fina...
.filter(PickingCandidate::isPacked) .map(PickingCandidate::getPackedToHuId) .collect(ImmutableSet.toImmutableSet()); final List<I_M_HU> husToDeliver = handlingUnitsRepo.getByIds(huIdsToDeliver); HUShippingFacade.builder() .hus(husToDeliver) .addToShipperTransportationId(shipperTransportationId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_4EyesReview_ProcessAll.java
1
请完成以下Java代码
public final void setService(final String service) { this.service = service; } public final String getArtifactParameter() { return this.artifactParameter; } /** * Configures the Request Parameter to look for when attempting to see if a CAS ticket * was sent from the server. * @param artifactParameter th...
} public final void setServiceParameter(final String serviceParameter) { this.serviceParameter = serviceParameter; } public final boolean isAuthenticateAllArtifacts() { return this.authenticateAllArtifacts; } /** * If true, then any non-null artifact (ticket) should be authenticated. Additionally, * the...
repos\spring-security-main\cas\src\main\java\org\springframework\security\cas\ServiceProperties.java
1
请在Spring Boot框架中完成以下Java代码
public static String mkOwnOrderNumber(final String documentNo) { final String sevenDigitString = documentNo.length() <= 7 ? documentNo : documentNo.substring(documentNo.length() - 7); return "006" + lpadZero(sevenDigitString, 7); } /** * Remove trailing zeros after decimal separator * * @return <code>bd</...
// http://stackoverflow.com/questions/5239137/clarification-on-behavior-of-bigdecimal-striptrailingzeroes if (result.signum() == 0) { result = BigDecimal.ZERO; } // // If after removing our scale is negative, we can safely set the scale to ZERO because we don't want to get rid of zeros before decimal poin...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\commons\Util.java
2
请完成以下Java代码
public SetJobRetriesByProcessAsyncBuilder processInstanceIds(List<String> processInstanceIds) { this.processInstanceIds = processInstanceIds; return this; } @Override public SetJobRetriesByProcessAsyncBuilder processInstanceQuery(ProcessInstanceQuery query) { this.processInstanceQuery = query; re...
validateParameters(); return commandExecutor.execute(new SetJobsRetriesByProcessBatchCmd(processInstanceIds, processInstanceQuery, historicProcessInstanceQuery, retries, dueDate, isDueDateSet)); } protected void validateParameters() { ensureNotNull("commandExecutor", commandExecutor); ensureNot...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\management\SetJobRetriesByProcessAsyncBuilderImpl.java
1
请完成以下Java代码
void mutate() { // tag::mutate[] String url = "wss://spring.io/graphql"; WebSocketClient client = new ReactorNettyWebSocketClient(); WebSocketGraphQlClient graphQlClient = WebSocketGraphQlClient.builder(url, client) .headers((headers) -> headers.setBasicAuth("joe", "...")) .build(); // Use graphQlCl...
// end::mutate[] } void keepAlive() { // tag::keepAlive[] String url = "wss://spring.io/graphql"; WebSocketClient client = new ReactorNettyWebSocketClient(); WebSocketGraphQlClient graphQlClient = WebSocketGraphQlClient.builder(url, client) .keepAlive(Duration.ofSeconds(30)) .build(); // end::keep...
repos\spring-graphql-main\spring-graphql-docs\src\main\java\org\springframework\graphql\docs\client\websocketgraphqlclient\WebSocketClientUsage.java
1
请完成以下Java代码
public Integer getFinishOvertime() { return finishOvertime; } public void setFinishOvertime(Integer finishOvertime) { this.finishOvertime = finishOvertime; } public Integer getCommentOvertime() { return commentOvertime; } public void setCommentOvertime(Integer commentO...
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", flashOrderOvertime=").append(flashOrderOvertime); sb.app...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderSetting.java
1
请完成以下Java代码
public void invalidateAll() { } private void changeRow(final DocumentId rowId, final UnaryOperator<PricingConditionsRow> mapper) { if (!rowIds.contains(rowId)) { throw new EntityNotFoundException(rowId.toJson()); } rowsById.compute(rowId, (key, oldRow) -> { if (oldRow == null) { throw new Ent...
{ throw new AdempiereException("No editable row found"); } return editableRowId; } public PricingConditionsRow getEditableRow() { return getById(getEditableRowId()); } public DocumentFilterList getFilters() { return filters; } public PricingConditionsRowData filter(@NonNull final DocumentFilterLis...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowData.java
1
请完成以下Java代码
public boolean isIncludeExtensionProperties() { return includeExtensionProperties; } public void setIncludeExtensionProperties(boolean includeExtensionProperties) { this.includeExtensionProperties = includeExtensionProperties; } public int hashCode() { final int prime = 31; int result = 1; ...
} if (getClass() != obj.getClass()) { return false; } TopicSubscriptionImpl other = (TopicSubscriptionImpl) obj; if (topicName == null) { if (other.topicName != null) return false; } else if (!topicName.equals(other.topicName)) { return false; } return true; } }
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\topic\impl\TopicSubscriptionImpl.java
1
请完成以下Java代码
public int compare(IAllocableDocRow row1, IAllocableDocRow row2) { return ComparisonChain.start() .compare(row1.getDocumentDate(), row2.getDocumentDate()) .compare(row1.getDocumentNo(), row2.getDocumentNo()) .result(); } }; //@formatter:off String PROPERTY_Selected = "Selected"; boolean isSel...
* <li>false if automatic calculations are allowed on this row * </ul> */ void setTaboo(boolean taboo); /** @return document's date */ Date getDocumentDate(); // task 09643: separate the accounting date from the transaction date Date getDateAcct(); int getC_BPartner_ID(); /** @retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\IAllocableDocRow.java
1
请完成以下Java代码
public class Book { private String isbn; private String title; public Book(String isbn, String title) { this.isbn = isbn; this.title = title; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn;
} public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Override public String toString() { return "Book{" + "isbn='" + isbn + '\'' + ", title='" + title + '\'' + '}'; } }
repos\SpringBootLearning-master\springboot-cacahe-data-with-spring\src\main\java\forezp\entity\Book.java
1
请完成以下Java代码
public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public void setPassword(String password) { this.password = password; } public void setEmail(String email) { this.email = email; } pu...
} public void setLastLogin(Timestamp lastLogin) { this.lastLogin = lastLogin; } public Permission getPermission() { return permission; } public void setPermission(Permission permission) { this.permission = permission; } @Override public String toString() { ...
repos\tutorials-master\persistence-modules\spring-boot-persistence\src\main\java\com\baeldung\countrows\entity\Account.java
1
请完成以下Java代码
public org.compiere.model.I_M_InOutLine getReversalLine() throws RuntimeException { return (org.compiere.model.I_M_InOutLine)MTable.get(getCtx(), org.compiere.model.I_M_InOutLine.Table_Name) .getPO(getReversalLine_ID(), get_TrxName()); } /** Set Reversal Line. @param ReversalLine_ID Use to keep the reve...
/** Set Zielmenge. @param TargetQty Zielmenge der Warenbewegung */ public void setTargetQty (BigDecimal TargetQty) { set_ValueNoCheck (COLUMNNAME_TargetQty, TargetQty); } /** Get Zielmenge. @return Zielmenge der Warenbewegung */ public BigDecimal getTargetQty () { BigDecimal bd = (BigDecimal)ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_M_InOutLine_Overview.java
1
请完成以下Java代码
public class LargeHtmlDocument { private final String content; private LargeHtmlDocument(String html) { this.content = html; } public LargeHtmlDocument() { this(""); } public String html() { return format("<html>%s</html>", content); }
public LargeHtmlDocument head(HtmlElement head) { return new LargeHtmlDocument(format("%s <head>%s</head>", content, head.html())); } public LargeHtmlDocument body(HtmlElement body) { return new LargeHtmlDocument(format("%s <body>%s</body>", content, body.html())); } public LargeHtmlDocument footer(HtmlElement ...
repos\tutorials-master\patterns-modules\design-patterns-behavioral-2\src\main\java\com\baeldung\fluentinterface\LargeHtmlDocument.java
1
请完成以下Java代码
public I_M_Material_Tracking_Report_Line createMaterialTrackingReportLine(final I_M_Material_Tracking_Report report, final I_M_InOutLine iol, final String lineAggregationKey) { final I_M_Material_Tracking_Report_Line newLine = InterfaceWrapperHelper.newInstance(I_M_Material_Tracking_Report_Line.class, iol); newLi...
@Override public void createMaterialTrackingReportLineAllocation(final I_M_Material_Tracking_Report_Line reportLine, final MaterialTrackingReportAgregationItem items) { final I_M_Material_Tracking_Report_Line_Alloc alloc = InterfaceWrapperHelper.newInstance(I_M_Material_Tracking_Report_Line_Alloc.class, reportLi...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingReportBL.java
1
请完成以下Java代码
public Mono<OAuth2AuthorizationRequest> removeAuthorizationRequest(ServerWebExchange exchange) { String state = getStateParameter(exchange); if (state == null) { return Mono.empty(); } // @formatter:off return getSessionAttributes(exchange) .filter((sessionAttrs) -> sessionAttrs.containsKey(this.sessio...
* @return the state parameter or null if not found */ private String getStateParameter(ServerWebExchange exchange) { Assert.notNull(exchange, "exchange cannot be null"); return exchange.getRequest().getQueryParams().getFirst(OAuth2ParameterNames.STATE); } private Mono<Map<String, Object>> getSessionAttributes...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\server\WebSessionOAuth2ServerAuthorizationRequestRepository.java
1
请完成以下Java代码
public static void ifNotEmpty(@Nullable Map<String, Object> source, @Nullable Consumer<DefaultPropertiesPropertySource> action) { if (!CollectionUtils.isEmpty(source) && action != null) { action.accept(new DefaultPropertiesPropertySource(source)); } } /** * Add a new {@link DefaultPropertiesPropertySourc...
* @param environment the environment to update */ public static void moveToEnd(ConfigurableEnvironment environment) { moveToEnd(environment.getPropertySources()); } /** * Move the 'defaultProperties' property source so that it's the last source in the * given {@link MutablePropertySources}. * @param prope...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\DefaultPropertiesPropertySource.java
1
请完成以下Java代码
public int getInitialCapacity() { if (initialCapacity > 0) { return initialCapacity; } else if (template != null) { return template.getInitialCapacity(); } throw new IllegalStateException("Cannot get InitialCapacity"); } @Override public ITableCacheConfigBuilder setInitialCapacity(final int in...
this.maxCapacity = maxCapacity; return this; } public int getExpireMinutes() { if (expireMinutes > 0 || expireMinutes == ITableCacheConfig.EXPIREMINUTES_Never) { return expireMinutes; } else if (template != null) { return template.getExpireMinutes(); } throw new IllegalStateException("Cannot ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\TableCacheConfigBuilder.java
1
请完成以下Java代码
private XmlAddress createEsrBank(final @NonNull Bank bank, @NonNull final Location location) { return XmlAddress.builder() .company(XmlCompany.builder() .companyname(bank.getBankName()) .postal(XmlPostal.builder() .zip(location.getPostal()) .city(location.getCity()) .countryCo...
return xAugmentedRequest.getPayload().getBody().getEsr() instanceof XmlEsr9; } @Nullable private BPartnerBankAccount getBPartnerBankAccountOrNull(final BPartnerId bpartnerID) { return bpBankAccountDAO.getBpartnerBankAccount(BankAccountQuery.builder() .bpBankAcctUses(ImmutableSet.of(BPBankAcctUse.DEBIT_OR_D...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\Invoice450FromCrossVersionModelTool.java
1
请完成以下Java代码
private static PrivateKey readPrivateKey(Reader reader, String passStr) throws IOException, PKCSException { char[] password = getPassword(passStr); PrivateKey privateKey = null; JcaPEMKeyConverter keyConverter = new JcaPEMKeyConverter(); try (PEMParser pemParser = new PEMParser(reader)) ...
} else if (object instanceof PEMKeyPair) { privateKey = keyConverter.getKeyPair((PEMKeyPair) object).getPrivate(); break; } else if (object instanceof PrivateKeyInfo) { privateKey = keyConverter.getPrivateKey((PrivateKeyInfo) object); ...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\SslUtil.java
1
请完成以下Java代码
public boolean supports(Class<?> authentication) { return OidcClientRegistrationAuthenticationToken.class.isAssignableFrom(authentication); } private OidcClientRegistrationAuthenticationToken findRegistration( OidcClientRegistrationAuthenticationToken clientRegistrationAuthentication, OAuth2Authorization aut...
Set<String> requiredScope) { Collection<String> authorizedScope = Collections.emptySet(); if (authorizedAccessToken.getClaims().containsKey(OAuth2ParameterNames.SCOPE)) { authorizedScope = (Collection<String>) authorizedAccessToken.getClaims().get(OAuth2ParameterNames.SCOPE); } if (!authorizedScope.containsA...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\authentication\OidcClientConfigurationAuthenticationProvider.java
1
请在Spring Boot框架中完成以下Java代码
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { if (element.hasAttribute(ADDRESSES) && (element.hasAttribute(HOST_ATTRIBUTE) || element.hasAttribute(PORT_ATTRIBUTE))) { parserContext.getReaderContext().error("If the 'addresses' attribute is provided, a conn...
parserContext.getReaderContext() .error("You must not specify both '" + SHUFFLE_ADDRESSES + "' and '" + SHUFFLE_MODE + "'", element); } NamespaceUtils.setValueIfAttributeDefined(builder, element, SHUFFLE_MODE); NamespaceUtils.setReferenceIfAttributeDefined(builder, element, ADDRESS_RESOLVER); NamespaceUtil...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\ConnectionFactoryParser.java
2
请完成以下Java代码
public void setAD_Table_ID (int AD_Table_ID) { if (AD_Table_ID < 1) set_Value (COLUMNNAME_AD_Table_ID, null); else set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); } /** Get Table. @return Database Table information */ public int getAD_Table_ID () { Integer ii = (Integer)get_V...
set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** ReplicationType AD_Reference_ID=126 */ public static final int REPLICATIONTYPE_AD_Referen...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationDocument.java
1
请完成以下Java代码
public int getM_AttributeSetInstance_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_M_InventoryLine getM_InventoryLine() { return get_ValueAsPO(COLUMNNAME_M_InventoryLine_ID, org.co...
public void setM_InventoryLineMA_ID (int M_InventoryLineMA_ID) { if (M_InventoryLineMA_ID < 1) set_ValueNoCheck (COLUMNNAME_M_InventoryLineMA_ID, null); else set_ValueNoCheck (COLUMNNAME_M_InventoryLineMA_ID, Integer.valueOf(M_InventoryLineMA_ID)); } /** Get M_InventoryLineMA. @return M_InventoryLineM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InventoryLineMA.java
1
请完成以下Java代码
public boolean hasDifferences() { return differenceAmt.signum() != 0; } public BankStatementLineAmounts assertNoDifferences() { if (differenceAmt.signum() != 0) { throw new AdempiereException("Amounts are not completelly balanced: " + this); } return this; } public BankStatementLineAmounts addDiff...
? toBuilder().trxAmt(trxAmt).build() : this; } public BankStatementLineAmounts addDifferenceToBankFeeAmt() { if (differenceAmt.signum() == 0) { return this; } return toBuilder() .bankFeeAmt(this.bankFeeAmt.subtract(differenceAmt)) .build(); } public BankStatementLineAmounts withBankFeeAmt...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\model\BankStatementLineAmounts.java
1
请完成以下Java代码
public Class<?> getType(ELContext context, Object base, Object property) { Objects.requireNonNull(context, "context is null"); if (isResolvable(base)) { context.setPropertyResolved(base, property); if (readOnly || base.getClass() == UNMODIFIABLE) { return null; } return Object.class; } return...
} } @Override public boolean isReadOnly(ELContext context, Object base, Object property) { Objects.requireNonNull(context, "context is null"); if (isResolvable(base)) { context.setPropertyResolved(base, property); return this.readOnly || UNMODIFIABLE.equals(base.getClass()); } return readOnly; } ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\MapELResolver.java
1
请完成以下Java代码
void registerLoggedException(Throwable exception) { this.loggedExceptions.add(exception); } void registerExitCode(int exitCode) { this.exitCode = exitCode; } @Override public void uncaughtException(Thread thread, Throwable ex) { try { if (isPassedToParent(ex) && this.parent != null) { this.parent.un...
if (ex == null) { return false; } if (this.loggedExceptions.contains(ex)) { return true; } if (ex instanceof InvocationTargetException) { return isRegistered(ex.getCause()); } return false; } static SpringBootExceptionHandler forCurrentThread() { return handler.get(); } /** * Thread local...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\SpringBootExceptionHandler.java
1
请完成以下Java代码
public String getBusinessKey() { return businessKey; } public void setBusinessKey(String businessKey) { this.businessKey = businessKey; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; }
public List<IncidentStatisticsDto> getIncidents() { return incidents; } public void setIncidents(List<IncidentStatisticsDto> incidents) { this.incidents = incidents; } public boolean isSuspended() { return SuspensionState.SUSPENDED.getStateCode() == suspensionState; } protected void setSuspen...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\base\dto\ProcessInstanceDto.java
1
请完成以下Java代码
public MInvoice getInvoice() { if (m_invoice == null && getC_Invoice_ID() != 0) m_invoice = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName()); return m_invoice; } // getInvoice /** * Get BPartner of Invoice * @return bp */ public int getC_BPartner_ID() { if (m_invoice == null) getInvoic...
getInvoice(); if (m_invoice != null) setAD_Org_ID(m_invoice.getAD_Org_ID()); } return true; } // beforeSave @Override protected boolean afterSave(boolean newRecord, boolean success) { //metas start: cg task us025b if (success) { updateAmounts(); } return success; //metas end: cg task u...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MPaymentAllocate.java
1
请完成以下Java代码
public Integer encrypt(Integer value) { return value; } // encrypt /** * Decryption. * The methods must recognize clear text values * * @param value encrypted value * @return decrypted String */ @Override public Integer decrypt(Integer value) { return value; } // decrypt /** * Encryption. ...
try { m_md = MessageDigest.getInstance("MD5"); // m_md = MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException nsae) { nsae.printStackTrace(); } } // Reset MessageDigest object m_md.reset(); // Convert String to array of bytes byte[] input = value.getBytes(StandardCh...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Secure.java
1
请在Spring Boot框架中完成以下Java代码
static class JacksonJsonStrategyConfiguration { private static final MediaType[] SUPPORTED_TYPES = { MediaType.APPLICATION_JSON, new MediaType("application", "*+json") }; @Bean @Order(1) @ConditionalOnBean(JsonMapper.class) RSocketStrategiesCustomizer jacksonJsonRSocketStrategyCustomizer(JsonMappe...
new org.springframework.http.codec.json.Jackson2JsonDecoder(objectMapper, SUPPORTED_TYPES)); strategy.encoder( new org.springframework.http.codec.json.Jackson2JsonEncoder(objectMapper, SUPPORTED_TYPES)); }; } } } static class NoJacksonOrJackson2Preferred extends AnyNestedCondition { NoJacks...
repos\spring-boot-4.0.1\module\spring-boot-rsocket\src\main\java\org\springframework\boot\rsocket\autoconfigure\RSocketStrategiesAutoConfiguration.java
2
请完成以下Java代码
public void throwSignal(SignalDto dto) { String name = dto.getName(); if (name == null) { throw new InvalidRequestException(Status.BAD_REQUEST, "No signal name given"); } SignalEventReceivedBuilder signalEvent = createSignalEventReceivedBuilder(dto); try { signalEvent.send(); } catc...
signalEvent.setVariables(variables); } String tenantId = dto.getTenantId(); if (tenantId != null) { signalEvent.tenantId(tenantId); } boolean isWithoutTenantId = dto.isWithoutTenantId(); if (isWithoutTenantId) { signalEvent.withoutTenantId(); } return signalEvent; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\SignalRestServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class TaxExtensionType { @XmlElement(name = "TaxExtension", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact") protected at.erpel.schemas._1p0.documents.extensions.edifact.TaxExtensionType taxExtension; @XmlElement(name = "ErpelTaxExtension") protected CustomType erpelTaxExt...
* * @return * possible object is * {@link CustomType } * */ public CustomType getErpelTaxExtension() { return erpelTaxExtension; } /** * Sets the value of the erpelTaxExtension property. * * @param value * allowed object is * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\TaxExtensionType.java
2
请在Spring Boot框架中完成以下Java代码
public ImmutableMap<FlatrateTermId, CommissionConfig> createForExistingInstance(@NonNull final CommissionConfigProvider.ConfigRequestForExistingInstance commissionConfigRequest) { final ImmutableMap.Builder<FlatrateTermId, CommissionConfig> resultBuilder = ImmutableMap.builder(); priorityOrderedConfigFactories.st...
ProductId salesProductId; @NonNull LocalDate commissionDate; @NonNull Hierarchy commissionHierarchy; @NonNull CommissionTriggerType commissionTriggerType; public boolean isCustomerTheSalesRep() { return customerBPartnerId.equals(salesRepBPartnerId); } } @Builder @Value public static class ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\CommissionConfigProvider.java
2
请在Spring Boot框架中完成以下Java代码
protected AssetProfile prepare(EntitiesImportCtx ctx, AssetProfile assetProfile, AssetProfile old, EntityExportData<AssetProfile> exportData, IdProvider idProvider) { assetProfile.setDefaultRuleChainId(idProvider.getInternalId(assetProfile.getDefaultRuleChainId())); assetProfile.setDefaultDashboardId(id...
@Override protected AssetProfile deepCopy(AssetProfile assetProfile) { return new AssetProfile(assetProfile); } @Override protected void cleanupForComparison(AssetProfile assetProfile) { super.cleanupForComparison(assetProfile); } @Override public EntityType getEntityType()...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\AssetProfileImportService.java
2
请完成以下Spring Boot application配置
# Spring boot application spring.application.name=dubbo-auto-configuration-provider-demo # Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service # Dubbo Application ## The default value of dubbo.application.name i...
plication.name=${spring.application.name} # Dubbo Protocol dubbo.protocol.name=dubbo dubbo.protocol.port=12345 ## Dubbo Registry dubbo.registry.address=N/A
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-samples\auto-configure-samples\provider-sample\src\main\resources\application.properties
2
请完成以下Java代码
private GrantedAuthority getRequiredAuthority(int changeType) { if (changeType == CHANGE_AUDITING) { return this.gaModifyAuditing; } if (changeType == CHANGE_GENERAL) { return this.gaGeneralChanges; } if (changeType == CHANGE_OWNERSHIP) { return this.gaTakeOwnership; } throw new IllegalArgumentEx...
* Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use * the {@link SecurityContextHolderStrategy} stored in {@link SecurityContextHolder}. * * @since 5.8 */ public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { Assert.notNu...
repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\domain\AclAuthorizationStrategyImpl.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_ImpEx_Connector[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Beschreibung. @param Description Optional short description of the record */ public void setDescription (String Description) { set...
set_Value (COLUMNNAME_ImpEx_ConnectorType_ID, null); else set_Value (COLUMNNAME_ImpEx_ConnectorType_ID, Integer.valueOf(ImpEx_ConnectorType_ID)); } /** Get Konnektor-Typ. @return Konnektor-Typ */ public int getImpEx_ConnectorType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_ImpEx_ConnectorType_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_ImpEx_Connector.java
1
请完成以下Java代码
public Stage getPlanModel() { return planModel; } public void setPlanModel(Stage planModel) { this.planModel = planModel; } public String getStartEventType() { return startEventType; } public void setStartEventType(String startEventType) { this.startEventType =...
return allCaseElements; } public void setAllCaseElements(Map<String, CaseElement> allCaseElements) { this.allCaseElements = allCaseElements; } public <T extends PlanItemDefinition> List<T> findPlanItemDefinitionsOfType(Class<T> type) { return planModel.findPlanItemDefinitionsOfType(typ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Case.java
1
请完成以下Java代码
private boolean isProcessDefinitionResource(String resource) { return resource.endsWith(".bpmn20.xml") || resource.endsWith(".bpmn"); } protected DeploymentBuilder loadApplicationUpgradeContext(DeploymentBuilder deploymentBuilder) { if (applicationUpgradeContextService != null) { lo...
); } } } private void loadEnforcedAppVersion(DeploymentBuilder deploymentBuilder) { if (applicationUpgradeContextService.hasEnforcedAppVersion()) { deploymentBuilder.setEnforcedAppVersion(applicationUpgradeContextService.getEnforcedAppVersion()); LOGGER.warn(...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\autodeployment\AbstractAutoDeploymentStrategy.java
1
请完成以下Java代码
public final class ModelByIdComparator<ModelType> implements Comparator<ModelType> { public static final transient ModelByIdComparator<Object> instance = new ModelByIdComparator<>(); public static final <ModelType> ModelByIdComparator<ModelType> getInstance() { @SuppressWarnings("unchecked") final ModelByIdComp...
} Check.assumeNotNull(model1, "model1 not null"); // shall not happen Check.assumeNotNull(model2, "model2 not null"); // shall not happen final int modelId1 = InterfaceWrapperHelper.getId(model1); final int modelId2 = InterfaceWrapperHelper.getId(model2); return modelId1 - modelId2; } /** * Returns a c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\model\util\ModelByIdComparator.java
1
请完成以下Java代码
public void setResources(Resource[] resources) { this.resources = resources; } /** * The name of the key for the file name in each {@link ExecutionContext}. * Defaults to "fileName". * @param keyName the value of the key */ public void setKeyName(String keyName) { this.k...
*/ @Override public Map<String, ExecutionContext> partition(int gridSize) { Map<String, ExecutionContext> map = new HashMap<>(gridSize); int i = 0, k = 1; for (Resource resource : resources) { ExecutionContext context = new ExecutionContext(); Assert.state(resourc...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batch\partitioner\CustomMultiResourcePartitioner.java
1
请完成以下Java代码
public class Anagram { // This definition only works for single byte encoding character set. // For multibyte encoding, such as UTF-8, 16, 32 etc., // we need to increase this number so that it can contain all possible characters. private static int CHARACTER_RANGE = 256; public boolean isAnagramSo...
if (string1.length() != string2.length()) { return false; } Multiset<Character> multiset1 = HashMultiset.create(); Multiset<Character> multiset2 = HashMultiset.create(); for (int i = 0; i < string1.length(); i++) { multiset1.add(string1.charAt(i)); mul...
repos\tutorials-master\core-java-modules\core-java-string-algorithms-3\src\main\java\com\baeldung\anagram\Anagram.java
1
请完成以下Java代码
public final class DuplicateLookupObjectException extends ReplicationException { private static final long serialVersionUID = 5099228399627874129L; @Getter private final List<PO> lookedUpPOs; private final I_EXP_ReplicationTrxLine trxLineDraft; @Getter private final boolean doLookup; /** * Constructs a {...
} public DuplicateLookupObjectException(final String adMessage, final List<PO> lookedUpPOs, final I_EXP_ReplicationTrxLine trxLineDraft, final boolean doLookup) { super(adMessage); this.lookedUpPOs = lookedUpPOs; this.trxLineDraft = trxLineDraft; this.doLookup = doLookup; } public I_EXP_ReplicationTrxLine...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\exceptions\DuplicateLookupObjectException.java
1
请完成以下Java代码
public static ProductId ofRepoId(final int repoId) { return new ProductId(repoId); } @Nullable public static ProductId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new ProductId(repoId) : null; } @Nullable public static ProductId ofRepoIdOrNull(final int repoId) ...
} public static boolean equals(@Nullable final ProductId o1, @Nullable final ProductId o2) { return Objects.equals(o1, o2); } private ProductId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "productId"); } @Override @JsonValue public int getRepoId() { return repoId; } publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\product\ProductId.java
1
请完成以下Java代码
public static CurrencyId createCurrencyId(@NonNull final CurrencyCode currencyCode) { Adempiere.assertUnitTestMode(); return createCurrency(currencyCode).getId(); } public static Currency createCurrency(@NonNull final CurrencyCode currencyCode) { Adempiere.assertUnitTestMode(); return prepareCurrency() ...
@Nullable final CurrencyPrecision precision, @Nullable final CurrencyId currencyId) { Adempiere.assertUnitTestMode(); final CurrencyPrecision precisionToUse = precision != null ? precision : CurrencyPrecision.TWO; final I_C_Currency record = newInstanceOutOfTrx(I_C_Currency.class); record.setISO_Code(cur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\impl\PlainCurrencyDAO.java
1
请完成以下Java代码
public PaySelectionLineType extractType(final I_C_PaySelectionLine line) { final OrderId orderId = OrderId.ofRepoIdOrNull(line.getC_Order_ID()); final InvoiceId invoiceId = InvoiceId.ofRepoIdOrNull(line.getC_Invoice_ID()); if (orderId != null) { return PaySelectionLineType.Order; } else if (invoiceId !=...
return paySelectionDAO.getPaySelectionLinesById(paySelectionLineId); } @Override public List<I_C_PaySelectionLine> retrievePaySelectionLines(@NonNull final I_C_PaySelection paySelection) { return paySelectionDAO.retrievePaySelectionLines(paySelection); } @Override public List<I_C_PaySelectionLine> retrievePa...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\PaySelectionBL.java
1
请完成以下Java代码
private Polyline2D createGateway(GraphicInfo graphicInfo) { double middleX = graphicInfo.getX() + (graphicInfo.getWidth() / 2); double middleY = graphicInfo.getY() + (graphicInfo.getHeight() / 2); Polyline2D gatewayRectangle = new Polyline2D( new Point2D(graphicInfo.getX(), middleY)...
public SequenceFlow getSequenceFlow() { return sequenceFlow; } public void setSequenceFlow(SequenceFlow sequenceFlow) { this.sequenceFlow = sequenceFlow; } public FlowElementsContainer getFlowContainer() { return flowContainer; } pub...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\BpmnJsonConverter.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, Object> getVariables() { return variables; } @Override public Date getDuedate() { return job.getDuedate(); } @Override public String getProcessInstanceId() { return job.getProcessInstanceId(); } @Override public String getExecutionId() { ...
@Override public boolean isExclusive() { return job.isExclusive(); } @Override public Date getCreateTime() { return job.getCreateTime(); } @Override public String getId() { return job.getId(); } @Override public int getRetries() { return job.get...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\AcquiredExternalWorkerJobImpl.java
2
请完成以下Java代码
default SyncGraphQlClientInterceptor andThen(SyncGraphQlClientInterceptor interceptor) { return new SyncGraphQlClientInterceptor() { @Override public ClientGraphQlResponse intercept(ClientGraphQlRequest request, Chain chain) { return SyncGraphQlClientInterceptor.this.intercept( request, (nextRequest)...
interface Chain { /** * Delegate to the rest of the chain to perform the request. * @param request the request to perform * @return the GraphQL response * @throws GraphQlTransportException in case of errors due to transport or * other issues related to encoding and decoding the request and response. ...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\SyncGraphQlClientInterceptor.java
1
请完成以下Java代码
final class ShipmentScheduleSegmentChangedProcessor { private static final String TRX_PROPERTYNAME = ShipmentScheduleSegmentChangedProcessor.class.getName(); public static ShipmentScheduleSegmentChangedProcessor getOrCreateIfThreadInheritedElseNull( @NonNull final ShipmentScheduleInvalidateBL shipmentScheduleInva...
{ this.shipmentScheduleInvalidator = shipmentScheduleInvalidator; } private void process() { if (segments.isEmpty()) { return; } final List<IShipmentScheduleSegment> segmentsCopy = new ArrayList<>(segments); segments.clear(); shipmentScheduleInvalidator.flagSegmentForRecompute(segmentsCopy); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\invalidation\impl\ShipmentScheduleSegmentChangedProcessor.java
1
请完成以下Java代码
private void assertUOMOrSourceUOM(@NonNull final UomId uomId) { if (!getUomId().equals(uomId) && !getSourceUomId().equals(uomId)) { throw new QuantitiesUOMNotMatchingExpection("UOMs are not compatible") .appendParametersToMessage() .setParameter("Qty.UOM", getUomId()) .setParameter("assertUOM", u...
else // count > 1 { final ImmutableList.Builder<Quantity> result = ImmutableList.builder(); final Quantity qtyPerPart = divide(count); Quantity qtyRemainingToSpread = this; for (int i = 1; i <= count; i++) { final boolean isLast = i == count; if (isLast) { result.add(qtyRemainingToSpre...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\Quantity.java
1
请完成以下Java代码
public Criteria andLastUpdateNotBetween(Date value1, Date value2) { addCriterion("last_update not between", value1, value2, "lastUpdate"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); ...
} protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } e...
repos\spring-boot-quick-master\quick-multi-data\src\main\java\com\quick\mulit\entity\primary\CityExample.java
1
请完成以下Java代码
private void shutdown(Connector connector, boolean getResult) { Future<Void> result; try { result = connector.shutdown(); } catch (NoSuchMethodError ex) { Method shutdown = ReflectionUtils.findMethod(connector.getClass(), "shutdown"); Assert.state(shutdown != null, "'shutdown' must not be null"); re...
} private void awaitShutdown(GracefulShutdownCallback callback) { while (!this.aborted && this.activeRequests.get() > 0) { sleep(100); } if (this.aborted) { logger.info("Graceful shutdown aborted with one or more requests still active"); callback.shutdownComplete(GracefulShutdownResult.REQUESTS_ACTIVE)...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\GracefulShutdown.java
1
请完成以下Java代码
protected String doIt() throws Exception { final DATEVExportFormat exportFormat = exportFormatRepo.getById(datevExportFormatId); final I_DATEV_Export datevExport = getRecord(I_DATEV_Export.class); final IExportDataSource dataSource = createDataSource(exportFormat, datevExport.getDATEV_Export_ID()); final Byt...
.addEqualsWhereClause(I_DATEV_ExportLine.COLUMNNAME_DATEV_Export_ID, datevExportId) .addEqualsWhereClause(I_DATEV_ExportLine.COLUMNNAME_IsActive, true) .addOrderBy(I_DATEV_ExportLine.COLUMNNAME_DocumentNo) .addOrderBy(I_DATEV_ExportLine.COLUMNNAME_DATEV_ExportLine_ID); exportFormat .getColumns(...
repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\process\DATEV_ExportFile.java
1
请在Spring Boot框架中完成以下Java代码
public class HuId implements RepoIdAware { public static HuId ofRepoId(final int repoId) { return new HuId(repoId); } @JsonCreator public static HuId ofObject(@NonNull final Object object) { return RepoIdAwares.ofObject(object, HuId.class); } @Nullable public static HuId ofRepoIdOrNull(final int repoId) ...
throw metasfreshException; } } public static HuId ofHUValueOrNull(@Nullable final String huValue) { final String huValueNorm = StringUtils.trimBlankToNull(huValue); if (huValueNorm == null) {return null;} try { return ofRepoIdOrNull(NumberUtils.asIntOrZero(huValueNorm)); } catch (final Exception e...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\handlingunits\HuId.java
2
请完成以下Java代码
public void sendSimpleMessage(String to, String subject, String text) { try { SimpleMailMessage message = new SimpleMailMessage(); message.setFrom(NOREPLY_ADDRESS); message.setTo(to); message.setSubject(subject); message.setText(text); ema...
helper.addAttachment("Invoice", file); emailSender.send(message); } catch (MessagingException e) { e.printStackTrace(); } } @Override public void sendMessageWithInputStreamAttachment( String to, String subject, String text, String attachmentName, InputStream...
repos\tutorials-master\spring-web-modules\spring-mvc-basics\src\main\java\com\baeldung\spring\mail\EmailServiceImpl.java
1
请完成以下Java代码
public void convertUsingCustomisedJOOQ() throws ClassNotFoundException, SQLException { Class.forName("org.h2.Driver"); Connection dbConnection = DriverManager.getConnection("jdbc:h2:mem:rs2jdbc", "user", "password"); // Create a table Statement stmt = dbConnection.createStatement(); ...
.mapToObj(i -> { try { return md.getColumnName(i + 1); } catch (SQLException e) { e.printStackTrace(); return "?"; } }) .collect(Collectors.toList()); List<JSONObject> json = DSL...
repos\tutorials-master\persistence-modules\core-java-persistence-2\src\main\java\com\baeldung\resultset2json\ResultSet2JSON.java
1