instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private static void throwError(String errorCode, String parameterName) { OAuth2Error error = new OAuth2Error(errorCode, "OAuth 2.0 Parameter: " + parameterName, ERROR_URI); throw new OAuth2AuthenticationException(error); } private static final class OAuth2DeviceCodeGenerator implements OAuth2TokenGenerator<OAuth...
int offset = Math.abs(b % 20); sb.append(VALID_CHARS[offset]); } sb.insert(4, '-'); return sb.toString(); } } private static final class OAuth2UserCodeGenerator implements OAuth2TokenGenerator<OAuth2UserCode> { private final StringKeyGenerator userCodeGenerator = new UserCodeStringKeyGenerator(); ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2DeviceAuthorizationRequestAuthenticationProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class RequisitionService { public BigDecimal computePrice(final I_M_Requisition requisition, final I_M_RequisitionLine line) { if (line.getC_Charge_ID() > 0) { final MCharge charge = MCharge.get(Env.getCtx(), line.getC_Charge_ID()); return charge.getChargeAmt(); } else if (line.getM_Product_ID() ...
pp.setM_PriceList_ID(priceListId); // pp.setPriceDate(getDateOrdered()); // return pp.getPriceStd(); } } else { return null; } } public void updateLineNetAmt(final I_M_RequisitionLine line) { BigDecimal lineNetAmt = line.getQty().multiply(line.getPriceActual()); line.setLineNetAmt(line...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\requisition\RequisitionService.java
2
请完成以下Java代码
public class SalaryType implements UserType<Salary>, DynamicParameterizedType { private String localCurrency; @Override public int getSqlType() { return Types.VARCHAR; } @Override public Class<Salary> returnedClass() { return Salary.class; } @Override public boole...
st.setString(index, value.getCurrency() + " " + salaryValue); } } @Override public Salary deepCopy(Salary value) { if (Objects.isNull(value)) return null; Salary newSal = new Salary(); newSal.setAmount(value.getAmount()); newSal.setCurrency(value.getCur...
repos\tutorials-master\persistence-modules\hibernate-annotations\src\main\java\com\baeldung\hibernate\customtypes\SalaryType.java
1
请在Spring Boot框架中完成以下Java代码
public class DruidWallConfigRegister implements SpringApplicationRunListener { public SpringApplication application; private String[] args; /** * 必备,否则启动报错 * @param application * @param args */ public DruidWallConfigRegister(SpringApplication application, String[] args) { ...
} @Override public void contextLoaded(ConfigurableApplicationContext context) { ConfigurableEnvironment env = context.getEnvironment(); Map<String, Object> props = new HashMap<>(); props.put("spring.datasource.dynamic.druid.wall.selectWhereAlwayTrueCheck", false); MutableProper...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\DruidWallConfigRegister.java
2
请完成以下Java代码
public void setRequestMatcher(RequestMatcher requestMatcher) { Assert.notNull(requestMatcher, "requestMatcher cannot be null"); this.requestMatcher = requestMatcher; } /** * <p> * Sets the value (in seconds) for the max-age directive of the * Strict-Transport-Security header. The default is one year. * <...
* If true, preload will be included in HSTS Header. The default is false. * </p> * * <p> * See <a href="https://tools.ietf.org/html/rfc6797#section-6.1.2">Section 6.1.2</a> * for additional details. * </p> * @param preload true to include preload, else false * @since 5.2.0 */ public void setPreload(b...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\HstsHeaderWriter.java
1
请完成以下Java代码
public Boolean getVariableNamesIgnoreCase() { return variableNamesIgnoreCase; } public Boolean getVariableValuesIgnoreCase() { return variableValuesIgnoreCase; } @Override public HistoricVariableInstanceQuery includeDeleted() { includeDeleted = true; return this; } public String getProc...
return processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public List<String> getVariableNameIn() { return variableNameIn; } public Date getCreatedAfter() { return createdAfter; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricVariableInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void changeCurrencyRate(@NonNull final BankStatementLineId bankStatementLineId, @NonNull final BigDecimal currencyRate) { if (currencyRate.signum() == 0) { throw new AdempiereException("Invalid currency rate: " + currencyRate); } final I_C_BankStatementLine line = getLineById(bankStatementLineId); ...
} line.setCurrencyRate(currencyRate); InterfaceWrapperHelper.save(line); unpost(bankStatement); } @Override public CurrencyId getBaseCurrencyId(final I_C_BankStatementLine line) { final ClientAndOrgId clientAndOrgId = ClientAndOrgId.ofClientAndOrg(line.getAD_Client_ID(), line.getAD_Org_ID()); return mo...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\service\impl\BankStatementBL.java
2
请完成以下Java代码
public class HashMapToArrayListConverterUtils { static ArrayList<String> convertUsingConstructor(HashMap<Integer, String> hashMap) { if (hashMap == null) { return null; } return new ArrayList<String>(hashMap.values()); } static ArrayList<String> convertUsingAddAllMethod...
arrayList.add(entry.getValue()); } return arrayList; } static public ArrayList<String> convertUsingGuava(HashMap<Integer, String> hashMap) { if (hashMap == null) { return null; } EntryTransformer<Integer, String, String> entryMapTransformer = (key, value) -...
repos\tutorials-master\core-java-modules\core-java-collections-conversions-2\src\main\java\com\baeldung\hashmaptoarraylist\HashMapToArrayListConverterUtils.java
1
请完成以下Java代码
public class SimplifiedChineseDictionary extends BaseChineseDictionary { /** * 简体=繁体 */ static AhoCorasickDoubleArrayTrie<String> trie = new AhoCorasickDoubleArrayTrie<String>(); static { long start = System.currentTimeMillis(); if (!load(HanLP.Config.tcDictionaryRoot + "s...
} public static String convertToTraditionalChinese(String simplifiedChineseString) { return segLongest(simplifiedChineseString.toCharArray(), trie); } public static String convertToTraditionalChinese(char[] simplifiedChinese) { return segLongest(simplifiedChinese, trie); } ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\ts\SimplifiedChineseDictionary.java
1
请完成以下Java代码
public class HelloWorkflowV2Impl implements HelloWorkflowV2 { private static final Logger log = LoggerFactory.getLogger(HelloWorkflowV2Impl.class); private final HelloV2Activities activity = Workflow.newActivityStub( HelloV2Activities.class, ActivityOptions.newBuilder() .setStartToCloseTi...
public String hello(String person) { var info = Workflow.getInfo(); log.info("Running workflow for person {}: id={}, attempt={}", person, info.getWorkflowId(), info.getAttempt()); var step1result = activity.sayHello(person); var step2result = activity.say...
repos\tutorials-master\saas-modules\temporal\src\main\java\com\baeldung\temporal\workflows\hellov2\HelloWorkflowV2Impl.java
1
请完成以下Java代码
public class WEBUI_M_HU_MoveToQualityWarehouse extends HUEditorProcessTemplate implements IProcessPrecondition { private final transient IHUMovementBL huMovementBL = Services.get(IHUMovementBL.class); @Param(parameterName = I_M_Warehouse.COLUMNNAME_M_Warehouse_ID, mandatory = true) private I_M_Warehouse warehouse; ...
{ Check.assume(warehouse.isQualityReturnWarehouse(), "not a quality returns warehouse"); final List<I_M_HU> selectedTopLevelHUs = streamSelectedHUs(Select.ONLY_TOPLEVEL).collect(ImmutableList.toImmutableList()); if (selectedTopLevelHUs.isEmpty()) { throw new AdempiereException("@NoSelection@"); } movem...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_MoveToQualityWarehouse.java
1
请完成以下Java代码
public List<Object> getValues(@NonNull final I_M_ShipmentSchedule sched) { final IShipmentScheduleEffectiveBL shipmentScheduleEffectiveBL = Services.get(IShipmentScheduleEffectiveBL.class); final IShipmentScheduleBL shipmentScheduleBL = Services.get(IShipmentScheduleBL.class); final List<Object> values = new Ar...
values.add(sched.getC_Async_Batch_ID()); } values.add(sched.getExternalHeaderId()); if (sched.getExternalSystem_ID() > 0) { values.add(sched.getExternalSystem_ID()); } return values; } @Override public String toString() { return ObjectUtils.toString(this); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\agg\key\impl\ShipmentScheduleKeyValueHandler.java
1
请完成以下Java代码
protected ExposableWebEndpoint createEndpoint(Object endpointBean, EndpointId id, Access defaultAccess, Collection<WebOperation> operations) { String rootPath = PathMapper.getRootPath(this.endpointPathMappers, id); return new DiscoveredWebEndpoint(this, endpointBean, id, rootPath, defaultAccess, operations, ...
@Override protected OperationKey createOperationKey(WebOperation operation) { return new OperationKey(operation.getRequestPredicate(), () -> "web request predicate " + operation.getRequestPredicate()); } static class WebEndpointDiscovererRuntimeHints implements RuntimeHintsRegistrar { @Override public vo...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\annotation\WebEndpointDiscoverer.java
1
请完成以下Java代码
protected String doIt() { final HURow row = getSingleHURow(); pickHU(row); // invalidate view in order to be refreshed getView().invalidateAll(); return MSG_OK; } private void pickHU(@NonNull final HURow row) { final HuId huId = row.getHuId(); final PickRequest pickRequest = PickRequest.builder() ...
final PPOrderLinesView ppOrderView = PPOrderLinesView.cast(view); pickingRequestBuilder.ppOrderId(ppOrderView.getPpOrderId()); } WEBUI_PP_Order_ProcessHelper.pickAndProcessSingleHU(pickRequest, pickingRequestBuilder.build()); } @Override protected void postProcess(final boolean success) { if (!success) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_Pick.java
1
请完成以下Java代码
public DmnDecisionQuery orderByDecisionType() { return orderBy(DecisionQueryProperty.DECISION_TYPE); } // results //////////////////////////////////////////// @Override public long executeCount(CommandContext commandContext) { return CommandContextUtil.getDecisionEntityManager(commandC...
public Integer getVersionGte() { return versionGte; } public Integer getVersionLt() { return versionLt; } public Integer getVersionLte() { return versionLte; } public boolean isLatest() { return latest; } public String getCategory() { return ca...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\DecisionQueryImpl.java
1
请完成以下Java代码
private boolean deploymentsDifferDefault(DeploymentEntity deployment, DeploymentEntity saved) { if (deployment.getResources() == null || saved.getResources() == null) { return true; } Map<String, ResourceEntity> resources = deployment.getResources(); Map<String, ResourceEntit...
ProcessDefinitionEntity.class )) { // If activation date is set, we first suspend all the process // definition SuspendProcessDefinitionCmd suspendProcessDefinitionCmd = new SuspendProcessDefinitionCmd( processDefinitionEntity, false, ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\DeployCmd.java
1
请完成以下Java代码
public FetchAndLockRequest setAsyncResponse(AsyncResponse asyncResponse) { this.asyncResponse = asyncResponse; return this; } public String getProcessEngineName() { return processEngineName; } public FetchAndLockRequest setProcessEngineName(String processEngineName) { this.processEngineName = ...
} public long getTimeoutTimestamp() { FetchExternalTasksExtendedDto dto = getDto(); long requestTime = getRequestTime().getTime(); long asyncResponseTimeout = dto.getAsyncResponseTimeout(); return requestTime + asyncResponseTimeout; } @Override public String toString() { return "FetchAndLo...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\FetchAndLockRequest.java
1
请完成以下Java代码
public class AppInfo { private String app = ""; private Integer appType = 0; private Set<MachineInfo> machines = ConcurrentHashMap.newKeySet(); public AppInfo() {} public AppInfo(String app) { this.app = app; } public AppInfo(String app, Integer appType) { this.app = ap...
} } return false; } public Optional<MachineInfo> getMachine(String ip, int port) { return machines.stream() .filter(e -> e.getIp().equals(ip) && e.getPort().equals(port)) .findFirst(); } private boolean heartbeatJudge(final int threshold) { if (m...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\discovery\AppInfo.java
1
请完成以下Java代码
private static final class ManageSchedulerRequestHandlerAsEventListener implements IEventListener { private final EventLogUserService eventLogUserService; private final ManageSchedulerRequestHandler handler; @lombok.Builder private ManageSchedulerRequestHandlerAsEventListener( @NonNull final ManageSchedul...
} } private void handleRequest(@NonNull final ManageSchedulerRequest request) { handler.handleRequest(request); } private IAutoCloseable switchCtx(@NonNull final ManageSchedulerRequest request) { final Properties ctx = createCtx(request); return Env.switchContext(ctx); } private Properties c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\scheduler\eventbus\SchedulerEventBusService.java
1
请完成以下Java代码
public Builder id(String jti) { return claim(JwtClaimNames.JTI, jti); } /** * Sets the claim. * @param name the claim name * @param value the claim value * @return the {@link Builder} */ public Builder claim(String name, Object value) { Assert.hasText(name, "name cannot be empty"); Assert...
// The value of the 'iss' claim is a String or URL (StringOrURI). // Attempt to convert to URL. Object issuer = this.claims.get(JwtClaimNames.ISS); if (issuer != null) { URL convertedValue = ClaimConversionService.getSharedInstance().convert(issuer, URL.class); if (convertedValue != null) { this.c...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtClaimsSet.java
1
请完成以下Java代码
public int priority() { return 30; } protected Val spinJsonToVal(SpinJsonNode node, Function<Object, Val> innerValueMapper) { if (node.isObject()) { Map pairs = node.fieldNames() .stream() .collect(toMap(field -> field, field -> spinJsonToVal(node.prop(fie...
.entrySet().stream() .collect(toMap(Map.Entry::getKey, entry -> { List<Val> valList = entry.getValue(); if (!valList.isEmpty() && valList.size() > 1) { return innerValueMapper.apply(valList); } else { return valList.get(0); } })); membersMap.pu...
repos\camunda-bpm-platform-master\engine-plugins\spin-plugin\src\main\java\org\camunda\spin\plugin\impl\feel\integration\SpinValueMapper.java
1
请在Spring Boot框架中完成以下Java代码
public String getMail() { return mail; } public void setMail(String mail) { this.mail = mail; } public Integer getUserType() { return userType; } public void setUserType(Integer userType) { this.userType = userType; } public Integer getUserState() { ...
public void setPassword(String password) { this.password = password; } @Override public String toString() { return "UserQueryReq{" + "id='" + id + '\'' + ", username='" + username + '\'' + ", password='" + password + '\'' + ",...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\user\UserQueryReq.java
2
请完成以下Java代码
public void setAuthenticationSuccessHandler(AuthenticationSuccessHandler successHandler) { Assert.notNull(successHandler, "successHandler cannot be null"); this.successHandler = successHandler; } public void setAuthenticationFailureHandler(AuthenticationFailureHandler failureHandler) { Assert.notNull(failureHa...
* @since 5.8 */ public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { Assert.notNull(securityContextHolderStrategy, "securityContextHolderStrategy cannot be null"); this.securityContextHolderStrategy = securityContextHolderStrategy; } protected Authenticat...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\AbstractAuthenticationProcessingFilter.java
1
请完成以下Java代码
public void setIsTableBased (boolean IsTableBased) { set_ValueNoCheck (COLUMNNAME_IsTableBased, Boolean.valueOf(IsTableBased)); } /** Get Table Based. @return Table based List Reporting */ @Override public boolean isTableBased () { Object oo = get_Value(COLUMNNAME_IsTableBased); if (oo != null) { ...
} /** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Drucker. @param PrinterName Name of the Printer */ @Override public void setPrinterName (java.lang.String PrinterName) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintFormat.java
1
请完成以下Java代码
private int createDocType (String Name, String PrintName, String DocBaseType, String DocSubType, int C_DocTypeShipment_ID, int C_DocTypeInvoice_ID, int StartNo, int GL_Category_ID) { log.debug("In createDocType"); log.debug("docBaseType: " + DocBaseType); log.debug("GL_Category_ID: " +...
dt.setC_DocTypeShipment_ID(C_DocTypeShipment_ID); if (C_DocTypeInvoice_ID != 0) dt.setC_DocTypeInvoice_ID(C_DocTypeInvoice_ID); if (GL_Category_ID != 0) dt.setGL_Category_ID(GL_Category_ID); if (sequence == null) dt.setIsDocNoControlled(false); else { dt.setIsDocNoControlled(true); dt.setDocNoS...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\CreateDocType.java
1
请在Spring Boot框架中完成以下Java代码
public class CommentDTO { /** The task id. */ private String taskId; /** The last name. */ private String comment; /** The completed. */ private Date posted; /** * Instantiates a new task dto. */ public CommentDTO() { super(); } /** * Instantiates a new task dto. * * @param taskId * ...
* * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; CommentDTO other = (CommentDTO) obj; if (comment == null) { if (other.comment != n...
repos\spring-boot-microservices-master\comments-webservice\src\main\java\com\rohitghatol\microservices\comments\dtos\CommentDTO.java
2
请完成以下Java代码
public class DedupeResponseHeaderGatewayFilterFactory extends AbstractGatewayFilterFactory<DedupeResponseHeaderGatewayFilterFactory.Config> { /** * The name of the strategy key. */ public static final String STRATEGY_KEY = "strategy"; public DedupeResponseHeaderGatewayFilterFactory() { super(Config.class);...
} void dedupe(HttpHeaders headers, Config config) { String names = config.getName(); Strategy strategy = config.getStrategy(); if (headers == null || names == null || strategy == null) { return; } for (String name : names.split(" ")) { dedupe(headers, name.trim(), strategy); } } private void dedu...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\DedupeResponseHeaderGatewayFilterFactory.java
1
请完成以下Java代码
public GitIgnoreSection getVscode() { return this.vscode; } /** * Representation of a section of a {@code .gitignore} file. */ public static class GitIgnoreSection implements Section { private final String name; private final LinkedList<String> items; public GitIgnoreSection(String name) { this.na...
public LinkedList<String> getItems() { return this.items; } @Override public void write(PrintWriter writer) { if (!this.items.isEmpty()) { if (this.name != null) { writer.println(); writer.println(String.format("### %s ###", this.name)); } this.items.forEach(writer::println); } }...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\scm\git\GitIgnore.java
1
请在Spring Boot框架中完成以下Java代码
public String getStreet() { return street; } /** 银行卡开户具体地址 **/ public void setStreet(String street) { this.street = street; } /** 银行卡开户名eg:张三 **/ public String getBankAccountName() { return bankAccountName; } /** 银行卡开户名eg:张三 **/ public void setBankAccountName(String bankAccountName) { this.bankAccou...
return cardNo; } /** 证件号码 **/ public void setCardNo(String cardNo) { this.cardNo = cardNo; } /** 手机号码 **/ public String getMobileNo() { return mobileNo; } /** 手机号码 **/ public void setMobileNo(String mobileNo) { this.mobileNo = mobileNo; } /** 银行名称 **/ public String getBankName() { return bankNam...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\entity\RpUserBankAccount.java
2
请完成以下Java代码
public class GitHubServiceGenerator { private static final String BASE_URL = "https://api.github.com/"; private static Retrofit.Builder builder = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()); private static Retrofit retrofit = builder.build(); private s...
public static <S> S createService(Class<S> serviceClass, final String token) { if (token != null) { httpClient.interceptors().clear(); httpClient.addInterceptor(new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOExcep...
repos\tutorials-master\libraries-http\src\main\java\com\baeldung\retrofitguide\GitHubServiceGenerator.java
1
请在Spring Boot框架中完成以下Java代码
public class NotifyQueue implements Serializable { /** * */ private static final long serialVersionUID = 1L; private static final Log LOG = LogFactory.getLog(NotifyQueue.class); @Autowired private NotifyParam notifyParam; @Autowired private NotifyPersist notifyPersist; /** ...
} if (notifyRecord.getVersion().intValue() == 0) {// 刚刚接收到的数据 notifyRecord.setLastNotifyTime(new Date()); } long time = notifyRecord.getLastNotifyTime().getTime(); Map<Integer, Integer> timeMap = notifyParam.getNotifyParams(); if (notifyTimes < maxNotifyTime) { ...
repos\roncoo-pay-master\roncoo-pay-app-notify\src\main\java\com\roncoo\pay\app\notify\core\NotifyQueue.java
2
请完成以下Java代码
public String getBusinessKey() { return businessKey; } public String getBusinessKeyLike() { return businessKeyLike; } public String getCaseDefinitionId() { return caseDefinitionId; } public String getCaseDefinitionKey() { return caseDefinitionKey; } public String getCaseDefinitionIdL...
public void setSuperCaseInstanceId(String superCaseInstanceId) { this.superCaseInstanceId = superCaseInstanceId; } public List<String> getCaseKeyNotIn() { return caseKeyNotIn; } public Date getCreatedAfter() { return createdAfter; } public Date getCreatedBefore() { return createdBefore; ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricCaseInstanceQueryImpl.java
1
请完成以下Java代码
public void setQtyEnteredInBPartnerUOM (final @Nullable BigDecimal QtyEnteredInBPartnerUOM) { set_Value (COLUMNNAME_QtyEnteredInBPartnerUOM, QtyEnteredInBPartnerUOM); } @Override public BigDecimal getQtyEnteredInBPartnerUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyEnteredInBPartnerUOM); ...
public void setUPC_CU (final @Nullable java.lang.String UPC_CU) { set_Value (COLUMNNAME_UPC_CU, UPC_CU); } @Override public java.lang.String getUPC_CU() { return get_ValueAsString(COLUMNNAME_UPC_CU); } @Override public void setUPC_TU (final @Nullable java.lang.String UPC_TU) { set_Value (COLUMNNAME_UP...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_DesadvLine.java
1
请完成以下Java代码
protected TbResultSetFuture executeAsyncRead(TenantId tenantId, Statement statement) { return executeAsync(tenantId, statement, defaultReadLevel, rateReadLimiter); } protected TbResultSetFuture executeAsyncWrite(TenantId tenantId, Statement statement) { return executeAsync(tenantId, statement, ...
log.debug("Execute cassandra async statement {}", statementToString(statement)); } if (statement.getConsistencyLevel() == null) { statement = statement.setConsistencyLevel(level); } return rateExecutor.submit(new CassandraStatementTask(tenantId, getSession(), statement)); ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\nosql\CassandraAbstractDao.java
1
请在Spring Boot框架中完成以下Java代码
public class Publisher implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String company; @OneToMany(cascade = CascadeType.ALL, mappedBy = "publisher", orphanRemoval = true) ...
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public List<Book> getBooks() { return books; }...
repos\Hibernate-SpringBoot-master\HibernateSpringBootNamedSubgraph\src\main\java\com\bookstore\entity\Publisher.java
2
请完成以下Java代码
public Integer getCamundaHistoryTimeToLive() { String ttl = getCamundaHistoryTimeToLiveString(); if (ttl != null) { return Integer.parseInt(ttl); } return null; } public void setCamundaHistoryTimeToLive(Integer historyTimeToLive) { setCamundaHistoryTimeToLiveString(String.valueOf(historyT...
inputCollection = sequenceBuilder.elementCollection(InputCaseParameter.class) .build(); outputCollection = sequenceBuilder.elementCollection(OutputCaseParameter.class) .build(); typeBuilder.build(); } @Override public String getCamundaHistoryTimeToLiveString() { return camundaHistor...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseImpl.java
1
请完成以下Java代码
public final void addConnection(Connection connection) { Assert.notNull(connection, "Connection must not be null"); if (!this.connections.contains(connection)) { this.connections.add(connection); } } public final void addChannel(Channel channel) { addChannel(channel, null); } public final void addChann...
for (Connection con : this.connections) { //NOSONAR RabbitUtils.closeConnection(con); } this.connections.clear(); this.channels.clear(); this.channelsPerConnection.clear(); } public void addDeliveryTag(Channel channel, long deliveryTag) { this.deliveryTags.add(channel, deliveryTag); } public void rol...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\RabbitResourceHolder.java
1
请完成以下Java代码
public int divideAndConquer(int number) { if (number < 100000){ // 5 digits or less if (number < 100){ // 1 or 2 if (number < 10) return 1; else return 2; }else{ // 3 to 5 ...
// 6 or 7 digits if (number < 1000000) return 6; else return 7; } else { // 8 to 10 digits if (number < 100000000) return 8; else { // 9 or 10 digit...
repos\tutorials-master\core-java-modules\core-java-numbers\src\main\java\com\baeldung\numberofdigits\NumberOfDigits.java
1
请在Spring Boot框架中完成以下Java代码
private RelationalPersistentEntity<?> getPersistentEntity(Class<?> entityType) { return r2dbcEntityTemplate.getConverter().getMappingContext().getPersistentEntity(entityType); } private static Collection<? extends OrderByField> createOrderByFields(Table table, Sort sortToUse) { List<OrderByFiel...
// Use a composite alias of "tableName_columnName" String.format("%s_%s", tableName, columnName) ) ); } /** * Converts a camel case string to snake case. * * @param input The camel case string to be converted to snake case. * @return The input string conv...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\repository\EntityManager.java
2
请完成以下Java代码
protected ProcessDefinitionEntityManager getProcessDefinitionManager() { return getSession(ProcessDefinitionEntityManager.class); } protected ProcessDefinitionInfoEntityManager getProcessDefinitionInfoManager() { return getSession(ProcessDefinitionInfoEntityManager.class); } protected ...
protected HistoricTaskInstanceEntityManager getHistoricTaskInstanceManager() { return getSession(HistoricTaskInstanceEntityManager.class); } protected HistoricIdentityLinkEntityManager getHistoricIdentityLinkEntityManager() { return getSession(HistoricIdentityLinkEntityManager.class); } ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\AbstractManager.java
1
请在Spring Boot框架中完成以下Java代码
public void setVariables(List<RestVariable> variables) { this.variables = variables; } @JsonTypeInfo(use = Id.CLASS, defaultImpl = RestVariable.class) public List<RestVariable> getVariables() { return variables; } public void setTransientVariables(List<RestVariable> transientVariab...
this.signalName = signalName; } @ApiModelProperty(value = "Message of the signal", example = "My Signal") public String getMessageName() { return messageName; } public void setMessageName(String messageName) { this.messageName = messageName; } @Override @ApiModelProper...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ExecutionActionRequest.java
2
请完成以下Java代码
public int getM_CostRevaluation_ID() { return get_ValueAsInt(COLUMNNAME_M_CostRevaluation_ID); } @Override public void setM_CostRevaluationLine_ID (final int M_CostRevaluationLine_ID) { if (M_CostRevaluationLine_ID < 1) set_ValueNoCheck (COLUMNNAME_M_CostRevaluationLine_ID, null); else set_ValueNoC...
@Override public int getM_CostType_ID() { return get_ValueAsInt(COLUMNNAME_M_CostType_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostRevaluationLine.java
1
请完成以下Java代码
public class ParsedDeployment { protected DeploymentEntity deploymentEntity; protected List<ProcessDefinitionEntity> processDefinitions; protected Map<ProcessDefinitionEntity, BpmnParse> mapProcessDefinitionsToParses; protected Map<ProcessDefinitionEntity, ResourceEntity> mapProcessDefinitionsToResour...
public ResourceEntity getResourceForProcessDefinition(ProcessDefinitionEntity processDefinition) { return mapProcessDefinitionsToResources.get(processDefinition); } public BpmnParse getBpmnParseForProcessDefinition(ProcessDefinitionEntity processDefinition) { return mapProcessDefinitionsToParse...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\deployer\ParsedDeployment.java
1
请完成以下Java代码
public void resolveIncident(final String incidentId) { IncidentEntity incident = (IncidentEntity) Context .getCommandContext() .getIncidentManager() .findIncidentById(incidentId); IncidentContext incidentContext = new IncidentContext(incident); IncidentHandling.removeIncidents(incid...
* activity is left via transition (case 1) or not (case 2). In case 1, when the * execution becomes async, the scope execution is already removed. In case 2 it is not. * * @return true if * <ul> * <li>the execution is in asyncAfter state and completes * <li>leaves a scope activity * <li>compl...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\PvmExecutionImpl.java
1
请完成以下Java代码
public class ExpiresSoonMedicineReader extends AbstractItemCountingItemStreamItemReader<Medicine> implements ContainsJobParameters { private static final String FIND_EXPIRING_SOON_MEDICINE = "Select * from MEDICINE where EXPIRATION_DATE >= CURRENT_DATE AND EXPIRATION_DATE <= DATEADD('DAY', ?, CURRENT_DATE)"; /...
} private static Medicine getMedicine(ResultSet rs) throws SQLException { return new Medicine(UUID.fromString(rs.getString(1)), rs.getString(2), MedicineCategory.valueOf(rs.getString(3)), rs.getTimestamp(4), rs.getDouble(5), rs.getObject(6, Double.class)); } @Override protected void doClose() ...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batchreaderproperties\job\ExpiresSoonMedicineReader.java
1
请完成以下Java代码
private Stream<HttpExchange> sort(String[] params, Stream<HttpExchange> stream) { if (params.length < 2) { return stream; } String sortBy = params[1]; String order; if (params.length > 2) { order = params[2]; } else { order = "desc"; ...
return status >= 404 && status < 501; }); break; case "warn": stream = stream.filter(httpTrace -> { int status = httpTrace.getResponse().getStatus(); return status >= 201 && status < 404; ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\monitor\actuator\httptrace\CustomInMemoryHttpTraceRepository.java
1
请在Spring Boot框架中完成以下Java代码
public static class Config { private String baseMessage; private boolean preLogger; private boolean postLogger; public Config() { }; public Config(String baseMessage, boolean preLogger, boolean postLogger) { super(); this.baseMessage = baseMessag...
return preLogger; } public boolean isPostLogger() { return postLogger; } public void setBaseMessage(String baseMessage) { this.baseMessage = baseMessage; } public void setPreLogger(boolean preLogger) { this.preLogger = preLogger; ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\java\com\baeldung\springcloudgateway\customfilters\gatewayapp\filters\factories\LoggingGatewayFilterFactory.java
2
请完成以下Java代码
public int hashCode() { return Objects.hash(id); } public Long getId() { return id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; }
public LocalDate getDob() { return dob; } public void setDob(LocalDate dob) { this.dob = dob; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\entities\Customer.java
1
请完成以下Java代码
public class OAuth2ClientInfo extends BaseData<OAuth2ClientId> implements HasName { @Schema(description = "Oauth2 client registration title (e.g. My google)") private String title; @Schema(description = "Oauth2 client provider name (e.g. Google)") private String providerName; @Schema(description =...
super(id); } public OAuth2ClientInfo(OAuth2Client oAuth2Client) { super(oAuth2Client); this.title = oAuth2Client.getTitle(); this.providerName = oAuth2Client.getAdditionalInfoField("providerName", JsonNode::asText,""); this.platforms = oAuth2Client.getPlatforms(); } @O...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\oauth2\OAuth2ClientInfo.java
1
请完成以下Java代码
public void clearBOMOwnCostPrice(@NonNull final CostElementId costElementId) { getCostPrice().clearOwnCostPrice(costElementId); } private Optional<CostAmount> computeComponentsCostPrice(@NonNull final CostElementId costElementId) { final Optional<CostAmount> componentsTotalAmt = getLines() .stream() .f...
final Stream<BOMCostPrice> linesCostPrices = getLines().stream().map(BOMLine::getCostPrice); return Stream.concat(Stream.of(getCostPrice()), linesCostPrices); } private ImmutableSet<CostElementId> getCostElementIds() { return streamCostPrices() .flatMap(BOMCostPrice::streamCostElementIds) .distinct() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOM.java
1
请完成以下Java代码
private void removeWeightConfig(String routeId) { log.trace(LogMessage.format("Removing weight config for route %s", routeId)); groupWeights.forEach((group, weightConfig) -> { if (weightConfig.normalizedWeights.containsKey(routeId)) { weightConfig.normalizedWeights.remove(routeId); weightConfig.weights.r...
LinkedHashMap<Integer, String> rangeIndexes = new LinkedHashMap<>(); List<Double> ranges = new ArrayList<>(); GroupWeightConfig(String group) { this.group = group; } GroupWeightConfig(GroupWeightConfig other) { this.group = other.group; this.weights = new LinkedHashMap<>(other.weights); this.norm...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\WeightCalculatorWebFilter.java
1
请完成以下Spring Boot application配置
spring.main.banner-mode=off logging.pattern.console= %d{MM-dd HH:mm:ss} - %logger{36} - %msg%n #spring.security.user.name=in28minutes #spring.securi
ty.user.password=dummy spring.datasource.url=jdbc:h2:mem:testdb
repos\master-spring-and-spring-boot-main\71-spring-security\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
public class BatchElementConfiguration { protected static final Comparator<String> NULLS_LAST_STRING_COMPARATOR = Comparator.nullsLast(String::compareToIgnoreCase); protected SortedMap<String, Set<String>> collectedMappings = new TreeMap<>(NULLS_LAST_STRING_COMPARATOR); protected List<String> ids; protected D...
Set<String> nullIds = collectedMappings.get(null); if (nullIds == null) { nullIds = new HashSet<>(); collectedMappings.put(null, nullIds); } nullIds.addAll(missingIds); } } /** * @return the list of ids that are mapped to deployment ids, ordered by * deployment i...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchElementConfiguration.java
2
请完成以下Java代码
public static final JSONNotificationEvent eventReadAll() { final String notificationId = null; final JSONNotification notification = null; final int unreadCount = 0; return new JSONNotificationEvent(EventType.ReadAll, notificationId, notification, unreadCount); } public static final JSONNotificationEvent ev...
@JsonInclude(JsonInclude.Include.NON_ABSENT) private final JSONNotification notification; @JsonProperty("unreadCount") @JsonInclude(JsonInclude.Include.NON_ABSENT) private final Integer unreadCount; private JSONNotificationEvent(final EventType eventType, final String notificationId, final JSONNotification notif...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\notification\json\JSONNotificationEvent.java
1
请完成以下Java代码
public class ConditionXmlConverter extends CaseElementXmlConverter { @Override public String getXMLElementName() { return CmmnXmlConstants.ELEMENT_CONDITION; } @Override public boolean hasChildElements() { return false; } @Override protected CmmnElement convert...
if (StringUtils.isNotEmpty(condition)) { CmmnElement currentCmmnElement = conversionHelper.getCurrentCmmnElement(); if (currentCmmnElement instanceof SentryIfPart) { ((SentryIfPart) currentCmmnElement).setCondition(condition); } else if (currentCmmnEle...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\ConditionXmlConverter.java
1
请完成以下Java代码
public final AppsAction getIgnoreAction() { return aIgnore; } public final boolean isAlignVerticalTabsWithHorizontalTabs() { return alignVerticalTabsWithHorizontalTabs; } /** * For a given component, it removes component's key bindings (defined in ancestor's map) that this panel also have defined. * *...
{ // Check if the component has a key binding defined for our panel key binding. final Object compAction = compInputMap.get(key); if (compAction == null) { continue; } if (isRemoveKeyStrokePredicate != null && !isRemoveKeyStrokePredicate.apply(key)) { continue; } // NOTE: Instead of...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\APanel.java
1
请完成以下Java代码
public int getSEPA_Export_Line_ID() { return get_ValueAsInt(COLUMNNAME_SEPA_Export_Line_ID); } @Override public void setSEPA_Export_Line_Ref_ID (final int SEPA_Export_Line_Ref_ID) { if (SEPA_Export_Line_Ref_ID < 1) set_ValueNoCheck (COLUMNNAME_SEPA_Export_Line_Ref_ID, null); else set_ValueNoCheck (...
return get_ValueAsInt(COLUMNNAME_SEPA_Export_Line_Ref_ID); } @Override public void setStructuredRemittanceInfo (final @Nullable String StructuredRemittanceInfo) { set_Value (COLUMNNAME_StructuredRemittanceInfo, StructuredRemittanceInfo); } @Override public String getStructuredRemittanceInfo() { return ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java-gen\de\metas\payment\sepa\model\X_SEPA_Export_Line_Ref.java
1
请完成以下Java代码
public void dispose() { m_mField = null; } // dispose private GridField m_mField = null; private String m_columnName; private String m_oldText; private String m_VFormat; private int m_fieldLength; private volatile boolean m_setting = false; /** * Set Editor to value * @param value ...
String newText = String.valueOf(getPassword()); m_setting = true; try { fireVetoableChange(m_columnName, m_oldText, newText); } catch (PropertyVetoException pve) {} m_setting = false; } // keyReleased /** * Data Binding to MTable (via GridController) - Enter pressed * @param e event */ public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VPassword.java
1
请在Spring Boot框架中完成以下Java代码
public class DocumentAcctLogsRelatedDocumentsProvider implements IRelatedDocumentsProvider { @NonNull private final IQueryBL queryBL = Services.get(IQueryBL.class); @NonNull private final IADWindowDAO adWindowDAO = Services.get(IADWindowDAO.class); @NonNull private final AcctDocRegistry acctDocRegistry; private fi...
RelatedDocumentsCandidateGroup.of( RelatedDocumentsCandidate.builder() .id(RelatedDocumentsId.ofString(I_Document_Acct_Log.Table_Name)) .internalName(I_Document_Acct_Log.Table_Name) .targetWindow(RelatedDocumentsTargetWindow.ofAdWindowId(logsWindowId)) .windowCaption(adWindowDAO.re...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\related_documents\DocumentAcctLogsRelatedDocumentsProvider.java
2
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private static final Logger log = Logger.getLogger(BookstoreService.class.getName()); private final TransactionTemplate template; private final ChapterRepository chapterRepository; private final ModificationRepository modificationRepository; public BookstoreService...
modification.setModification("Format ..."); modification.setChapter(chapter); modificationRepository.save(modification); log.info("Commit second transaction ..."); } }); log.info("Resuming firs...
repos\Hibernate-SpringBoot-master\HibernateSpringBootOptimisticForceIncrement\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public String toString() { return value ? "TRUE" : "FALSE"; } } private static final class NamedConstant extends LogicExpressionResult { private transient String _toString = null; // lazy private NamedConstant(final String name, final boolean value) { super(name, value, value ? ConstantLogicExpress...
@Override public String toString() { if (_toString == null) { _toString = MoreObjects.toStringHelper(value ? "TRUE" : "FALSE") .omitNullValues() .addValue(name) .toString(); } return _toString; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\LogicExpressionResult.java
1
请完成以下Java代码
public void setName(String name) { this.name = name; } public Integer getRoleLevel() { return roleLevel; } public void setRoleLevel(Integer roleLevel) { this.roleLevel = roleLevel; } public String getDescription() { return description; }
public void setDescription(String description) { this.description = description; } @Override public String toString() { return "Role{" + "id=" + id + ", name=" + name + ", roleLevel=" + roleLevel + ", description=" + descriptio...
repos\springBoot-master\springboot-dubbo\abel-user-api\src\main\java\cn\abel\user\models\Role.java
1
请完成以下Java代码
public java.lang.String getInvoicableQtyBasedOn() { return get_ValueAsString(COLUMNNAME_InvoicableQtyBasedOn); } @Override public void setM_InOut_ID (final int M_InOut_ID) { if (M_InOut_ID < 1) set_ValueNoCheck (COLUMNNAME_M_InOut_ID, null); else set_ValueNoCheck (COLUMNNAME_M_InOut_ID, M_InOut_ID)...
@Override public void setSumDeliveredInStockingUOM (final @Nullable BigDecimal SumDeliveredInStockingUOM) { set_ValueNoCheck (COLUMNNAME_SumDeliveredInStockingUOM, SumDeliveredInStockingUOM); } @Override public BigDecimal getSumDeliveredInStockingUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_M_InOut_Desadv_V.java
1
请完成以下Java代码
public final class TablePermissions extends AbstractPermissions<TablePermission> { public static final Builder builder() { return new Builder(); } private TablePermissions(final PermissionsBuilder<TablePermission, TablePermissions> builder) { super(builder); } public Builder toBuilder() { final Builder ...
public boolean isCanReport(final int AD_Table_ID) { return hasAccess(AD_Table_ID, Access.REPORT); } public boolean isCanExport(final int AD_Table_ID) { return hasAccess(AD_Table_ID, Access.EXPORT); } public static class Builder extends PermissionsBuilder<TablePermission, TablePermissions> { @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\TablePermissions.java
1
请在Spring Boot框架中完成以下Java代码
public class CreatedUpdatedInfo { public static CreatedUpdatedInfo createNew( @NonNull final UserId createdBy, @NonNull final ZonedDateTime created) { return new CreatedUpdatedInfo(createdBy, created, createdBy, created); } public static CreatedUpdatedInfo of( @NonNull final ZonedDateTime created, @N...
{ this.createdBy = createdBy; this.created = created; this.updatedBy = updatedBy; this.updated = updated; } public CreatedUpdatedInfo updated( @NonNull final UserId updatedBy, @NonNull final ZonedDateTime updated) { return new CreatedUpdatedInfo(createdBy, created, updatedBy, updated); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\CreatedUpdatedInfo.java
2
请完成以下Java代码
public void setBinaryData (byte[] BinaryData) { set_Value (COLUMNNAME_BinaryData, BinaryData); } /** Get BinaryData. @return Binary Data */ public byte[] getBinaryData () { return (byte[])get_Value(COLUMNNAME_BinaryData); } /** Set Description. @param Description Optional short description of th...
return (String)get_Value(COLUMNNAME_ImageURL); } /** 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 (Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Image.java
1
请完成以下Java代码
public IScriptFactory getScriptFactory() { return getDelegate().getScriptFactory(); } @Override public void setScriptFactory(final IScriptFactory scriptFactory) { getDelegate().setScriptFactory(scriptFactory); } @Override public IScriptFactory getScriptFactoryToUse() { return getDelegate().getScriptFac...
} @Override public boolean hasNext() { return getDelegate().hasNext(); } @Override public IScript next() { return getDelegate().next(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\ForwardingScriptScanner.java
1
请完成以下Java代码
public java.lang.String getInternalName () { return (java.lang.String)get_Value(COLUMNNAME_InternalName); } /** Set inkl. "leer"-Eintrag. @param IsIncludeEmpty Legt fest, ob die Dimension einen dezidierten "Leer" Eintrag enthalten soll */ @Override public void setIsIncludeEmpty (boolean IsIncludeEmpty)...
/** Get inkl. "sonstige"-Eintrag. @return Legt fest, ob die Dimension einen dezidierten "Sonstige" Eintrag enthalten soll */ @Override public boolean isIncludeOtherGroup () { Object oo = get_Value(COLUMNNAME_IsIncludeOtherGroup); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo...
repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Spec.java
1
请完成以下Java代码
public JsonSerde<T> forKeys() { this.jsonSerializer.forKeys(); this.jsonDeserializer.forKeys(); return this; } /** * Configure the serializer to not add type information. * @return the serde. * @since 2.3 */ public JsonSerde<T> noTypeInfo() { this.jsonSerializer.noTypeInfo(); return this; } /**...
/** * Ignore type information headers and use the configured target class. * @return the serde. * @since 2.3 */ public JsonSerde<T> ignoreTypeHeaders() { this.jsonDeserializer.ignoreTypeHeaders(); return this; } /** * Use the supplied {@link org.springframework.kafka.support.mapping.Jackson2JavaTypeMa...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\JsonSerde.java
1
请完成以下Java代码
public Map<String, Map<String, Object>> getChildInstanceTaskVariables() { return childInstanceTaskVariables; } public CaseInstanceChangeState setChildInstanceTaskVariables(Map<String, Map<String, Object>> childInstanceTaskVariables) { this.childInstanceTaskVariables = childInstanceTaskVariables...
this.createdStageInstances.put(key, planItemInstance); } public Map<String, PlanItemInstanceEntity> getTerminatedPlanItemInstances() { return terminatedPlanItemInstances; } public CaseInstanceChangeState setTerminatedPlanItemInstances(HashMap<String, PlanItemInstanceEntity> terminatedPlanI...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceChangeState.java
1
请在Spring Boot框架中完成以下Java代码
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { this.sysCommentService.removeByIds(Arrays.asList(ids.split(","))); return Result.OK("批量删除成功!"); } /** * 通过id查询 * * @param id * @return */ //@AutoLog(value = "系统评论回复表-通过id查询"...
public ModelAndView exportXls(HttpServletRequest request, SysComment sysComment) { return super.exportXls(request, sysComment, SysComment.class, "系统评论回复表"); } /** * 通过excel导入数据 * * @param request * @param response * @return */ //@RequiresPermissions("sys_comment:import...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysCommentController.java
2
请完成以下Java代码
private static PPOrderLineRowId fromStringPartsList(final List<String> parts) { final int partsCount = parts.size(); if (partsCount < 1) { throw new IllegalArgumentException("Invalid id: " + parts); } final PPOrderLineRowType type = PPOrderLineRowType.forCode(parts.get(0)); final DocumentId parentRowId...
Preconditions.checkArgument(ppOrderId > 0, "ppOrderId > 0"); return new PPOrderLineRowId(PPOrderLineRowType.PP_Order, null, ppOrderId); } public static PPOrderLineRowId ofIssuedOrReceivedHU(@Nullable DocumentId parentRowId, @NonNull final HuId huId) { return new PPOrderLineRowId(PPOrderLineRowType.IssuedOrRecei...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\PPOrderLineRowId.java
1
请在Spring Boot框架中完成以下Java代码
public MscExecutorService getValue() throws IllegalStateException, IllegalArgumentException { return this; } @Override public void start(StartContext context) throws StartException { provider.accept(this); } @Override public void stop(StopContext context) { provider.accept(null); } @Overr...
final EnhancedQueueExecutor EnhancedQueueExecutor = managedQueueSupplier.get(); boolean rejected = false; try { EnhancedQueueExecutor.execute(runnable); } catch (RejectedExecutionException e) { rejected = true; } catch (Exception e) { // if it fails for some other reason, log a warni...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscExecutorService.java
2
请完成以下Java代码
public String getProductSkuCode() { return productSkuCode; } public void setProductSkuCode(String productSkuCode) { this.productSkuCode = productSkuCode; } public String getMemberNickname() { return memberNickname; } public void setMemberNickname(String memberNickname)...
} @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(", productId=").append(productId); sb....
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsCartItem.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context) { final I_C_Invoice invoice = context.getSelectedModel(I_C_Invoice.class); if (invoice == null) { return ProcessPreconditionsResolution.reject(Services.get(IMsgBL.class).getTranslatableMsgTe...
paymentRequestBL.createPaymentRequest(invoice, template); } public I_C_Payment_Request createPaymentRequestTemplate(final I_C_BP_BankAccount bankAccount, final BigDecimal amount, final PaymentString paymentString) { final IContextAware contextProvider = PlainContextAware.newOutOfTrx(Env.getCtx()); // // Crea...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\process\paymentdocumentform\PaymentStringProcessService.java
1
请完成以下Java代码
public boolean isDisabled() { return getPreconditionsResolution().isRejected(); } public boolean isEnabled() { final ProcessPreconditionsResolution preconditionsResolution = getPreconditionsResolution(); return preconditionsResolution.isAccepted(); } public boolean isEnabledOrNotSilent() { try (final M...
if (debugProcessClassname != null) { debugProperties.put("debug-classname", debugProcessClassname); } return debugProperties.build(); } public boolean isDisplayedOn(@NonNull final DisplayPlace displayPlace) { return getDisplayPlaces().contains(displayPlace); } @Value private static class ValueAndDur...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\descriptor\WebuiRelatedProcessDescriptor.java
1
请完成以下Java代码
public class RefundProfitPriceActualComponent implements ProfitPriceActualComponent { private final CalculateProfitPriceActualRequest request; private final RefundContractRepository refundContractRepository; // TODO: take out the repo/service from here ! private final MoneyService moneyService; public RefundProfit...
.getByQuery(query) .flatMap(RefundContract::getRefundConfigToUseProfitCalculation) .orElse(null); if (refundConfig == null) { return input; } if (RefundBase.AMOUNT_PER_UNIT.equals(refundConfig.getRefundBase())) { final Money amountPerUnit = refundConfig.getAmount(); return input.subtract(am...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\grossprofit\RefundProfitPriceActualComponent.java
1
请完成以下Java代码
public ResponseEntity handleMethodArgumentNotValidException( HttpServletRequest request, HttpServletResponse response, MethodArgumentNotValidException ex) { String errMsg = null; if (ex.getBindingResult() != null && ex.getBindingResult().hasErrors()) { err...
* @param request * @param e * @return */ @ExceptionHandler({UnauthorizedException.class}) @ResponseStatus(HttpStatus.UNAUTHORIZED) public String processUnauthorizedException(NativeWebRequest request, Model model, UnauthorizedException e) { model.addAttribute("exception", e.getMessage(...
repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\exception\DefaultExceptionHandler.java
1
请完成以下Java代码
public boolean accept(I_C_ReferenceNo_Doc pojo) { return pojo.getRecord_ID() == InterfaceWrapperHelper.getId(model) && pojo.getAD_Table_ID() == MTable.getTable_ID(InterfaceWrapperHelper.getModelTableName(model)); } }); // add the C_ReferenceNos into a set to avoid duplicates final Set<I_C_Referen...
return new ArrayList<>(refNos); } @Override protected List<I_C_ReferenceNo_Doc> retrieveRefNoDocByRefNoAndTableName(final I_C_ReferenceNo referenceNo, final String tableName) { return lookupMap.getRecords(I_C_ReferenceNo_Doc.class, new IPOJOFilter<I_C_ReferenceNo_Doc>() { @Override public boolean accept(...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.refid\src\main\java\de\metas\document\refid\api\impl\PlainReferenceNoDAO.java
1
请在Spring Boot框架中完成以下Java代码
public User getUser(@PathVariable Long id) { Map<String, Object> params = new HashMap<>(); params.put("id", id); URI uri = UriComponentsBuilder.fromUriString("http://Server-Provider/user/{id}") .build().expand(params).encode().toUri(); return this.restTemplate.getForEntit...
if (status.is2xxSuccessful()) { return "新增用户成功"; } else { return "新增用户失败"; } } @GetMapping("user/update") public void updateUser() { User user = new User(1L, "mrbird", "123456"); this.restTemplate.put("http://Server-Provider/user", user); } @...
repos\SpringAll-master\29.Spring-Cloud-Ribbon-LoadBalance\Ribbon-Consumer\src\main\java\com\example\demo\controller\TestController.java
2
请完成以下Java代码
protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("AD_PrintFormat_ID")) m_AD_PrintFormat_ID = ((BigDecimal)para[i].getParame...
{ log.info("Create from AD_Table_ID=" + m_AD_Table_ID); MPrintFormat pf = MPrintFormat.createFromTable(getCtx(), m_AD_Table_ID.intValue(), getRecord_ID()); addLog(m_AD_Table_ID.intValue(), null, new BigDecimal(pf.getItemCount()), pf.getName()); return pf.getName() + " #" + pf.getItemCount(); } else if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\MPrintFormatProcess.java
1
请在Spring Boot框架中完成以下Java代码
public class CountryRepository { private static final Map<String, Country> countries = new HashMap<>(); { initData(); } private final static void initData() { Country usa = new Country(); usa.setName("USA"); usa.setCapital("Washington D.C."); usa.setCurrency(Cu...
india.setCapital("New Delhi"); india.setCurrency(Currency.INR); india.setPopulation(1295210000); countries.put(india.getName(), india); Country france = new Country(); france.setName("France"); france.setCapital("Paris"); france.setCurrency(Currency.EUR); ...
repos\tutorials-master\core-java-modules\core-java-11-2\src\main\java\com\baeldung\soap\ws\server\CountryRepository.java
2
请在Spring Boot框架中完成以下Java代码
public String getAccountNo() { return accountNo; } /** * 账户编号 * * @param accountNo */ public void setAccountNo(String accountNo) { this.accountNo = accountNo == null ? null : accountNo.trim(); } /** 用户名称 **/ public String getUserName() { return userName; } /** 用户名称 **/ public void setUserName...
/** * 交易总金额 * * @return */ public BigDecimal getTotalAmount() { return totalAmount; } /** * 交易总金额 * * @param totalAmount */ public void setTotalAmount(BigDecimal totalAmount) { this.totalAmount = totalAmount; } /** * 交易总笔数 * * @return */ public Integer getTotalCount() { return ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpSettDailyCollect.java
2
请完成以下Java代码
public void setStartDate (Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); } /** Get Start Date. @return First effective day (inclusive) */ public Timestamp getStartDate () { return (Timestamp)get_Value(COLUMNNAME_StartDate); } /** Set Search Key. @param Value
Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getValue () { return (String)get_Value(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Campaign.java
1
请在Spring Boot框架中完成以下Java代码
public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public static AccountTypeEnum getEnum(String enumName) { AccountTypeEnum resultEnum = null; AccountTypeEnum[] enumAry = AccountTypeEnum.values(); for (int i = 0; i < enumAry.length; i++) { if (enumAry[i]....
Map<String, Map<String, Object>> enumMap = new HashMap<String, Map<String, Object>>(); for (int num = 0; num < ary.length; num++) { Map<String, Object> map = new HashMap<String, Object>(); String key = ary[num].name(); map.put("desc", ary[num].getDesc()); enumMap.put(key, map); } return enumMap; } ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\enums\AccountTypeEnum.java
2
请完成以下Java代码
public int getM_QualityInsp_LagerKonf_Version_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_QualityInsp_LagerKonf_Version_ID); if (ii == null) return 0; return ii.intValue(); } /** Set % ab. @param PercentFrom % ab */ @Override public void setPercentFrom (java.math.BigDecimal PercentFrom) {...
} /** Set Betrag pro Einheit. @param Processing_Fee_Amt_Per_UOM Betrag pro Einheit */ @Override public void setProcessing_Fee_Amt_Per_UOM (java.math.BigDecimal Processing_Fee_Amt_Per_UOM) { set_Value (COLUMNNAME_Processing_Fee_Amt_Per_UOM, Processing_Fee_Amt_Per_UOM); } /** Get Betrag pro Einheit. @retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java-gen\de\metas\materialtracking\ch\lagerkonf\model\X_M_QualityInsp_LagerKonf_ProcessingFee.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonHUUpdate { @NonNull @JsonProperty("FLAG") Integer flag; @NonNull @JsonProperty("ID") String id; @NonNull @JsonProperty("ATTRIBUTES") Map<String, Object> attributes; @Builder public JsonHUUpdate(
@JsonProperty("FLAG") @NonNull final Integer flag, @JsonProperty("ID") @NonNull final String id, @JsonProperty("ATTRIBUTES") @NonNull final Map<String, Object> attributes) { this.flag = flag; this.id = id; this.attributes = attributes; } @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(with...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\to_grs\api\model\JsonHUUpdate.java
2
请在Spring Boot框架中完成以下Java代码
private Saml2AuthenticationToken tokenByRegistration(HttpServletRequest request, RelyingPartyRegistration registration, AbstractSaml2AuthenticationRequest authenticationRequest) { if (registration == null) { return null; } String decoded = decode(request); UriResolver resolver = RelyingPartyRegistrationPl...
private String decode(HttpServletRequest request) { String encoded = request.getParameter(Saml2ParameterNames.SAML_RESPONSE); boolean isGet = HttpMethod.GET.matches(request.getMethod()); if (!this.shouldConvertGetRequests && isGet) { return null; } Saml2Utils.DecodingConfigurer decoding = Saml2Utils.withEn...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\web\BaseOpenSamlAuthenticationTokenConverter.java
2
请完成以下Java代码
public int getAlberta_Order_ID() { return get_ValueAsInt(COLUMNNAME_Alberta_Order_ID); } @Override public void setAlberta_OrderedArticleLine_ID (final int Alberta_OrderedArticleLine_ID) { if (Alberta_OrderedArticleLine_ID < 1) set_ValueNoCheck (COLUMNNAME_Alberta_OrderedArticleLine_ID, null); else ...
public java.sql.Timestamp getExternallyUpdatedAt() { return get_ValueAsTimestamp(COLUMNNAME_ExternallyUpdatedAt); } @Override public void setIsPrivateSale (final boolean IsPrivateSale) { set_Value (COLUMNNAME_IsPrivateSale, IsPrivateSale); } @Override public boolean isPrivateSale() { return get_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_Alberta_OrderedArticleLine.java
1
请完成以下Java代码
public static ValueNamePair of( @JsonProperty("v") final String value, @JsonProperty("n") final String name) { return of(value, name, null/* help */); } public static ValueNamePair of( @JsonProperty("v") final String value, @JsonProperty("n") final String name, @JsonProperty("description") final St...
public String getValue() { return m_value; } // getValue /** * Get Validation Message * * @return Validation Message */ @JsonProperty("validationInformation") @JsonInclude(JsonInclude.Include.NON_NULL) public ValueNamePairValidationInformation getValidationInformation() { return m_validationInfo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\ValueNamePair.java
1
请完成以下Java代码
private static AttributesKeyPattern parseSinglePartPattern(final String string) { if ("<ALL_STORAGE_ATTRIBUTES_KEYS>".equals(string)) { return AttributesKeyPattern.ALL; } else if ("<OTHER_STORAGE_ATTRIBUTES_KEYS>".equals(string)) { return AttributesKeyPattern.OTHER; } else { final AttributesKe...
else if (!patterns.contains(AttributesKeyPattern.OTHER)) { return patterns.stream() .map(AttributesKeyPatternsUtil::matching) .collect(ImmutableList.toImmutableList()); } else { final ImmutableSet<AttributesKeyMatcher> otherMatchers = patterns.stream() .filter(AttributesKeyPattern::isSpecif...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\keys\AttributesKeyPatternsUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class OLCandWithUOMForTUsCapacityProvider implements IOLCandWithUOMForTUsCapacityProvider { private static final AdMessageKey MSG_TU_UOM_CAPACITY_REQUIRED = AdMessageKey.of("de.metas.handlingunits.ordercandidate.UOMForTUsCapacityRequired"); private final IUOMDAO uomDAO = Services.get(IUOMDAO.class); private ...
{ final OLCandHUPackingAware huPackingAware = new OLCandHUPackingAware(olCand); final Capacity capacity = huPackingAwareBL.calculateCapacity(huPackingAware); if (capacity == null) { return Optional.empty(); } final ProductId productId = ProductId.ofRepoId(olCand.getM_Product_ID()); // note that the pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\ordercandidate\spi\impl\OLCandWithUOMForTUsCapacityProvider.java
2
请完成以下Java代码
public comment removeElement(String hashcode) { removeElementFromRegistry(hashcode); return (this); } protected String createStartTag() { setEndTagChar(' '); StringBuffer out = new StringBuffer(); out.append(getStartTagChar()); if (getBeginStartModifierDefined()) { out.append(getBeginStart...
setEndStartModifier(' '); out.append(getStartTagChar()); if (getEndStartModifierDefined()) { out.append(getEndStartModifier()); } out.append(getElementType()); if (getEndEndModifierDefined()) { out.append(getEndEndModifier()); } out.append(getEndTagChar()); setStartTagChar('<'); // p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\comment.java
1
请完成以下Java代码
public String encodeNonNullPassword(String rawPassword) { String salt = PREFIX + this.saltGenerator.generateKey() + SUFFIX; return digest(salt, rawPassword); } private String digest(String salt, CharSequence rawPassword) { if (rawPassword == null) { rawPassword = ""; } String saltedPassword = rawPasswor...
* Takes a previously encoded password and compares it with a rawpassword after mixing * in the salt and encoding that value * @param rawPassword plain text password * @param encodedPassword previously encoded password * @return true or false */ @Override protected boolean matchesNonNull(String rawPassword, ...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\password\Md4PasswordEncoder.java
1
请完成以下Java代码
public RecordAccessConfig getByRoleId(@NonNull final RoleId roleId) { return configs.getOrLoad(roleId, this::retrieveByRoleId); } private RecordAccessConfig retrieveByRoleId(@NonNull final RoleId roleId) { final List<I_AD_Role_Record_Access_Config> records = queryActiveConfigs() .addEqualsFilter(I_AD_Role_...
return RecordAccessConfig.EMPTY; } return RecordAccessConfig.builder() .handlers(CompositeRecordAccessHandler.of(handlers)) .build(); } private IQueryBuilder<I_AD_Role_Record_Access_Config> queryActiveConfigs() { return Services.get(IQueryBL.class) .createQueryBuilderOutOfTrx(I_AD_Role_Record_Acc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\record_access\RecordAccessConfigService.java
1
请完成以下Java代码
public void setPrice (java.math.BigDecimal Price) { throw new IllegalArgumentException ("Price is virtual column"); } /** Get Preis. @return Price */ @Override public java.math.BigDecimal getPrice () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Price); if (bd == null) return BigDecimal.ZERO;...
if (bd == null) return BigDecimal.ZERO; return bd; } @Override public void setSourceAmt (final @Nullable BigDecimal SourceAmt) { set_Value (COLUMNNAME_SourceAmt, SourceAmt); } @Override public BigDecimal getSourceAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SourceAmt); return bd ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostDetail.java
1
请完成以下Java代码
public class M_InOut_AddToTransportationOrderProcess_GridView extends ViewBasedProcessTemplate implements IProcessPrecondition { @Param(parameterName = "M_ShipperTransportation_ID", mandatory = true) private I_M_ShipperTransportation transportationOrder; public static final AdMessageKey ALL_SELECTED_SHIPMENTS_SHOUL...
@Override protected String doIt() throws Exception { final DocStatus docStatus = DocStatus.ofCode(transportationOrder.getDocStatus()); if (docStatus.isCompleted()) { // this error should not be thrown since we have AD_Val_Rule for the parameter throw new AdempiereException("Transportation Order should not...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\inout\process\M_InOut_AddToTransportationOrderProcess_GridView.java
1
请完成以下Java代码
public void setApp(String app) { this.app = app; } public Integer getGrade() { return grade; } public void setGrade(Integer grade) { this.grade = grade; } public Double getCount() { return count; } public void setCount(Double count) { this.coun...
} public void setControlBehavior(Integer controlBehavior) { this.controlBehavior = controlBehavior; } public Integer getBurst() { return burst; } public void setBurst(Integer burst) { this.burst = burst; } public Integer getMaxQueueingTimeoutMs() { return ...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\gateway\rule\UpdateFlowRuleReqVo.java
1
请在Spring Boot框架中完成以下Java代码
public Object getParameterDefaultValue(final IProcessDefaultParameter parameter) { if (PARAM_Qty.equals(parameter.getColumnName())) { return getTask().getQtyToReserve().toZeroIfNegative().toBigDecimal(); } if (PARAM_C_UOM_ID.equals(parameter.getColumnName())) { return getTask().getQtyToReserve().getUom...
return tasksCache.computeIfAbsent(getTaskId(), projectService::getTaskById); } private ServiceRepairProjectTaskId getTaskId() { final HUsToIssueViewContext husToIssueViewContext = getHusToIssueViewContext(); return husToIssueViewContext.getTaskId(); } private ImmutableSet<HuId> getSelectedTopLevelHUIds() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\HUsToIssueView_IssueHUs.java
2
请完成以下Java代码
public String toString() { return ObjectUtils.toString(this); } @Override public int release() { return lockDatabase.unlock(this); } @Override public Future<Integer> releaseAfterTrxCommit(final String trxName) { final FutureValue<Integer> countUnlockedFuture = new FutureValue<>(); final ITrxManager ...
} @Override public IUnlockCommand setRecordsByModels(final Collection<?> models) { _recordsToUnlock.setRecordsByModels(models); return this; } @Override public IUnlockCommand setRecordByTableRecordId(final int tableId, final int recordId) { _recordsToUnlock.setRecordByTableRecordId(tableId, recordId); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\UnlockCommand.java
1