instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class F2FPayResultVo {
/**
* 交易状态
*/
private String status;
/**
* 交易流水号流水号
*/
private String trxNo;
/**
* 商户订单号
*/
private String orderNo;
/**
* 支付KEY
*/
private String payKey;
/** 产品名称 **/
private String productName;
/** 支... | }
public String getField1() {
return field1;
}
public void setField1(String field1) {
this.field1 = field1;
}
public String getField2() {
return field2;
}
public void setField2(String field2) {
this.field2 = field2;
}
public String getField3() {
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\F2FPayResultVo.java | 2 |
请完成以下Java代码 | public void setDynamicSubProcessId(String dynamicSubProcessId) {
this.dynamicSubProcessId = dynamicSubProcessId;
}
public String nextSubProcessId(Map<String, FlowElement> flowElementMap) {
return nextId("dynamicSubProcess", flowElementMap);
}
public String nextTaskId(Map<String, Fl... | public String nextStartEventId(Map<String, FlowElement> flowElementMap) {
return nextId("startEvent", flowElementMap);
}
public String nextEndEventId(Map<String, FlowElement> flowElementMap) {
return nextId("endEvent", flowElementMap);
}
protected String nextId(String prefix, Map<S... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\dynamic\DynamicEmbeddedSubProcessBuilder.java | 1 |
请完成以下Java代码 | public String toString() {
return "-";
}
};
private final Operator operator;
private final AstNode left, right;
public AstBinary(AstNode left, AstNode right, Operator operator) {
this.left = left;
this.right = right;
this.operator = operator;
}
publ... | public String toString() {
return "'" + operator.toString() + "'";
}
@Override
public void appendStructure(StringBuilder b, Bindings bindings) {
left.appendStructure(b, bindings);
b.append(' ');
b.append(operator);
b.append(' ');
right.appendStructure(b, bind... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstBinary.java | 1 |
请完成以下Java代码 | private ITranslatableString extractWarehouseFrom(final @NotNull DDOrderReference ddOrderReference)
{
return TranslatableStrings.anyLanguage(warehouseService.getWarehouseName(ddOrderReference.getFromWarehouseId()));
}
private ITranslatableString extractWarehouseTo(final @NotNull DDOrderReference ddOrderReference)
... | return Optional.ofNullable(ddOrderReference.getProductId())
.flatMap(productService::getGTIN)
.map(GTIN::getAsString)
.map(TranslatableStrings::anyLanguage)
.orElse(TranslatableStrings.empty());
}
@NonNull
private ITranslatableString extractSourceDoc(@NonNull final DDOrderReference ddOrderReference)... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\DistributionLauncherCaptionProvider.java | 1 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** 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
*/
pub... | public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Text.
@param Text Text */
public void setText (String Text)
{
set_Value (C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ResourceBundleThemeSource themeSource() {
ResourceBundleThemeSource themeSource = new ResourceBundleThemeSource();
themeSource.setDefaultEncoding("UTF-8");
themeSource.setBasenamePrefix("themes.");
return themeSource;
}
@Bean
public CookieThemeResolver themeResolver()... | }
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(themeChangeInterceptor());
}
@Bean
public WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> enableDefaultServlet() {
return factory -> factory.setRegisterDefaultServlet(t... | repos\tutorials-master\spring-web-modules\spring-mvc-basics\src\main\java\com\baeldung\spring\web\config\WebConfig.java | 2 |
请完成以下Java代码 | public static UserAuthQRCode fromGlobalQRCodeJsonString(final String qrCodeString)
{
return fromGlobalQRCode(GlobalQRCode.ofString(qrCodeString));
}
public static UserAuthQRCode fromGlobalQRCode(@NonNull final GlobalQRCode globalQRCode)
{
if (!isTypeMatching(globalQRCode))
{
throw new AdempiereException("... | {
return JsonConverterV1.fromGlobalQRCode(globalQRCode);
}
else
{
throw new AdempiereException("Invalid QR Code version: " + version);
}
}
public static boolean isTypeMatching(final @NonNull GlobalQRCode globalQRCode)
{
return GlobalQRCodeType.equals(GLOBAL_QRCODE_TYPE, globalQRCode.getType());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\qr\UserAuthQRCodeJsonConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<Map<String, String>> getDepPostIdByDepId(@RequestParam(name = "depIds") String depIds) {
String departIds = sysDepartService.getDepPostIdByDepId(depIds);
return Result.OK(departIds);
}
/**
* 更新改变后的部门数据
*
* @param changeDepartVo
* @return
*/
@PutMappin... | /**
* 获取部门负责人
*
* @param departId
* @return
*/
@GetMapping("/getDepartmentHead")
public Result<IPage<SysUser>> getDepartmentHead(@RequestParam(name = "departId") String departId,
@RequestParam(name="pageNo", defaultValue="1") Integer ... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysDepartController.java | 2 |
请完成以下Spring Boot application配置 | initializr:
env:
kotlin:
default-version: "1.9.22"
group-id:
value: org.acme
dependencies:
- name: Web
content:
- name: Web
id: web
description: Servlet web application with Spring MVC and Tomcat
languages:
- name: Java
id: java
default: true
... | on: /starter.zip
- name: Gradle Project
id: gradle-project
description: Generate a Gradle based project archive
tags:
build: gradle
format: project
default: false
action: /starter.zip
configuration-file-formats:
- name: Properties
id: properties
defaul... | repos\initializr-main\initializr-service-sample\src\main\resources\application.yaml | 2 |
请在Spring Boot框架中完成以下Java代码 | public static class AdditionalCost {
@XmlElement(name = "AdditionalCostType", required = true)
protected String additionalCostType;
@XmlElement(name = "AdditionalCostAmount", required = true)
protected BigDecimal additionalCostAmount;
@XmlElement(name = "VATRate")
protec... | */
public void setAdditionalCostAmount(BigDecimal value) {
this.additionalCostAmount = value;
}
/**
* Gets the value of the vatRate property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\AdditionalCostsType.java | 2 |
请完成以下Java代码 | public class WordCounterActor extends AbstractActor {
private final LoggingAdapter log = Logging.getLogger(getContext().getSystem(), this);
public static final class CountWords {
String line;
public CountWords(String line) {
this.line = line;
}
}
@Override
pub... | private int countWordsFromLine(String line) throws Exception {
if (line == null) {
throw new IllegalArgumentException("The text to process can't be null!");
}
int numberOfWords = 0;
String[] words = line.split(" ");
for (String possibleWord : words) {
if... | repos\tutorials-master\akka-modules\akka-actors\src\main\java\com\baeldung\akkaactors\WordCounterActor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AuthorView fetchNextPage(long id, int limit) {
List<Author> authors = authorRepository.fetchAll(id, limit + 1);
if (authors.size() == (limit + 1)) {
authors.remove(authors.size() - 1);
return new AuthorView(authors, false);
}
return new AuthorView(authors... | return new AuthorViewDto(authors, true);
}
// Or, like this (rely on Author.toString() method):
/*
public Map<List<Author>, Boolean> fetchNextPage(long id, int limit) {
List<Author> authors = authorRepository.fetchAll(id, limit + 1);
if (authors.size() == (limit + 1)) {
aut... | repos\Hibernate-SpringBoot-master\HibernateSpringBootKeysetPaginationNextPage\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public void setTrxType (final java.lang.String TrxType)
{
set_Value (COLUMNNAME_TrxType, TrxType);
}
@Override
public java.lang.String getTrxType()
{
return get_ValueAsString(COLUMNNAME_TrxType);
}
@Override
public org.compiere.model.I_C_ElementValue getUser1()
{
return get_ValueAsPO(COLUMNNAME_User1_... | public void setUser2(final org.compiere.model.I_C_ElementValue User2)
{
set_ValueFromPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class, User2);
}
@Override
public void setUser2_ID (final int User2_ID)
{
if (User2_ID < 1)
set_Value (COLUMNNAME_User2_ID, null);
else
set_Value (COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Payment.java | 1 |
请完成以下Java代码 | private DocumentIdsSelection getSelectedRootDocumentIds()
{
final DocumentIdsSelection selectedRowIds = getSelectedRowIds();
if (selectedRowIds.isAll())
{
return selectedRowIds;
}
else if (selectedRowIds.isEmpty())
{
return selectedRowIds;
}
else
{
return selectedRowIds.stream().filter(Docum... | return PackageableFilterDescriptorProvider.extractProductBarcodeFilterData(getView());
}
private List<ShipmentScheduleId> getShipmentScheduleIds()
{
final DocumentIdsSelection selectedRowIds = getSelectedRootDocumentIds();
return getView().streamByIds(selectedRowIds)
.flatMap(selectedRow -> selectedRow.getI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\process\WEBUI_Picking_Launcher.java | 1 |
请完成以下Java代码 | public class Html2PdfUsingFlyingSaucer {
private static final String HTML_INPUT = "src/main/resources/htmlforopenpdf.html";
private static final String PDF_OUTPUT = "src/main/resources/html2pdf.pdf";
public static void main(String[] args) {
try {
Html2PdfUsingFlyingSaucer htmlToPdf = n... | private Document createWellFormedHtml(File inputHTML) throws IOException {
Document document = Jsoup.parse(inputHTML, "UTF-8");
document.outputSettings()
.syntax(Document.OutputSettings.Syntax.xml);
return document;
}
private void xhtmlToPdf(Document xhtml, File outputPdf) t... | repos\tutorials-master\text-processing-libraries-modules\pdf\src\main\java\com\baeldung\pdf\openpdf\Html2PdfUsingFlyingSaucer.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, AD_User_ID);
}
@Override
public int getAD_User_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_User_ID);
}
@Override
public void setAD_... | @Override
public org.compiere.model.I_CRM_Occupation getCRM_Occupation()
{
return get_ValueAsPO(COLUMNNAME_CRM_Occupation_ID, org.compiere.model.I_CRM_Occupation.class);
}
@Override
public void setCRM_Occupation(final org.compiere.model.I_CRM_Occupation CRM_Occupation)
{
set_ValueFromPO(COLUMNNAME_CRM_Occupa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Occupation_Specialization.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PersistenceProductConfiguration {
private final Environment env;
public PersistenceProductConfiguration(Environment env) {
this.env = env;
}
@Bean
public LocalContainerEntityManagerFactoryBean productEntityManager() {
final LocalContainerEntityManagerFactoryBean em = n... | public DataSource productDataSource() {
final DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(Preconditions.checkNotNull(env.getProperty("jdbc.driverClassName")));
dataSource.setUrl(Preconditions.checkNotNull(env.getProperty("product.jdbc.url")))... | repos\tutorials-master\persistence-modules\spring-data-jpa-simple\src\main\java\com\baeldung\jpa\paginationsorting\config\PersistenceProductConfiguration.java | 2 |
请完成以下Java代码 | public class Info_Column extends ColumnInfo
{
@Getter @Setter private int seqNo;
public Info_Column(String colHeader, @NonNull String columnName, Class<?> colClass)
{
super(colHeader, columnName, colClass);
setColumnName(columnName);
}
public Info_Column(@NonNull String columnName, String colHeader, String c... | public String getIDcolSQL()
{
return super.getKeyPairColSQL();
}
public boolean isIDcol()
{
return super.isKeyPairCol();
}
@Override
public String toString()
{
return super.toString();
}
} // infoColumn | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\search\Info_Column.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_M_CostElement getM_CostElement() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_CostElement_ID, org.compiere.model.I_M_CostElement.class);
}
@Override
public void setM_CostElement(org.compiere.model.I_M_CostElement M_CostElement)
{
set_ValueFromPO(COLUMNNAME_M_CostElem... | set_Value (COLUMNNAME_M_CostElement_ID, null);
else
set_Value (COLUMNNAME_M_CostElement_ID, Integer.valueOf(M_CostElement_ID));
}
/** Get Kostenart.
@return Produkt-Kostenart
*/
@Override
public int getM_CostElement_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_CostElement_ID);
if (ii == nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AcctSchema_CostElement.java | 1 |
请完成以下Java代码 | public boolean isVirtualColumn(final String columnName)
{
final GridField field = getGridField(columnName);
return field != null && field.isVirtualColumn();
}
@Override
public boolean isKeyColumnName(final String columnName)
{
final GridField field = getGridField(columnName);
return field != null && field... | {
// TODO: implement
throw new UnsupportedOperationException();
}
@Override
public void setValueFromPO(final String idColumnName, final Class<?> parameterType, final Object value)
{
// TODO: implement
throw new UnsupportedOperationException();
}
@Override
public boolean invokeEquals(final Object[] meth... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\GridTabModelInternalAccessor.java | 1 |
请完成以下Java代码 | public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BPMNSequenceFlowImpl that = (BPMNSequenceFlowImpl) o;
return (
Objects.equals(getElementId(), that.getEleme... | public String toString() {
return (
"SequenceFlowImpl{" +
"sourceActivityElementId='" +
sourceActivityElementId +
'\'' +
", sourceActivityName='" +
sourceActivityName +
'\'' +
", sourceActivityType='" +
s... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\BPMNSequenceFlowImpl.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: listener-demo
# RabbitMQ 相关配置项
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
server:
port: 18080 # 随机端口,方便启动多个消费者
management:
endpoints:
# Actuator HTTP 配置项,对应 WebEndpointPr | operties 配置类
web:
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 | repos\SpringBoot-Labs-master\labx-18\labx-18-sc-bus-rabbitmq-demo-listener-actuator\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DocTypeInvoicingPoolId implements RepoIdAware
{
@JsonCreator
public static DocTypeInvoicingPoolId ofRepoId(final int repoId)
{
return new DocTypeInvoicingPoolId(repoId);
}
@Nullable
public static DocTypeInvoicingPoolId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : nu... | int repoId;
private DocTypeInvoicingPoolId(final int docTypeInvoicingPoolRepoId)
{
this.repoId = Check.assumeGreaterThanZero(docTypeInvoicingPoolRepoId, I_C_DocType_Invoicing_Pool.COLUMNNAME_C_DocType_Invoicing_Pool_ID);
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static int ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\invoicingpool\DocTypeInvoicingPoolId.java | 2 |
请完成以下Java代码 | public String toString() {return getAsString();}
@JsonValue
public String getAsString() {return barcode;}
/**
* @return true if standard/fixed code (i.e. not starting with prefix 28 nor 29)
*/
public boolean isFixed() {return prefix.isFixed();}
public boolean isVariable() {return prefix.isFixed();}
/**
... | public boolean isInternalUseOrVariableMeasure() {return prefix.isInternalUseOrVariableMeasure();}
public Optional<BigDecimal> getWeightInKg() {return Optional.ofNullable(weightInKg);}
public GTIN toGTIN() {return GTIN.ofEAN13(this);}
public boolean isMatching(@NonNull final EAN13ProductCode expectedProductNo)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\ean13\EAN13.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getDispla... | }
public String getIncludeInStageOverview() {
return includeInStageOverview;
}
public void setIncludeInStageOverview(String includeInStageOverview) {
this.includeInStageOverview = includeInStageOverview;
}
public PlanItemDefinition getPlanItemDefinition... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\GetHistoricStageOverviewCmd.java | 1 |
请完成以下Java代码 | public void setAddressLine1(String addressLine1) {
this.addressLine1 = addressLine1;
}
public void setAddressLine2(String addressLine2) {
this.addressLine2 = addressLine2;
}
public void setCity(String city) {
this.city = city;
}
public void setCountry(String country) {... | @Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Address address = (Address) o;
return zipCode == address.zipCode &&
Objects.equals(addressLine1, address.addressLine1) &&
... | repos\tutorials-master\persistence-modules\hibernate-annotations\src\main\java\com\baeldung\hibernate\customtypes\Address.java | 1 |
请完成以下Java代码 | public Amount getUserEnteredPrice()
{
return Amount.of(getUserEnteredPriceValue(), getCurrencyCode());
}
public ProductProposalPrice withUserEnteredPriceValue(@NonNull final BigDecimal userEnteredPriceValue)
{
if (this.userEnteredPriceValue.equals(userEnteredPriceValue))
{
return this;
}
return toBui... | public ProductProposalPrice withPriceListPriceValue(@NonNull final BigDecimal priceListPriceValue)
{
return withPriceListPrice(Amount.of(priceListPriceValue, getCurrencyCode()));
}
public ProductProposalPrice withPriceListPrice(@NonNull final Amount priceListPrice)
{
if (this.priceListPrice.equals(priceListPri... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\model\ProductProposalPrice.java | 1 |
请完成以下Java代码 | public IWorkPackageBuilder setUserInChargeId(@Nullable final UserId userInChargeId)
{
assertNotBuilt();
this.userInChargeId = userInChargeId;
return this;
}
@Override
public WorkPackageBuilder setAsyncBatchId(@Nullable final AsyncBatchId asyncBatchId)
{
if (asyncBatchId == null)
{
return this;
}
... | // Set the Async batch if provided
if (asyncBatchSet)
{
workPackage.setC_Async_Batch_ID(AsyncBatchId.toRepoId(asyncBatchId));
}
if (userInChargeId != null)
{
workPackage.setAD_User_InCharge_ID(userInChargeId.getRepoId());
}
@SuppressWarnings("deprecation") // Suppressing the warning, be... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageBuilder.java | 1 |
请完成以下Java代码 | public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {
// 排除指定条件
if ("id".equals(field.getName()) // 排除 id 字段,因为作为查询主键
|| field.getAnnotation(Transient.class) != null // 排除 @Transient 注解的字段,因为非存储字段
|| Modi... | mongoTemplate.remove(new Query(Criteria.where("_id").is(id)), UserDO.class);
}
public UserDO findById(Integer id) {
return mongoTemplate.findOne(new Query(Criteria.where("_id").is(id)), UserDO.class);
}
public UserDO findByUsername(String username) {
return mongoTemplate.findOne(new Qu... | repos\SpringBoot-Labs-master\lab-16-spring-data-mongo\lab-16-spring-data-mongodb\src\main\java\cn\iocoder\springboot\lab16\springdatamongodb\dao\UserDao.java | 1 |
请完成以下Java代码 | public boolean isFunctionRow(final int row)
{
return false;
}
@Override
public boolean isPageBreak(final int row, final int col)
{
return false;
}
@Override
protected List<CellValue> getNextRow()
{
return CellValues.toCellValues(getNextRawDataRow());
}
private List<Object> getNextRawDataRow()
{
t... | return row;
}
catch (final SQLException e)
{
throw DBException.wrapIfNeeded(e);
}
}
@Override
protected boolean hasNextRow()
{
try
{
return m_resultSet.next();
}
catch (SQLException e)
{
throw DBException.wrapIfNeeded(e);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\JdbcExcelExporter.java | 1 |
请完成以下Java代码 | public static MLandedCostAllocation[] getOfInvoiceLine (Properties ctx,
int C_InvoiceLine_ID, String trxName)
{
ArrayList<MLandedCostAllocation> list = new ArrayList<MLandedCostAllocation>();
String sql = "SELECT * FROM C_LandedCostAllocation WHERE C_InvoiceLine_ID=?";
PreparedStatement pstmt = null;
try
... | * Load Constructor
* @param ctx context
* @param rs result name
* @param trxName trx
*/
public MLandedCostAllocation (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MLandedCostAllocation
/**
* Parent Constructor
* @param parent parent
* @param M_CostElement_ID co... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MLandedCostAllocation.java | 1 |
请完成以下Java代码 | default List<String> getAudience() {
return this.getClaimAsStringList(IdTokenClaimNames.AUD);
}
/**
* Returns the Expiration time {@code (exp)} on or after which the ID Token MUST NOT
* be accepted.
* @return the Expiration time on or after which the ID Token MUST NOT be accepted
*/
default Instant getExp... | /**
* Returns the Authorized party {@code (azp)} to which the ID Token was issued.
* @return the Authorized party to which the ID Token was issued
*/
default String getAuthorizedParty() {
return this.getClaimAsString(IdTokenClaimNames.AZP);
}
/**
* Returns the Access Token hash value {@code (at_hash)}.
... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\IdTokenClaimAccessor.java | 1 |
请完成以下Java代码 | public void setTabLevel (int level)
{
if (level == 0)
putClientProperty(AdempiereLookAndFeel.TABLEVEL, null);
else
putClientProperty(AdempiereLookAndFeel.TABLEVEL, new Integer(level));
} // setTabLevel
/**
* Get Tab Hierarchy Level
* @return Tab Level
*/
public int getTabLevel()
{
try
{
... | /**************************************************************************
* String representation
* @return String representation
*/
@Override
public String toString()
{
final StringBuilder sb = new StringBuilder("CPanel [");
sb.append(super.toString());
MFColor bg = getBackgroundColor();
if (bg !=... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CPanel.java | 1 |
请完成以下Java代码 | private void assertColumnNameValid(@NonNull final String columnName, final int displayType)
{
if (DisplayType.isID(displayType) && displayType != DisplayType.Account)
{
if (!columnName.endsWith("_ID")
&& !columnName.equals("CreatedBy")
&& !columnName.equals("UpdatedBy")
&& !columnName.equals("AD_... | }
else
{
if (columnName.endsWith("_ID") && displayType != DisplayType.Button)
{
throw new AdempiereException("Ending a non lookup column with `_ID` might be misleading");
}
if (columnName.endsWith("_Acct"))
{
throw new AdempiereException("Ending a non Account column with `_Acct` might be misl... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\column\model\interceptor\AD_Column.java | 1 |
请完成以下Java代码 | public class LoginRequest implements Serializable
{
private static final long serialVersionUID = -8864218635418155189L;
private String username;
private String password;
private String hostKey = null;
@Override
public String toString()
{
return "LoginRequest [username=" + username
+ ", password=*********... | return password;
}
public void setPassword(String password)
{
this.password = password;
}
public String getHostKey()
{
return hostKey;
}
public void setHostKey(String hostKey)
{
this.hostKey = hostKey;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\LoginRequest.java | 1 |
请完成以下Java代码 | public Map<AttributeCode, String> getAttributesAsMap()
{
if (attributes == null || attributes.isEmpty())
{
return ImmutableMap.of();
}
final HashMap<AttributeCode, String> result = new HashMap<>();
for (final Attribute attribute : attributes)
{
result.put(attribute.getCode(), attribute.getValue());
... | //
//
//
//
//
@Value
@Builder
@Jacksonized
public static class Attribute
{
@NonNull AttributeCode code;
@Nullable String value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\rest_api\json\JsonCountRequest.java | 1 |
请完成以下Java代码 | public void setIsManual (boolean IsManual)
{
set_ValueNoCheck (COLUMNNAME_IsManual, Boolean.valueOf(IsManual));
}
/** Get Manuell.
@return This is a manual process
*/
@Override
public boolean isManual ()
{
Object oo = get_Value(COLUMNNAME_IsManual);
if (oo != null)
{
if (oo instanceof Boolean)... | }
/** Set Storno-Zeile.
@param ReversalLine_ID Storno-Zeile */
@Override
public void setReversalLine_ID (int ReversalLine_ID)
{
if (ReversalLine_ID < 1)
set_Value (COLUMNNAME_ReversalLine_ID, null);
else
set_Value (COLUMNNAME_ReversalLine_ID, Integer.valueOf(ReversalLine_ID));
}
/** Get Storno-Z... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AllocationLine.java | 1 |
请完成以下Java代码 | public static AttributeValueType ofCode(@NonNull final String code)
{
return index.ofCode(code);
}
public boolean isList() {return LIST.equals(this);}
public interface CaseMapper<T>
{
T string();
T number();
T date();
T list();
}
public <T> T map(@NonNull final CaseMapper<T> mapper)
{
switch (... | public interface CaseConsumer
{
void string();
void number();
void date();
void list();
}
public void apply(@NonNull final CaseConsumer consumer)
{
switch (this)
{
case STRING:
{
consumer.string();
break;
}
case NUMBER:
{
consumer.number();
break;
}
case DATE:
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\mm\attributes\AttributeValueType.java | 1 |
请完成以下Java代码 | public void setBillTo(final Boolean billTo)
{
this.billTo = billTo;
this.billToSet = true;
}
public void setBillToDefault(final Boolean billToDefault)
{
this.billToDefault = billToDefault;
this.billToDefaultSet = true;
}
public void setEphemeral(final Boolean ephemeral)
{
this.ephemeral = ephemeral;
... | {
this.visitorsAddress = visitorsAddress;
this.visitorsAddressSet = true;
}
public void setVisitorsAddressDefault(final Boolean visitorsAddressDefault)
{
this.visitorsAddressDefault = visitorsAddressDefault;
this.visitorsAddressDefaultSet = true;
}
public void setVatId(final String vatId)
{
this.vatI... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\JsonRequestLocation.java | 1 |
请完成以下Java代码 | public void output(PrintWriter out)
{
if (doctype != null)
{
doctype.output(out);
try
{
out.write('\n');
}
catch ( Exception e)
{}
}
// XhtmlDocument is just a convient wrapper for htm... | /**
Override the toString() method so that it prints something meaningful.
*/
public final String toString(String codeset)
{
StringBuffer sb = new StringBuffer();
if (doctype != null)
sb.append (doctype.toString(getCodeset()));
sb.append (html.toString(get... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\XhtmlDocument.java | 1 |
请完成以下Java代码 | public void setFavouriteLanguage(final List<String> favouriteLanguage) {
this.favouriteLanguage = favouriteLanguage;
}
public String getNotes() {
return notes;
}
public void setNotes(final String notes) {
this.notes = notes;
}
public List<String> getFruit() {
r... | public String getBook() {
return book;
}
public void setBook(final String book) {
this.book = book;
}
public MultipartFile getFile() {
return file;
}
public void setFile(final MultipartFile file) {
this.file = file;
}
} | repos\tutorials-master\spring-web-modules\spring-mvc-xml-2\src\main\java\com\baeldung\spring\taglibrary\Person.java | 1 |
请完成以下Java代码 | public int getPickFrom_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_PickFrom_HU_ID);
}
@Override
public void setPickFrom_Locator_ID (final int PickFrom_Locator_ID)
{
if (PickFrom_Locator_ID < 1)
set_Value (COLUMNNAME_PickFrom_Locator_ID, null);
else
set_Value (COLUMNNAME_PickFrom_Locator_ID, PickFrom... | {
set_Value (COLUMNNAME_RejectReason, RejectReason);
}
@Override
public java.lang.String getRejectReason()
{
return get_ValueAsString(COLUMNNAME_RejectReason);
}
/**
* Status AD_Reference_ID=541435
* Reference name: DD_OrderLine_Schedule_Status
*/
public static final int STATUS_AD_Reference_ID=5414... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_DD_Order_MoveSchedule.java | 1 |
请完成以下Java代码 | public String getUserId() {
if (user != null) {
return user.getId();
} else {
return null;
}
}
public String getGroupId() {
if (group != null) {
return group.getId();
} else {
return null;
}
} | public TenantEntity getTenant() {
return tenant;
}
public void setTenant(TenantEntity tenant) {
this.tenant = tenant;
}
@Override
public String toString() {
return "TenantMembershipEntity [id=" + id + ", tenant=" + tenant + ", user=" + user + ", group=" + group + "]";
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TenantMembershipEntity.java | 1 |
请完成以下Java代码 | public void setRequiredDecisionResults(Collection<DmnDecisionLogicEvaluationEvent> requiredDecisionResults) {
this.requiredDecisionResults = requiredDecisionResults;
}
@Override
public long getExecutedDecisionInstances() {
return executedDecisionInstances;
}
public void setExecutedDecisionInstances(... | this.executedDecisionElements = executedDecisionElements;
}
@Override
public String toString() {
DmnDecision dmnDecision = decisionResult.getDecision();
return "DmnDecisionEvaluationEventImpl{" +
" key="+ dmnDecision.getKey() +
", name="+ dmnDecision.getName() +
", decisionLogic=" + dmn... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\delegate\DmnDecisionEvaluationEventImpl.java | 1 |
请完成以下Java代码 | public MStatus[] getStatus(boolean reload)
{
if (m_status != null && !reload)
return m_status;
String sql = "SELECT * FROM R_Status "
+ "WHERE R_StatusCategory_ID=? "
+ "ORDER BY SeqNo";
ArrayList<MStatus> list = new ArrayList<MStatus>();
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepare... | */
public int getDefaultR_Status_ID()
{
if (m_status == null)
getStatus(false);
for (int i = 0; i < m_status.length; i++)
{
if (m_status[i].isDefault() && m_status[i].isActive())
return m_status[i].getR_Status_ID();
}
if (m_status.length > 0
&& m_status[0].isActive())
return m_status[0].ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MStatusCategory.java | 1 |
请完成以下Java代码 | public static String md5(String source) {
// 验证传入的字符串
if (StringUtils.isEmpty(source)) {
return "";
}
try {
MessageDigest md = MessageDigest.getInstance(MD5);
byte[] bytes = md.digest(source.getBytes("utf-8"));
return byteArrayToHexString(bytes);
} catch (Exception e) {
logger.error("字符串使用Md... | * @return 十六进制字符串
*/
private static String byteArrayToHexString(byte[] bytes) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < bytes.length; i++) {
sb.append(Integer.toHexString((bytes[i] & 0xFF) | 0x100).toUpperCase().substring(1, 3));
}
return sb.toString();
}
/**
* 测试方法
*
* @param... | repos\spring-boot-student-master\spring-boot-student-encode\src\main\java\com\xiaolyuh\utils\EncodeUtil.java | 1 |
请完成以下Java代码 | public static PickOnTheFlyQRCode fromScannedCodeOrNullIfNotHandled(@NonNull final ScannedCode scannedCode)
{
return fromStringOrNullIfNotHandled(scannedCode.getAsString());
}
@Nullable
public static PickOnTheFlyQRCode fromStringOrNullIfNotHandled(@NonNull final String string)
{
final String stringNorm = Strin... | @Override
@Deprecated
public String toString() {return getAsString();}
@JsonValue
public String getAsString() {return STRING_VALUE;}
@Override
public Optional<BigDecimal> getWeightInKg() {return Optional.empty();}
@Override
public Optional<LocalDate> getBestBeforeDate() {return Optional.empty();}
@Override... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\special\PickOnTheFlyQRCode.java | 1 |
请完成以下Java代码 | public SignalPayload getSignalPayload() {
return signalPayload;
}
public void setSignalPayload(SignalPayload signalPayload) {
this.signalPayload = signalPayload;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o ... | public int hashCode() {
return Objects.hash(
getElementId(),
signalPayload != null ? signalPayload.getId() : null,
signalPayload != null ? signalPayload.getName() : null
);
}
@Override
public String toString() {
return (
"BPMNActivityI... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\BPMNSignalImpl.java | 1 |
请完成以下Java代码 | private static void updateRecordFrom(
@NonNull final I_M_CostRevaluation_Detail record,
@NonNull final CostSegmentAndElement from)
{
record.setCostingLevel(from.getCostingLevel().getCode());
record.setC_AcctSchema_ID(from.getAcctSchemaId().getRepoId());
record.setM_CostType_ID(from.getCostTypeId().getRepoI... | }
public void deleteDetailsByLineId(@NonNull final CostRevaluationLineId lineId)
{
deleteDetailsByLineIds(ImmutableSet.of(lineId));
}
public void deleteDetailsByLineIds(@NonNull final Collection<CostRevaluationLineId> lineIds)
{
if (lineIds.isEmpty())
{
return;
}
queryBL.createQueryBuilder(I_M_Cost... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costrevaluation\CostRevaluationRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Duration getTimeInNano() {
return timeInNano;
}
public void setTimeInNano(Duration timeInNano) {
this.timeInNano = timeInNano;
}
public Duration getTimeInDays() {
return timeInDays;
}
public void setTimeInDays(Duration timeInDays) {
this.timeInDays = tim... | public DataSize getSizeInTB() {
return sizeInTB;
}
public void setSizeInTB(DataSize sizeInTB) {
this.sizeInTB = sizeInTB;
}
public Employee getEmployee() {
return employee;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-core\src\main\java\com\baeldung\configurationproperties\PropertyConversion.java | 2 |
请完成以下Java代码 | protected void createScopeStartEvent(BpmnParse bpmnParse, ActivityImpl startEventActivity, StartEvent startEvent) {
ScopeImpl scope = bpmnParse.getCurrentScope();
Object triggeredByEvent = scope.getProperty("triggeredByEvent");
boolean isTriggeredByEvent = triggeredByEvent != null && ((Boolean)... | } else { // "regular" subprocess
if (!startEvent.getEventDefinitions().isEmpty()) {
LOGGER.warn("event definitions only allowed on start event if subprocess is an event subprocess {}", bpmnParse.getCurrentSubProcess().getId());
}
if (scope.getProperty(PROPERTYNAME_IN... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\StartEventParseHandler.java | 1 |
请完成以下Java代码 | protected void paintComponent (Graphics g)
{
Graphics2D g2D = (Graphics2D)g;
// center icon
m_icon.paintIcon(this, g2D, s_size.width/2 - m_icon.getIconWidth()/2, 5);
// Paint Text
Color color = getForeground();
g2D.setPaint(color);
Font font = getFont();
//
AttributedString aString = new AttributedS... | TextLayout layout = measurer.nextLayout(width);
// center text
float xPos = (float)(s_size.width/2 - layout.getBounds().getWidth()/2);
float yPos = m_icon.getIconHeight() + 20;
//
layout.draw(g2D, xPos, yPos);
width = s_size.width - 4; // 2 pt
while (measurer.getPosition() < iter.getEndIndex())
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WFNodeComponent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class DataSourceJmxConfiguration {
private static final Log logger = LogFactory.getLog(DataSourceJmxConfiguration.class);
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(HikariDataSource.class)
@ConditionalOnSingleCandidate(DataSource.class)
static class Hikari {
private final DataSource dataSour... | @Nullable Object dataSourceMBean(DataSource dataSource) {
DataSourceProxy dataSourceProxy = DataSourceUnwrapper.unwrap(dataSource, PoolConfiguration.class,
DataSourceProxy.class);
if (dataSourceProxy != null) {
try {
return dataSourceProxy.createPool().getJmxPool();
}
catch (SQLException ex)... | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\autoconfigure\DataSourceJmxConfiguration.java | 2 |
请完成以下Java代码 | public int getStartOffset()
{
return m_view.getStartOffset();
}
/**
* Returns the ending offset into the model for this view.
*
* @return the ending offset
*/
public int getEndOffset()
{
return m_view.getEndOffset();
}
/**
* Gets the element that this view is mapped to.
*
* @return the view... | * @param width the width
* @param height the height
*/
public void setSize(float width, float height)
{
this.m_width = (int) width;
m_view.setSize(width, height);
}
/**
* Fetches the factory to be used for building the
* various view fragments that make up the view that
* represents the mode... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\HTMLRenderer.java | 1 |
请完成以下Java代码 | public boolean isReversed()
{
return this == Reversed;
}
public boolean isReversedOrVoided()
{
return this == Reversed
|| this == Voided;
}
public boolean isClosedReversedOrVoided()
{
return this == Closed
|| this == Reversed
|| this == Voided;
}
public boolean isCompleted()
{
return th... | return this == InProgress;
}
public boolean isInProgressCompletedOrClosed()
{
return this == InProgress
|| this == Completed
|| this == Closed;
}
public boolean isDraftedInProgressOrInvalid()
{
return this == Drafted
|| this == InProgress
|| this == Invalid;
}
@SuppressWarnings("BooleanMe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocStatus.java | 1 |
请完成以下Java代码 | public static Object valueToJsonObject(
@Nullable final Object value,
@NonNull final JSONOptions jsonOpts,
@NonNull final UnaryOperator<Object> fallbackMapper)
{
if (JSONNullValue.isNull(value))
{
return JSONNullValue.instance;
}
else if (value instanceof java.util.Date)
{
final Instant valueD... | {
return bigDecimalToJson((BigDecimal)value);
}
else if (value instanceof Quantity)
{
return bigDecimalToJson(((Quantity)value).toBigDecimal());
}
else if (value instanceof Money)
{
return bigDecimalToJson(((Money)value).toBigDecimal());
}
else if (value instanceof Amount)
{
return bigDeci... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\Values.java | 1 |
请完成以下Java代码 | public boolean lock() {
// 请求锁超时时间,纳秒
long timeout = timeOut * 1000000;
// 系统当前时间,纳秒
long nowTime = System.nanoTime();
while ((System.nanoTime() - nowTime) < timeout) {
// 分布式服务器有时差,这里给1秒的误差值
expires = System.currentTimeMillis() + expireTime * 1000 + 1 * ... | locked = true;
return true;
}
}
/*
延迟10 毫秒, 这里使用随机时间可能会好一点,可以防止饥饿进程的出现,即,当同时到达多个进程,
只会有一个进程获得锁,其他的都用同样的频率进行尝试,后面有来了一些进行,也以同样的频率申请锁,这将可能导致前面来的锁得不到满足.
使用随机的等待时间可以一定程度上保证公平性
*/
try {
... | repos\spring-boot-student-master\spring-boot-student-data-redis-distributed-lock\src\main\java\com\xiaolyuh\redis\lock\RedisLock2.java | 1 |
请完成以下Java代码 | public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/**
* Type AD_Reference_ID=540047
* Reference n... | @Override
public java.lang.String getType ()
{
return (java.lang.String)get_Value(COLUMNNAME_Type);
}
/** Set Search Key.
@param Value
Search key for the record in the format required - must be unique
*/
@Override
public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\letters\model\X_AD_BoilerPlate_Var.java | 1 |
请完成以下Java代码 | public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
public String getExecutionId() {
return executionId;
}
public void setExecutionId(String executionId) {
this.execut... | this.processDefinitionKey = processDefinitionKey;
}
public String getJobDefinitionId() {
return jobDefinitionId;
}
public void setJobDefinitionId(String jobDefinitionId) {
this.jobDefinitionId = jobDefinitionId;
}
public String getJobId() {
return jobId;
}
public void setJobId(String job... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\oplog\UserOperationLogContextEntry.java | 1 |
请完成以下Java代码 | public ResponseEntity<ErrorResponse> handle(ConstraintViolationException e) {
ErrorResponse errors = new ErrorResponse();
for (ConstraintViolation violation : e.getConstraintViolations()) {
ErrorItem error = new ErrorItem();
error.setCode(violation.getMessageTemplate());
... | }
public static class ErrorResponse {
private List<ErrorItem> errors = new ArrayList<>();
public List<ErrorItem> getErrors() {
return errors;
}
public void setErrors(List<ErrorItem> errors) {
this.errors = errors;
}
public void addError(Er... | repos\tutorials-master\spring-boot-modules\spring-boot-angular\src\main\java\com\baeldung\ecommerce\exception\ApiExceptionHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Cookie getCookie() {
return this.cookie;
}
}
}
/**
* Strategies for supporting forward headers.
*/
public enum ForwardHeadersStrategy {
/**
* Use the underlying container's native support for forwarded headers.
*/
NATIVE,
/**
* Use Spring's support for handling forwarded heade... | NONE
}
public static class Encoding {
/**
* Mapping of locale to charset for response encoding.
*/
private @Nullable Map<Locale, Charset> mapping;
public @Nullable Map<Locale, Charset> getMapping() {
return this.mapping;
}
public void setMapping(@Nullable Map<Locale, Charset> mapping) {
thi... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\ServerProperties.java | 2 |
请完成以下Java代码 | public String getParamName ()
{
return (String)get_Value(COLUMNNAME_ParamName);
}
/** Set Parameterwert.
@param ParamValue Parameterwert */
public void setParamValue (String ParamValue)
{
set_Value (COLUMNNAME_ParamValue, ParamValue);
}
/** Get Parameterwert.
@return Parameterwert */
public Strin... | Zur Bestimmung der Reihenfolge der Eintraege; die kleinste Zahl kommt zuerst
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Eintraege; die kleinste Zahl kommt zuerst
*/
public int getSeqNo ()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_Impex_ConnectorParam.java | 1 |
请完成以下Java代码 | public ArrayKeyBuilder append(final Object obj)
{
keyParts.add(obj);
return this;
}
public ArrayKeyBuilder appendAll(@NonNull final Collection<Object> objs)
{
keyParts.addAll(objs);
return this;
}
public ArrayKeyBuilder append(final String name, final Object obj)
{
keyParts.add(name);
keyParts.add(... | */
public ArrayKeyBuilder appendId(final int id)
{
keyParts.add(id <= 0 ? -1 : id);
return this;
}
public ArrayKeyBuilder appendModelId(final Object model)
{
final int modelId;
if (model == null)
{
modelId = -1;
}
else
{
modelId = InterfaceWrapperHelper.getId(model);
}
keyParts.add(mode... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\ArrayKeyBuilder.java | 1 |
请完成以下Java代码 | public List<String> getParameterTypes() {
return parameterTypes;
}
public void setParameterTypes(List<String> parameterTypes) {
this.parameterTypes = parameterTypes;
}
/**
* 必须重写equals和hashCode方法,否则放到set集合里没法去重
*
* @param o
* @return
*/
@Override
public... | if (o == null || getClass() != o.getClass()) {
return false;
}
CachedMethodInvocation that = (CachedMethodInvocation) o;
return key.equals(that.key);
}
@Override
public int hashCode() {
return key.hashCode();
}
} | repos\spring-boot-student-master\spring-boot-student-cache-redis\src\main\java\com\xiaolyuh\redis\cache\CachedMethodInvocation.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | set_Value (COLUMNNAME_Parent_ID, null);
else
set_Value (COLUMNNAME_Parent_ID, Integer.valueOf(Parent_ID));
}
/** Get Parent.
@return Parent of Entity
*/
public int getParent_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Parent_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_TreeNode.java | 1 |
请完成以下Java代码 | public class SingleSelectCapability extends ServiceCapability<List<DefaultMetadataElement>>
implements Defaultable<DefaultMetadataElement> {
private final List<DefaultMetadataElement> content = new ArrayList<>();
private final ReadWriteLock contentLock = new ReentrantReadWriteLock();
@JsonCreator
SingleSelectC... | (content) -> content.stream().filter((it) -> id.equals(it.getId())).findFirst().orElse(null));
}
@Override
public void merge(List<DefaultMetadataElement> otherContent) {
withWritableContent((content) -> otherContent.forEach((it) -> {
if (get(it.getId()) == null) {
this.content.add(it);
}
}));
}
pri... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\SingleSelectCapability.java | 1 |
请完成以下Java代码 | public ImmutableList<I_M_Package> createM_Packages(@NonNull final List<CreatePackagesRequest> packagesRequestList)
{
return packagesRequestList.stream().map(this::createM_Package).collect(ImmutableList.toImmutableList());
}
private I_M_Package createM_Package(@NonNull final CreatePackagesRequest createPackageRequ... | mPackage.setM_InOut_ID(inOut.getM_InOut_ID());
mPackage.setPOReference(inOut.getPOReference());
mPackage.setTrackingInfo(createPackageRequest.getTrackingCode());
mPackage.setPackageWeight(createPackageRequest.getWeightInKg());
mPackage.setTrackingURL(createPackageRequest.getTrackingURL());
final PackageDimens... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipping\InOutPackageRepository.java | 1 |
请完成以下Java代码 | public void setTitle(final String title)
{
if (link != null)
{
link.setText(title);
}
}
/**
*
* @return collapsible pane
*/
public JXCollapsiblePane getCollapsiblePane()
{
return collapsible;
}
public JComponent getContentPane()
{
return (JComponent)getCollapsiblePane().getContentPane();
}... | @Override
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height)
{
// if the collapsible is collapsed, we do not want its border to be painted.
if (c instanceof JXCollapsiblePane)
{
if (((JXCollapsiblePane)c).isCollapsed())
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CollapsiblePanel.java | 1 |
请完成以下Java代码 | public class EventConsumerInfo {
protected String eventSubscriptionId;
protected String subScopeId;
protected String scopeDefinitionId;
protected String scopeType;
protected boolean hasExistingInstancesForUniqueCorrelation;
public EventConsumerInfo() {}
public EventConsumerInfo(St... | public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
public boolean isHasExistingInstancesForUniqueCorrelation() {
return hasExistingInstancesForUniqueCorrelation;
}
public void setHasExistingInstancesForUniqueCorrelation(boolean hasExistingInstancesForUniqueCorrela... | repos\flowable-engine-main\modules\flowable-event-registry-api\src\main\java\org\flowable\eventregistry\api\EventConsumerInfo.java | 1 |
请完成以下Java代码 | public void setUserCache(UserCache userCache) {
this.userCache = userCache;
}
@Override
public boolean supports(Class<?> authentication) {
return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication));
}
protected UserDetailsChecker getPreAuthenticationChecks() {
return this.preAuthen... | throw new LockedException(AbstractUserDetailsAuthenticationProvider.this.messages
.getMessage("AbstractUserDetailsAuthenticationProvider.locked", "User account is locked"));
}
if (!user.isEnabled()) {
AbstractUserDetailsAuthenticationProvider.this.logger
.debug("Failed to authenticate since user acc... | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\dao\AbstractUserDetailsAuthenticationProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setResourceLocation(String resourceLocation) {
this.resourceLocation = resourceLocation;
}
/**
* Sets a Resource that is a Properties file in the format defined in
* {@link UserDetailsResourceFactoryBean}.
* @param resource the Resource to use
*/
public void setResource(Resource resource) {
... | * users
* @return the UserDetailsResourceFactoryBean
*/
public static UserDetailsResourceFactoryBean fromResource(Resource propertiesResource) {
UserDetailsResourceFactoryBean result = new UserDetailsResourceFactoryBean();
result.setResource(propertiesResource);
return result;
}
/**
* Creates a UserDeta... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\core\userdetails\UserDetailsResourceFactoryBean.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Job zappJob(JobBuilderFactory jobBuilderFactory, @Qualifier("zappStep1") Step s1) {
return jobBuilderFactory.get("zappJob")
.incrementer(new RunIdIncrementer())
.flow(s1)//为Job指定Step
.end()
.listener(new MyJobListener())//绑定监听器csvJobListener... | .skip(Exception.class)
.skipLimit(200) //一共允许跳过200次异常
// .taskExecutor(new SimpleAsyncTaskExecutor()) //设置每个Job通过并发方式执行,一般来讲一个Job就让它串行完成的好
// .throttleLimit(10) //并发任务数为 10,默认为4
.build();
}
@Bean
public Validator<App> csvBeanValid... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\zapp\AppConfig.java | 2 |
请完成以下Java代码 | public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNam... | /** 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 including this date (last day)
*/
public Timestamp getValidTo ()
{
return (Timestamp)get_Value(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Buyer.java | 1 |
请完成以下Java代码 | public String toString() {return getValue();}
@JsonValue
public String toJson() {return getValue();}
public boolean isAlberta() {return Alberta.equals(this);}
public boolean isRabbitMQ() {return RabbitMQ.equals(this);}
public boolean isWOO() {return WOO.equals(this);}
public boolean isGRSSignum() {return GRS... | public boolean isPrintClient() {return PrintClient.equals(this);}
public boolean isProCareManagement() {return ProCareManagement.equals(this);}
public boolean isShopware6() {return Shopware6.equals(this);}
public boolean isOther() {return Other.equals(this);}
public boolean isGithub() {return Github.equals(this... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\externalsystem\ExternalSystemType.java | 1 |
请完成以下Java代码 | public void mouseExited(MouseEvent e) {
}
/* (non-Javadoc)
* @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
*/
@Override
public void mousePressed(MouseEvent e) {
}
/* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
*/
@Override
publ... | }
@Override
public void run()
{
if( url == null )
{
// restore the original cursor
html.setCursor( cursor );
// PENDING(prinz) remove this hack when
// automatic validation is activated.
Container parent = html.getParent();
parent.repaint();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\apps\graph\HtmlDashboard.java | 1 |
请完成以下Java代码 | private void invoiceDone()
{
// Close Old
if (m_invoice != null)
{
if (m_linecount == 0)
m_invoice.delete(false);
else
{
m_invoice.processIt(MInvoice.ACTION_Prepare);
m_invoice.save();
addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo());
}
}
m_invoice = null;
} ... | */
private void invoiceLine (MRequest request)
{
MRequestUpdate[] updates = request.getUpdates(null);
for (int i = 0; i < updates.length; i++)
{
BigDecimal qty = updates[i].getQtyInvoiced();
if (qty == null || qty.signum() == 0)
continue;
// if (updates[i].getC_InvoiceLine_ID() > 0)
// continue;... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\RequestInvoice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getConnectionString() {
String connectionString = this.properties.getConnectionString();
Assert.state(connectionString != null, "'connectionString' must not be null");
return connectionString;
}
@Override
public @Nullable String getUsername() {
return this.properties.getUsername();
}
... | public @Nullable SslBundle getSslBundle() {
Ssl ssl = this.properties.getEnv().getSsl();
if (!ssl.getEnabled()) {
return null;
}
if (StringUtils.hasLength(ssl.getBundle())) {
Assert.notNull(this.sslBundles, "SSL bundle name has been set but no SSL bundles found in context");
return this.sslBundl... | repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseAutoConfiguration.java | 2 |
请完成以下Java代码 | public String toString() {
String status;
if (httpStatus.getHttpStatus() != null) {
status = String.valueOf(httpStatus.getHttpStatus().value());
}
else {
status = httpStatus.getStatus().toString();
}
return filterToStringCreator(RedirectToGatewayFilterFactory.this).append(status, uri)
... | public @Nullable String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public boolean isIncludeRequestParams() {
return includeRequestParams;
}
public void setIncludeRequestParams(boolean includeRequestParams) {
this.includeRequestParams = includeRequestParams;
... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RedirectToGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public class JmsChannelMessageListenerAdapter extends AbstractAdaptableMessageListener {
protected EventRegistry eventRegistry;
protected InboundChannelModel inboundChannelModel;
public JmsChannelMessageListenerAdapter(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) {
this.ev... | return eventRegistry;
}
public void setEventRegistry(EventRegistry eventRegistry) {
this.eventRegistry = eventRegistry;
}
public InboundChannelModel getInboundChannelModel() {
return inboundChannelModel;
}
public void setInboundChannelModel(InboundChannelModel inboundChannelMo... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\jms\JmsChannelMessageListenerAdapter.java | 1 |
请完成以下Java代码 | public class BranchData2 {
@XmlElement(name = "Id")
protected String id;
@XmlElement(name = "Nm")
protected String nm;
@XmlElement(name = "PstlAdr")
protected PostalAddress6 pstlAdr;
/**
* Gets the value of the id property.
*
* @return
* possible object is
* ... | /**
* Gets the value of the pstlAdr property.
*
* @return
* possible object is
* {@link PostalAddress6 }
*
*/
public PostalAddress6 getPstlAdr() {
return pstlAdr;
}
/**
* Sets the value of the pstlAdr property.
*
* @param value
*... | 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\BranchData2.java | 1 |
请完成以下Java代码 | public static String getMoneyIntoWords(final double money) {
long dollar = (long) money;
long cents = Math.round((money - dollar) * 100);
if (money == 0D) {
return "";
}
if (money < 0) {
return INVALID_INPUT_GIVEN;
}
String dollarPart = "";... | private static String convert(final long n) {
if (n < 0) {
return INVALID_INPUT_GIVEN;
}
if (n < 20) {
return ones[(int) n];
}
if (n < 100) {
return tens[(int) n / 10] + ((n % 10 != 0) ? " " : "") + ones[(int) n % 10];
}
if (n <... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\numberwordconverter\NumberWordConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfig extends AbstractHttpConfigurer<SecurityConfig, HttpSecurity> {
@Override
public void configure(HttpSecurity http) throws Exception {
AuthenticationManager authenticationManager = http.getSharedObject(AuthenticationManager.class);
http.addFilterBefore(authenticationFi... | .formLogin(httpSecurityFormLoginConfigurer -> httpSecurityFormLoginConfigurer.loginPage("/login").permitAll())
.logout(httpSecurityLogoutConfigurer -> httpSecurityLogoutConfigurer.logoutUrl("/logout").permitAll())
.with(securityConfig(), Customizer.withDefaults());
return http.getOrBuild... | repos\tutorials-master\spring-security-modules\spring-security-web-login-2\src\main\java\com\baeldung\loginextrafieldssimple\SecurityConfig.java | 2 |
请完成以下Java代码 | static Observer<Integer> getFirstObserver() {
return new Observer<Integer>() {
@Override
public void onNext(Integer value) {
subscriber1 += value;
System.out.println("Subscriber1: " + value);
}
@Override
public void on... | }
@Override
public void onError(Throwable e) {
System.out.println("error");
}
@Override
public void onCompleted() {
System.out.println("Subscriber2 completed");
}
};
}
public static void main(Strin... | repos\tutorials-master\rxjava-modules\rxjava-core\src\main\java\com\baeldung\rxjava\SubjectImpl.java | 1 |
请完成以下Java代码 | public class DocLine_Payroll extends DocLine<Doc_HRProcess>
{
/**
* Constructor
* @param line Payroll line
* @param doc header
*/
public DocLine_Payroll (MHRMovement line, Doc_HRProcess doc)
{
super (line, doc);
int C_BPartner_ID = line.getC_BPartner_ID();
I_C_BPartner bpartner = Services.get(IBPa... | return m_HR_Concept_ID;
}
public String getAccountSign(){
return m_AccountSign;
}
@Override
public BPartnerId getBPartnerId(){
return m_C_BPartner_ID;
}
@Override
public ActivityId getActivityId() {
return m_C_Activity_ID;
}
public BigDecimal getAmount() {
return m_Amount;
}
public int g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\compiere\acct\DocLine_Payroll.java | 1 |
请完成以下Java代码 | public DepartIdModel convertByUserDepart(SysDepart sysDepart) {
this.key = sysDepart.getId();
this.value = sysDepart.getId();
this.code = sysDepart.getOrgCode();
this.title = sysDepart.getDepartName();
return this;
}
public List<DepartIdModel> getChildren() {
re... | public void setValue(String value) {
this.value = value;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.co... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\model\DepartIdModel.java | 1 |
请完成以下Java代码 | public void setM_Shipment_Declaration_ID (int M_Shipment_Declaration_ID)
{
if (M_Shipment_Declaration_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Shipment_Declaration_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Shipment_Declaration_ID, Integer.valueOf(M_Shipment_Declaration_ID));
}
/** Get Abgabemeldung.
... | }
/** Set Process Now.
@param Processing Process Now */
@Override
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
@Override
public boolean isProcessing ()
{
Object oo = get_Value(COLUMN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipment_Declaration.java | 1 |
请完成以下Java代码 | public static void main(String[] args) {
/* Static text */
Logger.info("Hello World!");
/* Placeholders */
Logger.info("Hello {}!", "Alice");
Logger.info("π = {0.00}", Math.PI);
/* Lazy Logging */
Logger.debug("Expensive computation: {}", () -> compute()); //... | try {
int i = a / b;
} catch (Exception ex) {
Logger.error(ex, "Cannot divide {} by {}", a, b);
}
try {
int i = a / b;
} catch (Exception ex) {
Logger.error(ex);
}
}
private static int compute() {
return 42; // In ... | repos\tutorials-master\logging-modules\tinylog2\src\main\java\com\baeldung\tinylog\TinylogExamples.java | 1 |
请完成以下Java代码 | public JsonResponseLocation getJsonBPartnerLocationById(@Nullable final String orgCode, @NonNull final BPartnerLocationId bpartnerLocationId)
{
final ResponseEntity<JsonResponseLocation> location = bpartnerRestController.retrieveBPartnerLocation(
orgCode,
Integer.toString(bpartnerLocationId.getBpartnerId().g... | .setParameter("bpartnerContactIdentifier", bpartnerContactId.getRepoId()));
}
@NonNull
public JsonResponseBPartner getJsonBPartnerByExternalIdentifier(@Nullable final String orgCode, @NonNull final String externalIdentifier)
{
final ResponseEntity<JsonResponseComposite> bpartner = bpartnerRestController.retrieve... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\BPartnerEndpointAdapter.java | 1 |
请完成以下Java代码 | public long getCreatedTime() {
return super.getCreatedTime();
}
@Schema(description = "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", accessMode = Schema.AccessMode.READ_ONLY)
@Override
public TenantId getTenantId() {
return this.tenantId;
}
@... | @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "Edge type", example = "Silos")
public String getType() {
return this.type;
}
@Schema(description = "Label that may be used in widgets", example = "Silo Edge on far field")
public String getLabel() {
return this.label;
... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\edge\Edge.java | 1 |
请完成以下Java代码 | public Date getClaimTime() {
return null;
}
@Override
public String getClaimedBy() {
return null;
}
@Override
public Date getSuspendedTime() {
return null;
}
@Override | public String getSuspendedBy() {
return null;
}
@Override
public Date getInProgressStartDueDate() {
return null;
}
@Override
public void setInProgressStartDueDate(Date inProgressStartDueDate) {
// nothing
}
} | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntity.java | 1 |
请完成以下Java代码 | public class JakartaEjbProcessApplicationReference implements ProcessApplicationReference {
private static ProcessApplicationLogger LOG = ProcessEngineLogger.PROCESS_APPLICATION_LOGGER;
/** this is an EjbProxy and can be cached */
protected ProcessApplicationInterface selfReference;
/** the name of the proce... | public ProcessApplicationInterface getProcessApplication() throws ProcessApplicationUnavailableException {
try {
// check whether process application is still deployed
selfReference.getName();
} catch (EJBException e) {
throw LOG.processApplicationUnavailableException(processApplicationName, e... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\application\impl\JakartaEjbProcessApplicationReference.java | 1 |
请完成以下Java代码 | public class SecretKey
{
private static final SecureRandom random = new SecureRandom();
private final String string;
private SecretKey(@NonNull final String string)
{
this.string = string;
}
public static SecretKey random()
{
final byte[] bytes = new byte[20];
random.nextBytes(bytes);
return new Secr... | @Override
public String toString() {return getAsString();}
public String getAsString() {return string;}
public boolean isValid(@NonNull final OTP otp)
{
return TOTPUtils.validate(this, otp);
}
public String toHexString()
{
final byte[] bytes = BaseEncoding.base32().decode(string);
//return java.util.He... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\user_2fa\totp\SecretKey.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void storeFailed(
@NonNull final TimeRecord timeRecord, @NonNull final String errorMsg, @NonNull OrgId orgId)
{
final StringBuilder errorMessage = new StringBuilder(errorMsg);
String jsonValue = null;
try
{
jsonValue = objectMapper.writeValueAsString(timeRecord);
}
catch (final JsonProcessin... | IMPORT_TIME_BOOKINGS_LOG_MESSAGE_PREFIX, stopWatch);
}
private TimeRecord getTimeRecordFromFailed(@NonNull final FailedTimeBooking failedTimeBooking)
{
try
{
return objectMapper.readValue(failedTimeBooking.getJsonValue(), TimeRecord.class);
}
catch (final Exception e)
{
throw new AdempiereException(... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\everhour\EverhourImporterService.java | 2 |
请完成以下Java代码 | public BankStatementLineAmounts addDifferenceToTrxAmt()
{
if (differenceAmt.signum() == 0)
{
return this;
}
return toBuilder()
.trxAmt(this.trxAmt.add(differenceAmt))
.build();
}
public BankStatementLineAmounts withTrxAmt(@NonNull final BigDecimal trxAmt)
{
return !this.trxAmt.equals(trxAmt)
... | {
return this;
}
return toBuilder()
.bankFeeAmt(this.bankFeeAmt.subtract(differenceAmt))
.build();
}
public BankStatementLineAmounts withBankFeeAmt(@NonNull final BigDecimal bankFeeAmt)
{
return !this.bankFeeAmt.equals(bankFeeAmt)
? toBuilder().bankFeeAmt(bankFeeAmt).build()
: this;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\model\BankStatementLineAmounts.java | 1 |
请完成以下Java代码 | public void setPageURL (String PageURL)
{
set_Value (COLUMNNAME_PageURL, PageURL);
}
/** Get Page URL.
@return Page URL */
public String getPageURL ()
{
return (String)get_Value(COLUMNNAME_PageURL);
}
/** Set Counter Count.
@param W_CounterCount_ID
Web Counter Count Management
*/
public void ... | set_ValueNoCheck (COLUMNNAME_W_CounterCount_ID, null);
else
set_ValueNoCheck (COLUMNNAME_W_CounterCount_ID, Integer.valueOf(W_CounterCount_ID));
}
/** Get Counter Count.
@return Web Counter Count Management
*/
public int getW_CounterCount_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_W_CounterCo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_CounterCount.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ResponseEntity<?> updateOrder(@CurrentUser UserPrincipal userPrincipal, @RequestBody OrderResponse orderResponse)
{
return orderService.statusDelivered(userPrincipal, orderResponse);
}
@PostMapping("/order/repeatOrderRequest")
public ResponseEntity<?> repeatOrder(@CurrentUser UserPrincip... | List<Good> goodList = goodsRepository.findAllByInternalCodeAndIsOutdated(goodOrderDetailsResponse.getInternalCode(), false);
if(!goodList.isEmpty())
{
Good good = goodsRepository.findAllByInternalCodeAndIsOutdated(goodOrderDetailsResponse.getInternalCode(), false).get... | repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\controller\OrderController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private ITemplateResolver htmlTemplateResolver() {
SpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver();
resolver.setApplicationContext(applicationContext);
resolver.setPrefix("/WEB-INF/views/");
resolver.setCacheable(false);
resolver.setTemplateMode(Tem... | return localeChangeInterceptor;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**... | repos\tutorials-master\spring-web-modules\spring-thymeleaf\src\main\java\com\baeldung\thymeleaf\config\WebMVCConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void addComment(CommentResource comment) {
if (this.taskComments == null) {
this.taskComments = new ArrayList<>();
}
this.taskComments.add(comment);
}
/**
* @return the taskComments
*/
public List<CommentResource> getTaskComments() {
return taskComments;
}
/**
* @param taskComments
* ... | /*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "CommentCollectionResource [taskComments=" + taskComments + "]";
}
}
/**
* Inner class to perform the de-serialization of the comments array
*
* @author anilallewar
*
*/
class CommentsCollectionDe... | repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\model\CommentCollectionResource.java | 2 |
请完成以下Java代码 | public final class Password
{
@JsonCreator
public static Password ofNullableString(final String password)
{
return password != null ? new Password(password) : null;
}
public static Password cast(final Object value)
{
return (Password)value;
}
public static final String OBFUSCATE_STRING = "********";
pri... | @Override
public String toString()
{
return MoreObjects.toStringHelper(this)
.add("password", "********")
.toString();
}
@JsonValue
public String toJson()
{
return OBFUSCATE_STRING;
}
public String getAsString()
{
return password;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\Password.java | 1 |
请完成以下Java代码 | public void creatingInitialAdminUser(User adminUser) {
logDebug("010", "Creating initial Admin User: {}", adminUser);
}
public void skipAdminUserCreation(User existingUser) {
logDebug("011", "Skip creating initial Admin User, user does exist: {}", existingUser);
}
public void createInitialFilter(Filte... | logInfo("021", "Auto-Deploying resources: {}", resourceDescriptions);
}
public void enterLicenseKey(String licenseKeySource) {
logInfo("030", "Setting up license key: {}", licenseKeySource);
}
public void enterLicenseKeyFailed(URL licenseKeyFile, Exception e) {
logWarn("031", "Failed setting up licens... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\util\SpringBootProcessEngineLogger.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.