instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private void setAsRunning(final I_C_Invoice_Verification_Run run) { run.setStatus(InvoiceVerificationRunStatus.Running.getCode()); run.setDateStart(SystemTime.asTimestamp()); run.setAD_PInstance_ID(getPinstanceId().getRepoId()); InterfaceWrapperHelper.save(run); } private void setCompleted(final I_C_Invoice...
final I_C_Invoice_Verification_Run run = Check.assumeNotNull(queryBL.createQueryBuilder(I_C_Invoice_Verification_Run.class) .addOnlyActiveRecordsFilter() .filter(context.getQueryFilter(I_C_Invoice_Verification_Run.class)) .create().firstOnly(I_C_Invoice_Verification_Run.class), "C_Invoice_Verification_Run w...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\process\C_Invoice_Verification_Run_Execute.java
1
请在Spring Boot框架中完成以下Java代码
public DefaultVariableTypes addType(VariableType type) { return addType(type, typesList.size()); } @Override public DefaultVariableTypes addType(VariableType type, int index) { typesList.add(index, type); typesMap.put(type.getTypeName(), type); return this; } public...
} @Override public int getTypeIndex(String typeName) { VariableType type = typesMap.get(typeName); if (type != null) { return getTypeIndex(type); } else { return -1; } } @Override public VariableTypes removeType(VariableType type) { t...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\DefaultVariableTypes.java
2
请完成以下Java代码
public static class Settings { private final String title; private final String brand; private final String loginIcon; private final String favicon; private final String faviconDanger; private final PollTimer pollTimer; private final UiTheme theme; private final boolean notificationFilterEnabled...
/** * Should the page shown as an iframe or open in a new window. */ private final boolean iframe; /** * A list of child views. */ private final List<ExternalView> children; public ExternalView(String label, String url, Integer order, boolean iframe, List<ExternalView> children) { Assert.hasTex...
repos\spring-boot-admin-master\spring-boot-admin-server-ui\src\main\java\de\codecentric\boot\admin\server\ui\web\UiController.java
1
请完成以下Java代码
public void clearDiagnosticsData() { DiagnosticsRegistry diagnosticsRegistry = ((ProcessEngineConfigurationImpl) processEngineConfiguration).getDiagnosticsRegistry(); if (diagnosticsRegistry != null) { diagnosticsRegistry.clear(); } MetricsRegistry metricsRegistry = ((ProcessEngineConfigurationImp...
DbSqlSession dbSqlSession = dbSqlSessionFactory.openSession(connection, catalog, schema); commandContext.getSessions().put(DbSqlSession.class, dbSqlSession); dbSqlSession.dbSchemaUpdate(); return ""; } } protected class GetRegisteredDeploymentsCmd implements Command<Set<String>> { @Ove...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ManagementServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
private static FTSConfigField toFTSConfigField(final I_ES_FTS_Config_Field record) { return FTSConfigField.builder() .id(FTSConfigFieldId.ofRepoId(record.getES_FTS_Config_Field_ID())) .esFieldName(ESFieldName.ofString(record.getES_FieldName())) .build(); } public void setConfigFields( @NonNull fina...
{ this.configs = ImmutableList.copyOf(configs); this.configsByESIndexName = Maps.uniqueIndex(configs, FTSConfig::getEsIndexName); this.configsById = Maps.uniqueIndex(configs, FTSConfig::getId); this.sourceTables = sourceTables .filter(sourceTable -> configsById.containsKey(sourceTable.getFtsConfigId()...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSConfigRepository.java
2
请在Spring Boot框架中完成以下Java代码
public abstract class AbstractEntity implements Serializable { @Id @GeneratedValue private Long id; private boolean deleted = false; @NonNull private String uuid = UUID.randomUUID().toString(); // // Versioning and created/updated timestamps protected static final int VERSION_INITIAL = 0; @Version private...
} public int getVersion() { return version; } public void setDeleted(final boolean deleted) { this.deleted = deleted; } public boolean isDeleted() { return deleted; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Objects.hashCode(id); ret...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\AbstractEntity.java
2
请完成以下Java代码
private boolean isClientLevelOnly() { return getShareType().equals(SHARETYPE_ClientAllShared); } /** * Is Org Level Only * * @return true if org level only (not shared) */ private boolean isOrgLevelOnly() { return getShareType().equals(SHARETYPE_OrgNotShared); } private String getTableName() { ...
+ " AND c.IsParent='Y'" + " AND c.ColumnName IN (SELECT ColumnName FROM AD_Column cc " + "WHERE cc.IsKey='Y' AND cc.AD_Table_ID=?))"; PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement(sql, null); pstmt.setInt(1, getAD_Table_ID()); rs = pstmt.executeQuery(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MClientShare.java
1
请完成以下Java代码
public void setQtyEntered (BigDecimal QtyEntered) { set_ValueNoCheck (COLUMNNAME_QtyEntered, QtyEntered); } /** Get Menge. @return Die Eingegebene Menge basiert auf der gewaehlten Mengeneinheit */ public BigDecimal getQtyEntered () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyEntered); if (bd...
*/ public void setQtyInvoiced (BigDecimal QtyInvoiced) { set_ValueNoCheck (COLUMNNAME_QtyInvoiced, QtyInvoiced); } /** Get Quantity Invoiced. @return Invoiced Quantity */ public BigDecimal getQtyInvoiced () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInvoiced); if (bd == null) return En...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_C_InvoiceLine_Overview.java
1
请完成以下Java代码
public void assertNoLoops(final I_AD_Role_Included roleIncluded) { final RoleId includedRoleId = RoleId.ofRepoIdOrNull(roleIncluded.getIncluded_Role_ID()); final List<RoleId> trace = new ArrayList<>(); if (hasLoop(includedRoleId, trace)) { final IRoleDAO roleDAO = Services.get(IRoleDAO.class); final Stri...
{ final RoleId childId = RoleId.ofRepoId(rs.getInt(1)); if (trace2.contains(childId)) { trace.clear(); trace.addAll(trace2); trace.add(childId); return true; } if (hasLoop(childId, trace2)) { trace.clear(); trace.addAll(trace2); return true; } } } ca...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\model\interceptor\AD_Role_Included.java
1
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Report Column Set. @param PA_ReportColumnSet_ID Collection of Columns for Report */ public void setPA_ReportColumnSet_ID (int PA_ReportColumnSet_ID) { if (PA_ReportColumnSet_ID < 1) set_ValueN...
return ii.intValue(); } /** 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 boolean isProcessing () { Object oo = get_Value(COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportColumnSet.java
1
请完成以下Java代码
public class X_C_BankStatement_Import_File_Log extends org.compiere.model.PO implements I_C_BankStatement_Import_File_Log, org.compiere.model.I_Persistent { private static final long serialVersionUID = -943655227L; /** Standard Constructor */ public X_C_BankStatement_Import_File_Log (final Properties ctx, f...
public void setC_BankStatement_Import_File_ID (final int C_BankStatement_Import_File_ID) { if (C_BankStatement_Import_File_ID < 1) set_Value (COLUMNNAME_C_BankStatement_Import_File_ID, null); else set_Value (COLUMNNAME_C_BankStatement_Import_File_ID, C_BankStatement_Import_File_ID); } @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\org\adempiere\banking\model\X_C_BankStatement_Import_File_Log.java
1
请完成以下Java代码
public class Person { private SimpleIntegerProperty id; private SimpleStringProperty name; private SimpleBooleanProperty isEmployed; public Person(Integer id, String name, boolean isEmployed) { this.id = new SimpleIntegerProperty(id); this.name = new SimpleStringProperty(name); ...
} public void setName(String name) { this.name.set(name); } public boolean getIsEmployed() { return isEmployed.get(); } public BooleanProperty isEmployedProperty() { return isEmployed; } public void setIsEmployed(boolean isEmployed) { this.isEmployed.set(i...
repos\tutorials-master\javafx\src\main\java\com\baeldung\model\Person.java
1
请完成以下Java代码
public int getM_TU_HU_ID() { return get_ValueAsInt(COLUMNNAME_M_TU_HU_ID); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public v...
{ set_Value (COLUMNNAME_QtyTU, QtyTU); } @Override public BigDecimal getQtyTU() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyTU); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setVHU_ID (final int VHU_ID) { if (VHU_ID < 1) set_Value (COLUMNNAME_VHU_ID, null); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_QtyPicked.java
1
请在Spring Boot框架中完成以下Java代码
public Connector tagTextConnector() { return integrationContext -> { LinkedHashMap contentToTag = (LinkedHashMap) integrationContext.getInBoundVariables().get("content"); contentToTag.put("tags", singletonList(" :) ")); integrationContext.addOutBoundVariable("content", conten...
private LinkedHashMap pickRandomString() { String[] texts = { "hello from london", "Hi there from activiti!", "all good news over here.", "I've tweeted about activiti today.", "other boring projects.", "activiti cloud - Cloud Native Java BP...
repos\Activiti-develop\activiti-examples\activiti-api-basic-full-example-nobean\src\main\java\org\activiti\examples\DemoApplication.java
2
请完成以下Java代码
public void setSelectClause (String SelectClause) { set_Value (COLUMNNAME_SelectClause, SelectClause); } /** Get Sql SELECT. @return SQL SELECT clause */ public String getSelectClause () { return (String)get_Value(COLUMNNAME_SelectClause); } /** Set Reihenfolge. @param SeqNo Method of ordering r...
if (ii == null) return 0; return ii.intValue(); } public void setParameterDisplayLogic (String ParameterDisplayLogic) { set_Value (COLUMNNAME_ParameterDisplayLogic, ParameterDisplayLogic); } public String getParameterDisplayLogic () { return (String)get_Value(COLUMNNAME_ParameterDisplayLogic); } p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoColumn.java
1
请完成以下Java代码
public Mono<ArticleViewWrapper> updateArticle(@RequestBody UpdateArticleRequestWrapper request, @PathVariable String slug) { return userSessionProvider.getCurrentUserOrEmpty() .flatMap(currentUser -> articleFacade.updateArticle(slug, request.getContent(), currentUser)) .map(Artic...
@PostMapping("/articles/{slug}/favorite") @ResponseStatus(HttpStatus.CREATED) public Mono<ArticleViewWrapper> favoriteArticle(@PathVariable String slug) { return userSessionProvider.getCurrentUserOrEmpty() .flatMap(currentUser -> articleFacade.favoriteArticle(slug, currentUser)) ...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\api\ArticleController.java
1
请完成以下Java代码
public String[] getExecutionIds() { return executionIds; } /** the activity name */ public String getActivityName() { return activityName; } /** * deprecated; the JSON field with this name was never documented, but existed * from 7.0 to 7.2 */ public String getName() { return activity...
result.activityId = instance.getActivityId(); result.activityType = instance.getActivityType(); result.processInstanceId = instance.getProcessInstanceId(); result.processDefinitionId = instance.getProcessDefinitionId(); result.childActivityInstances = fromListOfActivityInstance(instance.getChildActivity...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\ActivityInstanceDto.java
1
请在Spring Boot框架中完成以下Java代码
public String getTAXRATE() { return taxrate; } /** * Sets the value of the taxrate property. * * @param value * allowed object is * {@link String } * */ public void setTAXRATE(String value) { this.taxrate = value; } /** * Gets t...
public String getTAXAMOUNT() { return taxamount; } /** * Sets the value of the taxamount property. * * @param value * allowed object is * {@link String } * */ public void setTAXAMOUNT(String value) { this.taxamount = value; } /** ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DALCH1.java
2
请完成以下Java代码
public void deleteTenantProfiles(TenantId tenantId) { log.trace("Executing deleteTenantProfiles"); tenantProfilesRemover.removeEntities(tenantId, null); } @Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findTenantProf...
private final PaginatedRemover<String, TenantProfile> tenantProfilesRemover = new PaginatedRemover<>() { @Override protected PageData<TenantProfile> findEntities(TenantId tenantId, String id, PageLink pageLink) { return tenantProfileDao.findTenantProfiles(tenantId, pageLink); } ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\tenant\TenantProfileServiceImpl.java
1
请完成以下Java代码
private I_M_HU_PI_Item_Product getM_HU_PI_Item_Product() { Check.assumeNotNull(_huPIItemProduct, "_huPIItemProduct not null"); return _huPIItemProduct; } @Override public IHUPIItemProductDisplayNameBuilder setQtyTUPlanned(final BigDecimal qtyTUPlanned) { _qtyTUPlanned = qtyTUPlanned; return this; } @Ov...
_qtyCapacity = qtyCapacity; return this; } @Override public IHUPIItemProductDisplayNameBuilder setShowAnyProductIndicator(boolean showAnyProductIndicator) { this._showAnyProductIndicator = showAnyProductIndicator; return this; } private boolean isShowAnyProductIndicator() { return _showAnyProductIndic...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDisplayNameBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public RuleOriginatedNotificationInfo constructNotificationInfo(AlarmAssignmentTrigger trigger) { AlarmInfo alarmInfo = trigger.getAlarmInfo(); AlarmAssignee assignee = alarmInfo.getAssignee(); return AlarmAssignmentNotificationInfo.builder() .action(trigger.getActionType() == Ac...
.alarmOriginatorName(alarmInfo.getOriginatorName()) .alarmOriginatorLabel(alarmInfo.getOriginatorLabel()) .alarmSeverity(alarmInfo.getSeverity()) .alarmStatus(alarmInfo.getStatus()) .alarmCustomerId(alarmInfo.getCustomerId()) .dashboardId(a...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\rule\trigger\AlarmAssignmentTriggerProcessor.java
2
请完成以下Java代码
public void setHR_ListBase_ID (int HR_ListBase_ID) { if (HR_ListBase_ID < 1) set_Value (COLUMNNAME_HR_ListBase_ID, null); else set_Value (COLUMNNAME_HR_ListBase_ID, Integer.valueOf(HR_ListBase_ID)); } /** Get Payroll List Base. @return Payroll List Base */ public int getHR_ListBase_ID () { Inte...
/** 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 () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_ListVersion.java
1
请完成以下Java代码
public class Customer extends RepresentationModel<Customer> { private String customerId; private String customerName; private String companyName; private Map<String, Order> orders; public Customer() { super(); } public Customer(final String customerId, final String customerName, fi...
return customerName; } public void setCustomerName(final String customerName) { this.customerName = customerName; } public String getCompanyName() { return companyName; } public void setCompanyName(final String companyName) { this.companyName = companyName; } ...
repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\persistence\model\Customer.java
1
请完成以下Java代码
public void setValue(Object value, VariableScope variableScope) { setValue(value, variableScope, null); } public void setValue(Object value, VariableScope variableScope, BaseDelegateExecution contextExecution) { ELContext elContext = expressionManager.getElContext(variableScope); try { Expression...
@Override public String toString() { if(valueExpression != null) { return valueExpression.getExpressionString(); } return super.toString(); } @Override public boolean isLiteralText() { return valueExpression.isLiteralText(); } public String getExpressionText() { return expression...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\el\JuelExpression.java
1
请完成以下Java代码
public JdbcCustomConversions jdbcCustomConversions() { return new JdbcCustomConversions(asList(new Converter<Clob, String>() { @Nullable @Override public String convert(Clob clob) { try { return Math.toIntExact(clob.length()) == 0 // ? "" // : clob.getSubString(1, Math.toIntExact(c...
} @Bean DataSourceInitializer initializer(DataSource dataSource) { var initializer = new DataSourceInitializer(); initializer.setDataSource(dataSource); var script = new ClassPathResource("schema.sql"); var populator = new ResourceDatabasePopulator(script); initializer.setDatabasePopulator(populator); ...
repos\spring-data-examples-main\jdbc\basics\src\main\java\example\springdata\jdbc\basics\aggregate\AggregateConfiguration.java
1
请完成以下Java代码
public class MSchedulerLog extends X_AD_SchedulerLog implements AdempiereProcessorLog { /** * */ private static final long serialVersionUID = -8105976307507562851L; /** * Standard Constructor * @param ctx context * @param AD_SchedulerLog_ID id * @param trxName transaction */ public MSchedulerLog (...
/** * Parent Constructor * @param parent parent * @param summary summary */ public MSchedulerLog (MScheduler parent, String summary) { this (parent.getCtx(), 0, parent.get_TrxName()); setClientOrg(parent); setAD_Scheduler_ID(parent.getAD_Scheduler_ID()); setSummary(summary); } // MSchedulerLog } //...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MSchedulerLog.java
1
请完成以下Java代码
public String postStatusUpdate(String message) { try { FacebookType response = facebookClient.publish("me/feed", FacebookType.class, Parameter.with("message", message)); return "Post ID: " + response.getId(); } catch (Exception e) { logger.log(Level.SEVERE,"Failed to ...
public String postToPage(String pageId, String message) { try { Page page = facebookClient.fetchObject(pageId, Page.class, Parameter.with("fields", "access_token")); FacebookClient pageClient = new DefaultFacebookClient(page.getAccessToken(), appSecret, Version.LATEST); Fac...
repos\tutorials-master\libraries-http-3\src\main\java\com\baeldung\facebook\FacebookService.java
1
请完成以下Java代码
public void setServiceDate (Timestamp ServiceDate) { set_Value (COLUMNNAME_ServiceDate, ServiceDate); } /** Get Service date. @return Date service was provided */ public Timestamp getServiceDate () { return (Timestamp)get_Value(COLUMNNAME_ServiceDate); } /** Set Text Message. @param TextMsg Text...
*/ public Timestamp getValidFrom () { return (Timestamp)get_Value(COLUMNNAME_ValidFrom); } /** Set Valid to. @param ValidTo Valid to including this date (last day) */ public void setValidTo (Timestamp ValidTo) { set_Value (COLUMNNAME_ValidTo, ValidTo); } /** Get Valid to. @return Valid to inclu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
public static SettModeTypeEnum getEnum(String enumName) { SettModeTypeEnum resultEnum = null; SettModeTypeEnum[] enumAry = SettModeTypeEnum.values(); for (int i = 0; i < enumAry.length; i++) { if (enumAry[i].name().equals(enumName)) { resultEnum = enumAry[i]; break; } } return resultEnum; } ...
} return enumMap; } @SuppressWarnings({ "rawtypes", "unchecked" }) public static List toList() { SettModeTypeEnum[] ary = SettModeTypeEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { Map<String, String> map = new HashMap<String, String>(); map.put("desc", ary[i].getDe...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\enums\SettModeTypeEnum.java
2
请完成以下Java代码
public class X_M_DiscountSchema_Calculated_Surcharge extends org.compiere.model.PO implements I_M_DiscountSchema_Calculated_Surcharge, org.compiere.model.I_Persistent { private static final long serialVersionUID = -1307637385L; /** Standard Constructor */ public X_M_DiscountSchema_Calculated_Surcharge (fina...
@Override public int getM_DiscountSchema_Calculated_Surcharge_ID() { return get_ValueAsInt(COLUMNNAME_M_DiscountSchema_Calculated_Surcharge_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DiscountSchema_Calculated_Surcharge.java
1
请完成以下Java代码
private void update(byte[] block, int offset) { for (int i = 0; i < 16; i++) { this.tmp[i] = (block[offset++] & 0xFF) | (block[offset++] & 0xFF) << 8 | (block[offset++] & 0xFF) << 16 | (block[offset++] & 0xFF) << 24; } int A = this.state[0]; int B = this.state[1]; int C = this.state[2]; int D = thi...
A = HH(A, B, C, D, this.tmp[0], 3); D = HH(D, A, B, C, this.tmp[8], 9); C = HH(C, D, A, B, this.tmp[4], 11); B = HH(B, C, D, A, this.tmp[12], 15); A = HH(A, B, C, D, this.tmp[2], 3); D = HH(D, A, B, C, this.tmp[10], 9); C = HH(C, D, A, B, this.tmp[6], 11); B = HH(B, C, D, A, this.tmp[14], 15); A = HH(A,...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\password\Md4.java
1
请完成以下Java代码
public void put(long hash, T instance) { circle.put(hash, instance); } public void remove(long hash) { circle.remove(hash); } public boolean isEmpty() { return circle.isEmpty(); } public boolean containsKey(Long hash) { return circle.containsKey(hash); }
public ConcurrentNavigableMap<Long, T> tailMap(Long hash) { return circle.tailMap(hash); } public Long firstKey() { return circle.firstKey(); } public T get(Long hash) { return circle.get(hash); } public void log() { circle.forEach((key, value) -> log.debug("{}...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\discovery\ConsistentHashCircle.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getAlbumId() { return albumId; } public void setAlbumId(Long albumId) { this.albumId = albumId; } public String getPic() { return pic; } public...
} @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", albumId=").append(albumId); sb.appe...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsAlbumPic.java
1
请完成以下Java代码
public boolean isWithoutTenantId() { return withoutTenantId; } public void setWithoutTenantId(boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { ...
public boolean isResultEnabled() { return resultEnabled; } public void setResultEnabled(boolean resultEnabled) { this.resultEnabled = resultEnabled; } public boolean isVariablesInResultEnabled() { return variablesInResultEnabled; } public void setVariablesInResultEnabled(boolean variablesInRe...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\message\CorrelationMessageDto.java
1
请完成以下Java代码
public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public String getTenantId() { return tenantId; } public void setTenantId(String ten...
int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; EventSubs...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\EventSubscriptionEntityImpl.java
1
请完成以下Java代码
public org.compiere.model.I_AD_Color getInsufficientQtyAvailableForSalesColor() { return get_ValueAsPO(COLUMNNAME_InsufficientQtyAvailableForSalesColor_ID, org.compiere.model.I_AD_Color.class); } @Override public void setInsufficientQtyAvailableForSalesColor(final org.compiere.model.I_AD_Color InsufficientQtyAva...
@Override public boolean isQtyPerWarehouse() { return get_ValueAsBoolean(COLUMNNAME_IsQtyPerWarehouse); } @Override public void setMD_AvailableForSales_Config_ID (final int MD_AvailableForSales_Config_ID) { if (MD_AvailableForSales_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_MD_AvailableForSales_Config_...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_AvailableForSales_Config.java
1
请完成以下Java代码
public static OrderLineId cast(@NonNull final RepoIdAware id) { return (OrderLineId)id; } public static int toRepoId(@Nullable final OrderLineId orderLineId) { return orderLineId != null ? orderLineId.getRepoId() : -1; } public static Set<Integer> toIntSet(final Collection<OrderLineId> orderLineIds) { re...
private OrderLineId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "repoId"); } @Override @JsonValue public int getRepoId() { return repoId; } public static boolean equals(@Nullable final OrderLineId id1, @Nullable final OrderLineId id2) {return Objects.equals(id1, id2);} }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderLineId.java
1
请完成以下Java代码
public List<ActivityInstanceEntity> findActivityInstancesByProcessInstanceId(String processInstanceId, boolean includeDeleted) { List<ActivityInstanceEntity> activityInstances = getList(getDbSqlSession(), "selectActivityInstancesByProcessInstanceId", processInstanceId, activitiesByProcessInstan...
@SuppressWarnings("unchecked") public List<ActivityInstance> findActivityInstancesByNativeQuery(Map<String, Object> parameterMap) { return getDbSqlSession().selectListWithRawParameter("selectActivityInstanceByNativeQuery", parameterMap); } @Override public long findActivityInstanceCountByNative...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\data\impl\MybatisActivityInstanceDataManager.java
1
请完成以下Java代码
private static boolean isEnabled() { if (enabled == Enabled.DETECT) { if (ansiCapable == null) { ansiCapable = detectIfAnsiCapable(); } return ansiCapable; } return enabled == Enabled.ALWAYS; } private static boolean detectIfAnsiCapable() { try { if (Boolean.FALSE.equals(consoleAvailable)) { ...
/** * Possible values to pass to {@link AnsiOutput#setEnabled}. Determines when to output * ANSI escape sequences for coloring application output. */ public enum Enabled { /** * Try to detect whether ANSI coloring capabilities are available. The default * value for {@link AnsiOutput}. */ DETECT, ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ansi\AnsiOutput.java
1
请完成以下Java代码
protected void queueVariableEvent(VariableEvent variableEvent, boolean includeCustomerListeners) { Queue<VariableEvent> variableEventsQueue = getVariableEventQueue(); variableEventsQueue.add(variableEvent); // if this is the first event added, trigger listener invocation if (variableEventsQueue.size(...
} } } currentExecution = currentExecution.getParent(); } // finally remove the event from the queue variableEventsQueue.remove(); } } protected Queue<VariableEvent> getVariableEventQueue() { if (variableEventsQueue == null) { variableEventsQueue = new Lin...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CmmnExecution.java
1
请在Spring Boot框架中完成以下Java代码
public class S3ResponseReader implements FileReader { private final S3Client s3Client; public S3ResponseReader(S3Client s3Client) { this.s3Client = s3Client; } @Override public FileData readResponse(S3ObjectRequest s3ObjectRequest) throws IOException { GetObjectRequest getObjectRe...
byte[] buffer = new byte[1024]; int bytesRead; while ((bytesRead = responseInputStream.read(buffer)) != -1) { outputStream.write(buffer, 0, bytesRead); } byte[] fileContent = outputStream.toByteArray(); String contentType = responseInputStream....
repos\tutorials-master\aws-modules\aws-rest\src\main\java\com\baeldung\aws\rest\s3\download\dto\S3ResponseReader.java
2
请在Spring Boot框架中完成以下Java代码
private CachingProvider getCachingProvider(@Nullable String cachingProviderFqn) { if (StringUtils.hasText(cachingProviderFqn)) { return Caching.getCachingProvider(cachingProviderFqn); } return Caching.getCachingProvider(); } private Properties createCacheManagerProperties( ObjectProvider<JCacheProperties...
} /** * Determine if a JCache provider is available. This either kicks in if a default * {@link CachingProvider} has been found or if the property referring to the provider * to use has been set. */ @Order(Ordered.LOWEST_PRECEDENCE) static class JCacheProviderAvailableCondition extends SpringBootCondition {...
repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\autoconfigure\JCacheCacheConfiguration.java
2
请完成以下Java代码
public void setSurname(String surname) { this.surname = surname; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getAge() { return age; } public void setAge(int age) { this.age ...
} @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User book = (User) o; return Objects.equals(id, book.id); } @Override public int hashCode() { return ...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\java\com\baeldung\multipledb\model\User.java
1
请完成以下Java代码
public void setIsRequiredLocation (boolean IsRequiredLocation) { set_Value (COLUMNNAME_IsRequiredLocation, Boolean.valueOf(IsRequiredLocation)); } /** Get Requires Location. @return Requires Location */ @Override public boolean isRequiredLocation () { Object oo = get_Value(COLUMNNAME_IsRequiredLocation)...
{ set_Value (COLUMNNAME_MarketingPlatformGatewayId, MarketingPlatformGatewayId); } /** Get Marketing Platform GatewayId. @return Marketing Platform GatewayId */ @Override public java.lang.String getMarketingPlatformGatewayId () { return (java.lang.String)get_Value(COLUMNNAME_MarketingPlatformGatewayId);...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_Platform.java
1
请完成以下Java代码
public class CommonResult<T> { /** * 状态码 */ private long code; /** * 提示信息 */ private String message; /** * 数据封装 */ private T data; protected CommonResult() { } protected CommonResult(long code, String message, T data) { this.code = code; ...
* 失败返回结果 */ public static <T> CommonResult<T> failed() { return failed(ResultCode.FAILED); } /** * 参数验证失败返回结果 */ public static <T> CommonResult<T> validateFailed() { return failed(ResultCode.VALIDATE_FAILED); } /** * 参数验证失败返回结果 * @param message 提示信息 ...
repos\mall-master\mall-common\src\main\java\com\macro\mall\common\api\CommonResult.java
1
请完成以下Java代码
public boolean hasFailures() { return !failures.isEmpty() || !activityInstanceReports.isEmpty() || !transitionInstanceReports.isEmpty(); } public void writeTo(StringBuilder sb) { sb.append("Cannot migrate process instance '") .append(processInstanceId) .append("':\n"); for (String failure ...
for (String failure : report.getFailures()) { sb.append("\t\t").append(failure).append("\n"); } } for (MigratingTransitionInstanceValidationReport report : transitionInstanceReports) { sb.append("\tCannot migrate transition instance '") .append(report.getTransitionInstanceId()) ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instance\MigratingProcessInstanceValidationReportImpl.java
1
请完成以下Java代码
public class ProcessDefinitionStatisticsEntity extends ProcessDefinitionEntity implements ProcessDefinitionStatistics { protected static final long serialVersionUID = 1L; protected int instances; protected int failedJobs; protected List<IncidentStatistics> incidentStatistics; public int getInstances() { ...
@Override public String toString() { return this.getClass().getSimpleName() + "[instances=" + instances + ", failedJobs=" + failedJobs + ", id=" + id + ", deploymentId=" + deploymentId + ", description=" + description + ", historyLevel=" + historyL...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ProcessDefinitionStatisticsEntity.java
1
请完成以下Java代码
public static MessagePropertiesBuilder fromProperties(MessageProperties properties) { return new MessagePropertiesBuilder(properties); } /** * Performs a shallow copy of the properties for the initial value. * @param properties The properties. * @return The builder. */ public static MessagePropertiesBuild...
private MessagePropertiesBuilder(MessageProperties properties) { super(properties); } @Override public MessagePropertiesBuilder copyProperties(MessageProperties properties) { super.copyProperties(properties); return this; } @Override public MessageProperties build() { return this.buildProperties(); } ...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\MessagePropertiesBuilder.java
1
请完成以下Java代码
protected void copyVariablesToBodyAsMap(Map<String, Object> variables, Exchange exchange) { exchange.getIn().setBody(new HashMap<>(variables)); } protected void copyVariablesToBody(Map<String, Object> variables, Exchange exchange) { Object camelBody = variables.get(ExchangeUtils.CAMELBODY); ...
} protected String getStringFromField(Expression expression, DelegateExecution execution) { if (expression != null) { Object value = expression.getValue(execution); if (value != null) { return value.toString(); } } return null; } ...
repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\CamelBehavior.java
1
请在Spring Boot框架中完成以下Java代码
CalculationWebClient calculationWebClient(WebClient webClient) { WebClientAdapter adapter = WebClientAdapter.create(webClient); HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(adapter).build(); return factory.createClient(CalculationWebClient.class); } //--- Routing...
.GET("sleep2", request -> callSleepBasedOnHeaderValue(serviceController, request.headers().header("mode"))) .build(); } static Mono<ServerResponse> callSleepBasedOnHeaderValue(ServiceController serviceController, List<String> modeHeaderValue) { final int value = extractSleepValue(modeHeader...
repos\spring-boot3-demo-master\src\main\java\com\giraone\sb3\demo\config\WebClientConfig.java
2
请在Spring Boot框架中完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public v...
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BookDTO bookDTO = (BookDTO) o; if (bookDTO.getId() == null || getId() == null) { return fals...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\service\dto\BookDTO.java
2
请完成以下Java代码
public class TbLwM2mStoreFactory { private final Optional<TBRedisCacheConfiguration> redisConfiguration; private final LwM2MTransportServerConfig config; private final LwM2mCredentialsSecurityInfoValidator validator; private final LwM2mVersionedModelProvider modelProvider; @Bean private Regist...
} @Bean private TbLwM2MClientOtaInfoStore otaStore() { return redisConfiguration.isPresent() ? new TbLwM2mRedisClientOtaInfoStore(getConnectionFactory()) : new TbDummyLwM2MClientOtaInfoStore(); } @Bean private TbLwM2MDtlsSessionStore sessionStore() { return redisConfiguration.isPre...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\store\TbLwM2mStoreFactory.java
1
请完成以下Java代码
protected int[] extractFeature(String sentence, FeatureMap featureMap, int position) { StringBuilder sbFeature = new StringBuilder(); List<Integer> featureVec = new LinkedList<Integer>(); for (int i = 0; i < featureTemplateArray.length; i++) { ...
@Override protected String getDefaultFeatureTemplate() { return "# Unigram\n" + "U0:%x[-1,0]\n" + "U1:%x[0,0]\n" + "U2:%x[1,0]\n" + "U3:%x[-2,0]%x[-1,0]\n" + "U4:%x[-1,0]%x[0,0]\n" + "U5:%x[0,0]%x[1,0]\n" + "U6:%x[1,0]%x...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\CRFSegmenter.java
1
请完成以下Java代码
public class SimpleAsymmetricConfig { private String privateKey = null; private String publicKey = null; private String privateKeyLocation = null; private String publicKeyLocation = null; private Resource privateKeyResource = null; private Resource publicKeyResource = null; private Resource...
public Resource loadPrivateKeyResource() { return loadResource(privateKeyResource, privateKey, privateKeyLocation, privateKeyFormat, "Private"); } /** * <p>loadPublicKeyResource.</p> * * @return a {@link org.springframework.core.io.Resource} object */ public Resource loadPublicK...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\encryptor\SimpleAsymmetricConfig.java
1
请完成以下Java代码
protected void executeExecutionListeners( HasExecutionListeners elementWithExecutionListeners, ExecutionEntity executionEntity, String eventType ) { commandContext .getProcessEngineConfiguration() .getListenerNotificationHelper() .executeExecutionL...
public void setCommandContext(CommandContext commandContext) { this.commandContext = commandContext; } public Agenda getAgenda() { return agenda; } public void setAgenda(DefaultActivitiEngineAgenda agenda) { this.agenda = agenda; } public ExecutionEntity getExecution()...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\agenda\AbstractOperation.java
1
请完成以下Java代码
public static List<AuthorizationDto> fromAuthorizationList(List<Authorization> resultList, ProcessEngineConfiguration engineConfiguration) { ArrayList<AuthorizationDto> result = new ArrayList<AuthorizationDto>(); for (Authorization authorization : resultList) { result.add(fromAuthorization(authorization,...
public void setGroupId(String groupId) { this.groupId = groupId; } public Integer getResourceType() { return resourceType; } public void setResourceType(Integer resourceType) { this.resourceType = resourceType; } public String getResourceId() { return resourceId; } public void setResourc...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\authorization\AuthorizationDto.java
1
请完成以下Java代码
public void setPA_ReportLine_ID (int PA_ReportLine_ID) { if (PA_ReportLine_ID < 1) set_ValueNoCheck (COLUMNNAME_PA_ReportLine_ID, null); else set_ValueNoCheck (COLUMNNAME_PA_ReportLine_ID, Integer.valueOf(PA_ReportLine_ID)); } /** Get Report Line. @return Report Line */ public int getPA_ReportLine_...
@return Direct internal record ID */ public int getRecord_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_Report.java
1
请在Spring Boot框架中完成以下Java代码
public class HierarchyContract implements CommissionContract { FlatrateTermId id; Percent commissionPercent; int pointsPrecision; boolean isSimulation; /** * Technically not needed, but useful to help users retain a minimum level of sanity when analyzing why a particular commission was granted */ Commissi...
@JsonProperty("commissionSettingsLineId") @Nullable final CommissionSettingsLineId commissionSettingsLineId, @JsonProperty("isSimulation") final boolean isSimulation) { this.id = id; this.commissionPercent = commissionPercent; this.pointsPrecision = assumeGreaterOrEqualToZero(pointsPrecision, "pointsPrecision...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\algorithms\hierarchy\HierarchyContract.java
2
请完成以下Java代码
private int getNextIntInRange(Range<Integer> range) { OptionalInt first = getSource().ints(1, range.getMin(), range.getMax()).findFirst(); assertPresent(first.isPresent(), range); return first.getAsInt(); } private long getNextLongInRange(Range<Long> range) { OptionalLong first = getSource().longs(1, range.g...
private final T min; private final T max; private Range(String value, T min, T max) { this.value = value; this.min = min; this.max = max; } T getMin() { return this.min; } T getMax() { return this.max; } @Override public String toString() { return this.value; } static <T ex...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\RandomValuePropertySource.java
1
请在Spring Boot框架中完成以下Java代码
public class ChunkController { @Autowired private ChunkService chunkService; /** * upload by part * * @param chunk * @return */ @PostMapping(value = "chunk") public ResponseEntity<String> chunk(Chunk chunk) { chunkService.chunk(chunk); return ResponseEntity....
return ResponseEntity.ok(chunkService.list()); } /** * get single file * * @param filename * @return file */ @GetMapping("/files/{filename:.+}") public ResponseEntity<Resource> getFile(@PathVariable("filename") String filename) { return ResponseEntity.ok().header(HttpHe...
repos\springboot-demo-master\file\src\main\java\com\et\controller\ChunkController.java
2
请完成以下Java代码
private String toJsonString(Object o) { try { ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().build(); return objectMapper.writeValueAsString(o); } catch (Exception ex) { log.warn("Failed to serialize JSON object", ex); } return null; } public URI getWebhookUrl() { return this.web...
} public static class Card { /** * This is header title. */ private String title = "Codecentric's Spring Boot Admin notice"; private String themeColor = "red"; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getThemeC...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\FeiShuNotifier.java
1
请完成以下Java代码
public QueueProcessorId getQueueProcessorForPackageProcessor(@NonNull final QueuePackageProcessorId packageProcessorId) { final I_C_Queue_Processor queueProcessor = getQueueProcessor(packageProcessorId); return QueueProcessorId.ofRepoId(queueProcessor.getC_Queue_Processor_ID()); } @NonNull public I_C_Queue_Pr...
.orElseThrow(() -> new AdempiereException("There is no C_Queue_PackageProcessor found!") .appendParametersToMessage() .setParameter("C_Queue_PackageProcessor_ID", packageProcessorId.getRepoId())); } @NonNull private Map<QueueProcessorId, QueueProcessorDescriptor> getQueueProcessorIndex() { return que...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\QueueProcessorDescriptorIndex.java
1
请完成以下Java代码
public BPartnerId getBPartnerIdByUserId(@NonNull final UserId userId) { final org.compiere.model.I_AD_User userRecord = getById(userId); return BPartnerId.ofRepoIdOrNull(userRecord.getC_BPartner_ID()); } @Override public <T extends org.compiere.model.I_AD_User> T getByIdInTrx(final UserId userId, final Class<T...
.firstId(UserId::ofRepoIdOrNull); if (targetUserId == null) { return Optional.empty(); } return Optional.of(getById(targetUserId)); } @Override public ImmutableSet<UserId> retrieveUsersByJobId(@NonNull final JobId jobId) { return queryBL.createQueryBuilder(I_AD_User.class) .addOnlyActiveRecordsF...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\api\impl\UserDAO.java
1
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JpaOrderLine other = (JpaOrderLine) obj; if (product == null) {...
result = prime * result + ((product == null) ? 0 : product.hashCode()); result = prime * result + quantity; return result; } @Override public String toString() { return "JpaOrderLine [product=" + product + ", quantity=" + quantity + "]"; } JpaProduct getProduct() { ...
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\ddd\order\jpa\JpaOrderLine.java
1
请完成以下Java代码
public void forEachShipmentScheduleId(@NonNull final BiConsumer<ShipmentScheduleId, Set<PickingJobScheduleId>> consumer) { final LinkedHashMap<ShipmentScheduleId, HashSet<PickingJobScheduleId>> map = new LinkedHashMap<>(); ids.forEach(id -> { final HashSet<PickingJobScheduleId> jobScheduleIds = map.computeIfAb...
final ImmutableSet<ShipmentScheduleAndJobScheduleId> retainedIds = ids.stream() .filter(id -> shipmentScheduleIds.contains(id.getShipmentScheduleId())) .collect(ImmutableSet.toImmutableSet()); return Objects.equals(this.ids, retainedIds) ? this : ofCollection(retainedIds); } @Nullable public Ship...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\picking\api\ShipmentScheduleAndJobScheduleIdSet.java
1
请完成以下Java代码
public int getK_EntryRelated_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_K_EntryRelated_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(g...
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 () { return (String)get_Value(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_EntryRelated.java
1
请完成以下Java代码
public void registerConverter(final Class<?> xmlRequestClass, final Converter<Object, Object> converter) { handlers.put(xmlRequestClass, converter); } public void setJAXBContext(final JAXBContext jaxbContext) { this.jaxbContext = jaxbContext; } public void setJAXBObjectFactory(final DynamicObjectFactory jax...
} } private String createStringFromXMLObject(final Object xmlObject) { try { final JAXBElement<Object> jaxbElement = jaxbObjectFactory.createJAXBElement(xmlObject); final Marshaller marshaller = jaxbContext.createMarshaller(); final StringWriter writer = new StringWriter(); marshaller.marshal(jaxbE...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\api\impl\MockedImportHelper.java
1
请完成以下Java代码
public Optional<ComponentDescriptor> saveIfNotExist(TenantId tenantId, ComponentDescriptor component) { if (component.getId() == null) { UUID uuid = Uuids.timeBased(); component.setId(new ComponentDescriptorId(uuid)); component.setCreatedTime(Uuids.unixTimestamp(uuid)); ...
type, pageLink.getTextSearch(), DaoUtil.toPageable(pageLink))); } @Override public PageData<ComponentDescriptor> findByScopeAndTypeAndPageLink(TenantId tenantId, ComponentScope scope, ComponentType type, PageLink pageLink) { return DaoUtil.toPageData(...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\component\JpaBaseComponentDescriptorDao.java
1
请完成以下Java代码
public static boolean isValid(final String pzn) { if (pzn.length() != PZN7_Length && pzn.length() != PZN8_Length) { return false; } if (!pzn.equals(StringUtils.getDigits(pzn))) { return false; } final int codeLimit = pzn.length() - 1; final int checkDigit = Character.getNumericValue(pzn.charAt...
{ int total = 0; int multiplier = initialMultiplier; final int codeLength = code.length(); for (int i = 0; i < codeLength; i++) { int value = Character.getNumericValue(code.charAt(i)); total += value * multiplier; multiplier++; } if (total == 0) { throw new AdempiereException("Invalid cod...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\vertical\pharma\PharmaModulo11Validator.java
1
请完成以下Java代码
public static BPGroupId ofRepoId(final int repoId) { final BPGroupId id = ofRepoIdOrNull(repoId); if (id == null) { throw new AdempiereException("Invalid C_BP_Group_ID: " + repoId); } return id; } @Nullable public static BPGroupId ofRepoIdOrNull(final int repoId) { if (repoId == STANDARD.repoId) ...
public static int toRepoId(@Nullable final BPGroupId bpGroupId) { return bpGroupId != null ? bpGroupId.getRepoId() : -1; } @JsonValue public int toJson() { return getRepoId(); } public static boolean equals(@Nullable final BPGroupId o1, @Nullable final BPGroupId o2) { return Objects.equals(o1, o2); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPGroupId.java
1
请在Spring Boot框架中完成以下Java代码
public class StandardMongoClientSettingsBuilderCustomizer implements MongoClientSettingsBuilderCustomizer, Ordered { private final UuidRepresentation uuidRepresentation; private final MongoConnectionDetails connectionDetails; private int order; public StandardMongoClientSettingsBuilderCustomizer(MongoConnection...
@Override public int getOrder() { return this.order; } /** * Set the order value of this object. * @param order the new order value * @see #getOrder() */ public void setOrder(int order) { this.order = order; } }
repos\spring-boot-4.0.1\module\spring-boot-mongodb\src\main\java\org\springframework\boot\mongodb\autoconfigure\StandardMongoClientSettingsBuilderCustomizer.java
2
请完成以下Java代码
public Integer getWidth() { return 17; } @Override public Integer getHeight() { return 15; } @Override public String getAnchorValue() { return null; } @Override public String getFillValue() { return "#585858"; } @Override public String ...
Element gTag = svgGenerator.getDOMFactory().createElementNS(null, SVGGraphics2D.SVG_G_TAG); gTag.setAttributeNS(null, "transform", "translate(" + (imageX - 7) + "," + (imageY - 7) + ")"); Element pathTag = svgGenerator.getDOMFactory().createElementNS(null, SVGGraphics2D.SVG_PATH_TAG); pathTag.s...
repos\Activiti-develop\activiti-core\activiti-image-generator\src\main\java\org\activiti\image\impl\icon\SignalThrowIconType.java
1
请完成以下Java代码
public JobDto findCleanupJob() { Job job = processEngine.getHistoryService().findHistoryCleanupJob(); if (job == null) { throw new RestException(Status.NOT_FOUND, "History cleanup job does not exist"); } return JobDto.fromJob(job); } public List<JobDto> findCleanupJobs() { List<Job> jobs ...
(ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration(); HistoryCleanupConfigurationDto configurationDto = new HistoryCleanupConfigurationDto(); configurationDto.setEnabled(engineConfiguration.isHistoryCleanupEnabled()); BatchWindow batchWindow = engineConfiguration.getBatchWindowMa...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoryCleanupRestServiceImpl.java
1
请完成以下Java代码
protected void closeLdapCtx(LdapContext context) { if (context != null) { try { context.close(); } catch (NamingException e) { // ignore LdapPluginLogger.INSTANCE.exceptionWhenClosingLdapContext(e); } } } public LdapSearchResults search(String baseDn, String search...
protected static String getValue(String attrName, Attributes attributes) { Attribute attribute = attributes.get(attrName); if (attribute != null) { try { return (String) attribute.get(); } catch (NamingException e) { throw new IdentityProviderException("Error occurred while retrievin...
repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapClient.java
1
请完成以下Java代码
private void contribute(Map<String, Object> details, Dependency dependency) { if (!ObjectUtils.isEmpty(dependency.getMappings())) { Map<String, VersionRange> dep = new LinkedHashMap<>(); dependency.getMappings().forEach((it) -> { if (it.getRange() != null && it.getVersion() != null) { dep.put(it.getVer...
details.put(dependency.getId(), dep); } } private Version getHigher(Map<String, VersionRange> dep) { Version higher = null; for (VersionRange versionRange : dep.values()) { Version candidate = versionRange.getHigherVersion(); if (higher == null) { higher = candidate; } else if (candidate.compar...
repos\initializr-main\initializr-actuator\src\main\java\io\spring\initializr\actuate\info\DependencyRangesInfoContributor.java
1
请完成以下Java代码
private final String buildUIDefaultsKey(final String name) { return buildUIDefaultsKey(uiSubClassID, name); } private static final String buildUIDefaultsKey(final String uiSubClassID, final String name) { if (uiSubClassID == null) { return name; } else { return uiSubClassID + "." + name; } } ...
return keyValueList; } Check.assumeNotEmpty(uiSubClassID, "uiSubClassID not empty"); final Object[] keyValueListConverted = new Object[keyValueList.length]; for (int i = 0, max = keyValueList.length; i < max; i += 2) { final Object keyOrig = keyValueList[i]; final Object value = keyValueList[i + 1]; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\UISubClassIDHelper.java
1
请完成以下Java代码
private void setConstraintInfo(@NonNull final Throwable e) { if (!isUniqueContraintError(e)) { return; // not unique constraint, nothing to do } else if (DB.isPostgreSQL()) { this.constraintName = extractConstraintNameFromPostgreSQLErrorMessage(e.getMessage()); } // if (!Check.isBlank(this.const...
} else if (!Check.isBlank(constraintName)) { return TranslatableStrings.builder().appendADMessage(MSG_SaveErrorNotUnique).append(": ").append(constraintName).build(); } else { final TranslatableStringBuilder message = TranslatableStrings.builder().appendADMessage(MSG_SaveErrorNotUnique); final Throwa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\exceptions\DBUniqueConstraintException.java
1
请完成以下Java代码
public int getIMP_Processor_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Import Processor Log. @param IMP_ProcessorLog_ID Import Processor Log */ public void setIMP_ProcessorLog_ID (int IMP_ProcessorLog_ID) { if (I...
Reference for this record */ public void setReference (String Reference) { set_Value (COLUMNNAME_Reference, Reference); } /** Get Reference. @return Reference for this record */ public String getReference () { return (String)get_Value(COLUMNNAME_Reference); } /** Set Summary. @param Summary ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_ProcessorLog.java
1
请完成以下Java代码
public void setIsDisplayed (boolean IsDisplayed) { set_Value (COLUMNNAME_IsDisplayed, Boolean.valueOf(IsDisplayed)); } /** Get Displayed. @return Determines, if this field is displayed */ public boolean isDisplayed () { Object oo = get_Value(COLUMNNAME_IsDisplayed); if (oo != null) { if (oo ins...
/** Set Single Row Layout. @param IsSingleRow Default for toggle between Single- and Multi-Row (Grid) Layout */ public void setIsSingleRow (boolean IsSingleRow) { set_Value (COLUMNNAME_IsSingleRow, Boolean.valueOf(IsSingleRow)); } /** Get Single Row Layout. @return Default for toggle between Single- an...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserDef_Tab.java
1
请完成以下Java代码
public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public ProcessInstanceModificationBuilderImpl getModificationBuilder() { return modificationBuilder; } public String getBusinessKey() { return bu...
public void setModificationBuilder(ProcessInstanceModificationBuilderImpl modificationBuilder) { this.modificationBuilder = modificationBuilder; } public void setRestartedProcessInstanceId(String restartedProcessInstanceId){ this.restartedProcessInstanceId = restartedProcessInstanceId; } public String...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstantiationBuilderImpl.java
1
请完成以下Java代码
public class PMM_PurchaseCandidate_Product_FacetCollector extends SingleFacetCategoryCollectorTemplate<I_PMM_PurchaseCandidate> { public PMM_PurchaseCandidate_Product_FacetCollector() { super(FacetCategory.builder() .setDisplayNameAndTranslate(I_PMM_PurchaseCandidate.COLUMNNAME_M_Product_ID) .setCollapsed(t...
} private IFacet<I_PMM_PurchaseCandidate> createFacet(final Map<String, Object> row) { final IFacetCategory facetCategoryBPartners = getFacetCategory(); final int bpartnerId = (int)row.get(I_M_Product.COLUMNNAME_M_Product_ID); final String bpartnerName = new StringBuilder() .append(row.get(I_M_Product.COL...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\facet\impl\PMM_PurchaseCandidate_Product_FacetCollector.java
1
请完成以下Java代码
public class RemittanceLocation2 { @XmlElement(name = "RmtId") protected String rmtId; @XmlElement(name = "RmtLctnMtd") @XmlSchemaType(name = "string") protected RemittanceLocationMethod2Code rmtLctnMtd; @XmlElement(name = "RmtLctnElctrncAdr") protected String rmtLctnElctrncAdr; @XmlEle...
*/ public void setRmtLctnMtd(RemittanceLocationMethod2Code value) { this.rmtLctnMtd = value; } /** * Gets the value of the rmtLctnElctrncAdr property. * * @return * possible object is * {@link String } * */ public String getRmtLctnElctrncAdr() { ...
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\RemittanceLocation2.java
1
请在Spring Boot框架中完成以下Java代码
public String getUPCTU() { return upctu; } /** * Sets the value of the upctu property. * * @param value * allowed object is * {@link String } * */ public void setUPCTU(String value) { this.upctu = value; } /** * Gets the value o...
* * @param value * allowed object is * {@link String } * */ public void setGTINCU(String value) { this.gtincu = value; } /** * Gets the value of the gtintu property. * * @return * possible object is * {@link String } * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev2\de\metas\edi\esb\jaxb\metasfreshinhousev2\EXPMInOutDesadvLineVType.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setMKTG_Channel_ID (final int MKTG_Channel_ID) { if (MKTG_Channel_ID < 1) set_ValueNoCheck (COLUMNNAME_MKTG_Channel_ID, null); else set_ValueNoCheck (COL...
{ return get_ValueAsInt(COLUMNNAME_MKTG_Channel_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_Channel.java
1
请完成以下Java代码
public abstract class KeywordExtractor { /** * 默认分词器 */ protected Segment defaultSegment; public KeywordExtractor(Segment defaultSegment) { this.defaultSegment = defaultSegment; } public KeywordExtractor() { this(StandardTokenizer.SEGMENT); } /** * 是...
} /** * 提取关键词 * * @param document 关键词 * @param size 需要几个关键词 * @return */ public List<String> getKeywords(String document, int size) { return getKeywords(defaultSegment.seg(document), size); } /** * 提取关键词(top 10) * * @param document 文章 *...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\summary\KeywordExtractor.java
1
请完成以下Java代码
public CountResultDto queryUserOperationCount(UriInfo uriInfo) { UserOperationLogQueryDto queryDto = new UserOperationLogQueryDto(objectMapper, uriInfo.getQueryParameters()); UserOperationLogQuery query = queryDto.toQuery(processEngine); return new CountResultDto(query.count()); } @Override public Li...
processEngine.getHistoryService() .setAnnotationForOperationLogById(operationId, annotation); return Response.noContent().build(); } @Override public Response clearAnnotation(String operationId) { processEngine.getHistoryService() .clearAnnotationForOperationLogById(operationId); re...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\UserOperationLogRestServiceImpl.java
1
请完成以下Java代码
private void configureSessionCookie(SessionCookieConfig config) { Cookie cookie = this.session.getCookie(); PropertyMapper map = PropertyMapper.get(); map.from(cookie::getName).to(config::setName); map.from(cookie::getDomain).to(config::setDomain); map.from(cookie::getPath).to(config::setPath); map.fr...
private @Nullable Set<jakarta.servlet.SessionTrackingMode> unwrap( @Nullable Set<Session.SessionTrackingMode> modes) { if (modes == null) { return null; } Set<jakarta.servlet.SessionTrackingMode> result = new LinkedHashSet<>(); for (Session.SessionTrackingMode mode : modes) { result.add(jakarta....
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\ServletContextInitializers.java
1
请完成以下Java代码
public QuickInput build() { return new QuickInput(this); } public Builder setRootDocumentPath(final DocumentPath rootDocumentPath) { _rootDocumentPath = Preconditions.checkNotNull(rootDocumentPath, "rootDocumentPath"); return this; } private DocumentPath getRootDocumentPath() { Check.assumeN...
return _quickInputDescriptor; } private DetailId getTargetDetailId() { final DetailId targetDetailId = getQuickInputDescriptor().getDetailId(); Check.assumeNotNull(targetDetailId, "Parameter targetDetailId is not null"); return targetDetailId; } private Document buildQuickInputDocument() { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\quickinput\QuickInput.java
1
请完成以下Java代码
public ProcessInstance from(org.activiti.engine.runtime.ProcessInstance internalProcessInstance) { ProcessInstanceImpl processInstance = new ProcessInstanceImpl(); processInstance.setId(internalProcessInstance.getId()); processInstance.setParentId(internalProcessInstance.getParentProcessInstance...
processInstance.setRootProcessInstanceId(internalProcessInstance.getRootProcessInstanceId()); return processInstance; } private ProcessInstance.ProcessInstanceStatus calculateStatus( org.activiti.engine.runtime.ProcessInstance internalProcessInstance ) { if (internalProcessInstance....
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\model\impl\APIProcessInstanceConverter.java
1
请在Spring Boot框架中完成以下Java代码
public class ArithmeticController { @Autowired private ArithmeticService arithmeticService; @GetMapping("/sum/{number1}/{number2}") public float getSum(@PathVariable("number1") float number1, @PathVariable("number2") float number2) { return arithmeticService.add(number1, number2); } ...
String memoryStats = ""; String init = String.format( "Initial: %.2f GB \n", (double)memoryBean.getHeapMemoryUsage().getInit() /1073741824); String usedHeap = String.format("Used: %.2f GB \n", (double)memoryBean.getHeapMemoryUsage().getUsed() /1073741824); Stri...
repos\tutorials-master\spring-boot-modules\spring-boot-mvc-3\src\main\java\com\baeldung\micronaut\vs\springboot\controller\ArithmeticController.java
2
请在Spring Boot框架中完成以下Java代码
public class JsonKPIDataSetValue { @JsonProperty("_key") Object _key; @JsonIgnore Map<String, Object> map; public static JsonKPIDataSetValue of(@NonNull final KPIDataSetValuesMap dataSetValue, @NonNull final KPIJsonOptions jsonOpts) { return new JsonKPIDataSetValue(dataSetValue.getKey(), dataSetValue.getValues()...
.collect(GuavaCollectors.toImmutableMap()); } private static Map.Entry<String, Object> toJson(@NonNull final Map.Entry<String, KPIDataValue> entry, @NonNull final KPIJsonOptions jsonOpts) { return GuavaCollectors.entry( entry.getKey(), entry.getValue().toJsonValue(jsonOpts)); } @JsonAnyGetter private ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\json\JsonKPIDataSetValue.java
2
请完成以下Java代码
/* package */class CompositeQueryUpdater<T> implements ICompositeQueryUpdater<T> { private final List<IQueryUpdater<T>> queryUpdaters = new ArrayList<>(); private String sql = null; private List<Object> sqlParams = null; private boolean sqlBuilt = false; public CompositeQueryUpdater() { } @Override public I...
} return updated; } @Override public String getSql(final Properties ctx, final List<Object> params) { buildSql(ctx); params.addAll(sqlParams); return sql; } private void buildSql(final Properties ctx) { if (sqlBuilt) { return; } if (queryUpdaters.isEmpty()) { throw new AdempiereExcept...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CompositeQueryUpdater.java
1
请完成以下Java代码
public String toString() { return "ParaModel{" + "provice='" + provice + '\'' + ", area='" + area + '\'' + ", streets=" + streets + '}'; } public String getProvice() { return provice; } public void setProvice(String provic...
return area; } public void setArea(String area) { this.area = area; } public List<Street> getStreets() { return streets; } public void setStreets(List<Street> streets) { this.streets = streets; } }
repos\spring-boot-quick-master\quick-swagger\src\main\java\com\quick\po\ParaModel.java
1
请完成以下Java代码
public Builder add( @NonNull final String fieldName, @Nullable final Collection<String> dependsOnFieldNames, @NonNull final DependencyType dependencyType) { if (dependsOnFieldNames == null || dependsOnFieldNames.isEmpty()) { return this; } final ImmutableSetMultimap.Builder<String, String...
return this; } for (final Map.Entry<DependencyType, Multimap<String, String>> l1 : dependencies.type2name2dependencies.entrySet()) { final DependencyType dependencyType = l1.getKey(); final ImmutableSetMultimap.Builder<String, String> name2dependencies = type2name2dependencies.computeIfAbsent(d...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentFieldDependencyMap.java
1
请在Spring Boot框架中完成以下Java代码
protected <T> T postProcess(T object) { return (T) this.objectPostProcessor.postProcess(object); } /** * Adds an {@link ObjectPostProcessor} to be used for this * {@link SecurityConfigurerAdapter}. The default implementation does nothing to the * object. * @param objectPostProcessor the {@link ObjectPostPr...
for (ObjectPostProcessor opp : this.postProcessors) { Class<?> oppClass = opp.getClass(); Class<?> oppType = GenericTypeResolver.resolveTypeArgument(oppClass, ObjectPostProcessor.class); if (oppType == null || oppType.isAssignableFrom(object.getClass())) { object = opp.postProcess(object); } } ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\SecurityConfigurerAdapter.java
2
请在Spring Boot框架中完成以下Java代码
public String addDictByLowAppId(SysDictVo sysDictVo) { String[] dictResult = this.addDict(sysDictVo.getDictName(),sysDictVo.getLowAppId(),sysDictVo.getTenantId()); String id = dictResult[0]; String code = dictResult[1]; this.addDictItem(id,sysDictVo.getDictItemsList()); return code; } @Override public voi...
/** * 添加字典 * @param dictName */ private String[] addDict(String dictName,String lowAppId, Integer tenantId) { SysDict dict = new SysDict(); dict.setDictName(dictName); dict.setDictCode(RandomUtil.randomString(10)); dict.setDelFlag(Integer.valueOf(CommonConstant.STATUS_0)); dict.setLowAppId(lowAppId); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysDictServiceImpl.java
2
请完成以下Java代码
private void resizeBuf(int size) { int capacity; if (size >= _capacity * 2) { capacity = size; } else { capacity = 1; while (capacity < size) { capacity <<= 1; } } byte[] buf =...
} _buf = buf; _capacity = capacity; } /** * 缓冲区 */ private byte[] _buf; /** * 大小 */ private int _size; /** * 容量 */ private int _capacity; }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\AutoBytePool.java
1
请完成以下Java代码
public void setLabel(String label) { this.label = label; } @Override public void setValue(String value) { innerList.clear(); innerList.add(new Word(value, label)); } @Override public int length() { return getValue().length(); } @Override ...
* @return */ public Word toWord() { return new Word(getValue(), getLabel()); } public CompoundWord(List<Word> innerList, String label) { this.innerList = innerList; this.label = label; } public static CompoundWord create(String param) { if (param ==...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\document\sentence\word\CompoundWord.java
1
请完成以下Java代码
public String getContentType() { return contentType; } /** @return true if the format is about displaying tabular data (e.g. Excel, CSV etc). */ public boolean isTabular() { return tabular; } /** @return file extension to be used for this format, without dot (e.g. xls, html, csv etc) */ public String getF...
/** * @return {@link OutputType} for the given file extension. */ public static Optional<OutputType> getOutputTypeByFileExtension(final String fileExtension ) { return Stream.of( values() ) .filter( v -> v.getFileExtension().equalsIgnoreCase(fileExtension) ) .findFirst(); } public static OutputType g...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\de.metas.report.jasper.commons\src\main\java\de\metas\report\server\OutputType.java
1
请完成以下Java代码
private ExternalSystemMap getMap() {return cache.getOrLoad(0, this::retrieveMap);} private ExternalSystemMap retrieveMap() { return queryBL.createQueryBuilder(I_ExternalSystem.class) .addOnlyActiveRecordsFilter() .create() .stream() .map(ExternalSystemRepository::fromRecord) .collect(ExternalSy...
{ return getMap().getById(id); } private static ExternalSystem fromRecord(@NonNull final I_ExternalSystem externalSystemRecord) { return ExternalSystem.builder() .id(ExternalSystemId.ofRepoId(externalSystemRecord.getExternalSystem_ID())) .type(ExternalSystemType.ofValue(externalSystemRecord.getValue()))...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\externalsystem\ExternalSystemRepository.java
1