instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
protected int getLastDayOfMonth(int monthNum, int year) { switch (monthNum) { case 1: return 31; case 2: return (isLeapYear(year)) ? 29 : 28; case 3: return 31; case 4: return 30; case 5: ...
case 11: return 30; case 12: return 31; default: throw new IllegalArgumentException("Illegal month number: " + monthNum); } } } class ValueSet { public int value; public int pos; }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\calendar\CronExpression.java
1
请完成以下Java代码
public void setExternalSystem_Config_ID (final int ExternalSystem_Config_ID) { if (ExternalSystem_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_ID, ExternalSystem_Config_ID); } @Override public int getExternalSystem_...
{ return get_ValueAsInt(COLUMNNAME_ExternalSystem_Config_WooCommerce_ID); } @Override public void setExternalSystemValue (final java.lang.String ExternalSystemValue) { set_Value (COLUMNNAME_ExternalSystemValue, ExternalSystemValue); } @Override public java.lang.String getExternalSystemValue() { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_WooCommerce.java
1
请完成以下Java代码
public void deleteAndUpdateCandidatesByDDOrderId(@NonNull final DDOrderId ddOrderId) { final DDOrderCandidateAllocList list = ddOrderCandidateAllocRepository.getByDDOrderId(ddOrderId); deleteAndUpdateCandidates(list); } private void deleteAndUpdateCandidates(@NonNull final DDOrderCandidateAllocList list) { i...
for (final DDOrderCandidate candidate : candidates.values()) { final DDOrderCandidateAllocList alloc = allocationsByCandidateId.getOrDefault(candidate.getId(), DDOrderCandidateAllocList.EMPTY); final Quantity qtyProcessed = alloc.getQtySum().orElseGet(() -> candidate.getQtyEntered().toZero()); candidate.setQ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\DDOrderCandidateService.java
1
请完成以下Java代码
public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { return null; } /** * Does nothing, the code is commented out for the time being. Probably the whole class will be removed.<br> * Don't use this stuff. We have a physical DB-index, and if a DBUniqueConstraintException is thrown anywhere in AD...
// { // // there is no need to go with further validation since our PO is not subject of current index // continue; // } // // index.validateData(po, trxName); // } // } // } // @formatter:on return null; } @Override public String docValidate(PO po, int timing) { return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MIndexValidator.java
1
请在Spring Boot框架中完成以下Java代码
public String encode(CharSequence rawPassword) { return getPasswordEncoder().encode(rawPassword); } @Override public boolean matches(CharSequence rawPassword, String encodedPassword) { return getPasswordEncoder().matches(rawPassword, encodedPassword); } @Override public boolean upgradeEncoding(Strin...
return this.passwordEncoder; } this.passwordEncoder = this.applicationContext.getBeanProvider(PasswordEncoder.class) .getIfUnique(PasswordEncoderFactories::createDelegatingPasswordEncoder); return this.passwordEncoder; } @Override public String toString() { return getPasswordEncoder().toString();...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configuration\AuthenticationConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public int getRetentionPeriod() { return this.retentionPeriod; } public void setRetentionPeriod(int retentionPeriod) { this.retentionPeriod = retentionPeriod; } public boolean isAppend() { return this.append; } public void setAppend(boolean append) { this.append = append; } public @Nulla...
*/ private @Nullable Integer maxQueueCapacity; /** * Maximum thread idle time. */ private Duration idleTimeout = Duration.ofMillis(60000); public Integer getAcceptors() { return this.acceptors; } public void setAcceptors(Integer acceptors) { this.acceptors = acceptors; } public Integer g...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\autoconfigure\JettyServerProperties.java
2
请完成以下Java代码
public String getEngineName() { return "juel"; } public String getEngineVersion() { return "1.0"; } public List<String> getExtensions() { return extensions; } public String getLanguageName() { return "JSP 2.1 EL"; } public String getLanguageVersion() {...
if (key.equals(ScriptEngine.NAME)) { return getLanguageName(); } else if (key.equals(ScriptEngine.ENGINE)) { return getEngineName(); } else if (key.equals(ScriptEngine.ENGINE_VERSION)) { return getEngineVersion(); } else if (key.equals(ScriptEngine.LANGUAGE)) ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\scripting\JuelScriptEngineFactory.java
1
请完成以下Java代码
public int getHR_Process_ID(){ return m_HR_Process_ID; } public int getHR_Concept_ID(){ return m_HR_Concept_ID; } public String getAccountSign(){ return m_AccountSign; } @Override public BPartnerId getBPartnerId(){ return m_C_BPartner_ID; } @Override public ActivityId getActivityId() { retur...
public BigDecimal getAmount() { return m_Amount; } public int getHR_Department_ID() { return m_HR_Department_ID; } public int getC_BP_Group_ID() { return m_C_BP_Group_ID; } } // DocLine_Payroll
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\compiere\acct\DocLine_Payroll.java
1
请完成以下Java代码
public static <T> T lookup(Class<T> clazz) { return lookup(clazz, true); } /** * @param optional if <code>false</code> then the bean must exist. * @return a ContextualInstance of the given type if optional is <code>false</code>. If optional is <code>true</code> null might be returned if no bean got found...
return (T) bm.getReference(bean, type, creationalContext); } } private static boolean isDependentScoped(Bean<?> bean) { return Dependent.class.equals(bean.getScope()); } private static void releaseOnContextClose(CreationalContext<?> creationalContext, Bean<?> bean) { CommandContext commandContext...
repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\util\ProgrammaticBeanLookup.java
1
请完成以下Java代码
private void close(Connector connector) { connector.pause(); connector.getProtocolHandler().closeServerSocketGraceful(); } private void awaitInactiveOrAborted() { try { for (Container host : this.tomcat.getEngine().findChildren()) { for (Container context : host.findChildren()) { while (!this.abort...
return true; } } return false; } catch (Exception ex) { throw new RuntimeException(ex); } } void abort() { this.aborted = true; } }
repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\GracefulShutdown.java
1
请完成以下Java代码
public void setPolicy(CrossOriginResourcePolicy resourcePolicy) { Assert.notNull(resourcePolicy, "resourcePolicy cannot be null"); this.delegate = createDelegate(resourcePolicy); } @Override public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) { return (this.delegate != null) ? this.delegate.writeHt...
CROSS_ORIGIN("cross-origin"); private final String policy; CrossOriginResourcePolicy(String policy) { this.policy = policy; } public String getPolicy() { return this.policy; } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\CrossOriginResourcePolicyServerHttpHeadersWriter.java
1
请完成以下Java代码
public int getC_Print_Job_Instructions_ID() { return get_ValueAsInt(COLUMNNAME_C_Print_Job_Instructions_ID); } @Override public de.metas.printing.model.I_C_Print_Job_Line getC_PrintJob_Line_From() { return get_ValueAsPO(COLUMNNAME_C_PrintJob_Line_From_ID, de.metas.printing.model.I_C_Print_Job_Line.class); }...
@Override public void setErrorMsg (java.lang.String ErrorMsg) { set_Value (COLUMNNAME_ErrorMsg, ErrorMsg); } @Override public java.lang.String getErrorMsg() { return (java.lang.String)get_Value(COLUMNNAME_ErrorMsg); } @Override public void setHostKey (java.lang.String HostKey) { set_Value (COLUMNNAME...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Print_Job_Instructions.java
1
请完成以下Java代码
public boolean isContinue() { // continue checking rows until we find out that the action shall be enabled return !actionEnabled.get(); } @Override public void process(final SelectableRowAdapter row) { // enable the action if there is at least one row on which we can do something if (isE...
if (!selectionModel.isSelectedIndex(selectionRowIndex)) { continue; } SelectableRowAdapter row = new SelectableRowAdapter(tableModel, selectionRowIndex, selectionColumnIndex); processor.process(row); } } protected static abstract class SelectableRowProcessor { public abstract void process(Sele...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AbstractManageSelectableRowsAction.java
1
请完成以下Java代码
public final class CreateRabbits { public static Rabbit createRabbitUsingNewOperator() { Rabbit rabbit = new Rabbit(); return rabbit; } public static Rabbit createRabbitUsingClassForName() throws InstantiationException, IllegalAccessException, ClassNotFoundException { Rabb...
ClonableRabbit clonedRabbit = (ClonableRabbit) originalRabbit.clone(); return clonedRabbit; } public static SerializableRabbit createRabbitUsingDeserialization(File file) throws IOException, ClassNotFoundException { try (FileInputStream fis = new FileInputStream(file); ...
repos\tutorials-master\core-java-modules\core-java-lang-oop-constructors-2\src\main\java\com\baeldung\objectcreation\utils\CreateRabbits.java
1
请完成以下Java代码
protected final ProcessPreconditionsResolution acceptIfOrderLinesHaveSameGroupId(final IProcessPreconditionsContext context) { final Set<OrderLineId> orderLineIds = getSelectedOrderLineIds(context); if (orderLineIds.isEmpty()) { return ProcessPreconditionsResolution.rejectWithInternalReason("Select some order...
{ return ProcessPreconditionsResolution.rejectWithInternalReason("Select lines which are not already grouped"); } return ProcessPreconditionsResolution.accept(); } private static final Set<OrderLineId> getSelectedOrderLineIds(final IProcessPreconditionsContext context) { return context.getSelectedIncluded...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\process\OrderCompensationGroupProcess.java
1
请完成以下Java代码
public class X_AD_WF_ProcessData extends org.compiere.model.PO implements I_AD_WF_ProcessData, org.compiere.model.I_Persistent { private static final long serialVersionUID = -171195175L; /** Standard Constructor */ public X_AD_WF_ProcessData (final Properties ctx, final int AD_WF_ProcessData_ID, @Nullable f...
@Override public void setAttributeName (final java.lang.String AttributeName) { set_Value (COLUMNNAME_AttributeName, AttributeName); } @Override public java.lang.String getAttributeName() { return get_ValueAsString(COLUMNNAME_AttributeName); } @Override public void setAttributeValue (final java.lang.Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_ProcessData.java
1
请完成以下Java代码
public List<DefaultMetadataElement> getContent() { return Collections.unmodifiableList(withReadableContent(ArrayList::new)); } public void addContent(DefaultMetadataElement element) { withWritableContent((content) -> content.add(element)); } public void setContent(List<DefaultMetadataElement> newContent) { ...
if (get(it.getId()) == null) { this.content.add(it); } })); } private <T> T withReadableContent(Function<List<DefaultMetadataElement>, T> consumer) { this.contentLock.readLock().lock(); try { return consumer.apply(this.content); } finally { this.contentLock.readLock().unlock(); } } privat...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\SingleSelectCapability.java
1
请在Spring Boot框架中完成以下Java代码
public Object insertMany(){ // 设置两个用户信息 User user1 = new User() .setId("11") .setAge(22) .setSex("男") .setRemake("无") .setSalary(1500) .setName("shiyi") .setBirthday(new Date()) ...
.setStatus(new Status().setHeight(180).setWeight(150)); // 使用户信息加入结合 List<User> userList = new ArrayList<>(); userList.add(user1); userList.add(user2); // 插入一条用户数据,如果某个文档信息已经存在就抛出异常 Collection<User> newUserList = mongoTemplate.insert(userList, COLLECTION_NAME); //...
repos\springboot-demo-master\mongodb\src\main\java\demo\et\mongodb\service\InsertService.java
2
请完成以下Java代码
public static void loadDictionary(BufferedReader br, TreeMap<String, CoreDictionary.Attribute> storage, boolean isCSV, Nature defaultNature) throws IOException { String splitter = "\\s"; if (isCSV) { splitter = ","; } String line; boolean firstLine = true;...
attribute.frequency[i] = Integer.parseInt(param[2 + 2 * i]); attribute.totalFrequency += attribute.frequency[i]; } } storage.put(param[0], attribute); } br.close(); } public static void writeCustomNature(DataOutputStream out, LinkedHas...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\io\IOUtil.java
1
请完成以下Java代码
class UnClosePickingCandidateCommand { private final transient IHUPickingSlotBL huPickingSlotBL = Services.get(IHUPickingSlotBL.class); private final PickingCandidate pickingCandidate; @Builder private UnClosePickingCandidateCommand(@NonNull final PickingCandidate pickingCandidate) { this.pickingCandidate = pi...
final PickingSlotId pickingSlotId = pickingCandidate.getPickingSlotId(); if (pickingSlotId == null) { throw new AdempiereException("Not in a picking slot"); } if (huPickingSlotBL.isPickingRackSystem(pickingSlotId)) { throw new AdempiereException("Unclosing a picking candidate when picking slot is a rac...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\UnClosePickingCandidateCommand.java
1
请完成以下Java代码
private static Timestamp truncateDateByGranularity(final Timestamp date, final Granularity granularity) { if (granularity == Granularity.Day) { return TimeUtil.trunc(date, TimeUtil.TRUNC_DAY); } else if (granularity == Granularity.Week) { return TimeUtil.trunc(date, TimeUtil.TRUNC_WEEK); } else if ...
} @NonNull private List<OLCand> getEligibleOLCand() { final GetEligibleOLCandRequest request = GetEligibleOLCandRequest.builder() .aggregationInfo(aggregationInfo) .orderDefaults(orderDefaults) .selection(selectionId) .asyncBatchId(asyncBatchId) .build(); return olCandProcessingHelper.getOL...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandsProcessorExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public void execute() { final WorkplaceId workplaceId = request.getWorkplaceId(); final Set<ShipmentScheduleId> shipmentScheduleIds = request.getShipmentScheduleAndJobScheduleIds().getShipmentScheduleIds(); if (shipmentScheduleIds.isEmpty()) { return; } shipmentSchedules.warmUpByIds(shipmentScheduleIds)...
{ throw new AdempiereException(ERROR_CARRIER_PRODUCT_NOT_SET, shipmentSchedule.getM_ShipmentSchedule_ID()); } } private @NonNull Quantity computeQtyToPick(final PickingJobSchedule jobSchedule) { final I_C_UOM uom = jobSchedule.getQtyToPick().getUOM(); final BigDecimal qtyToPickBD = request.getQtyToPickBD()...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job_schedule\service\commands\CreateOrUpdatePickingJobSchedulesCommand.java
2
请在Spring Boot框架中完成以下Java代码
public String getCaseDefinitionUrl() { return caseDefinitionUrl; } public void setCaseDefinitionUrl(String caseDefinitionUrl) { this.caseDefinitionUrl = caseDefinitionUrl; } @ApiModelProperty(example = "aCaseDefinitionName") public String getCaseDefinitionName() { retur...
return referenceType; } public void setReferenceType(String referenceType) { this.referenceType = referenceType; } public List<RestVariable> getVariables() { return variables; } public void setVariables(List<RestVariable> variables) { this.variables = variables; } ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\CaseInstanceResponse.java
2
请完成以下Java代码
private static BufferedImage createErrorImage(String verifyCode) { BufferedImage errorImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); Graphics2D graphics = null; try { graphics = (Graphics2D) errorImage.getGraphics(); // 白色背景 ...
} return errorImage; } /** * 获取指定范围内的随机颜色 * * @param minColorValue 最小颜色值 * @param maxColorValue 最大颜色值 * @param random 随机数生成器 * @return 随机颜色 */ private static Color getRandomColor(int minColorValue, int maxColorValue, Random random) { // 确保颜色值在有效范...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\util\RandImageUtil.java
1
请在Spring Boot框架中完成以下Java代码
QueueChannel multipleofThreeChannel() { return new QueueChannel(); } @Bean QueueChannel remainderIsOneChannel() { return new QueueChannel(); } @Bean QueueChannel remainderIsTwoChannel() { return new QueueChannel(); } boolean isMultipleOfThree(Integer number) { ...
} boolean isRemainderTwo(Integer number) { return number % 3 == 2; } @Bean public IntegrationFlow classify() { return flow -> flow.split() .<Integer, Integer> route(number -> number % 3, mapping -> mapping .channelMapping(0, "multipleofThr...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\subflows\subflowmapping\RouterExample.java
2
请完成以下Java代码
public class SysUserPosition implements Serializable { private static final long serialVersionUID = 1L; /**主键*/ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") private String id; /**用户id*/ @Excel(name = "用户id", width = 15) @Schema(description = "用户id") private String userId; /**职...
@Schema(description = "创建人") private String createBy; /**创建时间*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @Schema(description = "创建时间") private Date createTime; /**修改人*/ @Schema(description = "修改人") private String updateBy; /**修改时间*/ @JsonF...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysUserPosition.java
1
请完成以下Java代码
public AuthenticationResult verifyUser(BasicUserCredentialsDto credentialsDto) { if (credentialsDto.getUsername() == null || credentialsDto.getPassword() == null) { throw new InvalidRequestException(Status.BAD_REQUEST, "Username and password are required"); } IdentityService identityService = getProce...
User user = null; UserProfileDto profileDto = dto.getProfile(); if (profileDto != null) { String id = sanitizeUserId(profileDto.getId()); user = identityService.newUser(id); user.setFirstName(profileDto.getFirstName()); user.setLastName(profileDto.getLastName()); use...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\IdentityRestServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getServiceValue() { return "LocalFileSyncPurchaseOrders"; } @Override public String getExternalSystemTypeCode() { return PCM_SYSTEM_NAME; } @Override public String getEnableCommand() { return START_PURCHASE_ORDER_SYNC_LOCAL_FILE_ROUTE; } @Override public String getDisableCommand()
{ return STOP_PURCHASE_ORDER_SYNC_LOCAL_FILE_ROUTE; } @NonNull public String getStartPurchaseOrderRouteId() { return getExternalSystemTypeCode() + "-" + getEnableCommand(); } @NonNull public String getStopPurchaseOrderRouteId() { return getExternalSystemTypeCode() + "-" + getDisableCommand(); } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\purchaseorder\LocalFilePurchaseOrderSyncServicePCMRouteBuilder.java
2
请完成以下Java代码
public java.lang.String getExternalId() { return get_ValueAsString(COLUMNNAME_ExternalId); } @Override public void setIsBillTo (final boolean IsBillTo) { set_Value (COLUMNNAME_IsBillTo, IsBillTo); } @Override public boolean isBillTo() { return get_ValueAsBoolean(COLUMNNAME_IsBillTo); } @Override ...
* Reference name: Role */ public static final int ROLE_AD_Reference_ID=541254; /** Main Producer = MP */ public static final String ROLE_MainProducer = "MP"; /** Hostpital = HO */ public static final String ROLE_Hostpital = "HO"; /** Physician Doctor = PD */ public static final String ROLE_PhysicianDoctor = "...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Relation.java
1
请完成以下Java代码
protected PreparedStatement createPreparedStatement() {return DB.prepareStatement(sql, ITrx.TRXNAME_ThreadInherited);} @Override protected ImportRecordType fetch(final ResultSet rs) throws SQLException { return recordLoader.retrieveImportRecord(ctx, rs); } }); } @Override public void runSQLAfterR...
final AdempiereException metasfreshEx = AdempiereException.wrapIfNeeded(ex); final AdIssueId issueId = errorManager.createIssue(metasfreshEx); loggable.addLog("Failed running " + function + ": " + AdempiereException.extractMessage(metasfreshEx) + " (AD_Issue_ID=" + issueId.getRepoId() + ")"); throw metasfre...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\SqlImportSource.java
1
请在Spring Boot框架中完成以下Java代码
public class AdminController { @Autowired public Client client; @GetMapping("/users") public UserList getUsers() { return client.listUsers(); } @GetMapping("/user") public UserList searchUserByEmail(@RequestParam String query) { return client.listUsers(query, null, null, n...
@GetMapping("/createUser") public User createUser() { char[] tempPassword = {'P','a','$','$','w','0','r','d'}; User user = UserBuilder.instance() .setEmail("norman.lewis@email.com") .setFirstName("Norman") .setLastName("Lewis") .setPassword(tempPasswor...
repos\tutorials-master\spring-security-modules\spring-security-okta\src\main\java\com\baeldung\okta\controller\AdminController.java
2
请在Spring Boot框架中完成以下Java代码
public class MainApplication { @Autowired private BookstoreService bookstoreService; public static void main(String[] args) { SpringApplication.run(MainApplication.class, args); } @Bean public ApplicationRunner init() { return args -> { System.out.println("\n\nFetc...
System.out.println("-----------------------------------------------------------------"); bookstoreService.fetchBooksWithAuthorsViaQuery(); System.out.println("\n\nFetch books with authors via query and simple DTO"); System.out.println("-----------------------------------------------...
repos\Hibernate-SpringBoot-master\HibernateSpringBootNestedVsVirtualProjection\src\main\java\com\bookstore\MainApplication.java
2
请完成以下Java代码
public void updateToken(Token updatedToken) { super.update((TokenEntity) updatedToken); } @Override public boolean isNewToken(Token token) { return ((TokenEntity) token).getRevision() == 0; } @Override public List<Token> findTokenByQueryCriteria(TokenQueryImpl query) { ...
} @Override public TokenQuery createNewTokenQuery() { return new TokenQueryImpl(getCommandExecutor()); } @Override public List<Token> findTokensByNativeQuery(Map<String, Object> parameterMap) { return dataManager.findTokensByNativeQuery(parameterMap); } @Override publi...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\TokenEntityManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public EmbeddedCacheManager infinispanCacheManager(CacheProperties cacheProperties, ObjectProvider<ConfigurationBuilder> defaultConfigurationBuilder) throws IOException { EmbeddedCacheManager cacheManager = createEmbeddedCacheManager(cacheProperties); List<String> cacheNames = cacheProperties.getCacheNames(); ...
return new DefaultCacheManager(in); } } return new DefaultCacheManager(); } private org.infinispan.configuration.cache.Configuration getDefaultCacheConfiguration( @Nullable ConfigurationBuilder defaultConfigurationBuilder) { if (defaultConfigurationBuilder != null) { return defaultConfigurationBuilder...
repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\autoconfigure\InfinispanCacheConfiguration.java
2
请完成以下Spring Boot application配置
# -------------------------------------------------------------------------------- # HTTP server (tomcat) # -------------------------------------------------------------------------------- server: port: 9090 info: app: name: metasfresh-admin title: metasfresh Spring Boot Admin web application spring: cl...
metadata: management.context-path: / webapi: - uri: http://localhost:8080 metadata: management.context-path: /
repos\metasfresh-new_dawn_uat\misc\services\admin\src\main\resources\application.yml
2
请完成以下Java代码
public class BarbecueBarcodeGenerator { private static final Font BARCODE_TEXT_FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14); public static BufferedImage generateUPCABarcodeImage(String barcodeText) throws Exception { Barcode barcode = BarcodeFactory.createUPCA(barcodeText); //checksum is automatic...
} public static BufferedImage generateCode128BarcodeImage(String barcodeText) throws Exception { Barcode barcode = BarcodeFactory.createCode128(barcodeText); barcode.setFont(BARCODE_TEXT_FONT); return BarcodeImageHandler.getImage(barcode); } public static BufferedImage generatePDF...
repos\tutorials-master\spring-boot-modules\spring-boot-libraries\src\main\java\com\baeldung\barcodes\generators\BarbecueBarcodeGenerator.java
1
请完成以下Java代码
public class HistoricStatisticsManager extends AbstractManager { @SuppressWarnings("unchecked") public List<HistoricActivityStatistics> getHistoricStatisticsGroupedByActivity(HistoricActivityStatisticsQueryImpl query, Page page) { if (ensureHistoryReadOnProcessDefinition(query)) { return getDbEntityManag...
if(isAuthorizationEnabled() && getCurrentAuthentication() != null && commandContext.isAuthorizationCheckEnabled()) { String processDefinitionId = query.getProcessDefinitionId(); ProcessDefinitionEntity definition = getProcessDefinitionManager().findLatestProcessDefinitionById(processDefinitionId); if...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricStatisticsManager.java
1
请完成以下Java代码
public static boolean isOldValues(@NonNull final Object model) { if (POWrapper.isHandled(model)) { return POWrapper.isOldValues(model); } else if (GridTabWrapper.isHandled(model)) { return GridTabWrapper.isOldValues(model); } else if (POJOWrapper.isHandled(model)) { return POJOWrapper.isOldVal...
} /** * Disables the read only (i.e. not updateable) columns enforcement. * So basically, after you are calling this method you will be able to change the values for any not updateable column. * <p> * WARNING: please make sure you know what are you doing before calling this method. If you are not sure, please...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\InterfaceWrapperHelper.java
1
请在Spring Boot框架中完成以下Java代码
public class Foo implements Serializable { private static final long serialVersionUID = 1L; public Foo() { super(); } public Foo(final String name) { super(); this.name = name; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "ID") priv...
return id; } public void setId(final Long id) { this.id = id; } public String getName() { return name; } public void setName(final String name) { this.name = name; } }
repos\tutorials-master\persistence-modules\spring-jpa-2\src\main\java\com\baeldung\spring\hibernate\Foo.java
2
请完成以下Java代码
public class HUException extends AdempiereException { private static final long serialVersionUID = 800341714184424257L; public static final HUException ofAD_Message(final String adMessage) { final String adMessageEffective = !Check.isEmpty(adMessage, true) ? adMessage : "Error"; return new HUException("@" + ad...
super(adMessage, params); } @Override public HUException setParameter(final @NonNull String name, @Nullable final Object value) { super.setParameter(name, value); return this; } @Override public final @NonNull HUException appendParametersToMessage() { super.appendParametersToMessage(); return this; }...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\exceptions\HUException.java
1
请完成以下Java代码
public void run(String... args) { logger.info("payTimeoutSeconds:" + orderProperties.getPayTimeoutSeconds()); logger.info("createFrequencySeconds:" + orderProperties.getCreateFrequencySeconds()); } } @Component public class ValueCommandLineRunner implements CommandLineRunne...
@Value("${order.create-frequency-seconds}") private Integer createFrequencySeconds; // @Value("${order.desc}") // private String desc; @Override public void run(String... args) { logger.info("payTimeoutSeconds:" + payTimeoutSeconds); logger.info("createFre...
repos\SpringBoot-Labs-master\lab-43\lab-43-demo\src\main\java\cn\iocoder\springboot\lab43\propertydemo\Application.java
1
请完成以下Java代码
public class MKTG_Channel { public static final MKTG_Channel INSTANCE = new MKTG_Channel(); private final IMKTGChannelDao mktgChannelDao = Services.get(IMKTGChannelDao.class); private final IUserDAO userDAO = Services.get(IUserDAO.class); private static final AdMessageKey MSG_MUST_HAVE_CHANNEL = AdMessageKey.of("...
Set<UserId> usersSet = mktgChannelDao.retrieveUsersHavingChannel(mktgChannel.getMKTG_Channel_ID()); for (final UserId userId : usersSet) { if (mktgChannelDao.retrieveMarketingChannelsCountForUser(userId) > 0) { canBeDeleted = false; break; } } if (!canBeDeleted) { throw new AdempiereExcep...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\interceptor\MKTG_Channel.java
1
请完成以下Java代码
public class ObjectOverheadBenchmark { private static final ThreadLocalRandom RANDOM = ThreadLocalRandom.current(); @State(Scope.Benchmark) public static class Input { public Supplier<List<Integer>> randomNumbers = () -> RANDOM.ints().limit(10000).boxed().collect(Collectors.toList()); } @...
@Benchmark @BenchmarkMode(Mode.Throughput) public void sortingObjectArray(Input input, Blackhole blackhole) { final Integer[] array = input.randomNumbers.get().toArray(new Integer[0]); Arrays.sort(array); blackhole.consume(array); } @Benchmark @BenchmarkMode(Mode.Throughput)...
repos\tutorials-master\core-java-modules\core-java-collections-5\src\main\java\com\baeldung\collectionsvsarrays\ObjectOverheadBenchmark.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!hasLockedShipmentScheduleIds()) { return ProcessPreconditionsResolution.rejectWithInternalReason("no locked rows selected"); } return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() throws Except...
} private boolean hasLockedShipmentScheduleIds() { return streamLockedShipmentScheduleIds().anyMatch(Predicates.alwaysTrue()); } private Stream<ShipmentScheduleId> streamLockedShipmentScheduleIds() { return streamSelectedRows() .filter(PackageableRow::isLocked) .flatMap(row -> row.getShipmentSchedule...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\packageable\process\PackageablesView_UnlockAll.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); } public I_M_FreightCost getM_FreightCost()...
return 0; return ii.intValue(); } public I_M_Shipper getM_Shipper() throws RuntimeException { return (I_M_Shipper)MTable.get(getCtx(), I_M_Shipper.Table_Name) .getPO(getM_Shipper_ID(), get_TrxName()); } /** Set Lieferweg. @param M_Shipper_ID Methode oder Art der Warenlieferung */ public void se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_M_FreightCostShipper.java
1
请在Spring Boot框架中完成以下Java代码
public void method01() { // 查询订单 OrderDO order = orderRepository.findById(1).orElse(null); System.out.println(order); // 查询用户 UserDO user = userRepository.findById(1).orElse(null); System.out.println(user); } @Transactional // 报错,找不到事务管理器 public void method02...
} @Transactional(transactionManager = DBConstants.TX_MANAGER_USERS) public void method032() { UserDO user = userRepository.findById(1).orElse(null); System.out.println(user); } @Transactional(transactionManager = DBConstants.TX_MANAGER_ORDERS) public void method05() { // 查询...
repos\SpringBoot-Labs-master\lab-17\lab-17-dynamic-datasource-springdatajpa\src\main\java\cn\iocoder\springboot\lab17\dynamicdatasource\service\OrderService.java
2
请完成以下Java代码
public void setCanonicalizationMethod(CanonicalizationMethodType value) { this.canonicalizationMethod = value; } /** * Gets the value of the signatureMethod property. * * @return * possible object is * {@link SignatureMethodType } * */ public Signatu...
* */ public List<ReferenceType2> getReference() { if (reference == null) { reference = new ArrayList<ReferenceType2>(); } return this.reference; } /** * Gets the value of the id property. * * @return * possible object is * {@link S...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\SignedInfoType.java
1
请完成以下Java代码
private Language extractLanguage(@NonNull final I_C_Doc_Outbound_Log docOutboundLogRecord) { DocOutBoundRecipient recipient = null; if (docOutboundLogRecord.getCurrentEMailRecipient_ID() > 0) { recipient = docOutBoundRecipientService.getById(DocOutBoundRecipientId.ofRepoId(docOutboundLogRecord.getCurrentEMail...
return modelCtx .andComposeWith(InterfaceWrapperHelper.getEvaluatee(docOutboundLogRecord)); } @Value @Builder private static class EmailParams { String subject; String message; private boolean isHtml() { if (Check.isEmpty(message)) { // no message => no html return false; } retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\async\spi\impl\MailWorkpackageProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public void registerResult(EntityType entityType, boolean created) { EntityTypeLoadResult result = results.computeIfAbsent(entityType, EntityTypeLoadResult::new); if (created) { result.setCreated(result.getCreated() + 1); } else { result.setUpdated(result.getUpdated() + 1...
referenceCallbacks.put(externalId, tr); } } public void addEventCallback(ThrowingRunnable tr) { if (tr != null) { eventCallbacks.add(tr); } } public void registerNotFound(EntityId externalId) { notFoundIds.add(externalId); } public boolean isNotFoun...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\vc\data\EntitiesImportCtx.java
2
请在Spring Boot框架中完成以下Java代码
public class FactAcctFilterDescriptorsProviderFactory implements DocumentFilterDescriptorsProviderFactory { public static final String FACT_ACCT_TRANSACTIONS_VIEW = "Fact_Acct_Transactions_View"; private static final String FACT_ACCT_TABLE = I_Fact_Acct.Table_Name; private final transient IMsgBL msgBL = Services.get...
.fieldName(FactAcctFilterConverter.PARAM_ACCOUNT_VALUE_FROM) .displayName(msgBL.translatable(FactAcctFilterConverter.PARAM_ACCOUNT_VALUE_FROM)) .widgetType(DocumentFieldWidgetType.Text) .operator(Operator.EQUAL) ) .addParameter(DocumentFilterParamDescriptor.builder() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\accounting\filters\FactAcctFilterDescriptorsProviderFactory.java
2
请在Spring Boot框架中完成以下Java代码
public void setDescription(String description) { this.description = description; } public int getVersion() { return version; } public void setVersion(int version) { this.version = version; } public String getResourceName() { return resourceName; } publ...
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\DecisionResponse.java
2
请在Spring Boot框架中完成以下Java代码
public JSONObject listRole() { return userService.listRole(); } /** * 查询所有权限, 给角色分配权限时调用 */ @RequiresPermissions("role:list") @GetMapping("/listAllPermission") public JSONObject listAllPermission() { return userService.listAllPermission(); } /** * 新增角色 *...
} /** * 修改角色 */ @RequiresPermissions("role:update") @PostMapping("/updateRole") public JSONObject updateRole(@RequestBody JSONObject requestJson) { CommonUtil.hasAllRequired(requestJson, "roleId,roleName,permissions"); return userService.updateRole(requestJson); } /**...
repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\controller\UserController.java
2
请完成以下Java代码
public int addCategory(String category) { Integer id = categoryId.get(category); if (id == null) { id = categoryId.size(); categoryId.put(category, id); assert idCategory.size() == id; idCategory.add(category); } return id; ...
} public List<String> getCategories() { return idCategory; } public int size() { return idCategory.size(); } public String[] toArray() { String[] catalog = new String[idCategory.size()]; idCategory.toArray(catalog); return catalog; } @...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\Catalog.java
1
请完成以下Java代码
public void setPackVerificationCode (java.lang.String PackVerificationCode) { set_Value (COLUMNNAME_PackVerificationCode, PackVerificationCode); } /** Get Verification Code. @return Verification Code */ @Override public java.lang.String getPackVerificationCode () { return (java.lang.String)get_Value(COL...
} /** Set Kodierungskennzeichen. @param ProductCodeType Kodierungskennzeichen */ @Override public void setProductCodeType (java.lang.String ProductCodeType) { set_ValueNoCheck (COLUMNNAME_ProductCodeType, ProductCodeType); } /** Get Kodierungskennzeichen. @return Kodierungskennzeichen */ @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java-gen\de\metas\vertical\pharma\securpharm\model\X_M_Securpharm_Productdata_Result.java
1
请完成以下Java代码
public BigDecimal getStorageQtyOrZERO() { // no storage quantity available; assume ZERO return BigDecimal.ZERO; } /** * @return <code>false</code>. */ @Override public boolean isVirtual() { return false; } @Override public boolean isNew(final I_M_Attribute attribute) {
throw new AttributeNotFoundException(attribute, this); } /** * @return true, i.e. never disposed */ @Override public boolean assertNotDisposed() { return true; // not disposed } @Override public boolean assertNotDisposedTree() { return true; // not disposed } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\NullAttributeStorage.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { final org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo(ctx, Table_Name, get_TrxName()); return poi; } /** * Set Beschreibung. * * @param Description Beschreibung */ @Override public void setDescription(final java.la...
*/ @Override public boolean isDefault() { final Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo instanceof Boolean) { return ((Boolean)oo).booleanValue(); } return "Y".equals(oo); } return false; } /** * Set Name. * * @param Name * Alphanumeric i...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config.java
1
请完成以下Java代码
public class IDColumn { /** * ID Column constructor * @param record_ID */ public IDColumn (int record_ID) { this(new Integer(record_ID)); } // IDColumn /** * ID Column constructor * @param record_ID */ public IDColumn(Integer record_ID) { super(); setRecord_ID(record_ID); setSelected(...
{ return m_selected; } /** * Set Record_ID * @param record_ID */ public void setRecord_ID(Integer record_ID) { m_record_ID = record_ID; } /** * Get Record ID * @return ID */ public Integer getRecord_ID() { return m_record_ID; } /** * To String * @return String representation */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\minigrid\IDColumn.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { static Map<Long, User> users = Collections.synchronizedMap(new HashMap<>()); @ApiOperation(value = "获取用户列表", notes = "查询用户列表") @RequestMapping(value = {""}, method = RequestMethod.GET) @ApiResponses({ @ApiResponse(code = 100, message = "异常数据") }) public...
@ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "用户ID", required = true, dataType = "Long", paramType = "query"), @ApiImplicitParam(name = "name", value = "用户名", required = true, dataType = "String", paramType = "query"), @ApiImplicitParam(name = "age", value = "年龄", requ...
repos\spring-boot-leaning-master\2.x_42_courses\第 2-9 课:Spring Boot 中使用 Swagger2 构建 RESTful APIs\spring-boot-swagger\src\main\java\com\neo\controller\UserController.java
2
请在Spring Boot框架中完成以下Java代码
public Builder setPInstanceId(final PInstanceId pinstanceId) { this.pinstanceId = pinstanceId; return this; } public Builder setAD_Language(final String AD_Language) { this.AD_Language = AD_Language; return this; } public Builder setOutputType(final OutputType outputType) { this.outputTyp...
} public Builder setApplySecuritySettings(final boolean applySecuritySettings) { this.applySecuritySettings = applySecuritySettings; return this; } private ImmutableList<ProcessInfoParameter> getProcessInfoParameters() { return Services.get(IADPInstanceDAO.class).retrieveProcessInfoParameters(pinst...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\server\ReportContext.java
2
请完成以下Java代码
public Object getPrincipal() { return this.principal; } @Override public Object getCredentials() { return ""; } /** * Returns the user code. * @return the user code */ public String getUserCode() { return this.userCode; }
/** * Returns the additional parameters. * @return the additional parameters, or an empty {@code Map} if not available */ public Map<String, Object> getAdditionalParameters() { return this.additionalParameters; } /** * Returns the client identifier. * @return the client identifier */ public String ge...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2DeviceVerificationAuthenticationToken.java
1
请完成以下Java代码
public void setAD_DesktopWorkbench_ID (int AD_DesktopWorkbench_ID) { if (AD_DesktopWorkbench_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_DesktopWorkbench_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_DesktopWorkbench_ID, Integer.valueOf(AD_DesktopWorkbench_ID)); } /** Get Desktop Workbench. @return Desk...
return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), String.valueOf(getAD_Workbench_ID())); } /** Set Sequence. @param SeqNo Method of ordering records; lowest...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_DesktopWorkbench.java
1
请完成以下Java代码
public DefaultWebSocketGraphQlClientBuilder header(String name, String... values) { this.headers.put(name, Arrays.asList(values)); return this; } @Override public DefaultWebSocketGraphQlClientBuilder headers(Consumer<HttpHeaders> headersConsumer) { headersConsumer.accept(this.headers); return this; } @Ov...
Consumer<AbstractGraphQlClientBuilder<?>> builderInitializer) { super(delegate); Assert.notNull(transport, "WebSocketGraphQlTransport is required"); Assert.notNull(builderInitializer, "`builderInitializer` is required"); this.transport = transport; this.builderInitializer = builderInitializer; } ...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DefaultWebSocketGraphQlClientBuilder.java
1
请完成以下Java代码
public boolean isFull() { return queue.size() == maxSize; } public boolean isEmpty() { return queue.isEmpty(); } public void waitIsNotFull() throws InterruptedException { synchronized (IS_NOT_FULL) { IS_NOT_FULL.wait(); } } public void waitIsNotEmpt...
return mess; } public Integer getSize() { return queue.size(); } private void notifyIsNotFull() { synchronized (IS_NOT_FULL) { IS_NOT_FULL.notify(); } } private void notifyIsNotEmpty() { synchronized (IS_NOT_EMPTY) { IS_NOT_EMPTY.notify(...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-7\src\main\java\com\baeldung\producerconsumer\DataQueue.java
1
请完成以下Java代码
public ProductId getBomProductId() { if (lines.isEmpty()) { throw new AdempiereException("No lines"); } return lines.get(0).getBomProductId(); } public I_C_UOM getBomProductUOM() { if (lines.isEmpty()) { throw new AdempiereException("No lines"); } return lines.get(0).getBomProductUOM(); }
public QtyCalculationsBOMLine getLineByOrderBOMLineId(@NonNull final PPOrderBOMLineId orderBOMLineId) { return lines.stream() .filter(line -> PPOrderBOMLineId.equals(line.getOrderBOMLineId(), orderBOMLineId)) .findFirst() .orElseThrow(() -> new AdempiereException("No BOM line found for " + orderBOMLineId...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\QtyCalculationsBOM.java
1
请完成以下Java代码
private InsertIntoImportTableResult readSourceAndInsertIntoImportTable() { final ImpDataParser sourceParser = parserFactory.createParser(importFormat); final InsertIntoImportTableRequest request = InsertIntoImportTableRequest.builder() .importFormat(importFormat) .clientId(clientId) .orgId(orgId) ...
final IQuery<Object> query = queryBL.createQueryBuilder(importTableDescriptor.getTableName()) .addEqualsFilter(ImportTableDescriptor.COLUMNNAME_C_DataImport_Run_ID, dataImportRunId) .addEqualsFilter(ImportTableDescriptor.COLUMNNAME_I_ErrorMsg, null) .create(); _recordsToImportSelectionId = query.crea...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\DataImportCommand.java
1
请完成以下Java代码
public static void parseDataAssociation(DataAssociation dataAssociation, String elementName, XMLStreamReader xtr) { boolean readyWithDataAssociation = false; Assignment assignment = null; try { dataAssociation.setId(xtr.getAttributeValue(null, "id")); while (!readyWithDa...
} else if (xtr.isStartElement() && ELEMENT_FROM.equals(xtr.getLocalName())) { String from = xtr.getElementText(); if (assignment != null && StringUtils.isNotEmpty(from)) { assignment.setFrom(from.trim()); } } else if (xt...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\child\DataAssociationParser.java
1
请完成以下Java代码
public static List<EnumItem<NT>> roleTag(List<Vertex> vertexList, WordNet wordNetAll) { List<EnumItem<NT>> tagList = new LinkedList<EnumItem<NT>>(); // int line = 0; for (Vertex vertex : vertexList) { // 构成更长的 Nature nature = vertex.guessNature(); ...
EnumItem<NT> NTEnumItem = OrganizationDictionary.dictionary.get(vertex.word); // 此处用等效词,更加精准 if (NTEnumItem == null) { NTEnumItem = new EnumItem<NT>(NT.Z, OrganizationDictionary.transformMatrixDictionary.getTotalFrequency(NT.Z)); } tagList.add(NTEnumItem)...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\recognition\nt\OrganizationRecognition.java
1
请完成以下Java代码
public void setPostingType (String PostingType) { set_Value (COLUMNNAME_PostingType, PostingType); } /** Get PostingType. @return The type of posted amount for the transaction */ public String getPostingType () { return (String)get_Value(COLUMNNAME_PostingType); } /** Set Process Now. @param Proce...
*/ public void setUseLifeMonths (int UseLifeMonths) { set_Value (COLUMNNAME_UseLifeMonths, Integer.valueOf(UseLifeMonths)); } /** Get Usable Life - Months. @return Months of the usable life of the asset */ public int getUseLifeMonths () { Integer ii = (Integer)get_Value(COLUMNNAME_UseLifeMonths); if ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Group_Acct.java
1
请完成以下Java代码
public String getFileName() { return this.delegate.getFileName(); } @Override public InputStream newInputStream() throws IOException { return this.delegate.newInputStream(); } @Override @SuppressWarnings({ "deprecation", "removal" }) public ReadableByteChannel newReadableByteChannel() throws IOException { ...
} @Override public URI getRealURI() { return this.delegate.getRealURI(); } @Override public void copyTo(Path destination) throws IOException { this.delegate.copyTo(destination); } @Override public Collection<Resource> getAllResources() { return asLoaderHidingResources(this.delegate.getAllResources()); ...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\servlet\LoaderHidingResource.java
1
请完成以下Java代码
public String executeInContext(InitialDirContext initialDirContext) { String userDnSearch = buildQueryByUserId(ldapConfigurator, userId); try { String baseDn = ldapConfigurator.getUserBaseDn() != null ? ldapConfigurator.getUserBaseDn() : ldapConfigurator....
} else { throw new FlowableIllegalArgumentException("No 'queryUserByFullNameLike' configured"); } return searchExpression; } public String buildQueryGroupsById(LDAPConfiguration ldapConfigurator, String groupId) { String searchExpression; if (ldapConfigurator.getQuer...
repos\flowable-engine-main\modules\flowable-ldap\src\main\java\org\flowable\ldap\LDAPQueryBuilder.java
1
请在Spring Boot框架中完成以下Java代码
final class WelcomePageRouterFunctionFactory { private final String staticPathPattern; private final @Nullable Resource welcomePage; private final boolean welcomePageTemplateExists; WelcomePageRouterFunctionFactory(TemplateAvailabilityProviders templateAvailabilityProviders, ApplicationContext applicationCon...
} catch (Exception ex) { return false; } } private boolean welcomeTemplateExists(TemplateAvailabilityProviders templateAvailabilityProviders, ApplicationContext applicationContext) { return templateAvailabilityProviders.getProvider("index", applicationContext) != null; } @Nullable RouterFunction<Serve...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\autoconfigure\WelcomePageRouterFunctionFactory.java
2
请在Spring Boot框架中完成以下Java代码
public ResultHolder factorial(int number) { this.cacheMiss.set(true); Assert.isTrue(number >= 0L, String.format("Number [%d] must be greater than equal to 0", number)); simulateLatency(); if (number <= 2) { return ResultHolder.of(number, Operator.FACTORIAL, number == 2 ? 2 : 1); } int operand = n...
return ResultHolder.of(operand, Operator.FACTORIAL, result); } @Cacheable(value = "SquareRoots", keyGenerator = "resultKeyGenerator") public ResultHolder sqrt(int number) { this.cacheMiss.set(true); Assert.isTrue(number >= 0, String.format("Number [%d] must be greater than equal to 0", number)); simulat...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline\src\main\java\example\app\caching\inline\service\CalculatorService.java
2
请完成以下Java代码
public void mapEachLine(final UnaryOperator<FactLine> mapper) { final ListIterator<FactLine> it = m_lines.listIterator(); while (it.hasNext()) { FactLine line = it.next(); final FactLine changedLine = mapper.apply(line); if (changedLine == null) { it.remove(); } else { it.set(change...
{ final FactLine drLine = factTrxLines.getDebitLine(); saveNew(drLine); factTrxLines.forEachCreditLine(crLine -> { crLine.setCounterpart_Fact_Acct_ID(drLine.getIdNotNull()); saveNew(crLine); }); } // // Case: 1 credit line, one or more debit lines else if (factTrxLines.getType() == FactTrx...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Fact.java
1
请完成以下Java代码
public String getModelTableName() { return I_M_ShipmentSchedule.Table_Name; } @Override public IDeliveryDayAllocable asDeliveryDayAllocable(@NonNull final Object model) { final I_M_ShipmentSchedule sched = InterfaceWrapperHelper.create(model, I_M_ShipmentSchedule.class); return new ShipmentScheduleDeliveryD...
deliveryDayAlloc.setQtyOrdered(qtyOrdered); final BigDecimal qtyDelivered = sched.getQtyDelivered(); deliveryDayAlloc.setQtyDelivered(qtyDelivered); final Quantity qtyToDeliver = shipmentScheduleBL.getQtyToDeliver(sched); deliveryDayAlloc.setQtyToDeliver(qtyToDeliver.toBigDecimal()); } /** * Does nothing...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\api\impl\ShipmentScheduleDeliveryDayHandler.java
1
请完成以下Java代码
public I_R_RequestProcessor getR_RequestProcessor() throws RuntimeException { return (I_R_RequestProcessor)MTable.get(getCtx(), I_R_RequestProcessor.Table_Name) .getPO(getR_RequestProcessor_ID(), get_TrxName()); } /** Set Request Processor. @param R_RequestProcessor_ID Processor for Requests */ publ...
Type of request (e.g. Inquiry, Complaint, ..) */ public void setR_RequestType_ID (int R_RequestType_ID) { if (R_RequestType_ID < 1) set_Value (COLUMNNAME_R_RequestType_ID, null); else set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID)); } /** Get Request Type. @return Type o...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestProcessor_Route.java
1
请在Spring Boot框架中完成以下Java代码
public class SpringBootApplication { private static ApplicationContext applicationContext; @GetMapping("/") String home() { return "TADA!!! You are in Spring Boot Actuator test application."; } public static void main(String[] args) { applicationContext = SpringApplication.run(Spr...
} @Bean public SpringHelloServletRegistrationBean servletRegistrationBean() { SpringHelloServletRegistrationBean bean = new SpringHelloServletRegistrationBean(new SpringHelloWorldServlet(), "/springHelloWorld/*"); bean.setLoadOnStartup(1); bean.addInitParameter("message", "SpringHelloWo...
repos\tutorials-master\spring-boot-modules\spring-boot-mvc-4\src\main\java\com\baeldung\main\SpringBootApplication.java
2
请在Spring Boot框架中完成以下Java代码
public class MSV3ServerPeerService { private static final Logger logger = LoggerFactory.getLogger(MSV3ServerPeerService.class); private final AmqpTemplate amqpTemplate; private final MSV3PeerAuthToken msv3PeerAuthToken; public MSV3ServerPeerService( final Optional<AmqpTemplate> amqpTemplate, final Optional<...
convertAndSend(RabbitMQConfig.QUEUENAME_UserChangedEvents, MSV3UserChangedBatchEvent.builder() .event(event) .build()); } public void publishStockAvailabilityUpdatedEvent(@NonNull final MSV3StockAvailabilityUpdatedEvent event) { convertAndSend(RabbitMQConfig.QUEUENAME_StockAvailabilityUpdatedEvent, event)...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer\src\main\java\de\metas\vertical\pharma\msv3\server\peer\service\MSV3ServerPeerService.java
2
请在Spring Boot框架中完成以下Java代码
public class Mother { @Id @GeneratedValue private Long id; private String name; private String surname; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setN...
Mother mother = (Mother) o; return Objects.equals(id, mother.id) && Objects.equals(name, mother.name); } @Override public int hashCode() { return Objects.hash(id, name); } public String getSurname() { return surname; } public void setSurname(String ...
repos\springboot-demo-master\olingo\src\main\java\com\et\olingo\entity\Mother.java
2
请完成以下Java代码
public boolean existsActive(@NonNull final AdTableAndClientId tableAndClientId) { return getOrderedQueryBuilder(tableAndClientId) .create() .anyMatch(); } public boolean existsActiveOutOfTrx(@NonNull final AdTableAndClientId tableAndClientId) { return queryBL .createQueryBuilderOutOfTrx(I_ExternalS...
} @NonNull private static ExternalSystemScriptedExportConversionConfig fromRecord(@NonNull final I_ExternalSystem_Config_ScriptedExportConversion config) { return fromRecord(config, ExternalSystemParentConfigId.ofRepoId(config.getExternalSystem_Config_ID())); } @NonNull private IQueryBuilder<I_ExternalSystem_...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\ExternalSystemScriptedExportConversionRepository.java
1
请完成以下Java代码
public class JWTDecode { private static final String SECRET = "baeldung"; private static final String ISSUER = "Baeldung"; private static final String SUBJECT = "Baeldung Details"; private static final long TOKEN_VALIDITY_IN_MILLIS = 500L; private static Algorithm algorithm; private static JWT...
private static DecodedJWT decodedJWT(String jwtToken) { try { DecodedJWT decodedJWT = JWT.decode(jwtToken); return decodedJWT; } catch (JWTDecodeException e) { System.out.println(e.getMessage()); } return null; } private static boolean isJWTEx...
repos\tutorials-master\security-modules\jwt\src\main\java\com\baeldung\jwt\auth0\JWTDecode.java
1
请完成以下Java代码
public void setNote (String Note) { set_Value (COLUMNNAME_Note, Note); } /** Get Note. @return Optional additional user defined information */ public String getNote () { return (String)get_Value(COLUMNNAME_Note); } /** Set Achievement. @param PA_Achievement_ID Performance Achievement */ publ...
/** Get Measure. @return Concrete Performance Measurement */ public int getPA_Measure_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PA_Measure_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Achievement.java
1
请完成以下Java代码
public int getAD_Process_Stats_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Process_Stats_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Statistic Count. @param Statistic_Count Internal statistics how often the entity was used */ @Override public void setStatistic_Count...
Internal statistics how many milliseconds a process took */ @Override public void setStatistic_Millis (int Statistic_Millis) { set_Value (COLUMNNAME_Statistic_Millis, Integer.valueOf(Statistic_Millis)); } /** Get Statistic Milliseconds. @return Internal statistics how many milliseconds a process took */...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process_Stats.java
1
请在Spring Boot框架中完成以下Java代码
public String nlstFile(String dir) { return gateway.nlstFile(dir); } private static File convertInputStreamToFile(InputStream inputStream, String savePath) { OutputStream outputStream = null; File file = new File(savePath); try { outputStream = new FileOutputStream(f...
} if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { log.error("error:", e); } } } return file; } private static File convert(MultipartFile file) throws...
repos\springboot-demo-master\sftp\src\main\java\com\et\sftp\service\impl\SftpServiceImpl.java
2
请完成以下Java代码
public KeyStroke getKeyStroke() { return keyStroke; } } /** * Execute cut/copy/paste action of given type. * * @param actionType */ void executeCopyPasteAction(final CopyPasteActionType actionType); /** * Gets the copy/paste {@link Action} associated with given type. * * @param actionType *...
Action getCopyPasteAction(final CopyPasteActionType actionType); /** * Associate given action with given action type. * * @param actionType * @param action * @param keyStroke optional key stroke to be binded to given action. */ void putCopyPasteAction(final CopyPasteActionType actionType, final Action ac...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\editor\ICopyPasteSupportEditor.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable() { final ImmutableSet<ShipmentScheduleId> shipmentScheduleIds = getSelectedShipmentScheduleIds(); if (shipmentScheduleIds.isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (!helper.isSingleShipper(shipme...
@Override protected String doIt() { helper.updateEligibleShipmentSchedules( CarrierAdviseUpdateRequest.builder() .query(ShipmentScheduleQuery.builder() .shipperId(p_ShipperId) .shipmentScheduleIds(getSelectedShipmentScheduleIds()) .build()) .isIncludeCarrierAdviseManual(p_IsI...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons.webui\src\main\java\de\metas\shipper\gateway\commons\webui\M_ShipmentSchedule_Advise_Manual.java
1
请在Spring Boot框架中完成以下Java代码
protected DmnDecision getDecisionFromRequest(String decisionId) { DmnDecision decision = dmnRepositoryService.getDecision(decisionId); if (decision == null) { throw new FlowableObjectNotFoundException("Could not find a decision with id '" + decisionId + "'."); } if ...
throw new FlowableObjectNotFoundException("Could not find a deployment with id '" + deploymentId); } if (restApiInterceptor != null) { restApiInterceptor.accessDeploymentById(deployment); } List<String> resourceList = dmnRepositoryService.getDeploymentResourceNames(...
repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\repository\BaseDecisionResource.java
2
请完成以下Java代码
public Boolean getJobExecutorAcquireByPriority() { return jobExecutorAcquireByPriority; } public void setJobExecutorAcquireByPriority(Boolean jobExecutorAcquireByPriority) { this.jobExecutorAcquireByPriority = jobExecutorAcquireByPriority; } public Integer getDefaultNumberOfRetries() { return defa...
.add("generateUniqueProcessEngineName=" + generateUniqueProcessEngineName) .add("generateUniqueProcessApplicationName=" + generateUniqueProcessApplicationName) .add("historyLevel=" + historyLevel) .add("historyLevelDefault=" + historyLevelDefault) .add("autoDeploymentEnabled=" + autoDeploymentEn...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\CamundaBpmProperties.java
1
请在Spring Boot框架中完成以下Java代码
public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public String getMerchantName() { return merchantName; } public void setMerchantName(String merchantName) { this.merchantNa...
} public String getPayKey() { return payKey; } public void setPayKey(String payKey) { this.payKey = payKey; } public Map<String, PayTypeEnum> getPayTypeEnumMap() { return payTypeEnumMap; } public void setPayTypeEnumMap(Map<String, PayTypeEnum> payTypeEnumMap) { ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\RpPayGateWayPageShowVo.java
2
请完成以下Java代码
public boolean isBaseTypeOf(ModelElementType elementType) { if (this.equals(elementType)) { return true; } else { Collection<ModelElementType> baseTypes = ModelUtil.calculateAllBaseTypes(elementType); return baseTypes.contains(this); } } /** * Returns a list of all attributes, ...
if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } ModelElementTypeImpl other = (ModelElementTypeImpl) obj; if (model == null) { if (other.model != null) { return false; } } else i...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\ModelElementTypeImpl.java
1
请完成以下Java代码
private void prepareWebApplicationContext(ServletContext servletContext) { Object rootContext = servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (rootContext != null) { if (rootContext == this) { throw new IllegalStateException( "Cannot initialize context be...
catch (RuntimeException | Error ex) { logger.error("Context initialization failed", ex); servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex); throw ex; } } private void registerApplicationScope(ServletContext servletContext, ConfigurableListableBeanFactory beanFac...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\context\servlet\WebApplicationContextInitializer.java
1
请完成以下Java代码
protected static boolean isAllNull(Object... args) { for (Object arg : args) { if (arg != null) { return false; } } return true; } @Override public TsKvEntry toData() { KvEntry kvEntry = null; if (strValue != null) { ...
kvEntry = new BooleanDataEntry(strKey, booleanValue); } else if (jsonValue != null) { kvEntry = new JsonDataEntry(strKey, jsonValue); } if (aggValuesCount == null) { return new BasicTsKvEntry(ts, kvEntry, getVersion()); } else { return new AggTsKvEntr...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AbstractTsKvEntity.java
1
请完成以下Java代码
public List<AccountInfo> getAccountInfos(final Object acctAwareModel) { final String tableName = InterfaceWrapperHelper.getModelTableName(acctAwareModel); final POInfo poInfo = POInfo.getPOInfoNotNull(tableName); final List<AccountInfo> list = new ArrayList<>(); for (int columnIndex = 0; columnIndex < poInfo....
{ final AccountId accountId = accountInfo.getAccountId(); InterfaceWrapperHelper.setValue(acctAwareModel, accountInfo.getColumnName(), AccountId.toRepoId(accountId)); } @lombok.Value @lombok.Builder private static class AccountInfo { @NonNull String columnName; @Nullable @With AccountId accountId; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\process\AcctSchemaCopyAcct.java
1
请完成以下Java代码
public class AlarmInfoEntity extends AbstractAlarmEntity<AlarmInfo> { @Column(name = ALARM_ORIGINATOR_NAME_PROPERTY) private String originatorName; @Column(name = ALARM_ORIGINATOR_LABEL_PROPERTY) private String originatorLabel; @Column(name = ALARM_ASSIGNEE_FIRST_NAME_PROPERTY) private String a...
public AlarmInfoEntity() { super(); } @Override public AlarmInfo toData() { AlarmInfo alarmInfo = new AlarmInfo(super.toAlarm()); alarmInfo.setOriginatorName(originatorName); alarmInfo.setOriginatorLabel(originatorLabel); if (getAssigneeId() != null) { al...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AlarmInfoEntity.java
1
请完成以下Java代码
protected int get_AccessLevel() { return accessLevel.intValue(); } /** Load Meta Data */ protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new Strin...
return (String)get_Value(COLUMNNAME_Code); } /** Set Default. @param IsDefault Default value */ public void setIsDefault (boolean IsDefault) { set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); } /** Get Default. @return Default value */ public boolean isDefault () { Object oo = g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintColor.java
1
请完成以下Java代码
private static GenericTargetColumnInfo extractColumnInfo(final ResultSet rs) throws SQLException { return GenericTargetColumnInfo.builder() .caption(retrieveTranslatableString(rs, "target_columnDisplayName", "target_columnDisplayName_trls")) .columnName(rs.getString("target_columnname")) .virtualColumnSq...
TargetWindowAndColumn::getWindow, TargetWindowAndColumn::getColumn)); return new DynamicTargetsMap(map); } @Nullable private TargetWindowAndColumn retrieveRowFrom_Dynamic_Target_Window_V(@NonNull final ResultSet rs) throws SQLException { final GenericTargetWindowInfo targetWindow = extractWindowInfo(rs)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\generic\GenericRelatedDocumentDescriptorsRepository.java
1
请完成以下Java代码
public LocalDate provideDueDateOrNull(@NonNull final InvoiceId invoiceId) { final List<I_C_Flatrate_Term> flatrateTermsForInvoiceId = retrieveFlatrateTermsForInvoiceId(invoiceId); if (!applies(flatrateTermsForInvoiceId)) { return null; } final Optional<LocalDate> smallestStartDate = flatrateTermsForInvoi...
return Objects.equals(term.getMasterStartDate(), term.getStartDate()); } private List<I_C_Flatrate_Term> retrieveFlatrateTermsForInvoiceId(@NonNull final InvoiceId invoiceId) { return invoiceId2flatrateTerms.getOrLoad(invoiceId, () -> retrieveFlatrateTermsForInvoiceId0(invoiceId)); } private List<I_C_Flatrate_...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\dunning\ContractBasedInvoiceDueDateProvider.java
1
请完成以下Java代码
private ChildElement<Source> getReferenceSourceChild() { return (ChildElement<Source>) getReferenceSourceCollection(); } public Source getReferenceSource(ModelElementInstance referenceSourceParent) { return getReferenceSourceChild().getChild(referenceSourceParent); } private void setReferenceSource(Mo...
ModelInstanceImpl modelInstance = referenceSourceParentElement.getModelInstance(); String identifier = referenceTargetAttribute.getValue(referenceTargetElement); ModelElementInstance existingElement = modelInstance.getModelElementById(identifier); if (existingElement == null || !existingElement.equals(refe...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\reference\ElementReferenceImpl.java
1
请完成以下Java代码
public int getRecord_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Mitteilung. @param TextMsg Text Message */ @Override public void setTextMsg (java.lang.String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } ...
} /** Set Titel. @param Title Name this entity is referred to as */ @Override public void setTitle (java.lang.String Title) { set_Value (COLUMNNAME_Title, Title); } /** Get Titel. @return Name this entity is referred to as */ @Override public java.lang.String getTitle () { return (java.lang...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attachment.java
1
请完成以下Java代码
public void setUserId(String userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String userName) { this.username = userName; } public String getEmail() { return email; } public void setEmail(Strin...
public String getContactNumber() { return contactNumber; } public void setContactNumber(String contactNumber) { this.contactNumber = contactNumber; } public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = use...
repos\tutorials-master\core-java-modules\core-java-collections-conversions-2\src\main\java\com\baeldung\modelmapper\User.java
1
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } ModelElementTypeImpl other = (ModelElementTypeImpl) obj; if (model == null) { if (other.model != null) { ...
return false; } } else if (!typeName.equals(other.typeName)) { return false; } if (typeNamespace == null) { if (other.typeNamespace != null) { return false; } } else if (!typeNamespace.equals(other.typeNamespace)) { return false; } return true; } }
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\ModelElementTypeImpl.java
1