instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
private void prepareBPartnerProducts(@NonNull final Exchange exchange) { final PushRawMaterialsRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, ROUTE_PROPERTY_PUSH_RAW_MATERIALS_CONTEXT, PushRawMaterialsRouteContext.class); if (Check.isEmpty(...
exchange.getIn().setBody(ImmutableList.of()); return; } final JsonMetasfreshId bpartnerId = Optional.ofNullable(bPartnerProduct.getBPartnerMetasfreshId()) .map(Integer::parseInt) .map(JsonMetasfreshId::of) .orElseThrow(() -> new RuntimeCamelException("Missing mandatory JsonBPartnerProduct.METASFRESH...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\product\PushRawMaterialsRouteBuilder.java
2
请完成以下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_C_TaxGroup[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Tax...
@return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_C_TaxGroup.java
1
请完成以下Java代码
private static ReturnProductInfoProvider newInstance() { return new ReturnProductInfoProvider(); } private OrgId getOrgId(@NonNull final String orgCode) { return searchKey2Org.computeIfAbsent(orgCode, this::retrieveOrgId); } @NonNull private ProductId getProductId(@NonNull final String productSear...
if (product == null) { throw new AdempiereException("No product could be found for the target search key!") .appendParametersToMessage() .setParameter("ProductSearchKey", productSearchKey); } return product; } private I_M_Product loadProduct(@NonNull final String productSearchKey) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\receipt\CustomerReturnRestService.java
1
请完成以下Java代码
public Collection<? extends GrantedAuthority> getAuthorities() { //返回当前用户所拥有的资源 return resourceList.stream() .map(resource ->new SimpleGrantedAuthority(resource.getId()+":"+resource.getName())) .collect(Collectors.toList()); } @Override public String getPassw...
return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return umsAdmin.getStatus().equals(1); } }
repos\mall-master\mall-admin\src\main\java\com\macro\mall\bo\AdminUserDetails.java
1
请完成以下Java代码
protected String doIt() { final I_C_Async_Batch record = asyncBatchDAO.retrieveAsyncBatchRecordOutOfTrx(AsyncBatchId.ofRepoId(getRecord_ID())); final List<AttachmentEntry> attachments = getAttachmentEntries(record); if (!attachments.isEmpty()) { final AttachmentEntry attachment = attachments.get(0); // ta...
final List<AttachmentEntry> attachments = getAttachmentEntries(record); return !attachments.isEmpty(); } private List<AttachmentEntry> getAttachmentEntries(@NonNull final I_C_Async_Batch record) { final AttachmentEntryService.AttachmentEntryQuery attachmentQuery = AttachmentEntryService.AttachmentEntryQuery.bu...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\process\C_Async_Batch_DownloadFileFromAttachment.java
1
请完成以下Java代码
public PartyIdentification32 getOrgtr() { return orgtr; } /** * Sets the value of the orgtr property. * * @param value * allowed object is * {@link PartyIdentification32 } * */ public void setOrgtr(PartyIdentification32 value) { this.orgtr = ...
* returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the addtlInf property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAddtlInf().add(newItem); * </pre> * * * <p> * Objects...
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\ReturnReasonInformation10.java
1
请完成以下Java代码
public void cache(String key, String value) { valueOperations.set(key, value, AuthCacheConfig.timeout, TimeUnit.MILLISECONDS); } /** * 存入缓存 * * @param key 缓存key * @param value 缓存内容 * @param timeout 指定缓存过期时间(毫秒) */ @Override public void cache(String key, Strin...
@Override public String get(String key) { return valueOperations.get(key); } /** * 是否存在key,如果对应key的value值已过期,也返回false * * @param key 缓存key * @return true:存在key,并且value没过期;false:key不存在或者已过期 */ @Override public boolean containsKey(String key) { return redisTem...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\cache\AuthStateRedisCache.java
1
请完成以下Java代码
public void repair(String[] repairParts) { Assert.notEmpty(repairParts, "array of repairParts must not be empty"); // ... } public void repairWithNoNull(String[] repairParts) { Assert.noNullElements(repairParts, "array of repairParts must not contain null elements"); // ... ...
car.startWithHasLength(" "); car.startWithHasText("t"); car.startWithNotContain("132"); List<String> repairPartsCollection = new ArrayList<>(); repairPartsCollection.add("part"); car.repair(repairPartsCollection); Map<String, String> repairPartsMap = new HashMap<>(); ...
repos\tutorials-master\spring-5\src\main\java\com\baeldung\assertions\Car.java
1
请完成以下Java代码
public void setSubstitution(VerfuegbarkeitSubstitution value) { this.substitution = value; } /** * Gets the value of the anteile property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * r...
* * <p> * Objects of the following type(s) are allowed in the list * {@link VerfuegbarkeitAnteil } * * */ public List<VerfuegbarkeitAnteil> getAnteile() { if (anteile == null) { anteile = new ArrayList<VerfuegbarkeitAnteil>(); } return this.anteil...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VerfuegbarkeitsantwortArtikel.java
1
请完成以下Java代码
public class UpdateProcessDefinitionHistoryTimeToLiveCmd implements Command<Void>, Serializable { private static final long serialVersionUID = 1L; protected String processDefinitionId; protected Integer historyTimeToLive; public UpdateProcessDefinitionHistoryTimeToLiveCmd(String processDefinitionId, Integer ...
parser.validate(historyTimeToLive); ProcessDefinitionEntity processDefinitionEntity = context.getProcessDefinitionManager().findLatestProcessDefinitionById(processDefinitionId); logUserOperation(context, processDefinitionEntity); processDefinitionEntity.setHistoryTimeToLive(historyTimeToLive); return ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\UpdateProcessDefinitionHistoryTimeToLiveCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class CountryAreaId implements RepoIdAware { @JsonCreator @NonNull public static CountryAreaId ofRepoId(final int repoId) { return new CountryAreaId(repoId); } @Nullable public static CountryAreaId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new CountryAreaId(repoId) : null; } public ...
@JsonValue public int getRepoId() { return repoId; } public static boolean equals(@Nullable final CountryAreaId countryAreaId1, @Nullable final CountryAreaId countryAreaId2) { return Objects.equals(countryAreaId1, countryAreaId2); } public boolean equalsToRepoId(final int repoId) { return this.repoId ==...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\CountryAreaId.java
2
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPermissionUrl() { return permissionUrl; }...
} public void setMethod(String method) { this.method = method; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Override public String toString() { return "Perm...
repos\springBoot-master\springboot-dubbo\abel-user-api\src\main\java\cn\abel\user\models\Permission.java
1
请完成以下Java代码
public Connection getConnection() throws SQLException { return getCurrentDataSource().getConnection(); } @Override public Connection getConnection(String username, String password) throws SQLException { return getCurrentDataSource().getConnection(username, password); } protected Da...
throw new SQLException("Cannot unwrap " + getClass().getName() + " as an instance of " + iface.getName()); } @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { return iface.isInstance(this); } public Map<Object, DataSource> getDataSources() { return dataSou...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\cfg\multitenant\TenantAwareDataSource.java
1
请完成以下Java代码
public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** ModerationType AD_Reference_ID=395 */...
{ return (String)get_Value(COLUMNNAME_ModerationType); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_ChatType.java
1
请在Spring Boot框架中完成以下Java代码
public void doFinally() { } }); return ok[0]; } @Override public boolean isSourceChanged(MViewMetadata mdata, PO sourcePO, int changeType) { final String sourceTableName = sourcePO.get_TableName(); final Set<String> sourceColumns = mdata.getSourceColumns(sourceTableName); if (sourceColumns == null...
if (changeType == ModelValidator.TYPE_AFTER_NEW || changeType == ModelValidator.TYPE_AFTER_DELETE) { return true; } for (String sourceColumn : sourceColumns) { if (sourcePO.is_ValueChanged(sourceColumn)) { return true; } } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\TableMViewBL.java
2
请完成以下Java代码
public class BalanceSubType1Choice { @XmlElement(name = "Cd") protected String cd; @XmlElement(name = "Prtry") protected String prtry; /** * Gets the value of the cd property. * * @return * possible object is * {@link String } * */ public String...
/** * Gets the value of the prtry property. * * @return * possible object is * {@link String } * */ public String getPrtry() { return prtry; } /** * Sets the value of the prtry property. * * @param value * allowed object is ...
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\BalanceSubType1Choice.java
1
请完成以下Java代码
public void setSourceState(String sourceState) { this.sourceState = sourceState; } public String getTargetState() { return targetState; } public void setTargetState(String targetState) { this.targetState = targetState; } public String getImplementationType() { ...
public ScriptInfo getScriptInfo() { return scriptInfo; } /** * Sets the script info * * @see #getScriptInfo() */ public void setScriptInfo(ScriptInfo scriptInfo) { this.scriptInfo = scriptInfo; } public Object getInstance() { return instance; } ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\FlowableListener.java
1
请完成以下Java代码
public String getPrefix () { return (String)get_Value(COLUMNNAME_Prefix); } /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public b...
/** Get Remote Organization. @return Remote Organization to be used to replicate / synchronize data with. */ public int getRemote_Org_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Remote_Org_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Suffix. @param Suffix Suffix after ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Replication.java
1
请完成以下Java代码
void encrypt(String content, String fileName) throws InvalidKeyException, IOException { cipher.init(Cipher.ENCRYPT_MODE, secretKey); byte[] iv = cipher.getIV(); try ( FileOutputStream fileOut = new FileOutputStream(fileName); CipherOutputStream cipherOut = new Ci...
InputStreamReader inputReader = new InputStreamReader(cipherIn); BufferedReader reader = new BufferedReader(inputReader) ) { StringBuilder sb = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { ...
repos\tutorials-master\core-java-modules\core-java-security-5\src\main\java\com\baeldung\encrypt\FileEncrypterDecrypter.java
1
请完成以下Java代码
public void setHistoryTimeToLive(Integer historyTimeToLive) { this.historyTimeToLive = historyTimeToLive; } public void setFinishedProcessInstanceCount(long finishedProcessInstanceCount) { this.finishedProcessInstanceCount = finishedProcessInstanceCount; } public void setCleanableProcessInstanceCount(...
return tenantId; } protected CleanableHistoricProcessInstanceReport createNewReportQuery(ProcessEngine engine) { return engine.getHistoryService().createCleanableHistoricProcessInstanceReport(); } public static List<CleanableHistoricProcessInstanceReportResultDto> convert(List<CleanableHistoricProcessInst...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\CleanableHistoricProcessInstanceReportResultDto.java
1
请完成以下Java代码
public class TransactionQuantities1Choice { @XmlElement(name = "Qty") protected FinancialInstrumentQuantityChoice qty; @XmlElement(name = "Prtry") protected ProprietaryQuantity1 prtry; /** * Gets the value of the qty property. * * @return * possible object is * {@...
* possible object is * {@link ProprietaryQuantity1 } * */ public ProprietaryQuantity1 getPrtry() { return prtry; } /** * Sets the value of the prtry property. * * @param value * allowed object is * {@link ProprietaryQuantity1 } * ...
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\TransactionQuantities1Choice.java
1
请完成以下Java代码
public boolean isEmpty() { return this.sections.stream().allMatch((section) -> section.items.isEmpty()); } public GitIgnoreSection getGeneral() { return this.general; } public GitIgnoreSection getSts() { return this.sts; } public GitIgnoreSection getIntellijIdea() { return this.intellijIdea; } publi...
public void add(String... items) { this.items.addAll(Arrays.asList(items)); } public LinkedList<String> getItems() { return this.items; } @Override public void write(PrintWriter writer) { if (!this.items.isEmpty()) { if (this.name != null) { writer.println(); writer.println(String.for...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\scm\git\GitIgnore.java
1
请在Spring Boot框架中完成以下Java代码
public class Person implements Serializable { private static final long serialVersionUID = 133938246231808718L; @Id @GeneratedValue private Long id; private String name; private Integer age; private String address; public Person() { super(); } public Long getId() {...
this.age = age; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Person(Long id, String name, Integer age, String address) { super(); this.id = id; this.name = name; this....
repos\springBoot-master\springboot-Cache2\src\main\java\com\us\example\bean\Person.java
2
请完成以下Java代码
public void setIsSingleRow (boolean IsSingleRow) { set_Value (COLUMNNAME_IsSingleRow, Boolean.valueOf(IsSingleRow)); } /** Get Single Row Layout. @return Default for toggle between Single- and Multi-Row (Grid) Layout */ public boolean isSingleRow () { Object oo = get_Value(COLUMNNAME_IsSingleRow); if ...
*/ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public Ke...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserDef_Tab.java
1
请在Spring Boot框架中完成以下Java代码
public void addLog(LogDTO logDTO) { if(oConvertUtils.isEmpty(logDTO.getId())){ logDTO.setId(String.valueOf(IdWorker.getId())); } //保存日志(异常捕获处理,防止数据太大存储失败,导致业务失败)JT-238 try { logDTO.setCreateTime(new Date()); baseCommonMapper.saveLog(logDTO); ...
} //获取登录用户信息 if(user==null){ try { user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); } catch (Exception e) { //e.printStackTrace(); } } if(user!=null){ sysLog.setUserid(user.getUsername()); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\modules\base\service\impl\BaseCommonServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public final class LogFileWebEndpointAutoConfiguration { @Bean @ConditionalOnMissingBean @Conditional(LogFileCondition.class) LogFileWebEndpoint logFileWebEndpoint(ObjectProvider<LogFile> logFile, LogFileWebEndpointProperties properties) { return new LogFileWebEndpoint(logFile.getIfAvailable(), properties.getExt...
config = getLogFileConfig(environment, LogFile.FILE_PATH_PROPERTY); if (StringUtils.hasText(config)) { return ConditionOutcome.match(message.found(LogFile.FILE_PATH_PROPERTY).items(config)); } config = environment.getProperty("management.endpoint.logfile.external-file"); if (StringUtils.hasText(config))...
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\logging\LogFileWebEndpointAutoConfiguration.java
2
请完成以下Java代码
protected CmmnSentryPart newSentryPart() { return new CaseSentryPartImpl(); } // new case executions //////////////////////////////////////////////////////////// protected CaseExecutionImpl createCaseExecution(CmmnActivity activity) { CaseExecutionImpl child = newCaseExecution(); // set activity to...
if (isCaseInstanceExecution()) { return "CaseInstance[" + getToStringIdentity() + "]"; } else { return "CmmnExecution["+getToStringIdentity() + "]"; } } protected String getToStringIdentity() { return Integer.toString(System.identityHashCode(this)); } public String getId() { return...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CaseExecutionImpl.java
1
请在Spring Boot框架中完成以下Java代码
protected ExecutionContextSerializer getExecutionContextSerializer() { return (this.executionContextSerializer != null) ? this.executionContextSerializer : super.getExecutionContextSerializer(); } @Override @Deprecated(since = "4.0.0", forRemoval = true) @SuppressWarnings("removal") protected JobPara...
@BatchDataSource ObjectProvider<DataSource> batchDataSource, BatchJdbcProperties properties) { return new BatchDataSourceScriptDatabaseInitializer(batchDataSource.getIfAvailable(() -> dataSource), properties); } } static class OnBatchDatasourceInitializationCondition extends OnDatabaseInitializationC...
repos\spring-boot-4.0.1\module\spring-boot-batch-jdbc\src\main\java\org\springframework\boot\batch\jdbc\autoconfigure\BatchJdbcAutoConfiguration.java
2
请完成以下Java代码
public int getCounter() { return counter; } public void setCounter(int counter) { this.counter = counter; } @Override public void onSubscribe(Subscription subscription) { this.subscription = subscription; subscription.request(1); } @Override public void...
} catch (InterruptedException e) { e.printStackTrace(); } counter++; System.out.println("Processed item : " + item); subscription.request(1); } @Override public void onError(Throwable t) { t.printStackTrace(); } @Override public void onComple...
repos\tutorials-master\core-java-modules\core-java-9-new-features\src\main\java\com\baeldung\java9\reactive\BaeldungSubscriberImpl.java
1
请完成以下Java代码
public class ScriptBindingsFactory { protected AbstractEngineConfiguration engineConfiguration; protected List<ResolverFactory> resolverFactories; public ScriptBindingsFactory(AbstractEngineConfiguration engineConfiguration, List<ResolverFactory> resolverFactories) { this.engineConfiguration = eng...
if (resolver != null) { scriptResolvers.add(resolver); } } return new CompositeResolver(scriptResolvers); } public List<ResolverFactory> getResolverFactories() { return resolverFactories; } public void setResolverFactories(List<ResolverFactory> resol...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\scripting\ScriptBindingsFactory.java
1
请在Spring Boot框架中完成以下Java代码
public void setKey(String key, String value, int timeToLive) throws Exception { try { Future<Boolean>[] _future = evCache.set(key, value, timeToLive); // Wait for all the Futures to complete. // In "verbose" mode, show the status for each. for (Future<Boolean> f ...
// // // set verboseMode based on the environment variable // verboseMode = ("true".equals(System.getenv("EVCACHE_SAMPLE_VERBOSE"))); // // if (verboseMode) { // System.out.println("To run this sample app without using Gradle:"); // System.out.println("java -cp " + System.getP...
repos\Spring-Boot-In-Action-master\springbt_evcache\src\main\java\cn\codesheep\springbt_evcache\config\EVCacheClientSample.java
2
请完成以下Java代码
public class WrongDbException extends ProcessEngineException { private static final long serialVersionUID = 1L; String libraryVersion; String dbVersion; public WrongDbException(String libraryVersion, String dbVersion) { this("version mismatch: activiti library version is '" + libraryVersion + "', db vers...
} /** * The version of the Activiti library used. */ public String getLibraryVersion() { return libraryVersion; } /** * The version of the Activiti library that was used to create the database schema. */ public String getDbVersion() { return dbVersion; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\WrongDbException.java
1
请完成以下Java代码
public Properties getCtx() { return po.getCtx(); } @Override public String getTrxName() { return po.get_TrxName(); } @Override public Evaluatee createEvaluationContext() { final Properties privateCtx = Env.deriveCtx(getCtx()); final PO po = getPO(); final POInfo poInfo = po.getPOInfo(); for (int...
if (val == null) { continue; } if (val instanceof Integer) { Env.setContext(privateCtx, "#" + po.get_ColumnName(i), (Integer)val); } else if (val instanceof String) { Env.setContext(privateCtx, "#" + po.get_ColumnName(i), (String)val); } } return Evaluatees.ofCtx(privateCtx, En...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\POZoomSource.java
1
请完成以下Java代码
public class SpinBpmPlatformPlugin implements BpmPlatformPlugin { private static final SpinPluginLogger LOG = SpinPluginLogger.LOGGER; @Override public void postProcessApplicationDeploy(ProcessApplicationInterface processApplication) { ProcessApplicationInterface rawPa = processApplication.getRawObject(); ...
protected List<TypedValueSerializer<?>> lookupSpinSerializers(ClassLoader classLoader) { DataFormats paDataFormats = new DataFormats(); paDataFormats.registerDataFormats(classLoader); // does not create PA-local serializers for native Spin values; // this is still an open feature CAM-5246 return S...
repos\camunda-bpm-platform-master\engine-plugins\spin-plugin\src\main\java\org\camunda\spin\plugin\impl\SpinBpmPlatformPlugin.java
1
请完成以下Java代码
public class GatewayPropagatingSenderTracingObservationHandler extends PropagatingSenderTracingObservationHandler<GatewayContext> { private final Propagator propagator; private final List<String> remoteFieldsLowerCase; /** * Creates a new instance of {@link PropagatingSenderTracingObservationHandler}. * @pa...
this.remoteFieldsLowerCase = remoteFields.stream().map(s -> s.toLowerCase(Locale.ROOT)).toList(); } @Override public void onStart(GatewayContext context) { this.propagator.fields() .stream() .filter(field -> !remoteFieldsLowerCase.contains(field.toLowerCase(Locale.ROOT))) .forEach(s -> Objects.requireNon...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\observation\GatewayPropagatingSenderTracingObservationHandler.java
1
请完成以下Java代码
public class InstrumentationExample { public static void printObjectSize(Object object) { System.out.println("Object type: " + object.getClass() + ", size: " + InstrumentationAgent.getObjectSize(object) + " bytes"); } public static void main(String[] arguments) { String emptyString = ""; ...
StringClass stringClass = new StringClass(); printObjectSize(emptyString); printObjectSize(string); printObjectSize(stringArray); printObjectSize(anotherStringArray); printObjectSize(stringList); printObjectSize(stringBuilder); printObjectSize(maxIntPrimitive); ...
repos\tutorials-master\core-java-modules\core-java-jvm\src\main\java\com\baeldung\objectsize\InstrumentationExample.java
1
请完成以下Java代码
public long count() { this.resultType = ResultType.COUNT; if (commandExecutor != null) { return (Long) commandExecutor.execute(this); } return executeCount(Context.getCommandContext(), getParameterMap()); } public Object execute(CommandContext commandContext) { ...
Map<String, Object> parameterMap, int firstResult, int maxResults ); public U executeSingleResult(CommandContext commandContext) { List<U> results = executeList(commandContext, getParameterMap(), 0, Integer.MAX_VALUE); if (results.size() == 1) { return results.get(0)...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\AbstractNativeQuery.java
1
请完成以下Java代码
public void setDescription (java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Beschreibung. @return Beschreibung */ @Override public java.lang.String getDescription () { return (java.lang.String)get_Value(COLUMNNAME_Description); } /** * EntityType AD_Refer...
@return Dictionary Entity Type; Determines ownership and synchronization */ @Override public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNAME_EntityType); } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ @Override public voi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ColumnCallout.java
1
请完成以下Java代码
public class AsyncTasks { public static Random random = new Random(); @Async public CompletableFuture<String> doTaskOne() throws Exception { log.info("开始做任务一"); long start = System.currentTimeMillis(); Thread.sleep(random.nextInt(10000)); long end = System.currentTimeMillis...
long end = System.currentTimeMillis(); log.info("完成任务二,耗时:" + (end - start) + "毫秒"); return CompletableFuture.completedFuture("任务二完成"); } @Async public CompletableFuture<String> doTaskThree() throws Exception { log.info("开始做任务三"); long start = System.currentTimeMillis(); ...
repos\SpringBoot-Learning-master\2.x\chapter7-6\src\main\java\com\didispace\chapter76\AsyncTasks.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAD_Zebra_Config_ID (final int AD_Zebra_Config_ID) { if (AD_Zebra_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Zebra_Config_ID, null); else set_Value...
return get_ValueAsString(COLUMNNAME_Header_Line2); } @Override public void setIsDefault (final boolean IsDefault) { set_Value (COLUMNNAME_IsDefault, IsDefault); } @Override public boolean isDefault() { return get_ValueAsBoolean(COLUMNNAME_IsDefault); } @Override public void setName (final java.lang.S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Zebra_Config.java
1
请完成以下Java代码
public String getConfigurationFileFormat() { return this.configurationFileFormat; } public void setConfigurationFileFormat(String configurationFileFormat) { this.configurationFileFormat = configurationFileFormat; } public String getPackageName() { if (StringUtils.hasText(this.packageName)) { return this....
} public String getJavaVersion() { return this.javaVersion; } public void setJavaVersion(String javaVersion) { this.javaVersion = javaVersion; } public String getBaseDir() { return this.baseDir; } public void setBaseDir(String baseDir) { this.baseDir = baseDir; } }
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\project\ProjectRequest.java
1
请完成以下Java代码
public class XxlJobLogGlue { private int id; private int jobId; // 任务主键ID private String glueType; // GLUE类型 #com.xxl.job.core.glue.GlueTypeEnum private String glueSource; private String glueRemark; private Date addTime; private Date updateTime; public int getId() { return id; } public void setId(in...
} public String getGlueRemark() { return glueRemark; } public void setGlueRemark(String glueRemark) { this.glueRemark = glueRemark; } public Date getAddTime() { return addTime; } public void setAddTime(Date addTime) { this.addTime = addTime; } public Date getUpdateTime() { return updateTime; } ...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobLogGlue.java
1
请在Spring Boot框架中完成以下Java代码
public class ArticleMapping { @SerializedName("_id") private UUID _id = null; @SerializedName("customerId") private String customerId = null; @SerializedName("updated") private OffsetDateTime updated = null; public ArticleMapping _id(UUID _id) { this._id = _id; return this; } /** * Alb...
if (o == null || getClass() != o.getClass()) { return false; } ArticleMapping articleMapping = (ArticleMapping) o; return Objects.equals(this._id, articleMapping._id) && Objects.equals(this.customerId, articleMapping.customerId) && Objects.equals(this.updated, articleMapping.updated); ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\ArticleMapping.java
2
请在Spring Boot框架中完成以下Java代码
public class ExternalSystemId implements RepoIdAware { int repoId; public static ExternalSystemId ofRepoId(final int repoId) { return new ExternalSystemId(repoId); } @Nullable public static ExternalSystemId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new ExternalS...
private ExternalSystemId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, I_ExternalSystem.COLUMNNAME_ExternalSystem_ID); } @JsonValue public int toJson() { return getRepoId(); } public static boolean equals(@Nullable final ExternalSystemId o1, @Nullable final ExternalSystemId o2) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\externalsystem\ExternalSystemId.java
2
请完成以下Java代码
protected void rescheduleRegularCall(CommandContext commandContext, JobEntity jobEntity) { final BatchWindow nextBatchWindow = commandContext.getProcessEngineConfiguration().getBatchWindowManager() .getNextBatchWindow(ClockUtil.getCurrentTime(), commandContext.getProcessEngineConfiguration()); if (nextBat...
jobEntity.setJobHandlerConfiguration(configuration); } protected void cancelCountEmptyRuns(HistoryCleanupJobHandlerConfiguration configuration, JobEntity jobEntity) { configuration.setCountEmptyRuns(0); jobEntity.setJobHandlerConfiguration(configuration); } protected void reportMetrics(CommandContext ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupSchedulerCmd.java
1
请在Spring Boot框架中完成以下Java代码
protected Logger getLogger() { return this.logger; } private int validateDistributedSystemId(int distributedSystemId) { Assert.isTrue(distributedSystemId >= -1 && distributedSystemId < 256, String.format("Distributed System ID [%d] must be between -1 and 255", distributedSystemId)); return distributedSyst...
if (logger.isWarnEnabled()) { logger.warn("Distributed System Id [{}] was set on the ClientCache instance, which will not have any effect", distributedSystemId); } }); } @Bean PeerCacheConfigurer peerCacheDistributedSystemIdConfigurer() { return (beanName, cacheFactoryBean) -> getDistributedSyst...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\DistributedSystemIdConfiguration.java
2
请完成以下Java代码
public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setPlannedAmt (final BigDecimal PlannedAmt) { set_Value (COLUMNNAME_PlannedAmt, PlannedAmt); } @O...
} @Override 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(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ProjectPhase.java
1
请完成以下Java代码
public class ConsoleScannerClass { public static void main(String[] args) { System.out.println("Please enter your name and surname: "); Scanner scanner = new Scanner(System.in); String nameSurname = scanner.nextLine(); System.out.println("Please enter your gender: "); ch...
int sum = 0, count = 0; System.out.println("Please enter your college degrees. To finish, enter baeldung website url"); while (scanner.hasNextInt()) { int nmbr = scanner.nextInt(); sum += nmbr; count++; } int mean = sum / count; System.out.p...
repos\tutorials-master\core-java-modules\core-java-console\src\main\java\com\baeldung\console\ConsoleScannerClass.java
1
请完成以下Java代码
public Builder setContext(Context context) { this.context = context; return this; } public Builder setName(String name) { this.name = name; return this; } public Builder useSynchronization() { this.useSynchronization = true; return this; } private Optional<DelegatingAppender> getDelegat...
return stringAppender; } public StringAppender buildAndStart() { StringAppender stringAppender = build(); stringAppender.start(); return stringAppender; } } private final StringAppenderWrapper stringAppenderWrapper; protected StringAppender(StringAppenderWrapper stringAppenderWrapper) { if (s...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-starters\spring-geode-starter-logging\src\main\java\org\springframework\geode\logging\slf4j\logback\StringAppender.java
1
请完成以下Java代码
public void setAD_Table_Target_ID (int AD_Table_Target_ID) { if (AD_Table_Target_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Table_Target_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Table_Target_ID, Integer.valueOf(AD_Table_Target_ID)); } /** Get Ziel-Tabelle. @return Ziel-Tabelle */ public int get...
@return Quell-Datensatz-ID */ public int getRecord_Source_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Record_Source_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Ziel-Datensatz-ID. @param Record_Target_ID Ziel-Datensatz-ID */ public void setRecord_Target_ID (int Record_Tar...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Relation_Explicit_v1.java
1
请完成以下Java代码
private PrintingSegment createPrintingSegmentForQueueItem( @NonNull final I_C_Printing_Queue printingQueue) { final int trayRepoId = printingQueue.getAD_PrinterHW_MediaTray_ID(); final HardwarePrinterId printerId = HardwarePrinterId.ofRepoId(printingQueue.getAD_PrinterHW_ID()); final HardwareTrayId trayId =...
final I_AD_PrinterTray_Matching trayMatchingRecord = printingDAO.retrievePrinterTrayMatching(printerMatchingRecord, printerRouting, false); final int trayRepoId = trayMatchingRecord == null ? -1 : trayMatchingRecord.getAD_PrinterHW_MediaTray_ID(); final HardwarePrinterId printerId = HardwarePrinterId.ofRepoId(prin...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingDataFactory.java
1
请完成以下Java代码
public void updateAndPostEventOnQtyEnteredChange(final I_PP_Order ppOrderRecord) { if (ppOrderBL.isSomethingProcessed(ppOrderRecord)) { throw new LiberoException("Cannot quantity is not allowed because there is something already processed on this order"); // TODO: trl } final PPOrderChangedEventFactory eve...
{ final ProductBOMId bomId = ProductBOMId.ofRepoId(ppOrder.getPP_Product_BOM_ID()); final ProductId productIdOfBOM = productBOMDAO.getBOMProductId(bomId); if (ppOrder.getM_Product_ID() != productIdOfBOM.getRepoId()) { throw new AdempiereException(AdMessageKey.of("PP_Order_BOM_Doesnt_Match")) .markAsUs...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\validator\PP_Order.java
1
请完成以下Java代码
public class ComplexClass { private List<?> genericList; private Set<Integer> integerSet; public ComplexClass(List<?> genericArrayList, Set<Integer> integerHashSet) { super(); this.genericList = genericArrayList; this.integerSet = integerHashSet; } @Override public int...
return true; } protected List<?> getGenericList() { return genericList; } protected void setGenericArrayList(List<?> genericList) { this.genericList = genericList; } protected Set<Integer> getIntegerSet() { return integerSet; } protected void setIntegerSet(Set...
repos\tutorials-master\core-java-modules\core-java-lang-8\src\main\java\com\baeldung\equalshashcode\entities\ComplexClass.java
1
请完成以下Java代码
public static AttributeSetInstanceId nullToNone(@Nullable final AttributeSetInstanceId asiId) {return asiId != null ? asiId : NONE;} public static int toRepoId(@Nullable final AttributeSetInstanceId attributeSetInstanceId) { return attributeSetInstanceId != null ? attributeSetInstanceId.getRepoId() : -1; } priv...
} @Nullable public AttributeSetInstanceId asRegularOrNull() {return isRegular() ? this : null;} /** * Note that currently, according to this method, "NONE" ist not equal to an emptpy ASI */ public static boolean equals(@Nullable final AttributeSetInstanceId id1, @Nullable final AttributeSetInstanceId id2) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\mm\attributes\AttributeSetInstanceId.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Student getStudent() { return student; } public void setStudent(Student student) { this.student = student; } public Course getCourse() { return course; }...
public void setGrade(int grade) { this.grade = grade; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { ...
repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\manytomany\model\CourseRegistration.java
1
请完成以下Java代码
public Pet tags(List<Tag> tags) { this.tags = tags; return this; } public Pet addTagsItem(Tag tagsItem) { if (this.tags == null) { this.tags = new ArrayList<Tag>(); } this.tags.add(tagsItem); return this; } /** * Get tags * @return tags **/ @ApiModelProperty(value = ""...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedStrin...
repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\Pet.java
1
请完成以下Java代码
public class CostDetailCreateResultsList { public static final CostDetailCreateResultsList EMPTY = new CostDetailCreateResultsList(ImmutableList.of()); private final ImmutableList<CostDetailCreateResult> list; private CostDetailCreateResultsList(@NonNull final List<CostDetailCreateResult> list) { this.list = Im...
} public CostAmountDetailed getTotalAmountToPost(@NonNull final AcctSchema as) { return toAggregatedCostAmount().getTotalAmountToPost(as); } public AggregatedCostAmount toAggregatedCostAmount() { final CostSegment costSegment = CollectionUtils.extractSingleElement(list, CostDetailCreateResult::getCostSegment...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostDetailCreateResultsList.java
1
请在Spring Boot框架中完成以下Java代码
public OffsetDateTime getUpdated() { return updated; } public void setUpdated(OffsetDateTime updated) { this.updated = updated; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false...
sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\ArticleMapping.java
2
请完成以下Java代码
private static void checkType(@Nullable Type paramType, Set<Class<?>> avroTypes) { if (paramType == null) { return; } boolean container = isContainer(paramType); if (!container && paramType instanceof Class) { MergedAnnotations mergedAnnotations = MergedAnnotations.from((Class<?>) paramType); if (merge...
} } } private static boolean isContainer(Type paramType) { if (paramType instanceof ParameterizedType) { Type rawType = ((ParameterizedType) paramType).getRawType(); return (rawType.equals(List.class)) || rawType.getTypeName().equals(CONSUMER_RECORD_CLASS_NAME) || rawType.getTypeName().equals(CON...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\aot\KafkaAvroBeanRegistrationAotProcessor.java
1
请在Spring Boot框架中完成以下Java代码
private ITemplateResolver htmlTemplateResolver() { SpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver(); resolver.setApplicationContext(applicationContext); resolver.setPrefix("/WEB-INF/views/"); resolver.setCacheable(false); resolver.setTemplateMode(Tem...
registry.addInterceptor(localeChangeInterceptor()); } @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**", "/css/**") .addResourceLocations("/WEB-INF/resources/", "/WEB-INF/css/"); } @Override @Descriptio...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-5\src\main\java\com\baeldung\thymeleaf\config\WebMVCConfig.java
2
请完成以下Java代码
protected final String doIt() throws Exception { countExported = 0; countErrors = 0; retrieveValidSelectedDocuments().forEach(this::performNestedProcessInvocation); if (countExported > 0 && countErrors == 0) { return MSG_OK; } return MSG_Error + Services.get(IMsgBL.class).getMsg(getCtx(), errorMsg, n...
} catch (final Exception e) { final AdIssueId issueId = errorManager.createIssue(e); logMessage .append("Failed with AD_Issue_ID=").append(issueId.getRepoId()) .append("; Exception: ").append(e.getMessage()); countErrors++; } finally { addLog(logMessage.toString()); } } @NonNull pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\json\C_Invoice_Selection_Export_JSON.java
1
请完成以下Java代码
public int getC_BankStatementLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_BankStatementLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set C_DirectDebit_ID. @param C_DirectDebit_ID C_DirectDebit_ID */ public void setC_DirectDebit_ID (int C_DirectDebit_ID) { if (C_Dire...
{ return (String)get_Value(COLUMNNAME_Dtafile); } /** Set IsRemittance. @param IsRemittance IsRemittance */ public void setIsRemittance (boolean IsRemittance) { set_Value (COLUMNNAME_IsRemittance, Boolean.valueOf(IsRemittance)); } /** Get IsRemittance. @return IsRemittance */ public boolean isRemit...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\org\compiere\model\X_C_DirectDebit.java
1
请在Spring Boot框架中完成以下Java代码
public ExtendedDateType getPaymentDueDate() { return paymentDueDate; } /** * Sets the value of the paymentDueDate property. * * @param value * allowed object is * {@link ExtendedDateType } * */ public void ...
@XmlType(name = "", propOrder = { "additionalReference" }) public static class RelatedReferences { @XmlElement(name = "AdditionalReference") protected List<ReferenceType> additionalReference; /** * Other references if no dedicated field is available.Gets the value of t...
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\REMADVListLineItemExtensionType.java
2
请完成以下Java代码
public class Generics { // definition of a generic method public static <T> List<T> fromArrayToList(T[] a) { return Arrays.stream(a).collect(Collectors.toList()); } // definition of a generic method public static <T, G> List<G> fromArrayToList(T[] a, Function<T, G> mapperFunction) { ...
public static void paintAllBuildings(List<? extends Building> buildings) { buildings.forEach(Building::paint); } public static List<Integer> createList(int a) { List<Integer> list = new ArrayList<>(); list.add(a); return list; } public <T> List<T> genericMethod(List<T> ...
repos\tutorials-master\core-java-modules\core-java-lang-syntax\src\main\java\com\baeldung\generics\Generics.java
1
请完成以下Java代码
public int getA_Asset_Retirement_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Retirement_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNa...
} public I_C_InvoiceLine getC_InvoiceLine() throws RuntimeException { return (I_C_InvoiceLine)MTable.get(getCtx(), I_C_InvoiceLine.Table_Name) .getPO(getC_InvoiceLine_ID(), get_TrxName()); } /** Set Invoice Line. @param C_InvoiceLine_ID Invoice Detail Line */ public void setC_InvoiceLine_ID (int C...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Retirement.java
1
请在Spring Boot框架中完成以下Java代码
public class TrolleyService { @NonNull private final IWarehouseDAO warehouseDAO = Services.get(IWarehouseDAO.class); @NonNull private final LocatorScannedCodeResolverService locatorScannedCodeResolver; private final HashBiMap<UserId, LocatorQRCode> userId2locator = HashBiMap.create(); public LocatorQRCode setCurr...
synchronized (userId2locator) { userId2locator.forcePut(userId, locatorQRCode); } return locatorQRCode; } public Optional<LocatorQRCode> getCurrent(@NonNull final UserId userId) { synchronized (userId2locator) { return Optional.ofNullable(userId2locator.get(userId)); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\service\TrolleyService.java
2
请完成以下Java代码
public String getOperationRef() { return operationRef; } public void setOperationRef(String operationRef) { this.operationRef = operationRef; } public String getExtensionId() { return extensionId; } public void setExtensionId(String extensionId) { this.extensio...
public void setValues(ServiceTask otherElement) { super.setValues(otherElement); setImplementation(otherElement.getImplementation()); setImplementationType(otherElement.getImplementationType()); setResultVariableName(otherElement.getResultVariableName()); setType(otherElement.get...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ServiceTask.java
1
请完成以下Java代码
public DbOperation addRemovalTimeToVariableInstancesByProcessInstanceId(String processInstanceId, Date removalTime, Integer batchSize) { Map<String, Object> parameters = new HashMap<>(); parameters.put("processInstanceId", processInstanceId); parameters.put("removalTime", removalTime); parameters.put("m...
protected void configureQuery(HistoricVariableInstanceQueryImpl query) { getAuthorizationManager().configureHistoricVariableInstanceQuery(query); getTenantManager().configureQuery(query); } public DbOperation deleteHistoricVariableInstancesByRemovalTime(Date removalTime, int minuteFrom, int minuteTo, int b...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricVariableInstanceManager.java
1
请完成以下Java代码
public void disconnected(ExecutorDriver driver) { } @Override public void launchTask(ExecutorDriver driver, TaskInfo task) { Protos.TaskStatus status = Protos.TaskStatus.newBuilder().setTaskId(task.getTaskId()) .setState(Protos.TaskState.TASK_RUNNING).build(); driver.sendSt...
@Override public void killTask(ExecutorDriver driver, Protos.TaskID taskId) { } @Override public void frameworkMessage(ExecutorDriver driver, byte[] data) { } @Override public void shutdown(ExecutorDriver driver) { } @Override public void error(ExecutorDriver driver, String me...
repos\tutorials-master\apache-libraries\src\main\java\com\baeldung\mesos\executors\HelloWorldExecutor.java
1
请完成以下Java代码
public String getCamundaDecisionTenantId() { return camundaDecisionTenantIdAttribute.getValue(this); } public void setCamundaDecisionTenantId(String camundaDecisionTenantId) { camundaDecisionTenantIdAttribute.setValue(this, camundaDecisionTenantId); } @Override public String getCamundaMapDecisionRes...
.namespace(CAMUNDA_NS) .build(); camundaDecisionTenantIdAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DECISION_TENANT_ID) .namespace(CAMUNDA_NS) .build(); camundaMapDecisionResultAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_MAP_DECISION_RESULT) .namespace(C...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DecisionTaskImpl.java
1
请完成以下Java代码
public class BinaryFileWriter implements AutoCloseable { private static final int CHUNK_SIZE = 1024; private final OutputStream outputStream; private final ProgressCallback progressCallback; public BinaryFileWriter(OutputStream outputStream, ProgressCallback progressCallback) { this.outputStre...
long totalBytes = 0; while ((readBytes = input.read(dataBuffer)) != -1) { totalBytes += readBytes; outputStream.write(dataBuffer, 0, readBytes); progressCallback.onProgress(totalBytes / length * 100.0); } return totalBytes; } ...
repos\tutorials-master\libraries-http-2\src\main\java\com\baeldung\okhttp\download\BinaryFileWriter.java
1
请完成以下Java代码
protected String doIt() throws Exception { final BPartnerId bpartnerId = BPartnerId.ofRepoId(getProcessInfo().getRecord_ID()); final I_C_BPartner bpartnerRecord = bpartnerBL.getById(bpartnerId); final OrgChangeRequest orgChangeRequest = OrgChangeRequest.builder() .bpartnerId(bpartnerId) .startDate(p_st...
} @Override public void onParameterChanged(final String parameterName) { if (PARAM_AD_ORG_TARGET_ID.equals(parameterName) || PARAM_DATE_ORG_CHANGE.equals(parameterName)) { if (p_orgTargetId == null) { return; } final BPartnerId partnerId = BPartnerId.ofRepoId(getRecord_ID()); final Instant o...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\process\C_BPartner_MoveToAnotherOrg_ProcessHelper.java
1
请在Spring Boot框架中完成以下Java代码
public class Animal { @Id private long animalId; private String species; public Animal() {} public Animal(long animalId, String species) { this.animalId = animalId; this.species = species; } public long getAnimalId() { return animalId;
} public void setAnimalId(long animalId) { this.animalId = animalId; } public String getSpecies() { return species; } public void setSpecies(String species) { this.species = species; } }
repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\pojo\inheritance\Animal.java
2
请完成以下Java代码
public AdditionalRequiredFactorsBuilder<T> requireFactors(String... additionalAuthorities) { requireFactors((factors) -> { for (String authority : additionalAuthorities) { factors.requireFactor((factor) -> factor.authority(authority)); } }); return this; } public AdditionalRequiredFactorsBuil...
* set. * @return the {@link DefaultAuthorizationManagerFactory}. */ public DefaultAuthorizationManagerFactory<T> build() { DefaultAuthorizationManagerFactory<T> result = new DefaultAuthorizationManagerFactory<>(); AllRequiredFactorsAuthorizationManager<T> additionalChecks = this.factors.build(); result...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthorizationManagerFactories.java
1
请完成以下Java代码
public static ElementPermission none(final ElementResource resource) { return new ElementPermission(resource, ImmutableSet.of()); } @NonNull ElementResource resource; @Getter(AccessLevel.PRIVATE) @NonNull ImmutableSet<Access> accesses; private ElementPermission( @NonNull final ElementResource resource, ...
return Boolean.TRUE; } else if (hasAccess(Access.READ)) { return Boolean.FALSE; } else { return null; } } @Override public ElementPermission mergeWith(final Permission permissionFrom) { final ElementPermission elementPermissionFrom = PermissionInternalUtils.checkCompatibleAndCastToTarget(this...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\ElementPermission.java
1
请完成以下Java代码
private void buildSqlIfNeeded() { if (sqlWhereClause != null) { return; } if (isConstantTrue()) { final ConstantQueryFilter<Object> acceptAll = ConstantQueryFilter.of(true); sqlParams = acceptAll.getSqlParams(); sqlWhereClause = acceptAll.getSql(); } else {
sqlParams = Arrays.asList(lowerBoundValue, upperBoundValue); sqlWhereClause = "NOT ISEMPTY(" + "TSTZRANGE(" + lowerBoundColumnName.getColumnName() + ", " + upperBoundColumnName.getColumnName() + ", '[)')" + " * " + "TSTZRANGE(?, ?, '[)')" + ")"; } } private boolean isConstantTrue() { retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\DateIntervalIntersectionQueryFilter.java
1
请在Spring Boot框架中完成以下Java代码
public DataSize getMaxDiskUsagePerPart() { return this.maxDiskUsagePerPart; } public void setMaxDiskUsagePerPart(DataSize maxDiskUsagePerPart) { this.maxDiskUsagePerPart = maxDiskUsagePerPart; } public Integer getMaxParts() { return this.maxParts; } public void setMaxParts(Integer maxParts) { this.maxP...
return this.fileStorageDirectory; } public void setFileStorageDirectory(@Nullable String fileStorageDirectory) { this.fileStorageDirectory = fileStorageDirectory; } public Charset getHeadersCharset() { return this.headersCharset; } public void setHeadersCharset(Charset headersCharset) { this.headersChars...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\autoconfigure\ReactiveMultipartProperties.java
2
请完成以下Java代码
public static InputStream createInternetShortcut(String name, String url, String icon) { StringWriter sw = new StringWriter(); try { // 按照Windows快捷方式格式写入内容 sw.write("[InternetShortcut]\n"); sw.write("URL=" + url + "\n"); if (oConvertUtils.isNotEmpty(icon))...
// 处理本地文件路径:从文件路径提取文件名 return fileUrl.substring(fileUrl.lastIndexOf(File.separator) + 1); } catch (Exception e) { // 如果解析失败,使用时间戳作为文件名 return "file_" + System.currentTimeMillis(); } } /** * 生成ZIP中的文件名 * 功能:避免文件名冲突,为多个文件添加序号 * @param fileUrl 文件UR...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\FileDownloadUtils.java
1
请完成以下Java代码
public ResourceId getRawMaterialsPlantId() { loadIfNeeded(); return rawMaterialsPlantId; } public I_M_Warehouse getRawMaterialsWarehouse() { loadIfNeeded(); return rawMaterialsWarehouse; } public I_M_Locator getRawMaterialsLocator() { loadIfNeeded(); return rawMaterialsLocator; } public OrgId ge...
public BPartnerLocationId getOrgBPLocationId() { loadIfNeeded(); return orgBPLocationId; } public UserId getPlannerId() { loadIfNeeded(); return productPlanning == null ? null : productPlanning.getPlannerId(); } public WarehouseId getInTransitWarehouseId() { loadIfNeeded(); return inTransitWarehous...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\process\RawMaterialsReturnDDOrderLineCandidate.java
1
请完成以下Java代码
private static SqlViewGroupingBinding createSqlViewGroupingBinding() { return SqlViewGroupingBinding.builder() .groupBy(I_M_Packageable_V.COLUMNNAME_C_OrderSO_ID) .groupBy(I_M_Packageable_V.COLUMNNAME_C_BPartner_Customer_ID) .groupBy(I_M_Packageable_V.COLUMNNAME_M_Warehouse_ID) .columnSql(I_M_Package...
@Override public void customizeViewRow(final ViewRow.Builder rowBuilder) { final LookupValue orderOrBPLocationLV = createOrderOrBPLocation(rowBuilder); rowBuilder.putFieldValue(FIELDNAME_OrderOrBPLocation, orderOrBPLocationLV); } private LookupValue createOrderOrBPLocation(final ViewRow.Builder rowBuilder) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\PickingTerminalByOrderViewCustomizer.java
1
请完成以下Java代码
public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_M_Warehouse_ID, org.compiere.model.I...
/** Get Lager. @return Lager oder Ort für Dienstleistung */ @Override public int getM_Warehouse_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID); if (ii == null) return 0; return ii.intValue(); } /** Set ResetBufferInterval. @param ResetBufferInterval ResetBufferInterval */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inout\model\X_M_Material_Balance_Config.java
1
请完成以下Java代码
public class MDAGSet extends MDAG implements Set<String> { public MDAGSet(File dataFile) throws IOException { super(dataFile); } public MDAGSet(Collection<String> strCollection) { super(strCollection); } public MDAGSet() { } public MDAGSet(String dictionaryPat...
@Override public boolean containsAll(Collection<?> c) { for (Object e : c) if (!contains(e)) return false; return true; } @Override public boolean addAll(Collection<? extends String> c) { boolean modified = false; for (String e : c) ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\MDAG\MDAGSet.java
1
请完成以下Java代码
public final boolean isChecked() { return this.isSelected(); } private final void setChecked(final boolean checked) { this.setSelected(checked); } protected void onActionPerformed() { if (!isEnabled()) { return; } setEnabled(false);
try { action.setToggled(isChecked()); action.execute(); } catch (Exception e) { final int windowNo = Env.getWindowNo(this); Services.get(IClientUI.class).error(windowNo, e); } finally { setEnabled(true); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\sideactions\swing\CheckableSideActionComponent.java
1
请完成以下Java代码
public java.math.BigDecimal getDK_ParcelHeight () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DK_ParcelHeight); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Paketlänge. @param DK_ParcelLength Paketlänge */ @Override public void setDK_ParcelLength (java.math.BigDecimal DK_Parc...
set_Value (COLUMNNAME_DK_ParcelWidth, DK_ParcelWidth); } /** Get Paketbreite. @return Paketbreite */ @Override public java.math.BigDecimal getDK_ParcelWidth () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DK_ParcelWidth); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Referen...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java-gen\de\metas\shipper\gateway\derkurier\model\X_DerKurier_DeliveryOrderLine.java
1
请完成以下Java代码
public BigDecimal getQtyAllocated() { return storage.getQtyFree(); } @Override public BigDecimal getQtyToAllocate() { return storage.getQty().toBigDecimal(); } @Override public Object getTrxReferencedModel() { return referenceModel; } protected IProductStorage getStorage() { return storage; } ...
return HUListAllocationSourceDestination.of(hu); } @Override public boolean isReadOnly() { return readonly; } @Override public void setReadOnly(final boolean readonly) { this.readonly = readonly; } @Override public I_M_HU_Item getInnerHUItem() { return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\AbstractHUDocumentLine.java
1
请完成以下Java代码
public DataFetcherResult<ArticlePayload> favoriteArticle(@InputArgument("slug") String slug) { User user = SecurityUtil.getCurrentUser().orElseThrow(AuthenticationException::new); Article article = articleRepository.findBySlug(slug).orElseThrow(ResourceNotFoundException::new); ArticleFavorite articl...
return DataFetcherResult.<ArticlePayload>newResult() .data(ArticlePayload.newBuilder().build()) .localContext(article) .build(); } @DgsMutation(field = MUTATION.DeleteArticle) public DeletionStatus deleteArticle(@InputArgument("slug") String slug) { User user = SecurityUtil.getCurrent...
repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\graphql\ArticleMutation.java
1
请完成以下Java代码
private class FirewalledRequestAwareRequestDispatcher implements RequestDispatcher { private final String path; /** * @param path the {@code path} that will be used to obtain the delegate * {@link RequestDispatcher} from the original {@link HttpServletRequest}. */ FirewalledRequestAwareRequestDispatche...
getDelegateDispatcher().forward(request, response); } @Override public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException { getDelegateDispatcher().include(request, response); } private RequestDispatcher getDelegateDispatcher() { return RequestWrapper.s...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\firewall\RequestWrapper.java
1
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Produkt. @return Produkt, Leistung, Artikel */ @Override public int getM_Product_ID () { Integer...
else set_ValueNoCheck (COLUMNNAME_M_Product_LotNumber_Quarantine_ID, Integer.valueOf(M_Product_LotNumber_Quarantine_ID)); } /** Get M_Product_LotNumber_Quarantine. @return M_Product_LotNumber_Quarantine */ @Override public int getM_Product_LotNumber_Quarantine_ID () { Integer ii = (Integer)get_Value(CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\product\model\X_M_Product_LotNumber_Quarantine.java
1
请完成以下Java代码
public final class RestPreconditions { private RestPreconditions() { throw new AssertionError(); } // API /** * Check if some value was found, otherwise throw exception. * * @param expression * has value true if found, otherwise false * @throws MyResourceN...
* Check if some value was found, otherwise throw exception. * * @param expression * has value true if found, otherwise false * @throws MyResourceNotFoundException * if expression is false, means value not found. */ public static <T> T checkFound(final T resource...
repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\web\util\RestPreconditions.java
1
请在Spring Boot框架中完成以下Java代码
public String getName() { return name; } public int getVersion() { return version; } public String getResource() { return resource; } public String getDeploymentId() { return deploymentId; } public String getTenantId() { return tenantId; } public String getDecisionRequiremen...
return historyTimeToLive; } public String getVersionTag(){ return versionTag; } public static DecisionDefinitionDto fromDecisionDefinition(DecisionDefinition definition) { DecisionDefinitionDto dto = new DecisionDefinitionDto(); dto.id = definition.getId(); dto.key = definition.getKey(); ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\DecisionDefinitionDto.java
2
请完成以下Java代码
public int seekMovement() { if(fieldConcept.getValue() == null ) return 0; int HR_Movement_ID = 0; String date = DB.TO_DATE(fieldValidFrom.getValue()); int Process_ID = 0; KeyNamePair ppp = (KeyNamePair)fieldProcess.getSelectedItem(); int Employee_ID = 0; KeyNamePair ppe = (KeyNamePair)fieldEmployee.getS...
} //seekMovement /** * Get SQL Code of ColumnType for given sqlValue * @param sqlValue * @return sql select code */ private String getSQL_ColumnType(String sqlValue) { int columnType_Ref_ID = MTable.get(Env.getCtx(), MHRConcept.Table_ID) .getColumn(MHRConcept.COLUMNNAME_ColumnType) .getAD_Reference_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\form\VHRActionNotice.java
1
请在Spring Boot框架中完成以下Java代码
private <K, V> void add(Map<K, List<V>> map, K key, V value, boolean ifMissing) { List<V> values = map.computeIfAbsent(key, (k) -> new ArrayList<>()); if (!ifMissing || values.isEmpty()) { values.add(value); } } private ItemMetadata findMatchingItemMetadata(ItemMetadata metadata) { List<ItemMetadata> cand...
} public static String nestedPrefix(String prefix, String name) { String nestedPrefix = (prefix != null) ? prefix : ""; String dashedName = ConventionUtils.toDashedCase(name); nestedPrefix += nestedPrefix.isEmpty() ? dashedName : "." + dashedName; return nestedPrefix; } private static <T extends Comparable...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ConfigurationMetadata.java
2
请完成以下Java代码
public List<Map<String, String>> parseTable(Document doc, int tableOrder) { Element table = doc.select("table") .get(tableOrder); Element tbody = table.select("tbody") .get(0); Elements dataRows = tbody.select("tr"); Elements headerRow = table.select("tr") ...
colVals.get(colCount) .text(updateValue); } } } public void addRowToTable(Document doc, int tableOrder) { Element table = doc.select("table") .get(tableOrder); Element tbody = table.select("tbody") .get(0); Elements rows =...
repos\tutorials-master\jsoup\src\main\java\com\baeldung\jsoup\JsoupTableParser.java
1
请完成以下Java代码
private static long hash(String key) { // md5 byte MessageDigest md5; try { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("MD5 not supported", e); } md5.reset(); byte[] keyBytes =...
for (String address: addressList) { for (int i = 0; i < VIRTUAL_NODE_NUM; i++) { long addressHash = hash("SHARD-" + address + "-NODE-" + i); addressRing.put(addressHash, address); } } long jobHash = hash(String.valueOf(jobId)); SortedMap<L...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\route\strategy\ExecutorRouteConsistentHash.java
1
请完成以下Java代码
public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object object) throws Exception { // get token from http header String token = httpServletRequest.getHeader("token"); if(!(object instanceof HandlerMethod)){ return true; ...
jwtVerifier.verify(token); if (JWT.decode(token).getExpiresAt().before(new Date())) { throw new RuntimeException("token Expires"); } } catch (JWTVerificationException e) { throw new RuntimeException("401"); ...
repos\springboot-demo-master\jwt\src\main\java\com\et\jwt\interceptor\AuthenticationInterceptor.java
1
请完成以下Java代码
private static ViewId createPackingHUsViewIdFromParts( @NonNull final String pickingSlotsClearingViewIdPart, final int bpartnerId, final int bpartnerLocationId, final int version) { return ViewId.ofParts( PackingHUsViewFactory.WINDOW_ID, // part 0 pickingSlotsClearingViewIdPart, // part 1 Str...
} private PackingHUsViewKey(@NonNull final ViewId packingHUsViewId) { Check.assumeEquals(packingHUsViewId.getWindowId(), PackingHUsViewFactory.WINDOW_ID, "Invalid packingHUsViewId: {}", packingHUsViewId); this.bpartnerId = packingHUsViewId.getPartAsInt(2); this.bpartnerLocationId = packingHUsViewId.getPartAsI...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PackingHUsViewKey.java
1
请完成以下Java代码
public Workbook createWorkbook(final boolean useStreamingImplementation) { if (useStreamingImplementation) { return new SXSSFWorkbook(); } else { return new XSSFWorkbook(); } } @Override public String getCurrentPageMarkupTag() { // see XSSFHeaderFooter javadoc return "&P"; }
@Override public String getTotalPagesMarkupTag() { // see XSSFHeaderFooter javadoc return "&N"; } @Override public int getLastRowIndex() { return SpreadsheetVersion.EXCEL2007.getLastRowIndex(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\ExcelOpenXMLFormat.java
1
请完成以下Java代码
public ErrorItemBuilder createErrorItem() { return new ErrorItemBuilder(this); } public static final class OrderItemBuilder { private final PurchaseCandidate parent; private final PurchaseOrderItemBuilder innerBuilder; private OrderItemBuilder(@NonNull final PurchaseCandidate parent) { this.parent = ...
return this; } public PurchaseOrderItem buildAndAddToParent() { final PurchaseOrderItem newItem = innerBuilder.build(); parent.purchaseOrderItems.add(newItem); return newItem; } } public OrderItemBuilder createOrderItem() { return new OrderItemBuilder(this); } /** * Intended to be used by t...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\PurchaseCandidate.java
1
请完成以下Java代码
public void setAttribute (final java.lang.String Attribute) { set_Value (COLUMNNAME_Attribute, Attribute); } @Override public java.lang.String getAttribute() { return get_ValueAsString(COLUMNNAME_Attribute); } @Override public void setC_BPartner_Contact_QuickInput_Attributes_ID (final int C_BPartner_Cont...
{ set_ValueFromPO(COLUMNNAME_C_BPartner_Contact_QuickInput_ID, org.compiere.model.I_C_BPartner_Contact_QuickInput.class, C_BPartner_Contact_QuickInput); } @Override public void setC_BPartner_Contact_QuickInput_ID (final int C_BPartner_Contact_QuickInput_ID) { if (C_BPartner_Contact_QuickInput_ID < 1) set_V...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Contact_QuickInput_Attributes.java
1
请完成以下Java代码
public void setQty (BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } /** Get Quantity. @return Quantity */ public BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; } /** RewardMode AD_Reference_ID=53389 */ public sta...
*/ public String getRewardType () { return (String)get_Value(COLUMNNAME_RewardType); } /** Set Reihenfolge. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionReward.java
1